5 Replies Latest reply on Mar 13, 2008 2:48 PM by Daniel Bevenius

    Service Registry and service tag in jboss-esb.xml

    Luiz Antonio Falaguasta Barbosa Novice

      Hi people,

      When I deploy a .esb package with configuration about services (for sure) in the jboss-esb.xml file, may I do something by handling the Service Registry or the attributes name and category of service tag are set in the Service Registry like magic?

      Thanks in advance!

      Regards,

      Luiz

        • 1. Re: Service Registry and service tag in jboss-esb.xml
          Daniel Bevenius Master

          Hi Luiz,

          you don't have to do anything with the registry manually if that is what you are asking. This is handled internally when an .esb archive is deployed. Take a look at JAXRRegistryImpl and the registerEPR method for the details.

          Was that what you were asking or did I misunderstand you question?

          Regards,

          Daniel

          • 2. Re: Service Registry and service tag in jboss-esb.xml
            Luiz Antonio Falaguasta Barbosa Novice

            Hi Daniel,

            Yes, that's right. But I asked about Registry because I would like to know how to configure the endpoint for that cases I asked in another topic (Configuration for jms-jca-provider).

            In other words, I would like to know about the configuration for clients find, through the JBossESB, where are the following kind of services:
            - POJO
            - WS
            - EJB

            It seems that I need to put information into the jboss-properties.xml file to describe how clients can find these kind of services I related above. Is it right?

            Thanks in advance!

            Regards,

            Luiz

            • 3. Re: Service Registry and service tag in jboss-esb.xml
              Daniel Bevenius Master

               

              It seems that I need to put information into the jboss-properties.xml file to describe how clients can find these kind of services I related above. Is it right?

              No, that kind on information should go in the provider element or in the configuration of the action itself.
              Take a look at some of the quickstart like, webservice_producer and webservice_consumer to get a feel for how this is done.

              Regards,

              Daniel

              • 4. Re: Service Registry and service tag in jboss-esb.xml
                Luiz Antonio Falaguasta Barbosa Novice

                Hi Daniel,

                Thanks for your answer!

                So, what we have in webservice_producer are three providers, as we can see in the follow:


                <jms-provider name="JBossMQ" connection-factory="ConnectionFactory"
                jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
                jndi-URL="localhost">

                <jms-bus busid="quickstartGwChannel">
                <jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_webservice_producer_gw"/>
                </jms-bus>
                <jms-bus busid="quickstartEsbChannel">
                <jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_webservice_producer_esb"/>
                </jms-bus>
                </jms-provider>

                <jbr-provider name="JBR-Http" protocol="http" host="localhost">
                <jbr-bus busid="Http-1" port="8765" />
                </jbr-provider>

                <jbr-provider name="JBR-Socket" protocol="socket" host="localhost">
                <jbr-bus busid="Socket-1" port="8888" />
                </jbr-provider>



                So, JBossMQ is a provider that offer the service through JMS, JBR-Http is a provider that offer the service in a Web Service way and JBR-Socket, a provider that offer the service as a POJO, opening a SOCKET to provide it. Isn't it?

                Ok, we have the configuration for the client access ESB as it would be accessing the real service. But, how can I put, into the .esb package, the informations to the JBossESB access the real service?

                Please, note, that I am suposing that this real service is running in a different machine of that where JBossESB is running and JBossESB only forwards the message.

                Thanks in advance!

                Regards,

                Luiz

                • 5. Re: Service Registry and service tag in jboss-esb.xml
                  Daniel Bevenius Master

                  Hi Luiz,

                  ok, so if your ESB service need to call a remote web service for example, it could use the SOAPClient:

                  <action name="soapui-client-action"
                   class="org.jboss.soa.esb.actions.soap.SOAPClient">
                   <property name="wsdl"
                   value="http://127.0.0.1:8080/Quickstart_webservice_consumer1/HelloWorldWS?wsdl" />
                   <property name="responseAsOgnlMap" value="true" />
                   <property name="SOAPAction" value="sayHello"/>
                  </action>
                  

                  Or if you need to call an EJB you could use a JMSRouter to put a JMS Message of a queue or topic that a MDB listens to:
                  <action name="routeToReplyQueue" class="org.jboss.soa.esb.actions.routing.JMSRouter">
                   <property name="jndi-context-factory" value="org.jnp.interfaces.NamingContextFactory"/>
                   <property name="jndi-URL" value="127.0.0.1:1099"/>
                   <property name="jndi-pkg-prefix" value="org.jboss.naming:org.jnp.interfaces"/>
                   <property name="connection-factory" value="ConnectionFactory"/>
                   <property name="jndiName" value="queue/quickstart_jms_router_routeTo"/>
                   <property name="unwrap" value="true"/>
                  </action>
                  


                  So you can write custom actions to call types of application components in other systems.

                  Regards,

                  Daniel