8 Replies Latest reply on Nov 22, 2001 3:51 AM by Peter Antman

    Problem sending to remote queue

    Thomas Krebs Newbie

      I am using JBoss-2.4.3_Tomcat_3.2.3. From within my session bean I try to send a message to a remote topic which is established a remote JBoss server (running the same version). I followed the instructions in the documentation and added a JMS remote provider, but the messages end up in the topic of the originating JBoss instance.
      I have no glue what else to try or where to search.

      I attached the excerpts from my configuration files (the remote JBOSS is running on ccatpu01) and the debug messages I see on the originating JBOSS instance:
      ----------------------------------------------------
      Console output on originating JBOSS
      ----------------------------------------------------
      [RemoteJmsXA] Pool org.jboss.jms.ra.JmsManagedConnectionFactory-1 [1/1/Unlimited] gave out pooled object: org.jboss.jms.
      ra.JmsManagedConnection@5306dd
      [RemoteJmsXA] FINE: Leaving out XAResource
      [RemoteJmsXA] FINE: ConnectionEvent listener added
      [Default] Publishing messageTextMessage@Order created:1718,BMW...
      [RemoteJmsXA] FINE: Closing session
      [RemoteJmsXA] FINE: Sending connection event: 1
      [RemoteJmsXA] Pool org.jboss.jms.ra.JmsManagedConnectionFactory-1 [0/1/Unlimited] returned object org.jboss.jms.ra.JmsMa
      nagedConnection@5306dd to the pool.

      ---------------------------------------------------
      jboss.jcml
      -------------------------------------------------

      MyRemoteProvider
      ccatpu01:1099
      XAConnectionFactory
      XAConnectionFactory
      org.jboss.jms.jndi.JBossMQProvider


      <!-- JMS XA Resource adapter, -->
      <!-- use this to get transacted JMS in beans -->

      RemoteJmsXA
      JCA:service=RARDeployer
      JMS Adapter
      MinervaXACMFactory
      <!-- See the documentation for the specific connection manager
      implementation you are using for the properties you can set -->

      JmsProviderAdapterJNDI=java:MyRemoteProvider
      # Pool type - uncomment to force, otherwise it is the default
      #PoolConfiguration=per-factory

      # Connection pooling properties - see
      # org.opentools.minerva.pool.PoolParameters
      MinSize=0
      MaxSize=10
      Blocking=true
      GCEnabled=false
      IdleTimeoutEnabled=false
      InvalidateOnError=false
      TrackLastUsed=false
      GCIntervalMillis=120000
      GCMinIdleMillis=1200000
      IdleTimeoutMillis=1800000
      MaxIdleTimeoutPercent=1.0


      <!-- Principal mapping configuration -->
      org.jboss.resource.security.ManyToOnePrincipalMapping




      ----------------------------------------
      jboss.xml
      ----------------------------------------

      false
      <container-configurations />
      <enterprise-beans>

      <ejb-name>OrderControllerEJB</ejb-name>
      <jndi-name>ejb/OrderControllerEJB</jndi-name>
      <configuration-name/>
      <resource-ref>
      <res-ref-name>jms/MyTopicConnection</res-ref-name>
      <resource-name>topicfactoryref</resource-name>
      </resource-ref>
      <resource-ref>
      <res-ref-name>jms/im</res-ref-name>
      <resource-name>topicref</resource-name>
      </resource-ref>



      <ejb-name>OrderEJB</ejb-name>
      <jndi-name>ejb/OrderEJB</jndi-name>
      <configuration-name></configuration-name>


      <ejb-name>KeyGeneratorEJB</ejb-name>
      <jndi-name>ejb/KeyGeneratorEJB</jndi-name>
      <configuration-name></configuration-name>

      </enterprise-beans>

      <resource-managers>
      <resource-manager res-class="">
      <res-name>jdbc/MatcherDB</res-name>
      <res-jndi-name>java:/Hypersonic</res-jndi-name>
      </resource-manager>

      <resource-manager>
      <res-name>topicfactoryref</res-name>
      <res-jndi-name>java:/RemoteJmsXA</res-jndi-name>
      </resource-manager>

      <resource-manager>
      <res-name>topicref</res-name>
      <res-jndi-name>jnp://ccatpu01:1099/topic/testTopic</res-jndi-name>
      </resource-manager>

      </resource-managers>

        • 1. Re: Problem sending to remote queue
          Peter Antman Expert

          If I remember correct you should specify ra properties in an element in the JMS JCA RA setup.

          //Peter

          • 2. Re: Problem sending to remote queue
            Thomas Krebs Newbie

            Could you be more specific. The template in the documentation mentions an for the JMS XA adapter, but I had to comment it out because it contains no values and gives errors if left uncommented.
            I even tried to change the config-property in the the deployment descriptor for the JMS adapter in jms-ra.rar to be bound to RemoteJmsXA, but it didn't work either.

            What I can see from my log is that the provider url is bound. But I also see an JMX bug
            [Configuration] PrincipalMappingProperties set to in JCA:service=ConnectionFactoryLoader,name=RemoteJmsXA
            [Configuration] Detected JMX Bug: Server reports attribute 'ResourceAdapterName' is not writeable for MBean 'JCA:name=RemoteJmsXA,service=ConnectionFactoryLoader'
            [Configuration] Detected JMX Bug: Server reports attribute 'ResourceAdapterName' is not writeable for MBean 'JCA:name=MinervaDS,service=ConnectionFactoryLoader'
            [Configuration] Detected JMX Bug: Server reports attribute 'ResourceAdapterName' is not writeable for MBean 'JCA:name=JmsXA,service=ConnectionFactoryLoader'
            [Configuration] Detected JMX Bug: Server reports attribute 'Backlog' is not writeable for MBean 'DefaultDomain:service=Naming'

            I am really stuck and would very much appreciate any help on this. Thanks!

            • 3. Re: Problem sending to remote queue
              Raj Saini Newbie

              In the documentation, there is error. your must end the previous line with

              Here is the correct configuration:-
              <!-- JMS XA Resource adapter, -->
              <!-- use this to get transacted JMS in beans -->

              RemoteJmsXA
              JCA:service=RARDeployer
              JMS Adapter
              MinervaXACMFactory
              <!-- See the documentation for the specific connection manager
              implementation you are using for the properties you can set -->


              JmsProviderAdapterJNDI=java:MyRemoteProvider
              # Pool type - uncomment to force, otherwise it is the default
              #PoolConfiguration=per-factory

              # Connection pooling properties - see
              # org.opentools.minerva.pool.PoolParameters
              MinSize=0
              MaxSize=10
              Blocking=true
              GCEnabled=false
              IdleTimeoutEnabled=false
              InvalidateOnError=false
              TrackLastUsed=false
              GCIntervalMillis=120000
              GCMinIdleMillis=1200000
              IdleTimeoutMillis=1800000
              MaxIdleTimeoutPercent=1.0


              <!-- Principal mapping configuration -->
              org.jboss.resource.security.ManyToOnePrincipalMapping




              • 4. Re: Problem sending to remote queue
                Thomas Krebs Newbie

                Thanks a lot! With this change it works.

                • 5. Re: Problem sending to remote queue
                  Brian Lichtenwalter Newbie

                  I was wondering why I was having trouble sending to queue from a jms remote client with the default jboss.jcml config. So in order for a jms remote client to send to a queue we need to follow the instructions in the manual section 7.91? I've followed the instructions in this section and keep getting a NullPointer Exception when JBoss tries to load the RemoteJmsXA mbean...

                  [AutoDeployer] Auto deploy of file:/C:/JBoss-2.4.3/deploy/lib/jms-ra.rar
                  [RARDeployer] Attempting to deploy RAR at 'file:/C:/JBoss-2.4.3/deploy/lib/jms-ra.rar'
                  [RemoteJmsXA] FINE: Setting LogWriter: org.jboss.logging.log4j.CategoryWriter@fced4
                  [RemoteJmsXA] Problem loading or unloading connection factory
                  java.lang.NullPointerException
                  at org.jboss.resource.ConnectionFactoryLoader.loadConnectionFactory(ConnectionFactoryLoader.java:695)
                  at org.jboss.resource.ConnectionFactoryLoader.handleNotification(ConnectionFactoryLoader.java:367)
                  at com.sun.management.jmx.MBeanServerNotificationListener.handleNotification(MBeanServerNotificationListener.java:48)
                  at javax.management.NotificationBroadcasterSupport.sendNotification(NotificationBroadcasterSupport.java:142)
                  at org.jboss.resource.RARDeployer.deploy(RARDeployer.java:346)
                  at org.jboss.deployment.DeployerMBeanSupport.deploy(DeployerMBeanSupport.java:70)
                  ...


                  Using this MyRemoteLoader mbean definition...


                  MyRemoteProvider
                  j2chat-xp:1099
                  org.jboss.jms.jndi.JBossMQProvider
                  java:/XAConnectionFactory
                  java:/XAConnectionFactory



                  Using this RemoteJmsXA mbean definition...

                  <!-- JMS XA Resource adapter, use this to get transacted JMS in beans -->

                  RemoteJmsXA
                  JCA:service=RARDeployer
                  JMS Adapter
                  MinervaXACMFactory
                  <!-- See the documentation for the specific connection manager
                  implementation you are using for the properties you can set -->


                  JmsProviderAdapterJNDI=java:MyRemoteProvider
                  # Pool type - uncomment to force, otherwise it is the default
                  #PoolConfiguration=per-factory

                  # Connection pooling properties - see
                  # org.jboss.pool.PoolParameters
                  MinSize=0
                  MaxSize=10
                  Blocking=true
                  GCEnabled=false
                  IdleTimeoutEnabled=false
                  InvalidateOnError=false
                  TrackLastUsed=false
                  GCIntervalMillis=120000
                  GCMinIdleMillis=1200000
                  IdleTimeoutMillis=1800000
                  MaxIdleTimeoutPercent=1.0


                  <!-- Principal mapping configuration -->
                  org.jboss.resource.security.ManyToOnePrincipalMapping


                  • 6. Re: Problem sending to remote queue
                    Brian Lichtenwalter Newbie

                    Sorry, I mean Figure 7.93 and Figure 9.4 of the manual.

                    • 7. Re: Problem sending to remote queue
                      Brian Lichtenwalter Newbie

                      Once again...

                      Figure 7.93 and Figure 7.94 of the manual.

                      • 8. Re: Problem sending to remote queue
                        Peter Antman Expert

                        First thing I can see is wrong is your connection factory JNDI stuff: java:/XXX is only available localy. Use one of the other factories, eg ConnectionFactory.

                        //Peter