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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Queue and session is closed! problem" Watch "Queue and session is closed! problem" New topic

Queue and session is closed! problem

zabet tyan
Ranch Hand

Joined: Jan 14, 2009
Posts: 32

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:

Don't get me started about those stupid light bulbs.
subject: Queue and session is closed! problem
Similar Threads
spring 2 with hibernate 3
Hibernate insert fails due to generate key failure
Access hibernate session inside onMessage using ActiveMQ
unsatisfied Dependancy exception
JDBCContext returning TransactionManager as null