-->
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.  [ 3 posts ] 
Author Message
 Post subject: Jboss7 and Transactions
PostPosted: Tue Aug 16, 2011 6:51 pm 
Newbie

Joined: Mon Feb 07, 2011 7:43 am
Posts: 6
Hello Guys

I was having problems with Jboss7 and Hibernate3

I was using org.hibernate.transaction.JBossTransactionManagerLookup but it does not work in JBoss AS 7
The solution to the problem is simple.

I created a class with the following value

Code:
public class JBoss7TransactionManagerLookup extends JNDITransactionManagerLookup {

   @Override
   public String getUserTransactionName() {
      return "java:module/UserTransaction";
   }

   @Override
   protected String getName() {
      return "java:jboss/TransactionManager";      
   }

}


I hope it is of interest to someone else

Sorry for my bad English


Top
 Profile  
 
 Post subject: Re: Jboss7 and Transactions
PostPosted: Mon Jan 20, 2014 5:40 pm 
Newbie

Joined: Mon Jan 20, 2014 5:38 pm
Posts: 1
How to configure hibernate.cfg.xml in this case.
do we have to add
hibernate.transaction.manager_lookup_class
hibernate.transaction.factory_class?


Top
 Profile  
 
 Post subject: Re: Jboss7 and Transactions
PostPosted: Tue Jan 21, 2014 8:08 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
When deploying on JBoss, just avoid specifying any property: the deployer will inject the right one.

These properties are available to *override* the correct settings in case you want to do something different.

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.