JMS deployment error (destination not found)
thoste Nov 11, 2004 6:57 AMI tried to setup a simple HelloWorld MessageDrivenBean which receives and processes JMS messages (from a topic).
During the start of JBoss (3.2.6) the following error lines are displayed (concerning the mdb status):
[EjbModule] Deploying MyMessageDrivenBean
[JMSContainerInvoker] destination not found: topic/MyMessageDrivenBean
reason: javax.naming.NameNotFoundException: MyMessageDrivenBean not bound
[JMSContainerInvoker] creating a new temporary destination: topic/MyMessageDrivenBean
[MyMessageDrivenBean] Bound to JNDI name: topic/MyMessageDrivenBean
...
What is wrong with the following ejb-jar.xml and jboss.xml?
Surprisingly there is NO String "topic/MyMessageDrivenBean" as indicated in the error messages above.
The MessageBean should be accessible from the publisher session bean by a
topic = (Topic)context.lookup("java:comp/env/jms/MyTopicName");
Thank you
Thomas
ejb-jar.xml:
<ejb-jar> <enterprise-beans> ..... <session> <!-- this is for the jms sending session bean --> <description>Publisher SessionBean</description> <ejb-name>pubSessBean</ejb-name> <home>test.mysample.PublisherSessionHome</home> <remote>test.mysample.PublisherSession</remote> <ejb-class>test.mysample.PublisherSessionBean</ejb-class> <session-type>Stateless</session-type> <transaction-type>Container</transaction-type> <resource-ref> <description>My Topic ConnectionFactory</description> <res-ref-name>jms/MyTopicConnectionFactory</res-ref-name> <res-type>javax.jms.TopicConnectionfactory</res-type> <res-auth>Container</res-auth> </resource-ref> <resource-ref> <description>My Topic</description> <res-ref-name>jms/MyTopicName</res-ref-name> <res-type>javax.jms.Topic</res-type> <res-auth>Container</res-auth> </resource-ref> </session> <message-driven> <description>Message Driven Bean Sample</description> <ejb-name>MyMessageDrivenBean</ejb-name> <ejb-class>test.mysample.MessDrivenBean</ejb-class> <message-selector></message-selector> <transaction-type>Container</transaction-type> <acknowledge-mode>Auto-acknowledge</acknowledge-mode> <message-driven-destination> <destination-type>javax.jms.Topic</destination-type> <subscription-durability>NonDurable</subscription-durability> </message-driven-destination> </message-driven> </enterprise-beans> <assembly-descriptor> <container-transaction> <method> <ejb-name>MyMessageDrivenBean</ejb-name> <method-name>*</method-name> </method> <trans-attribute>NotSupported</trans-attribute> </container-transaction> </assembly-descriptor> </ejb-jar>
jboss.xml:
<jboss> <secure>false</secure> <resource-managers> <resource-manager> <res-name>topicfactoryref</res-name> <res-jndi-name>java:/JmsXA</res-jndi-name> </resource-manager> <resource-manager> <res-name>topicref</res-name> <res-jndi-name>topic/testTopic</res-jndi-name> </resource-manager> </resource-managers> <enterprise-beans> <session> <ejb-name>pubSessBean</ejb-name> <jndi-name>pubSessBean</jndi-name> <configuration-name>Standard Stateless SessionBean</configuration-name> <resource-ref> <res-ref-name>jms/MyTopicConnectionFactory</res-ref-name> <resource-name>topicfactoryref</resource-name> </resource-ref> <resource-ref> <res-ref-name>jms/MyTopicName</res-ref-name> <resource-name>topicref</resource-name> </resource-ref> </session> <message-driven> <ejb-name>MyMessageDrivenBean</ejb-name> <configuration-name>Standard Message Driven Bean</configuration-name> <destination-jndi-name>topic/testTopic</destination-jndi-name> </message-driven> </enterprise-beans> </jboss>