3 Replies Latest reply on Feb 16, 2010 10:43 AM by max5432

    JBoss ESB Beginner

      Hi

       

      Is there a forum for beginner?

       

      Thanks.

        • 1. Re: JBoss ESB Beginner

          I think, there is no an other forum for beginners ...

           

          Here is my question:

           

          Supposed, I want to send a simple message from a standalone Java Application running on System A to JBossESB running on System B and I use JMS Gateway. The only ESB has to do is to show this message (like quickstarts_helloworld example). I'm not sure if I understand correctly how this works!

           

          Here ist the extract from jboss-esb.xml:

           

          <providers>
            <jms-provider connection-factory="ConnectionFactory" name="JBoss Message Queue">
             <jms-bus busid="JMS_GW_Channel">
              <jms-message-filter dest-name="queue/unawareRequestQueue_Gateway" dest-type="QUEUE"/>
             </jms-bus>
            </jms-provider>
           </providers>
           <services>
            <service category="First Service ESB" description="Hello World" invmScope="GLOBAL" name="Simple Listener">
             <listeners>
              <jms-listener busidref="JMS_GW_Channel" is-gateway="true" name="JMS Gateway Listener"/>
             </listeners>
             <actions mep="OneWay">
              <action class="esb.helloworld.MyJMSListenerAction"
               name="User Action" process="showMessage"/>
             </actions>
            </service>
           </services>
          

           

          In "Getting Started with JBoss ESB" on page 11 there is a picture: if I understand correctly, I should define two listeners: the first one to listen for "ESB Unaware Messages"  and second one to listen for "ESB Aware Messages". In my case I didn't define neither the ESB-Queue nor the ESB-Listener. But, I have to define

           

          invmScope="GLOBAL"


          I don't understand how the message is processing in ESB.

           

          After message was received, the "JMS Gateway Listener" get this message from "unawareRequestQueue_Gateway" and process the message (it means call the method 'showMessage'). My question: it works only if invmScope="GLOBAL"? Otherwise I have to define a listener for "ESB Aware Messages" and a queue for "ESB Aware Messages":

           

          <providers>
            <jms-provider connection-factory="ConnectionFactory" name="JBoss Message Queue">
             <jms-bus busid="JMS_GW_Channel">
              <jms-message-filter dest-name="queue/unawareRequestQueue_Gateway" dest-type="QUEUE"/>
             </jms-bus>
             <jms-bus busid="JMS_ESB_Channel">
                 <jms-message-filter dest-name="queue/awareRequestQueue_Esb" dest-type="QUEUE"/>
             </jms-bus>
            </jms-provider>
           </providers>
           <services>
            <service category="First Service ESB" description="Hello World" name="Simple Listener">
             <listeners>
              <jms-listener busidref="JMS_GW_Channel" is-gateway="true" name="JMS Gateway Listener"/>
              <jms-listener busidref="JMS_ESB_Channel" name="JMS ESB Listener"/>
             </listeners>
             
             <actions mep="OneWay">
              <action class="esb.helloworld.MyJMSListenerAction"
               name="User Action" process="showMessage"/>
             </actions>
            </service>
           </services>

           

          The "invmScope="GLOBAL" allows communication between components & services running on the same JVM. If the first case (no "JMS ESB Listener") the "JMS Gateway Listener" communicats with witch component / service? With ActionClass esb.helloworld.MyJMSListenerAction and method showMessage?

           

          Could somebody describe processing of messages with and without listeners for "ESB Aware Messages"?

           

          An other question is the ServiceInvoker! Should I on the client side use ServiceInvoker or do this without explicit using SrviceInvoker (such in quickstarts_helloworld)? And, in witch case I sould use ServiceInvoker?

           

          Thanks.

          • 2. Re: JBoss ESB Beginner
            h.wolffenbuttel

            Hi,

             

            As far as I know you always need to define your queues and listeners. The INVM and GLOBAL parameter are there for other reasons. INVM is mainly used if you are not working with persisted messages. It works with in mem queues. GLOBAL means you can have multiple JBosses running on different VMs but still have the ServiceInvoker round robin on duplicate deployed services. This also depends on your UDDI settings.

             

            There is however one exception on the rule, and that is to deploy your ESB service (action) as a webservice. In that case you would not need to define a gateway, only a provider which is listening on the bus.

             

            In short: GateWays put messages on the bus and ESBawareproviders (in combination with their listeners) pull them of the bus.

             

            If you would need to put messages on the bus with application A, you will need a jbossesb-properties.xml file for the configuration of your ServiceInvoker.

             

            Anyone please correct me if i'm wrong.

             

            Regards,

             

            Hans

            • 3. Re: JBoss ESB Beginner
              Thanks.