Get the tools you need to learn Java skills fast!
Video tutorials, eBooks, hands-on lab exercises, sample code.
Get started
The moose likes Spring and the fly likes Queue and session is closed! problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Queue and session is closed! problem" Watch "Queue and session is closed! problem" New topic
Author

Queue and session is closed! problem

zabet tyan
Ranch Hand

Joined: Jan 14, 2009
Posts: 32
Hi

I am using a ActiveMQQueue and I have a class that processes the messages. Everytime the onMessage is called, and my finder executes findAreaByName, i get "Session is closed!"

I tried to make IncomingMessageHandler FactoryBeanAware and get finder at runtime but it didn't work. I tried to make finder of prototype scope, but that didn't help. Any ideas on what could be the problem?

is it because I am using DefaultMessageListenerContainer?



and findAreaByName :



and my entityManager code:





configuration:
 
Have you tried LearnNowOnline? http://www.learnnowonline.com/
 
subject: Queue and session is closed! problem