openejb-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <rmannibu...@gmail.com>
Subject Re: Strange MDB invocation behavior
Date Sat, 11 Aug 2012 14:43:28 GMT
Hi,

it means it works first then stop working?

can you check you can still send message to AMQ broker (using AMQ
directly), if not please check your AMQ config.

- Romain


2012/8/11 almos <almos@ukr.net>

> Hello,
>
> 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
> destinations.
> 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:// pastebin.com /kZ5W0kXS
>
> So having this code to send messages to topic/queue I use following
> approach:
>
> 1. inject sender into ejb bean:
> @EJB private IISMClient ismClient;
> 2. invoke send function
> ismClient.post(notification);
>
> Here is my tomee.xml (without spaces)
> http:// pastebin.com /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 = {
>                 @ActivationConfigProperty(
>                                 propertyName = "destinationType",
>                                 propertyValue = "javax.jms.Topic"),
>         @ActivationConfigProperty(
>                         propertyName = "destination",
>                         propertyValue = "ismTopic")
>                 })
> public class TestListener extends AGenericListener implements
> MessageListener {
> @Override
>         public void onMessage(Message msg)
>         {
>                 TextMessage tm = (TextMessage) msg;
>                 try {
>                         String message = tm.getText();
>                         logger.info("TestListener [message]: " + message);
>                         setRawPacket(message);
>                         process();
>                 } catch (JMSException e) {
>                         e.printStackTrace();
>                 }
>         }
> }
>
> 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?
>
> Thanks,
> Alex
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Strange-MDB-invocation-behavior-tp4656801.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message