Dear all,

 I have a session ejb (Publisher) that sends a message
to an MDB (TopicSubscriber) that subscribes to a
durable topic. The Publisher looks up the
topic connection factory and the topic, but fails when
trying to create the topic connection as follows:

topicConnection =
topicFactory.createTopicConnection("spin","spin");

 The error message thrown by the container is:

org.jboss.mq.SpyJMSException: Cannot get a client ID
at
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:245)
...........
linked exception is:
javax.jms.JMSSecurityException: The login id has an
assigned client id.  That client id is already
connected to the server!
        <<no stack trace available>>

 This happens even if I'm running the app for the
first time after deploying (it does deploy just fine).

And it happens in both 2.4.5+Catalina and
2.4.6+Catalina.

 Below are my entries in jboss.jcml,
jbossmq-state.xml, ejb-jar.xml and jboss.xml. As far
as I can tell I've done everything according to the
documentation.

 Could someone tell me what I'm doing wrong ?

 Thanks !!

 Ana

------------------------------------------------------------------

jboss.jcml:
<mbean code="org.jboss.mq.server.TopicManager"
name="JBossMQ:service=Topic,name=queryTopic"/>

------------------------------------------------------------------

jbossmq-state.xml:

<User>
      <Name>spin</Name>
      <Password>spin</Password>
      <Id>spinNodeQuery</Id>
      <DurableSubscription>
        <Name>spinNodeQuery</Name>
        <TopicName>queryTopic</TopicName>
      </DurableSubscription>
</User>

------------------------------------------------------------------

jboss.xml:

<session>
        <ejb-name>Publisher</ejb-name>
        <jndi-name>Publisher</jndi-name>
        <resource-ref>
                <res-ref-name>jms/TopicFactory</res-ref-name>
               
<jndi-name>TopicConnectionFactory</jndi-name>
        </resource-ref>
        <resource-env-ref>
               
<resource-env-ref-name>jms/QueryTopic</resource-env-ref-name>
               
<jndi-name>topic/queryTopic</jndi-name>
        </resource-env-ref>
</session>
<message-driven>
        <ejb-name>TopicSubscriber</ejb-name>
       
<destination-jndi-name>topic/queryTopic</destination-jndi-name>
        <mdb-user>spin</mdb-user>
        <mdb-passwd>spin</mdb-passwd>
        <mdb-client-id>spinNodeQuery</mdb-client-id>
        <resource-ref>
                <res-ref-name>jms/TopicFactory</res-ref-name>
               
<jndi-name>TopicConnectionFactory</jndi-name>
        </resource-ref>
</message-driven>

----------------------------------------------------------------------

ejb-jar.xml:

<session>
        <display-name>Publisher</display-name>
        <ejb-name>Publisher</ejb-name>
        <home>message.PublisherHome</home>
        <remote>message.Publisher</remote>
        <ejb-class>message.PublisherBean</ejb-class>
        <session-type>Stateless</session-type>
        <transaction-type>Container</transaction-type>
        <resource-ref>
                <description />
               
<res-ref-name>jms/TopicFactory</res-ref-name>
               
<res-type>javax.jms.TopicConnectionFactory</res-type>
                <res-auth>Container</res-auth>
        </resource-ref>
        <resource-env-ref>
                <description />
               
<resource-env-ref-name>jms/QueryTopic</resource-env-ref-name>
               
<resource-env-ref-type>javax.jms.Topic</resource-env-ref-type>
        </resource-env-ref>
</session>
<message-driven>
        <display-name>TopicSubscriber</display-name>
        <ejb-name>TopicSubscriber</ejb-name>
       
<ejb-class>message.TopicSubscriberBean</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>
        <resource-ref>
                <description />
               
<res-ref-name>jms/TopicFactory</res-ref-name>
               
<res-type>javax.jms.TopicConnectionFactory</res-type>
                <res-auth>Container</res-auth>
        </resource-ref>
</message-driven>


=====
Ana Holzbach
[EMAIL PROTECTED]

__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to