Announcement Announcement Module
Collapse
No announcement yet.
poller ref attribute for inner poller definitions Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • poller ref attribute for inner poller definitions

    from the xsd

    <xsd:element name="poller" type="basePollerType" /> ....
    ...
    <xsd:complexType name="basePollerType">
    ....
    <xsd:attribute name="ref" type="xsd:string" use="optional">
    - <xsd:annotation>
    <xsd:documentation>Allows this poller to reference another instance of a top-level poller. [IMPORTANT] - This attribute is only allowed on inner poller definitions. Defining this attribute on a top-level poller definition will result in a configuration exception.</xsd:documentation>
    </xsd:annotation>
    </xsd:attribute>
    Code:
    	<int:poller fixed-rate="10000" error-channel="errorChannel" id="somePoller">
    			<int:transactional transaction-manager="transactionManager" />
    	</int:poller>
    	
    	<int-jdbc:inbound-channel-adapter channel="tablePoller"  
    	query="select * from abc.rtable where service_status = 'start' and service = 'aService' and tracking_uuid is not null "
    	data-source="dataSource" update="update abc.rtable set service_status= 'aService', service='starting' where id in (:id)"  >
    		<int:poller ref="somePoller"/>
    	</int-jdbc:inbound-channel-adapter>
    Isnt this a reference from an inner poller definition to an outside one ?

    the above gives the configuration problem
    Configuration problem: A 'poller' element that provides a 'ref' must have no other attributes.
    Last edited by anshumania; Jul 1st, 2011, 12:36 PM. Reason: stack tracke

  • #2
    Are you sure you don't have another inner poller someplace? The code that generates that error is pretty straightforward...

    Code:
    if (pollerElement.hasAttribute("ref")) {
    	if (pollerElement.getAttributes().getLength() != 1) {
    		parserContext.getReaderContext().error(
    				"A 'poller' element that provides a 'ref' must have no other attributes.", pollerElement);
    	}
    ...

    Comment


    • #3
      no. even if i create just a new config file and just place the above code , sts complains with the following.

      A 'poller' element that provides a 'ref' must have no other attributes.
      Code:
      <int-jdbc:inbound-channel-adapter channel="tablePoller"  
      	query="select * from abc.rtable where service_status = 'start' and service = 'aService'"
       	data-source="dataSource">
      		<int:poller ref="somePoller"></int:poller>
      	</int-jdbc:inbound-channel-adapter>
      	<int:poller id="somePoller" fixed-rate="10000">
      			<int:transactional/>
      	</int:poller>
      
      </beans>

      Comment


      • #4
        Yup; this is a bug; please open a JIRA.

        It is caused by this schema element...

        Code:
        <xsd:attribute name="default" type="xsd:boolean" default="false" />
        Causes the attribute list to contain 'default=false' so when ref is there, the list length is 2 not 1.

        Comment


        • #5
          https://jira.springsource.org/browse/INT-1957

          thanks

          Comment

          Working...
          X