1 Reply Latest reply on Aug 18, 2006 9:02 AM by foxviewn2632

    Durable Topic that is password protected in EJB 3.

    foxviewn2632

      How do you annotate for a password if the topics client id is pasword protected. I annotated my bean as follows:

      @MessageDriven(
      description="My Message driven bean to test JMS implementation. ",
      name="PubMan",
      activationConfig={
      @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Topic")
      ,@ActivationConfigProperty(propertyName = "destination", propertyValue = "topic/SmithfieldDurableTopic")
      ,@ActivationConfigProperty(propertyName="Durability",propertyValue="Durable")//subscription
      ,@ActivationConfigProperty(propertyName="subscriptionName",propertyValue = "john")
      ,@ActivationConfigProperty(propertyName="clientID",propertyValue = "DurableSubscriberExample")
      ,@ActivationConfigProperty(propertyName="acknowledgeMode",propertyValue = "AUTO-ACKNOWLEDGE")
      }
      )

      I have the client Id set but how do I put a password into this? Below is the error message.


      2006-08-15 10:27:19,381 WARN [org.jboss.ejb3.mdb.MDB] JMS provider failure detected:
      javax.jms.InvalidClientIDException: This client id is password protected DurableSubscriberExample
      at org.jboss.mq.sm.jdbc.JDBCStateManager.checkLoggedOnClientId(JDBCStateManager.java:308)
      at org.jboss.mq.sm.AbstractStateManager.addLoggedOnClientId(AbstractStateManager.java:199)
      at org.jboss.mq.server.JMSDestinationManager.checkID(JMSDestinationManager.java:384)
      at org.jboss.mq.server.JMSServerInterceptorSupport.checkID(JMSServerInterceptorSupport.java:138)
      at org.jboss.mq.server.TracingInterceptor.checkID(TracingInterceptor.java:226)
      at org.jboss.mq.server.JMSServerInvoker.checkID(JMSServerInvoker.java:139)
      at org.jboss.mq.il.jvm.JVMServerIL.checkID(JVMServerIL.java:204)
      at org.jboss.mq.Connection.setClientID(Connection.java:508)
      at org.jboss.ejb3.mdb.MDB.innerCreateTopic(MDB.java:463)
      at org.jboss.ejb3.mdb.MDB.innerCreate(MDB.java:342)
      at org.jboss.ejb3.mdb.MDB.innerStart(MDB.java:225)
      at org.jboss.ejb3.mdb.MDB$ExceptionListenerImpl.onException(MDB.java:1133)
      at org.jboss.ejb3.mdb.MDB$1.run(MDB.java:237)
      2006-08-15 10:27:19,381 INFO [org.jboss.ejb3.mdb.MDB] Trying to reconnect to JMS provider

        • 1. Re: Durable Topic that is password protected in EJB 3.
          foxviewn2632

          Problems solved. You only need:

          @MessageDriven(
          description="My Message driven bean to test JMS implementation. ",
          name="PubMan",
          activationConfig={
          @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Topic")
          ,@ActivationConfigProperty(propertyName = "destination", propertyValue = "topic/testTopic")
          ,@ActivationConfigProperty(propertyName="Durability",propertyValue="Durable")//subscription
          ,@ActivationConfigProperty(propertyName="acknowledgeMode",propertyValue = "AUTO-ACKNOWLEDGE")
          }
          )



          There is no need for userid or password of Topic.
          All is working.
          Garth