6 Replies Latest reply on Aug 31, 2010 11:02 AM by Mike Finn

    Two services in same category

    Joakim Sandstroem Newbie

      Hello,

      I'we defined one category 'CustomerServiceCategory', which contains two services 'AddressService' and 'CustomerService'. But JBoss ESB seems to map both services to the same service name:

      [java] 21:21:26,734 DEBUG [main][RegistryUtil] Registering < CustomerService, EPR: PortReference < jms://queue > >
      [java] 21:21:26,781 DEBUG [main][JAXRRegistryImpl] Going to query the registry for name pattern [CustomerServiceCategory, CustomerService]
      [java] 21:21:27,250 DEBUG [main][JAXRRegistryImpl] Service name: CustomerServiceCategory:CustomerService
      [java] 21:21:27,250 DEBUG [main][JAXRRegistryImpl] Description: null
      [java] 21:21:27,250 DEBUG [main][JAXRRegistryImpl] Key id: F7F21750-B2BE-11DB-A608-CE39037A20C5
      [java] 21:21:27,390 DEBUG [main][JAXRRegistryImpl] javax.xml.registry.infomodel.ServiceBinding successfully saved
      [java] 21:21:27,390 DEBUG [main][JAXRRegistryImpl] Saved Key=B6E28DF0-CB4E-11DB-8DF0-E3F4F394A30C
      [java] 21:21:27,390 DEBUG [main][RegistryFactory] Going to load org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl
      [java] 21:21:27,390 DEBUG [main][Factory] Using the Context ClassLoader
      [java] 21:21:27,390 DEBUG [main][RegistryUtil] Registering < AddressService, EPR: PortReference < jms://queue > >
      [java] 21:21:27,406 DEBUG [main][JAXRRegistryImpl] Going to query the registry for name pattern [CustomerServiceCategory, AddressService]
      [java] 21:21:27,421 DEBUG [main][JAXRRegistryImpl] Service name: CustomerServiceCategory:CustomerService
      [java] 21:21:27,421 DEBUG [main][JAXRRegistryImpl] Description: null
      [java] 21:21:27,421 DEBUG [main][JAXRRegistryImpl] Key id: F7F21750-B2BE-11DB-A608-CE39037A20C5
      [java] 21:21:27,421 ERROR [main][JAXRRegistryImpl] Found 2 Services, while expecting only one by the name of AddressService in category CustomerServiceCategory
      [java] 21:21:27,468 DEBUG [main][JAXRRegistryImpl] javax.xml.registry.infomodel.ServiceBinding successfully saved
      [java] 21:21:27,468 DEBUG [main][JAXRRegistryImpl] Saved Key=B6F0BEC0-CB4E-11DB-BEC0-F5E9B7102464
      [java] 21:21:27,468 INFO [main][StandAloneBootStrapper] Listeners Ready
      [java] 21:21:27,468 DEBUG [Thread-1][MessageAwareListener] doRun() method of MessageAwareListener started on thread Thread-1
      [java] 21:21:27,468 INFO [Thread-3][ConfigurationController] Configuration Controller instance started.
      [java] 21:21:27,484 DEBUG [Thread-2][MessageAwareListener] doRun() method of MessageAwareListener started on thread Thread-2
      [java] 21:21:42,312 DEBUG [pool-2-thread-1][AddressAction] query is Customer: id=1234, name=null null
      [java] 21:21:42,312 DEBUG [pool-2-thread-1][AddressAction] returning [Address: id=null, customer=null]


      Although I'm selecting the correct service in the jms-bus:


      <jms-provider name="JBossMQ"
      connection-factory="ConnectionFactory"
      jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
      jndi-URL="localhost">
      <jms-bus busid="CustomerBus">
      <jms-message-filter dest-type="QUEUE"
      dest-name="queue/C" selector="service='CustomerService'" />
      </jms-bus>
      <jms-bus busid="AddressBus">
      <jms-message-filter dest-type="QUEUE"
      dest-name="queue/C" selector="service='AddressService'" />
      </jms-bus>
      </jms-provider>


      So when I'm calling the CustomerService my call gets routed to the AddressService..




      <jms-listener name="JMS-ESBListener"
      busidref="CustomerBus" maxThreads="10" />





      <jms-listener name="JMS-ESBListener"
      busidref="AddressBus" maxThreads="10" />




      / Joakim