[jboss-user] [jBPM] New message: "Re: JBpm 4.3 + Spring 3 transaction problem at buildProcessEngine"

Santanu Saraswati do-not-reply at jboss.com
Sat Jan 30 05:05:50 EST 2010


User development,

A new message was posted in the thread "JBpm 4.3 + Spring 3 transaction problem at buildProcessEngine":

http://community.jboss.org/message/523106#523106

Author  : Santanu Saraswati
Profile : http://community.jboss.org/people/saraswati.santanu

Message:
--------------------------------------------------------------
When you are using hibernate and let spring manage the transaction then the session should be bound to the transaction and not to thread. The *hibernate.current_session_context_class* property should be SpringSessionContext class. This is done automatically in LocalSessionFactoryBean. So you need not do anything extra.
 
Making a session bound to a thread does not make it transaction aware. You can manually start and stop as many transactions as you want in a thread. In an application server you should never use thread session context - that can be dangerous. You should use JTA. And with spring you should let spring set it.
 
I was interested to know how did you conclude that there is no transaction when you remove current session context class as thread?

--------------------------------------------------------------

To reply to this message visit the message page: http://community.jboss.org/message/523106#523106




More information about the jboss-user mailing list