activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhavyn <>
Subject Using JMS effeciently in a SLSB
Date Sun, 30 Jul 2006 05:16:20 GMT


I am working on integrating a EJB webservice endpoint into our messaging
backend.  However I'm having some performance issues.  I'm using ActiveMQ in
the GenericJMS Resource Adaptor with Glassfish.

The problem I'm having specifically is getting a request/response
interaction working at the speed we need it to.  I've spent the past two
days looking into it and what I'm seeing is that creating the
MessageConsumer is taking a really long amount of time (on the order of
30-50ms).  So, I tried caching the Session, MessageProducer and
MessageConsumer as the ActiveMQ wiki recommends, but that also fails because
the EJB specification states that an EJB can only have 1 open Session per
Connection.  Thus, as soon as a second thread comes a long and tries to open
a Session, everything breaks.  Closed Sessions to me no good because they
close the MessageConsumer too.

Is there some best practice that is generally used when creating a
request/response iteraction inside the EJB container?  30-50ms might not
seem like much but when you need to send to four or five different queues to
complete the webservice call, the 200ms delay causes our website to slow to
a crawl.  This is really frustrating because I can make the same set of
calls using PHP and Stomp and the whole interaction takes less time then it
takes just to instantiate a single MessageConsumer in Java.

View this message in context:
Sent from the ActiveMQ - User forum at

View raw message