openejb-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From almos <>
Subject Strange MDB invocation behavior
Date Sat, 11 Aug 2012 14:03:30 GMT

I am facing a strange behavior with MDB's that are listening on topics.
After long application inactive time (in other words - system is not used
overnight (3-4 hours)) first JMS message send to the topic NEVER reaches
destination (I have couple of MDBs listening on the topic and neither of
them gets invoked). I.e MDB isn't invoked (according to the verbose logs).
All next subsequent send operations works fine and all messages reach
According to our observations this doesn't happen with JMS Queues which uses
the same infrastructure code referenced below.

What might be a problem? What we are doing incorrectly?

Here is a code I use to send messages to the topic (without spaces, looks
like forum engine strips some URLs)
http:// /kZ5W0kXS

So having this code to send messages to topic/queue I use following

1. inject sender into ejb bean:
@EJB private IISMClient ismClient;
2. invoke send function;

Here is my tomee.xml (without spaces)
http:// /kcdBcgEw

Here is how we use @MessageDriven annotation. And as I mentioned after long
user inactivity first message sent to the topic ismTopic never gets
delivered to the listeners:

@MessageDriven(activationConfig = {
				propertyName = "destinationType",
				propertyValue = "javax.jms.Topic"),
        		propertyName = "destination",
        		propertyValue = "ismTopic")
public class TestListener extends AGenericListener implements
MessageListener {
	public void onMessage(Message msg)
		TextMessage tm = (TextMessage) msg;
		try {
			String message = tm.getText();"TestListener [message]: " + message);
		} catch (JMSException e) {

Sender and listeners resides currently under the same TomEE 1.0 instance on
the same machine.

Could you please check what I might be doing wrong?


View this message in context:
Sent from the OpenEJB User mailing list archive at

View raw message