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

        • 1. Re: Two services in same category
          Kurt Stam Master

          Yes I'm sorry. This issue is listed under the "known issues" and is caused by the fact that classifications are not yet implemented by scout. It's on my TODO list, for the time being please use unique names for the category and service name.

          --Kurt

          • 2. Re: Two services in same category
            Kent Peterson Newbie

            Hi,

            we are using the ESB 4.2.1 GA CP1 and gets a lot of ERROR messages according to below:

            2009-05-12 09:23:54,510 ERROR [main] [org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl] Found 2 Services, while expecting only one by the name of <aServiceName> in category <aServiceCategory>



            Is the known issue mentioned earlier in this thread is fixed in the version we are using or could our errors originate from the same problem?

            Thanks in advance

            • 3. Re: Two services in same category
              Kevin Conner Master

              You would need to provide us with more information I'm afraid, but there is a known issue with clustered registries and duplicates.

              https://jira.jboss.org/jira/browse/JBESB-2444

              Is there a reason you are still on 4.2.1CP1? There have been many changes to that branch and to trunk since that release.

              Kev

              • 4. Re: Two services in same category
                Mike Finn Apprentice

                Reviving this thread. We are on SOA-P 5.0.0 and having a similar issue. All our services now have unique category names, but still getting: "Found X Services, while expecting only one by the name of XXX in category ZZZ" when deploying to more than one node in a cluster.

                 

                It seems like the net effect of this issue is that we are unable to do any clustering of ESB services. Is that a fair assessment? If so, is there a known workaround? The jira is linked to SOA-2119 which looks to target SOA 5.1.0, if I am reading it right. Just trying to figure out our options, as we are targeted to be live in a few weeks.

                 

                TIA,

                Mike

                • 5. Re: Two services in same category
                  Tom Cunningham Master

                  Mike, can you give a brief description of your cluster situation?      Also, have you tried dropping the jUDDI tables and having them recreate?       If you have done so, do you run into this situation frequently?

                  • 6. Re: Two services in same category
                    Mike Finn Apprentice

                    Hi Tom,

                    5 node SOA-P 5.0 cluster on RHEL. Oracle DB on the backend for messaging, juddi, etc.

                     

                    With the workaround I posted to the 'JUDDI in cluster issue' thread ( http://community.jboss.org/thread/154140 ), this seems to have resolved itself. I am not sure why, but it must be related per your suggestion to drop/create the uddi tables.

                     

                    Now able to farm ESB services (plus clustered queues/CFs) and achieve clustering of services.

                     

                    Thanks,

                    Mike