activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reynald Borer <>
Subject Re: hibernate session in jms listner
Date Sun, 31 Oct 2010 18:26:48 GMT

As far as I know, there is no such thing in ActiveMQ as its not its purpose to handle Hibernate
session and related things.

But in Spring for example you can use a TransactionTemplate [1] in order to wrap your business
code in a transaction (which will assure you that you have a session open). Even better in
my opinion, from your message listener you call business methods on another bean whose methods
are annotated with a transaction definition.



On Oct 31, 2010, at 11:13 , fachhoch wrote:

> I am getting lazy load exception when I use my hibernate entity inside a
> message listener, please advice me if there are any abstract Message
> listeners  which   opens session puts   it into thread local     ?
> -- 
> View this message in context:
> Sent from the ActiveMQ - User mailing list archive at

View raw message