11 Replies Latest reply on Oct 6, 2003 12:00 PM by karumady

    Listening Two JBOSSs topic from Another

    karumady Newbie

      hai friends


      I want to listen topics on two differrent JBOSSs using
      an MDB of the thrd JBOSS. Earlier I was able to listen to
      the topics of a JBOSS.
      For that I ve created a JMS provider loader for the remote machine in
      my jms-service.xml and given the name in the standardjboss.xml like
      RemoteJMSProvider

      Now I want to listen topics on two JBOSSs

      do I need to create another provider adapter ??.
      If so where should I write my second JMSProviderAdapterJNDI??
      (in jboss.xml ??, First is in the standardjboss.xml)
      show me the right path

      hoping for help

        • 1. Re: Listening Two JBOSSs topic from Another
          Stephane Nicoll Master

          Process the same way you defined the first JBoss. What is your problem?

          You can have something like RemoteJMSProvider2 right?

          I will put this in jboss.xml

          Regards,

          Stephane

          • 2. Re: Listening Two JBOSSs topic from Another
            karumady Newbie

            My question is that,
            can I 've two JMSProviderAdapterJNDIs for the same MDB in its container configurations ??
            When I am giving like that in the jboss.xml it takes the second one only

            here is my jboss.xml
            ======================================

            <enterprise-beans>
            <message-driven>
            <ejb-name>OrderSubscriberBean</ejb-name>
            <configuration-name>Standard Message Driven Bean</configuration-name>
            <destination-jndi-name>topic/myTopic</destination-jndi-name>
            </message-driven>
            </enterprise-beans>
            <resource-managers />
            <container-configurations>
            <container-configuration>
            <container-name>Standard Message Driven Bean</container-name>
            <call-logging>false</call-logging>
            <container-invoker>org.jboss.ejb.plugins.jms.JMSContainerInvoker</container-invoker>
            <container-interceptors>
            org.jboss.ejb.plugins.LogInterceptor
            org.jboss.ejb.plugins.RunAsSecurityInterceptor
            <!-- CMT -->

            org.jboss.ejb.plugins.TxInterceptorCMT
            org.jboss.ejb.plugins.MetricsInterceptor
            org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor
            <!-- BMT -->

            org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor
            org.jboss.ejb.plugins.MessageDrivenTxInterceptorBMT
            org.jboss.ejb.plugins.MetricsInterceptor org.jboss.resource.connectionmanager.CachedConnectionInterceptor
            </container-interceptors>
            <client-interceptors>

            org.jboss.proxy.ejb.HomeInterceptor
            org.jboss.proxy.SecurityInterceptor
            org.jboss.proxy.TransactionInterceptor
            org.jboss.invocation.InvokerInterceptor


            new org.jboss.proxy.ejb.StatelessSessionInterceptor
            org.jboss.proxy.SecurityInterceptor
            org.jboss.proxy.TransactionInterceptor
            org.jboss.invocation.InvokerInterceptor

            </client-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>
            RemoteJMSProvider
            StdJMSPool
            15
            1

            10

            queue/DLQ
            10
            0


            </container-invoker-conf>
            <container-pool-conf>
            100
            </container-pool-conf>
            </container-configuration>
            </container-configurations>

            ======================================

            here I want to add another JMSProviderAdapterJNDI

            The aim is, I want the same MDB to listen the topics in two JBOSS servers. I configured JMS provider loader for each JBOSSs.
            If there is any better way to solve the problem, kindly inform me..

            Expecting a quick reply

            N.B : It works fine with a single JBOSS server

            • 3. Re: Listening Two JBOSSs topic from Another
              Adrian Brock Master

              It should in principal be possible to deploy
              two invoker-proxy-bindings in jboss-3.2

              This will create two JMS container invokers for the same MDB
              container.

              Not tried it myself.

              > Expecting a quick reply

              If you want a guaranteed reply buy a support contract.
              These forums are entirely voluntary.

              Regards,
              Adrian

              • 4. Re: Listening Two JBOSSs topic from Another
                karumady Newbie


                hai

                I tried the same in jboss-3.2

                here is my new jboss.xml

                ================================


                <enterprise-beans>
                <message-driven>
                <ejb-name>LisOrderSubscriberBean</ejb-name>
                <configuration-name>Standard Message Driven Bean</configuration-name>
                <destination-jndi-name>topic/lisTopic</destination-jndi-name>
                </message-driven>
                </enterprise-beans>
                <resource-managers/>
                <invoker-proxy-bindings>
                <invoker-proxy-binding>
                message-driven-bean
                <invoker-mbean>Standard Message Driven Bean</invoker-mbean>
                <proxy-factory>org.jboss.ejb.plugins.jms.JMSContainerInvoker</proxy-factory>
                <proxy-factory-config>
                RemoteJMSProvider1
                StdJMSPool
                15
                1
                True

                10

                queue/DLQ
                10
                0


                </proxy-factory-config>
                </invoker-proxy-binding>
                <invoker-proxy-binding>
                message-driven-bean
                <invoker-mbean>Standard Message Driven Bean</invoker-mbean>
                <proxy-factory>org.jboss.ejb.plugins.jms.JMSContainerInvoker</proxy-factory>
                <proxy-factory-config>
                RemoteJMSProvider2
                StdJMSPool
                15
                1
                True

                10

                queue/DLQ
                10
                0


                </proxy-factory-config>
                </invoker-proxy-binding>
                </invoker-proxy-bindings>
                <container-configurations>
                <container-configuration>
                <container-name>Standard Message Driven Bean</container-name>
                <call-logging>false</call-logging>
                <container-interceptors>
                org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor
                org.jboss.ejb.plugins.LogInterceptor
                org.jboss.ejb.plugins.RunAsSecurityInterceptor
                <!-- CMT -->
                org.jboss.ejb.plugins.TxInterceptorCMT
                org.jboss.ejb.plugins.MetricsInterceptor
                org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor
                <!-- BMT -->
                org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor
                org.jboss.ejb.plugins.MessageDrivenTxInterceptorBMT
                org.jboss.ejb.plugins.MetricsInterceptor
                org.jboss.resource.connectionmanager.CachedConnectionInterceptor
                </container-interceptors>
                <instance-pool>org.jboss.ejb.plugins.MessageDrivenInstancePool</instance-pool>
                <instance-cache></instance-cache>
                <persistence-manager></persistence-manager>
                <transaction-manager>org.jboss.tm.TxManager</transaction-manager>
                <container-pool-conf>
                100
                </container-pool-conf>
                </container-configuration>
                </container-configurations>



                =====================================


                here also the above problem exists.
                I f any further change in the configuration .
                pls inform me...

                thanks in advance







                • 5. Re: Listening Two JBOSSs topic from Another
                  Adrian Brock Master

                  First your container configuration is old,
                  look at conf/standjboss.xml
                  Not sure why you need to change it anyway?

                  Second give your bindings different names.

                  <invoker-proxy-bindings>
                  <invoker-proxy-binding>
                  message-driven-bean-1
                  <invoker-mbean>Standard Message Driven Bean</invoker-mbean>
                  <proxy-factory>org.jboss.ejb.plugins.jms.JMSContainerInvoker</proxy-factory>
                  <proxy-factory-config>
                  RemoteJMSProvider1
                  StdJMSPool
                  15
                  1
                  True

                  10

                  queue/DLQ
                  10
                  0


                  </proxy-factory-config>
                  </invoker-proxy-binding>
                  <invoker-proxy-binding>
                  message-driven-bean-2
                  <invoker-mbean>Standard Message Driven Bean</invoker-mbean>
                  <proxy-factory>org.jboss.ejb.plugins.jms.JMSContainerInvoker</proxy-factory>
                  <proxy-factory-config>
                  RemoteJMSProvider2
                  StdJMSPool
                  15
                  1
                  True

                  10

                  queue/DLQ
                  10
                  0


                  </proxy-factory-config>
                  </invoker-proxy-binding>
                  </invoker-proxy-bindings>

                  Third reference the bindings on the mdb:

                  <message-driven>

                  <ejb-name>test/Main</ejb-name>

                  <destination-jndi-name>queue/testQueue</destination-jndi-name>

                  <invoker-bindings>

                  <invoker-proxy-binding-name>message-driven-bean-1</invoker-proxy-binding-name>


                  <invoker-proxy-binding-name>message-driven-bean-2</invoker-proxy-binding-name>

                  </invoker-bindings>
                  </message-driven>


                  Regards,
                  Adrian

                  • 6. Re: Listening Two JBOSSs topic from Another
                    karumady Newbie

                    Thank u ,
                    Now both the providers are getting
                    But on the way there comes another problem,

                    the error is .........

                    INFO [org.jboss.ejb.plugins.jms.DLQHandler] Destroyed
                    DEBUG [org.jboss.ejb.plugins.jms.JMSContainerInvoker] DEBUG [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Looking up provider adapter: java:/RemoteJMSProvider2
                    DEBUG [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Provider adapter: org.jboss.jms.jndi.JBossMQProvider@8b1f8f
                    INFO [org.jboss.ejb.plugins.jms.DLQHandler] Creating
                    DEBUG [org.jboss.jms.jndi.JBossMQProvider] connecting to remote JNDI with props: {java.naming.provider.url=192.168.110.87:1099, java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.rmi.security.manager=yes, java.naming.factory.url.pkgs=org.jboss.naming}
                    DEBUG [org.jboss.jms.jndi.JBossMQProvider] created context: javax.naming.InitialContext@541b02
                    ERROR [org.jboss.ejb.plugins.jms.DLQHandler] Initialization failed
                    javax.jms.JMSException: Error creating the dlq connection: null
                    at org.jboss.ejb.plugins.jms.DLQHandler.createService(DLQHandler.java:152)
                    at org.jboss.system.ServiceMBeanSupport.create(ServiceMBeanSupport.java:158)
                    at org.jboss.ejb.plugins.jms.JMSContainerInvoker.innerCreate(JMSContainerInvoker.java:394)
                    at org.jboss.ejb.plugins.jms.JMSContainerInvoker.startService(JMSContainerInvoker.java:553)


                    The error was not there earlier

                    ...Expecting a soln.

                    • 7. Re: Listening Two JBOSSs topic from Another
                      Adrian Brock Master

                      Post the full stacktrace!
                      Post the config for RemoteJMSProvider2
                      I cannot help you in the dark.

                      Does the connection factory and queue exist on
                      192.168.110.87

                      > ...Expecting a soln
                      But a support contract then, your expections of these voluntary
                      forums is completely wrong. Stop being so pushy or I will stop
                      helping you.

                      Regards,
                      Adrian

                      • 8. Re: Listening Two JBOSSs topic from Another
                        karumady Newbie

                        The complete log is

                        ======================================
                        2003-10-03 11:43:08,281 DEBUG [org.jboss.ejb.MessageDrivenContainer] End java:comp/env for EJB: LisOrderSubscriberBean
                        2003-10-03 11:43:08,281 DEBUG [org.jboss.ejb.plugins.local.BaseLocalProxyFactory] LisOrderSubscriberBean cannot be Bound, doesn't have local and local home interfaces
                        2003-10-03 11:43:08,281 INFO [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Starting
                        2003-10-03 11:43:08,281 DEBUG [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Initializing
                        2003-10-03 11:43:08,281 DEBUG [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Looking up provider adapter: java:/RemoteJMSProvider2
                        2003-10-03 11:43:08,281 DEBUG [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Provider adapter: org.jboss.jms.jndi.JBossMQProvider@8b1f8f
                        2003-10-03 11:43:08,281 INFO [org.jboss.ejb.plugins.jms.DLQHandler] Creating
                        2003-10-03 11:43:08,281 DEBUG [org.jboss.jms.jndi.JBossMQProvider] connecting to remote JNDI with props: {java.naming.provider.url=192.168.110.87:1099, java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.rmi.security.manager=yes, java.naming.factory.url.pkgs=org.jboss.naming}
                        2003-10-03 11:43:08,281 DEBUG [org.jboss.jms.jndi.JBossMQProvider] created context: javax.naming.InitialContext@842d9a
                        2003-10-03 11:43:08,453 ERROR [org.jboss.ejb.plugins.jms.DLQHandler] Initialization failed
                        javax.jms.JMSException: Error creating the dlq connection: null
                        at org.jboss.ejb.plugins.jms.DLQHandler.createService(DLQHandler.java:152)
                        at org.jboss.system.ServiceMBeanSupport.create(ServiceMBeanSupport.java:158)
                        at org.jboss.ejb.plugins.jms.JMSContainerInvoker.innerCreate(JMSContainerInvoker.java:394)
                        at org.jboss.ejb.plugins.jms.JMSContainerInvoker.startService(JMSContainerInvoker.java:553)
                        at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
                        at org.jboss.ejb.MessageDrivenContainer.startService(MessageDrivenContainer.java:220)
                        at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
                        at sun.reflect.GeneratedMethodAccessor41.invoke(Unknown Source)
                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                        at java.lang.reflect.Method.invoke(Method.java:324)
                        at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
                        at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:966)
                        at $Proxy11.start(Unknown Source)
                        at org.jboss.system.ServiceController.start(ServiceController.java:392)
                        at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                        at java.lang.reflect.Method.invoke(Method.java:324)
                        at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
                        at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                        at $Proxy32.start(Unknown Source)
                        at org.jboss.ejb.EjbModule.startService(EjbModule.java:347)
                        at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
                        at sun.reflect.GeneratedMethodAccessor41.invoke(Unknown Source)
                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                        at java.lang.reflect.Method.invoke(Method.java:324)
                        at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
                        at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:966)
                        at $Proxy11.start(Unknown Source)
                        at org.jboss.system.ServiceController.start(ServiceController.java:392)
                        at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                        at java.lang.reflect.Method.invoke(Method.java:324)
                        at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
                        at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                        at $Proxy19.start(Unknown Source)
                        at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:541)
                        at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
                        at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:640)
                        at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:613)
                        at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                        at java.lang.reflect.Method.invoke(Method.java:324)
                        at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
                        at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                        at $Proxy7.deploy(Unknown Source)
                        at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:280)
                        at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:421)
                        at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:200)
                        at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:273)
                        at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
                        at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                        at java.lang.reflect.Method.invoke(Method.java:324)
                        at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
                        at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:966)
                        at $Proxy0.start(Unknown Source)
                        at org.jboss.system.ServiceController.start(ServiceController.java:392)
                        at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                        at java.lang.reflect.Method.invoke(Method.java:324)
                        at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
                        at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                        at $Proxy5.start(Unknown Source)
                        at org.jboss.deployment.SARDeployer.start(SARDeployer.java:242)
                        at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
                        at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:640)
                        at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:613)
                        at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:597)
                        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                        at java.lang.reflect.Method.invoke(Method.java:324)
                        at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
                        at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                        at $Proxy6.deploy(Unknown Source)
                        at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:361)
                        at org.jboss.system.server.ServerImpl.start(ServerImpl.java:268)
                        at org.jboss.Main.boot(Main.java:156)
                        at org.jboss.Main$1.run(Main.java:394)
                        at java.lang.Thread.run(Thread.java:536)

                        ======================================
                        The RemoteJMSProvider2 config is ..


                        RemoteJMSProvider2
                        org.jboss.jms.jndi.JBossMQProvider
                        192.168.110.87:1099
                        XAConnectionFactory
                        XAConnectionFactory

                        ======================================

                        I just created two topics with the same name one on 192.168.110.87 and another on 192.168.110.88 and tried to lookup both from my third JBOSS (on 192.168.110.89), using the same MDB . In the log ,for the both it is showing the same error (above).

                        Being a beginner in this field ,I actualy can't distinguish the priorities of each bug. Probably thats why u felt I was pushy.
                        So far ur advice route me in right path.
                        I expect only the same in future also

                        thanks

                        • 9. Re: Listening Two JBOSSs topic from Another
                          karumady Newbie

                          attatching ..

                          The first two JBOSSs are 3.0.3 and the MDB is on 3.2.
                          jboss.xml is like as u mentioned earlier

                          thanks

                          • 10. Re: Listening Two JBOSSs topic from Another
                            Adrian Brock Master

                            It could be that the versions are incompatible.
                            We don't gurantee compatiblity between 3.0 and 3.2,
                            the serialization may have changed.

                            3.0.3 jbossmq is very buggy anyway.
                            You should be using 3.0.7+ or 3.2

                            Unfortunalty the JMSException is not showing the
                            stacktrace for the NullPointerException, so I can't tell
                            the cause (it could be a change in the classes between 3.0
                            and 3.2).
                            Maybe you can get the source for the DLQHandler and
                            add a
                            log.error("Error looking up connection factory", e);
                            Before it wraps it in the JMSException.

                            Regards,
                            Adrian

                            • 11. Re: Listening Two JBOSSs topic from Another
                              karumady Newbie


                              thanks Adrian

                              It is working for 3.0.7+ and 3.2
                              I prefered 3.0.8 and 3.2

                              Once again
                              thanks....for ur greate advice