-->
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: How to handle Hibernate transactions inside CMT?
PostPosted: Sun Jul 04, 2010 10:28 pm 
Newbie

Joined: Thu Apr 01, 2010 2:22 am
Posts: 4
I need to commit only Hibernate transactions inside CMT

Current System

1) JBoss - Stateless Session Bean with CMT
2) DataSource as below
Code:
<bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
      <property name="jndiName">
         <value>java:OracleDS</value>
      </property>
   </bean>


3) Session Factory
Code:
   <bean id="sessionFactory"
      class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
      <property name="dataSource">
         <ref bean="dataSource" />
      </property>
      <property name="configLocation">
         <value>classpath:/hibernate.cfg.xml</value>
      </property>
   </bean>


4) I am using both Hibernate and JDBC (direct).

5) Now i need to commit only Hibernate transaction ("unit of work" or commit).
6) JDBC transactions as usual by CMT.
7) When i try with nested transaction, there is performance issue.

Please help me how to handle.


Top
 Profile  
 
 Post subject: Re: How to handle Hibernate transactions inside CMT?
PostPosted: Mon Jul 05, 2010 5:22 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
as "CMT" means "Container Managed Transactions" you can't commit them yourself ;)
If you want to manage them yourself, configure the transaction manager differently.

_________________
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.  [ 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.