-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Transactions and JBoss
PostPosted: Fri Sep 01, 2006 12:04 am 
Newbie

Joined: Fri Jun 02, 2006 2:49 pm
Posts: 13
Using Jboss 4.0.4 Hibernate 3.2.0 RC2

Maybe I have completly missed this but I want to use Container Managed transations in my application. Following the docs I used the following in hibernate-service.xml in my Hibernate Mbean. This is from the hibernate site
/docs and Jboss site/docs and diffrent places on-line, they all say to do
this.

Code:
<attribute name="TransactionStrategy">org.hibernate.transaction.CMTTransactionFactory</attribute>
       <attribute name="TransactionManagerLookupStrategy">org.hibernate.transaction.JBossTransactionManagerLookup</attribute>
       <attribute name="FlushBeforeCompletionEnabled">true</attribute>
       <attribute name="AutoCloseSessionEnabled">true</attribute>


This throws an error every time, says TransactionStrategy is an invalid attribute.

Is this no longer needed, configured a diffrent way?
I must of missed something completly obvious.


Top
 Profile  
 
 Post subject: getCurrentSession
PostPosted: Fri Sep 01, 2006 12:39 am 
Newbie

Joined: Fri Jun 02, 2006 2:49 pm
Posts: 13
To answer my own question. From what I can tell if I use sessionFactory.getCurrentSession() it will retrive the session bounded to the JTA. Now I have my beans configured to use container managaged transations. So JBoss should create the JTA as configured and the getCurrentSession() will bind to it.

No Idea if thats correct.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.