1 Reply Latest reply on Sep 1, 2004 1:37 PM by Adrian Brock

    Consuming a topic from a remote J2EE application running on

    bhanu b Newbie

      hi,
      Pleasee help with the following problem:
      SUMMARY: I am trying to connect (durable) to a topic created by a J2EE application running on a physically remote JBOSS 3.2.5 app server using an MDB residing on my local machine ( again JBOSS 3.2.5 app server). I keep getting the folowing exception on deploying my local MDB ( However i do not get any exception when deploying on the same app server on which the J2EE application is running ).
      EXCEPTION:
      javax.jms.JMSSecurityException: User: Dilbert is NOT authenticated

      at org.jboss.mq.security.SecurityManager.authenticate(SecurityManager.java:215)

      at org.jboss.mq.security.ServerSecurityInterceptor.authenticate(ServerSecurityInterceptor.java:51)

      at org.jboss.mq.server.TracingInterceptor.authenticate(TracingInterceptor.java:781)

      at org.jboss.mq.server.JMSServerInvoker.authenticate(JMSServerInvoker.java:287)

      at org.jboss.mq.il.jvm.JVMServerIL.authenticate(JVMServerIL.java:301)

      at org.jboss.mq.Connection.authenticate(Connection.java:1153)

      at org.jboss.mq.Connection.(Connection.java:248)

      at org.jboss.mq.SpyConnection.(SpyConnection.java:55)

      at org.jboss.mq.SpyXAConnection.(SpyXAConnection.java:52)

      at org.jboss.mq.SpyXAConnectionFactory.createXAConnection(SpyXAConnectionFactory.java:98)

      at org.jboss.mq.SpyXAConnectionFactory.createXATopicConnection(SpyXAConnectionFactory.java:131)

      at org.jboss.jms.ConnectionFactoryHelper.createTopicConnection(ConnectionFactoryHelper.java:146)

      at org.jboss.ejb.plugins.jms.JMSContainerInvoker.innerCreate(JMSContainerInvoker.java:607)

      at org.jboss.ejb.plugins.jms.JMSContainerInvoker.startService(JMSContainerInvoker.java:764)

      at org.jboss.ejb.plugins.jms.JMSContainerInvoker$ExceptionListenerImpl.onException(JMSContainerInvoker.java:1267)

      at org.jboss.ejb.plugins.jms.JMSContainerInvoker$1.run(JMSContainerInvoker.java:776)

      SNIPPET OF EJB-JAR.XML:
       <message-driven>
       <display-name>Test1</display-name>
       <ejb-name>Test1</ejb-name>
       <ejb-class>com.netmidas.workflow.mdb.Test1Bean</ejb-class>
       <transaction-type>Container</transaction-type>
       <message-driven-destination>
       <destination-type>javax.jms.Topic</destination-type>
       <subscription-durability>Durable</subscription-durability>
       </message-driven-destination>
       </message-driven>
      
      SNIPPET OF JBOSS.XML:
       <message-driven>
       <ejb-name>Test1</ejb-name>
       <destination-jndi-name>topic/WorkflowTopic</destination-jndi-name>
       <configuration-name >Standard Message Driven Bean</configuration-name >
       <mdb-user >Dilbert</mdb-user >
       <mdb-passwd >Dilbert</mdb-passwd >
       <mdb-subscription-id >DurableSubscriberDilbert</mdb-subscription-id >
       </message-driven>
      
      CHANGES MADE TO JBOSS FILES (on which the remote J2EE application is running):
      
      1. in jbossmq-state.xml :
       <Users>
       <User>
       <Name>Dilbert</Name>
       <Password>Dilbert</Password>
       <Id>DurableSubscriberDilbert</Id>
       </User>
       </Users>
       <Roles>
       <Role name="dilbert">
       <UserName>Dilbert</UserName>
       </Role>
       </Roles>
       <DurableSubscriptions>
       <DurableSubscription>
       <ClientID>DurableSubscriberDilbert</ClientID>
       <Name>DurableSubscriberDilbert</Name>
       <TopicName>WorkflowTopic</TopicName>
       </DurableSubscription>
       </DurableSubscriptions>


      2. in hsqldb-jdbc-state-service.xml
      POPULATE.TABLES.15 = INSERT INTO JMS_USERS (USERID, PASSWD, CLIENTID) VALUES ('Dilbert','Dilbert','DurableSubscriberDilbert')
      POPULATE.TABLES.16 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('dilbert','Dilbert')

      3. changes made to local JBOSS server in jms-ds.xml

      java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory

      java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces

      java.naming.provider.url=magarg:1099 <!-- the remote server i am trying to connect to which hosts the topic -->



      Please help!