users@glassfish.java.net

JMS MDB subscription to topic

From: <glassfish_at_javadesktop.org>
Date: Fri, 11 Jul 2008 08:21:06 PDT

Hello,

I have some strange effects in my application. I have two MDBs, one with 'mappedName = "jms/NewData"' and the other with 'mappedName = "jms/SourceTime"'. For testing purposes only (I'm just starting on JMS now) I send a message from a servlet to 'jms/SourceTime' ( @Resource(name = "jms/SourceTime") private Topic sourceTime; @Resource(name = "jms/SourceTimeFactory")).

The thing is that if I put breakpoints in both MDBs in OnMessage(), both breakpoints are activated, meaning that I receive the message in both topics. Is this ok?

I've read the "How do I specify the Queue or Topic that a Message Driven Bean should consume from?" section in GlassFish EJB FAQ and tried the three methods but still nothing.

Could you tell me what am I doing wrong ? Please let me know if you need more information.

Thank you,
[Message sent by forum member 'coboo' (coboo)]

http://forums.java.net/jive/thread.jspa?messageID=286016