activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Crisp <>
Subject (hopefully) simple JMS question
Date Thu, 07 Aug 2008 18:41:48 GMT

     I have a quick question regarding the JMS spec and I was hoping to
feedback from our merry band of domain experts.  

     Given that Sessions are not thread-safe, if I'm creating a little
API that gets hit by a myriad of threads and do not want to synchronize
the API points,  I need to create a new Session on the stack for each
thread context.   Destinations ARE thread safe, but are created via a
specific Session instance.   Given this, can I assume that destination
remain valid even after the Session that created them is destroyed?   I've
looked at
the JMS spec and it seems fairly silent on this point.    

Thanks in advance,

P.s.  I'm assuming this must be true given that Destination creation can't
be cheap since it requires communication with the broker.

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

View raw message