Title: RE: [JBoss-user] jBoss + ANT + NetBeans
 
It seems like the better approach at this time is to move to 2.4.1.    The link is down to get to the source but did what made sense to get back the 2.4.1 in a similar configuration as my 2.2.2. Now when I attempt to connect my listener I first get an error that ClientID is already defined (which I blow by) then followed by a message that ID[X] is not allowed to create a durable subscription.   Is there an example/reference/simple way to connect the client without going through a security manager and adding callback handlers to the client?
 
I have not deployed my ear into the new container and tested any clients, am I about to experience the same for my clients that connect directly to the server? 
 
TIA,
John Moore
 
-----Original Message-----
From: John Moore [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 10, 2001 4:38 PM
To: [EMAIL PROTECTED]
Subject: [JBoss-user] Durable Subscribers

 
We have a JMS Listener external to jboss and am getting an exception every time we attempt to connect to JBoss.  The exception is "That destination queue does not exists".     We are using jboss 2.2.2 w/ tomcat 3.2.2.   The initial code was using swiftmq but since we heavily into jboss it's time we use it's jms features.  Based on JNDI view it appears the topic and queue exists, the issue is with the durable subscriber.  Any assistance is greatly appreciated.   I think I provided everything; there were no modifications to the jboss.jcml.
 
jbossmq.xml
 <Topic>
  <Name>Exceptions</Name>
 </Topic>
 <Queue>
  <Name>JMSListener1</Name>
 </Queue>
 
 <UserManager>
  <User>
   <Name>JMSListener1</Name>
   <Password></Password>
   <Id>DurableSubscriberExample</Id>
    <DurableSubscription>
        <Name>DurableSubscriberExample</Name>
        <TopicName>Exceptions</TopicName>
     </DurableSubscription>
  </User>

 
The queue and topic exist via JNDIView
  +- queue (class: org.jnp.interfaces.NamingContext)
  |   +- JMSListener1 (class: org.jbossmq.SpyQueue)
  +- topic (class: org.jnp.interfaces.NamingContext)
  |   +- Exceptions (class: org.jbossmq.SpyTopic)
The Code
      JMSListener jmsListener = getListener((String)settings.get("listenerClass"));
 
      Hashtable env = new Hashtable();
      env.put(Context.INITIAL_CONTEXT_FACTORY,(String)settings.get("INITIAL_CONTEXT_FACTORY"));
      env.put(Context.PROVIDER_URL,(String)settings.get("PROVIDER_URL"));
    
      String url_pkg_prefixes = (String)settings.get("URL_PKG_PREFIXES");
      if( url_pkg_prefixes != null ) {
          env.put("java.naming.rmi.security.manager", "yes");
          env.put( Context.URL_PKG_PREFIXES, url_pkg_prefixes );
      }
     
      jndiContext = new InitialContext(env);
 
      topicConnectionFactory = (TopicConnectionFactory)
      jndiContext.lookup("TopicConnectionFactory");
      topicConnection = topicConnectionFactory.createTopicConnection();
      topicConnection.setClientID((String)settings.get("clientID"));
      topicSession = topicConnection.createTopicSession(false,Session.AUTO_ACKNOWLEDGE);
      topic = topicSession.createTopic((String)settings.get("topic"));
      // topicSubscriber = topicSession.createDurableSubscriber(topic, (String)settings.get("name"),null,false);
      topicSubscriber = topicSession.createDurableSubscriber(topic, (String)settings.get("name"));                    // <-- line 91

Input to the code
<JMS-Listener>
 <param name="listenerClass"    value="com.pdsisoft.staffeasy.exception.CriticalErrorListener" />
 <param name="INITIAL_CONTEXT_FACTORY" value="org.jnp.interfaces.NamingContextFactory" />
 <param name="PROVIDER_URL"     value="localhost:1099" />
 <param name="URL_PKG_PREFIXES" value="org.jboss.naming" />
 <param name="clientID" value="JMSListener1" />
 <param name="topic" value="Exceptions" />
 <param name="name" value="JMSListener1" />
 <param name="error_log_file" value="/opt/log/error_log_file.dat" />
</JMS-Listener>
Exception
java.rmi.RemoteException: ; nested exception is:
        javax.jms.JMSException: That destination queue does not exist
javax.jms.JMSException: That destination queue does not exist
        <<no stack trace available>>
java.rmi.RemoteException: ; nested exception is:
        javax.jms.JMSException: That destination queue does not exist
javax.jms.JMSException: That destination queue does not exist
        <<no stack trace available>>
javax.jms.JMSException: Cannot subscribe to this Destination
        at org.jbossmq.SpyConnection.failureHandler(SpyConnection.java:318)
        at org.jbossmq.SpyConnection.addConsumer(SpyConnection.java:440)
        at org.jbossmq.SpySession.addConsumer(SpySession.java:416)
        at org.jbossmq.SpyTopicSession.createDurableSubscriber(SpyTopicSession.java:89)
        at com.pdsisoft.core.util.JMSListener.main(JMSListener.java:91)
closing down connection
java.rmi.RemoteException: ; nested exception is:
        javax.jms.JMSException: That destination queue does not exist
javax.jms.JMSException: That destination queue does not exist
        <<no stack trace available>>
java.rmi.RemoteException: ; nested exception is:
        javax.jms.JMSException: That destination queue does not exist
javax.jms.JMSException: That destination queue does not exist
        <<no stack trace available>>
 
Run the listener batch
set J2EE_HOME=/usr/j2ee
java -classpath ./;staffeasy-1.0.0.jar;%JAVA_HOME%lib/tools.jar;%JAVA_HOME%jre/lib/rt.jar;/opt/jboss/client/jbossmq-client.jar;/opt/jboss/lib/ext/jms.jar;/opt/jboss/client/jnp-client.jar;/opt/jboss/client/jbosssx-client.jar;/opt/jboss/client/jta-spec1_0_1.jar;/opt/xerces/xerces.jar com.pdsisoft.staffeasy.exception.CriticalErrorListener ../jms/JMSListener.xml

 

Reply via email to