6 Replies Latest reply on May 31, 2005 6:30 AM by schrouf

    Message Driven Beans of one server not receiving the message

    vidyao

      Hi All,

      We have three jboss-3.2.1_tomcat-4.1.24. servers each in different machines bo1,bo2 and bo3 with Win2000 OS.
      Two mdbs of each server listen to a single queue present in bo1.All the messages are posted to a queue in server bo1.
      But when there are messages present in queue (messages more than the number of total mdbs(2+2+2)),the mdbs of bo2 and bo3 server
      start receiving the messages where as the mdbs in bo1 are not receiving the messages .The messages which are not received
      remains in the queue without being picked up by the mdbs of bo1.


      Can anybody tell why the mdbs in bo1 are not receiving the messages from the queue.
      Is there anything more i need to specify in the configuration files.

      Thanks,
      Vidya

        • 1. Re: Message Driven Beans of one server not receiving the mes
          jaikiran

          Can you please post your config files:

          jms-ds.xml
          jboss.xml
          jbossmq-destinations-service.xml


          • 2. Re: Message Driven Beans of one server not receiving the mes
            vidyao

            Hi ,

            
            
            The Congiguration xmls for bo1
            
            ejb-jar.xml
            ***********
            <message-driven>
             <display-name>FabRequestHandlerBean
            </display-name>
             <ejb-name>FabRequestHandlerBean</ejb-name>
             <ejb-class>com.dnb.goe.fab.mdb_fabrequesthandler.FabRequestHandlerBean</ejb-class>
             <destination-type>javax.jms.Queue</destination-type>
             <transaction-type>Container</transaction-type>
            </message-driven>
            
            jboss.xml
            *********
            <message-driven>
             <ejb-name>FabRequestHandlerBean</ejb-name>
             <configuration-name>FabRequestHandlerBean</configuration-name>
             <message-driven-destination>javax.jms.Queue</message-driven-destination>
             <destination-jndi-name>queue/FabricationQueue</destination-jndi-name>
            </message-driven>
            
            
            <container-configuration>
             <container-name>FabRequestHandlerBean</container-name>
             <call-logging>false</call-logging>
             <container-invoker>org.jboss.ejb.plugins.jms.JMSContainerInvoker</container-invoker>
             <container-interceptors>
             <interceptor>org.jboss.ejb.plugins.LogInterceptor</interceptor>
             <interceptor>org.jboss.ejb.plugins.SecurityInterceptor</interceptor>
             <!-- CMT -->
             <interceptor transaction="Container">org.jboss.ejb.plugins.TxInterceptorCMT</interceptor>
             <interceptor transaction="Container" metricsEnabled="true">org.jboss.ejb.plugins.MetricsInterceptor</interceptor>
             <interceptor transaction="Container">org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor</interceptor>
             <!-- BMT -->
             <interceptor transaction="Bean">org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor</interceptor>
             <interceptor transaction="Bean">org.jboss.ejb.plugins.MessageDrivenTxInterceptorBMT</interceptor>
             <interceptor transaction="Bean" metricsEnabled="true">org.jboss.ejb.plugins.MetricsInterceptor</interceptor>
             </container-interceptors>
            
             <instance-pool>org.jboss.ejb.plugins.MessageDrivenInstancePool</instance-pool>
             <instance-cache />
             <persistence-manager />
             <transaction-manager>org.jboss.tm.TxManager</transaction-manager>
             <container-invoker-conf>
             <JMSProviderAdapterJNDI>DefaultJMSProvider
            </JMSProviderAdapterJNDI>
             <ServerSessionPoolFactoryJNDI>StdJMSPool
            </ServerSessionPoolFactoryJNDI>
             <MaximumSize>2</MaximumSize>
             <MaxMessages>1</MaxMessages>
             <Optimized>True</Optimized>
             </container-invoker-conf>
             <container-cache-conf />
             <container-pool-conf>
             <MaximumSize>100</MaximumSize>
             <MinimumSize>10</MinimumSize>
             </container-pool-conf>
             <commit-option>B</commit-option>
             <role-mapping-manager/>
             <authentication-module/>
             </container-configuration>
            
            Standardjboss.xml
            ********************
             <invoker-proxy-binding>
             <name>message-driven-bean</name>
             <invoker-mbean>default</invoker-mbean>
             <proxy-factory>org.jboss.ejb.plugins.jms.JMSContainerInvoker</proxy-factory>
             <proxy-factory-config>
             <JMSProviderAdapterJNDI>DefaultJMSProvider</JMSProviderAdapterJNDI>
             <ServerSessionPoolFactoryJNDI>StdJMSPool</ServerSessionPoolFactoryJNDI>
             <MaximumSize>15</MaximumSize>
             <MaxMessages>1</MaxMessages>
             <MDBConfig>
             <ReconnectIntervalSec>10</ReconnectIntervalSec>
             <DLQConfig>
             <DestinationQueue>queue/DLQ</DestinationQueue>
             <MaxTimesRedelivered>10</MaxTimesRedelivered>
             <TimeToLive>0</TimeToLive>
             </DLQConfig>
             </MDBConfig>
             </proxy-factory-config>
             </invoker-proxy-binding>
            
            jmx-ds.xml
            **********
            <!-- The JMS provider loader -->
             <mbean code="org.jboss.jms.jndi.JMSProviderLoader"
             name="jboss.mq:service=JMSProviderLoader,name=JBossMQProvider">
             <attribute name="ProviderName">DefaultJMSProvider</attribute>
             <attribute name="ProviderAdapterClass">
             org.jboss.jms.jndi.JBossMQProvider
             </attribute>
             <attribute name="QueueFactoryRef">java:/XAConnectionFactory</attribute>
             <attribute name="TopicFactoryRef">java:/XAConnectionFactory</attribute>
             </mbean>
            
             <!-- The server session pool for Message Driven Beans -->
             <mbean code="org.jboss.jms.asf.ServerSessionPoolLoader"
             name="jboss.mq:service=ServerSessionPoolMBean,name=StdJMSPool">
             <depends optional-attribute-name="XidFactory">jboss:service=XidFactory</depends>
             <attribute name="PoolName">StdJMSPool</attribute>
             <attribute name="PoolFactoryClass">
             org.jboss.jms.asf.StdServerSessionPoolFactory
             </attribute>
             </mbean>
            
            The other servers bo1 and bo2 have the Congiguration xmls for bo1 as
            
            ejb-jar.xml
            ***********
            
            <message-driven>
             <display-name>FabRequestHandlerBean</display-name>
             <ejb-name>FabRequestHandlerBean</ejb-name>
             <ejb-class>com.dnb.goe.fab.mdb_fabrequesthandler.FabRequestHandlerBean</ejb-class>
             <destination-type>javax.jms.Queue</destination-type>
             <transaction-type>Container</transaction-type>
             </message-driven>
            
            
            jboss.xml
            ********
            <message-driven>
             <ejb-name>FabRequestHandlerBean</ejb-name>
             <configuration-name>FabRequestHandlerBean</configuration-name>
             <message-driven-destination>javax.jms.Queue</message-driven-destination>
             <destination-jndi-name>queue/FabricationQueue</destination-jndi-name>
             </message-driven>
             <container-configuration>
             <container-name>FabRequestHandlerBean</container-name>
             <call-logging>false</call-logging>
             <container-invoker>org.jboss.ejb.plugins.jms.JMSContainerInvoker</container-invoker>
             <container-interceptors>
             <interceptor>org.jboss.ejb.plugins.LogInterceptor</interceptor>
             <interceptor>org.jboss.ejb.plugins.SecurityInterceptor</interceptor>
             <!-- CMT -->
             <interceptor transaction="Container">org.jboss.ejb.plugins.TxInterceptorCMT</interceptor>
             <interceptor transaction="Container" metricsEnabled="true">org.jboss.ejb.plugins.MetricsInterceptor</interceptor>
             <interceptor transaction="Container">org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor</interceptor>
             <!-- BMT -->
             <interceptor transaction="Bean">org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor</interceptor>
             <interceptor transaction="Bean">org.jboss.ejb.plugins.MessageDrivenTxInterceptorBMT</interceptor>
             <interceptor transaction="Bean" metricsEnabled="true">org.jboss.ejb.plugins.MetricsInterceptor</interceptor>
             </container-interceptors>
             <instance-pool>org.jboss.ejb.plugins.MessageDrivenInstancePool</instance-pool>
             <instance-cache />
             <persistence-manager />
             <transaction-manager>org.jboss.tm.TxManager</transaction-manager>
             <container-invoker-conf>
             <JMSProviderAdapterJNDI>DefaultJMSProvider</JMSProviderAdapterJNDI>
             <ServerSessionPoolFactoryJNDI>StdJMSPool</ServerSessionPoolFactoryJNDI>
             <MaximumSize>2</MaximumSize>
             <MaxMessages>1</MaxMessages>
             <Optimized>True</Optimized>
             </container-invoker-conf>
             <container-cache-conf />
             <container-pool-conf>
             <MaximumSize>2</MaximumSize>
             <MinimumSize>1</MinimumSize>
             <strictMaximumSize>true</strictMaximumSize>
             </container-pool-conf>
             <commit-option>B</commit-option>
             <role-mapping-manager/>
             <authentication-module/>
             </container-configuration>
            
            
            Standardjboss.xml
            *****************
            
            
             <invoker-proxy-binding>
             <name>message-driven-bean</name>
             <invoker-mbean>default</invoker-mbean>
             <proxy-factory>org.jboss.ejb.plugins.jms.JMSContainerInvoker</proxy-factory>
             <proxy-factory-config>
             <!--JMSProviderAdapterJNDI>DefaultJMSProvider</JMSProviderAdapterJNDI-->
             <JMSProviderAdapterJNDI>RemoteJMSProvider</JMSProviderAdapterJNDI>
             <ServerSessionPoolFactoryJNDI>StdJMSPool</ServerSessionPoolFactoryJNDI>
             <MaximumSize>4</MaximumSize>
             <MaxMessages>1</MaxMessages>
             <MDBConfig>
             <ReconnectIntervalSec>10</ReconnectIntervalSec>
             <DLQConfig>
             <DestinationQueue>queue/DLQ</DestinationQueue>
             <MaxTimesRedelivered>10</MaxTimesRedelivered>
             <TimeToLive>0</TimeToLive>
             </DLQConfig>
             </MDBConfig>
             </proxy-factory-config>
             </invoker-proxy-binding>
            
            
            jmx-ds.xml
            **********
            <mbean code="org.jboss.jms.jndi.JMSProviderLoader" name="jboss.mq:service=JMSProviderLoader,name=RemoteJMSProvider">
             <attribute name="ProviderName">RemoteJMSProvider</attribute>
             <attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JBossMQProvider</attribute>
             <attribute name="ProviderUrl">bo1:1099</attribute>
             <attribute name="QueueFactoryRef">XAConnectionFactory</attribute>
             <attribute name="TopicFactoryRef">XAConnectionFactory</attribute>
             </mbean>
             <!-- The server session pool for Message Driven Beans -->
             <mbean code="org.jboss.jms.asf.ServerSessionPoolLoader" name="jboss.mq:service=ServerSessionPoolMBean,name=StdJMSPool">
             <depends optional-attribute-name="XidFactory">
            jboss:service=XidFactory</depends>
             <attribute name="PoolName">
            StdJMSPool</attribute>
             <attribute name="PoolFactoryClass">
             org.jboss.jms.asf.StdServerSessionPoolFactory
             </attribute>
             </mbean>
            
            All the servers bo1,bo2,bo3 have same jbossmq-destinations-service.xml entry as
            
            
            <mbean code="org.jboss.mq.server.jmx.Queue" name="jboss.mq.destination:service=Queue,name=FabricationQueue">
             <depends optional-attribute-name="DestinationManager">
            jboss.mq:service=DestinationManager
            </depends>
             </mbean>
            


            Thanks
            Vidya

            • 3. Re: Message Driven Beans of one server not receiving the mes
              vidyao

              Hi ,

              PLease consider these configuration xmls for the servers.These are the correct ones

              
              
              The Configuration xmls for bo1
              
              ejb-jar.xml
              ***********
              <message-driven>
               <display-name>FabRequestHandlerBean</display-name>
               <ejb-name>FabRequestHandlerBean</ejb-name>
               <ejb-class>com.dnb.goe.fab.mdb_fabrequesthandler.FabRequestHandlerBean</ejb-class>
               <destination-type>javax.jms.Queue</destination-type>
               <transaction-type>Container</transaction-type>
              </message-driven>
              
              jboss.xml
              *********
              <message-driven>
               <ejb-name>FabRequestHandlerBean</ejb-name>
               <configuration-name>FabRequestHandlerBean</configuration-name>
               <message-driven-destination>javax.jms.Queue</message-driven-destination>
               <destination-jndi-name>queue/FabricationQueue</destination-jndi-name>
              </message-driven>
              
              
              <container-configuration>
               <container-name>FabRequestHandlerBean</container-name>
               <call-logging>false</call-logging>
               <container-invoker>org.jboss.ejb.plugins.jms.JMSContainerInvoker</container-invoker>
               <container-interceptors>
               <interceptor>org.jboss.ejb.plugins.LogInterceptor</interceptor>
               <interceptor>org.jboss.ejb.plugins.SecurityInterceptor</interceptor>
               <!-- CMT -->
               <interceptor transaction="Container">org.jboss.ejb.plugins.TxInterceptorCMT</interceptor>
               <interceptor transaction="Container" metricsEnabled="true">org.jboss.ejb.plugins.MetricsInterceptor</interceptor>
               <interceptor transaction="Container">org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor</interceptor>
               <!-- BMT -->
               <interceptor transaction="Bean">org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor</interceptor>
               <interceptor transaction="Bean">org.jboss.ejb.plugins.MessageDrivenTxInterceptorBMT</interceptor>
               <interceptor transaction="Bean" metricsEnabled="true">org.jboss.ejb.plugins.MetricsInterceptor</interceptor>
               </container-interceptors>
              
               <instance-pool>org.jboss.ejb.plugins.MessageDrivenInstancePool</instance-pool>
               <instance-cache />
               <persistence-manager />
               <transaction-manager>org.jboss.tm.TxManager</transaction-manager>
               <container-invoker-conf>
               <JMSProviderAdapterJNDI>DefaultJMSProvider</JMSProviderAdapterJNDI>
               <ServerSessionPoolFactoryJNDI>StdJMSPool</ServerSessionPoolFactoryJNDI>
               <MaximumSize>2</MaximumSize>
               <MaxMessages>1</MaxMessages>
               <Optimized>True</Optimized>
               </container-invoker-conf>
               <container-cache-conf />
               <container-pool-conf>
               <MaximumSize>100</MaximumSize>
               <MinimumSize>10</MinimumSize>
               </container-pool-conf>
               <commit-option>B</commit-option>
               <role-mapping-manager/>
               <authentication-module/>
               </container-configuration>
              
              Standardjboss.xml
              ********************
               <invoker-proxy-binding>
               <name>message-driven-bean</name>
               <invoker-mbean>default</invoker-mbean>
               <proxy-factory>org.jboss.ejb.plugins.jms.JMSContainerInvoker</proxy-factory>
               <proxy-factory-config>
               <JMSProviderAdapterJNDI>DefaultJMSProvider</JMSProviderAdapterJNDI>
               <ServerSessionPoolFactoryJNDI>StdJMSPool</ServerSessionPoolFactoryJNDI>
               <MaximumSize>15</MaximumSize>
               <MaxMessages>1</MaxMessages>
               <MDBConfig>
               <ReconnectIntervalSec>10</ReconnectIntervalSec>
               <DLQConfig>
               <DestinationQueue>queue/DLQ</DestinationQueue>
               <MaxTimesRedelivered>10</MaxTimesRedelivered>
               <TimeToLive>0</TimeToLive>
               </DLQConfig>
               </MDBConfig>
               </proxy-factory-config>
               </invoker-proxy-binding>
              
              jmx-ds.xml
              **********
              <!-- The JMS provider loader -->
               <mbean code="org.jboss.jms.jndi.JMSProviderLoader"
               name="jboss.mq:service=JMSProviderLoader,name=JBossMQProvider">
               <attribute name="ProviderName">DefaultJMSProvider</attribute>
               <attribute name="ProviderAdapterClass">
               org.jboss.jms.jndi.JBossMQProvider
               </attribute>
               <attribute name="QueueFactoryRef">java:/XAConnectionFactory</attribute>
               <attribute name="TopicFactoryRef">java:/XAConnectionFactory</attribute>
               </mbean>
              
               <!-- The server session pool for Message Driven Beans -->
               <mbean code="org.jboss.jms.asf.ServerSessionPoolLoader"
               name="jboss.mq:service=ServerSessionPoolMBean,name=StdJMSPool">
               <depends optional-attribute-name="XidFactory">jboss:service=XidFactory</depends>
               <attribute name="PoolName">StdJMSPool</attribute>
               <attribute name="PoolFactoryClass">
               org.jboss.jms.asf.StdServerSessionPoolFactory
               </attribute>
               </mbean>
              
              The other servers bo2 and bo3 have the Congiguration xmls as
              
              ejb-jar.xml
              ***********
              
              <message-driven>
               <display-name>FabRequestHandlerBean</display-name>
               <ejb-name>FabRequestHandlerBean</ejb-name>
               <ejb-class>com.dnb.goe.fab.mdb_fabrequesthandler.FabRequestHandlerBean</ejb-class>
               <destination-type>javax.jms.Queue</destination-type>
               <transaction-type>Container</transaction-type>
               </message-driven>
              
              
              jboss.xml
              ********
              <message-driven>
               <ejb-name>FabRequestHandlerBean</ejb-name>
               <configuration-name>FabRequestHandlerBean</configuration-name>
               <message-driven-destination>javax.jms.Queue</message-driven-destination>
               <destination-jndi-name>queue/FabricationQueue</destination-jndi-name>
               </message-driven>
               <container-configuration>
               <container-name>FabRequestHandlerBean</container-name>
               <call-logging>false</call-logging>
               <container-invoker>org.jboss.ejb.plugins.jms.JMSContainerInvoker</container-invoker>
               <container-interceptors>
               <interceptor>org.jboss.ejb.plugins.LogInterceptor</interceptor>
               <interceptor>org.jboss.ejb.plugins.SecurityInterceptor</interceptor>
               <!-- CMT -->
               <interceptor transaction="Container">org.jboss.ejb.plugins.TxInterceptorCMT</interceptor>
               <interceptor transaction="Container" metricsEnabled="true">org.jboss.ejb.plugins.MetricsInterceptor</interceptor>
               <interceptor transaction="Container">org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor</interceptor>
               <!-- BMT -->
               <interceptor transaction="Bean">org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor</interceptor>
               <interceptor transaction="Bean">org.jboss.ejb.plugins.MessageDrivenTxInterceptorBMT</interceptor>
               <interceptor transaction="Bean" metricsEnabled="true">org.jboss.ejb.plugins.MetricsInterceptor</interceptor>
               </container-interceptors>
               <instance-pool>org.jboss.ejb.plugins.MessageDrivenInstancePool</instance-pool>
               <instance-cache />
               <persistence-manager />
               <transaction-manager>org.jboss.tm.TxManager</transaction-manager>
               <container-invoker-conf>
               <JMSProviderAdapterJNDI>DefaultJMSProvider</JMSProviderAdapterJNDI>
               <ServerSessionPoolFactoryJNDI>StdJMSPool</ServerSessionPoolFactoryJNDI>
               <MaximumSize>2</MaximumSize>
               <MaxMessages>1</MaxMessages>
               <Optimized>True</Optimized>
               </container-invoker-conf>
               <container-cache-conf />
               <container-pool-conf>
               <MaximumSize>2</MaximumSize>
               <MinimumSize>1</MinimumSize>
               <strictMaximumSize>true</strictMaximumSize>
               </container-pool-conf>
               <commit-option>B</commit-option>
               <role-mapping-manager/>
               <authentication-module/>
               </container-configuration>
              
              
              Standardjboss.xml
              *****************
              
              
               <invoker-proxy-binding>
               <name>message-driven-bean</name>
               <invoker-mbean>default</invoker-mbean>
               <proxy-factory>org.jboss.ejb.plugins.jms.JMSContainerInvoker</proxy-factory>
               <proxy-factory-config>
               <!--JMSProviderAdapterJNDI>DefaultJMSProvider</JMSProviderAdapterJNDI-->
               <JMSProviderAdapterJNDI>RemoteJMSProvider</JMSProviderAdapterJNDI>
               <ServerSessionPoolFactoryJNDI>StdJMSPool</ServerSessionPoolFactoryJNDI>
               <MaximumSize>4</MaximumSize>
               <MaxMessages>1</MaxMessages>
               <MDBConfig>
               <ReconnectIntervalSec>10</ReconnectIntervalSec>
               <DLQConfig>
               <DestinationQueue>queue/DLQ</DestinationQueue>
               <MaxTimesRedelivered>10</MaxTimesRedelivered>
               <TimeToLive>0</TimeToLive>
               </DLQConfig>
               </MDBConfig>
               </proxy-factory-config>
               </invoker-proxy-binding>
              
              
              jmx-ds.xml
              **********
              <mbean code="org.jboss.jms.jndi.JMSProviderLoader" name="jboss.mq:service=JMSProviderLoader,name=RemoteJMSProvider">
               <attribute name="ProviderName">RemoteJMSProvider</attribute>
               <attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JBossMQProvider</attribute>
               <attribute name="ProviderUrl">bo1:1099</attribute>
               <attribute name="QueueFactoryRef">XAConnectionFactory</attribute>
               <attribute name="TopicFactoryRef">XAConnectionFactory</attribute>
               </mbean>
               <!-- The server session pool for Message Driven Beans -->
               <mbean code="org.jboss.jms.asf.ServerSessionPoolLoader" name="jboss.mq:service=ServerSessionPoolMBean,name=StdJMSPool">
               <depends optional-attribute-name="XidFactory">jboss:service=XidFactory</depends>
               <attribute name="PoolName">StdJMSPool</attribute>
               <attribute name="PoolFactoryClass">
               org.jboss.jms.asf.StdServerSessionPoolFactory
               </attribute>
               </mbean>
              
              All the servers bo1,bo2,bo3 have same jbossmq-destinations-service.xml entry as
              
              
              <mbean code="org.jboss.mq.server.jmx.Queue"
               name="jboss.mq.destination:service=Queue,name=FabricationQueue">
               <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
               </mbean>
              


              Thanks in advance
              Vidya

              • 4. Re: Message Driven Beans of one server not receiving the mes
                jaikiran

                Hi,
                If i am getting it right, this is what you are trying to do:
                - You are maintaining a queue, say 'FabricationQueue' at bo1
                - All 3 clients from bo1, bo2 and bo3 write to 'FabricationQueue'
                - There are MDBs on bo1, bo2 and bo3 listening to 'FabricationQueue'

                If this is the case then, i had tried out a similar example and which worked. Here's what i did:

                You will have to change your jboss.xml as follows:

                jboss.xml:

                <message-driven>
                 <ejb-name>FabRequestHandlerBean</ejb-name>
                 <configuration-name>FabRequestHandlerBean</configuration-name>
                 <message-driven-destination>javax.jms.Queue</message-driven-destination>
                 <destination-jndi-name>queue/FabricationQueue</destination-jndi-name>
                 <invoker-bindings>
                 <invoker>
                 <invoker-proxy-binding-name>MyMDBInvoker</invoker-proxy-binding-name>
                 </invoker>
                 </invoker-bindings>
                </message-driven>
                
                
                <invoker-proxy-bindings>
                 <invoker-proxy-binding>
                 <name>MyMDBInvoker</name>
                 <invoker-mbean>doesntMatter</invoker-mbean>
                 <proxy-factory>org.jboss.ejb.plugins.jms.JMSContainerInvoker</proxy-factory>
                 <proxy-factory-config>
                 <JMSProviderAdapterJNDI>MyJMSProvider</JMSProviderAdapterJNDI>
                 <ServerSessionPoolFactoryJNDI>StdJMSPool</ServerSessionPoolFactoryJNDI>
                 <MinimumSize>1</MinimumSize>
                 <KeepAliveMillis>30000</KeepAliveMillis>
                 <MaximumSize>15</MaximumSize>
                 <MaxMessages>1</MaxMessages>
                 <MDBConfig>
                 <ReconnectIntervalSec>10</ReconnectIntervalSec>
                 <DLQConfig>
                 <DestinationQueue>queue/DLQ</DestinationQueue>
                 <MaxTimesRedelivered>10</MaxTimesRedelivered>
                 <TimeToLive>0</TimeToLive>
                 </DLQConfig>
                 </MDBConfig>
                 </proxy-factory-config>
                 </invoker-proxy-binding>
                 </invoker-proxy-bindings>


                Add the following entry to jms-ds.xml

                jms-ds.xml:


                <!--Adding my own JMS provider. This will be used to setup a 'destination'(queue/topic) on a remote m/c-->
                 <mbean code="org.jboss.jms.jndi.JMSProviderLoader"
                 name="jboss.mq:service=JMSProviderLoader,name=RemoteMQProvider,server=bo1">
                 <!--this name will be used in jboss.xml-->
                 <attribute name="ProviderName">MyJMSProvider</attribute>
                 <!--Points to Swati's server-->
                 <attribute name="ProviderUrl">jnp://bo1:1099</attribute>
                 <attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JBossMQProvider</attribute>
                 <attribute name="QueueFactoryRef">UIL2XAConnectionFactory</attribute>
                 <attribute name="TopicFactoryRef">UIL2XAConnectionFactory</attribute>
                 </mbean>


                The above proceedure will setup a remote queue on which the MDBs will be listening.

                Now the next step is to create the 'FabricationQueue'. You had stated that you are creating the queue on ALL the m/cs. I think going by what you are trying to achieve, you just have to add the following entry into the
                jbossmq-destinations-service.xml file of bo1 :

                <mbean code="org.jboss.mq.server.jmx.Queue"
                 name="jboss.mq.destination:service=Queue,name=FabricationQueue">
                 <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
                 </mbean>


                However, if you need to create the queue on all 3 m/cs then place the above entry in jbossmq-destinations-service.xml file of all 3 m/cs.

                But, make sure that while writing to the queue, you are always looking up the remote queue(on which the MDBs are listening). This can be done by having your InitialContext as follows:



                Hashtable env = new Hashtable();
                 env.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
                 env.put("java.naming.provider.url", "bo1");
                 Context ctx = new InitialContext(env);
                
                ctx.lookup("queue/FabricationQueue");


                See, if this works

                -Jaikiran









                • 5. Re: Message Driven Beans of one server not receiving the mes
                  vidyao

                  Hi,

                  Thanks for replying but my problem here is when the mdbs in BO2 and BO3 were able to take the messages from the remote queue available in BO1,why the mdbs in BO1 were not able to take the messages from the local queue even if the messages are pending in the queue?

                  And i also wanted to know what is the MBean attribute ReceiversCount mean in jmx-console for jboss.mq.destination domain? For my case is it the number of JBoss which looks into the queue or the number of mdbs looking into the queue?

                  Plz reply

                  Thanks
                  Vidya

                  • 6. Re: Message Driven Beans of one server not receiving the mes
                    schrouf

                    It is the number of JMS receivers connected to your queue or topic. These might be MDB's or standalone JMS clients

                    Regards
                    Ulf