-->
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: Default transaction factory in EJB3 environment
PostPosted: Tue Nov 15, 2005 12:00 pm 
Expert
Expert

Joined: Sat Oct 25, 2003 8:49 am
Posts: 490
Location: Vrhnika, Slovenia
Hibernate version: 3.1

I'm using EJB3 with JBossAS4.0.3.

How come CMTTransactionFactory isn't set by default in persistence.properties inside EJB3 deployer.

By default you get JDBCTransactionFactory. Is this one appropriate for session beans?

Or should I use JTATransactionFactory?

How to decide? :-)

Rgds, Ales

_________________
--------------------------------
Ales Justin
JBoss, a division of Red Hat


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 16, 2005 7:27 am 
Expert
Expert

Joined: Sat Oct 25, 2003 8:49 am
Posts: 490
Location: Vrhnika, Slovenia
Did some reading, this is what I found:

- http://docs.jboss.org/ejb3/app-server/H ... ansactions

Quote:
Note that you should choose org.hibernate.transaction.JTATransactionFactory in a BMT session bean, and org.hibernate.transaction.CMTTransactionFactory in a CMT session bean, when you configure Hibernate's transaction factory. Remember to also set org.hibernate.transaction.manager_lookup_class.


- http://www.hibernate.org/hib_docs/v3/re ... figuration

Quote:
hibernate.transaction.flush_before_completion If enabled, the session will be automatically flushed during the before completion phase of the transaction. (Very useful when using Hibernate with CMT.)

eg. true | false
hibernate.transaction.auto_close_session If enabled, the session will be automatically closed during the after completion phase of the transaction. (Very useful when using Hibernate with CMT.)

eg. true | false


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.