• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Bear Bibeault
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • salvin francis
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
Bartenders:
  • Jj Roberts
  • Carey Brown
  • Scott Selikoff

How to form a MDB with the topic?

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I used JBoss 3.0 and JBoss JMS 3.04 for MDB. If MDB listen to a queue, it worked fine. But I have the problem when I formed it as a topic.
The following is my Deployment descriptor modified from a queue:
1. ejb-jar.xml:
<ejb-jar>
<enterprise-beans>
<message-driven>
<ejb-name>WorkAgentMessage</ejb-name>
<ejb-class>com.eidea.ejb.component.automation.WorkAgentMessageBean</ejb-class>
<transaction-type>Container</transaction-type>
<message-selector>executionState ='open.ready_to_run'</message-selector>
<acknowledge-mode>AUTO_ACKNOWLEDGE</acknowledge-mode>
<message-driven-destination>
<destination-type>javax.jms.Topic</destination-type>
<subscription-durability>Durable</subscription-durability>
</message-driven-destination>
</message-driven>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>WorkAgentMessage</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
2. jboss.xml
<jboss>
<enterprise-beans>
<message-driven>
<ejb-name>WorkAgentMessage</ejb-name>
<configuration-name>Standard Message Driven Bean</configuration-name>
<destination-jndi-name>topic/DefaultChannel</destination-jndi-name>
<jndi-name>WorkAgentMessage</jndi-name>
</message-driven>
</enterprise-beans>
</jboss>
I got the following error in deployment
=============================
15:14:41,203 WARN [JMSContainerInvoker] JMS provider failure detected:
org.jboss.mq.SpyJMSException: Cannot subscribe to this Destination: null
at org.jboss.mq.Connection.addConsumer(Connection.java:974)
===============================
I checked JBoss console, the deployed topic DefaultChannel is there.
When I modified <destination-type> in ejb-jar.xml from javax.jms.Topic to Topic, the complain in deploy is gone, but onMessage() in MDB didn't get called in runtime.
I'd be very appreciated if anyone can help me to solve this issue.
 
"I know this defies the law of gravity... but I never studied law." -B. Bunny Defiant tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic