-->
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.  [ 17 posts ]  Go to page Previous  1, 2
Author Message
 Post subject:
PostPosted: Thu Nov 27, 2008 5:27 am 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
Hi,

have you tried explicitly setting the jtaTransactionManager property?

Code:
<bean id="txManager" class="org.springframework.transaction.jta.JtaTransactionManager">
        <property name="allowCustomIsolationLevels" value="true"/>
        <property name="nestedTransactionAllowed" value="true"/>
</bean>

<bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
        <property name="configurationClass" value="org.hibernate.cfg.AnnotationConfiguration"/>
        <property name="configLocation" value="/WEB-INF/hibernate.cfg.xml"/>
        <property name="dataSource" ref="dataSource"/>
       <property name="jtaTransactionManager">
          <bean factory-bean="txManager" factory-method="getTransactionManager"/>
        </property>
</bean>

<tx:annotation-driven transaction-manager="txManager"/>


If this does not help maybe have a closer look at the Spring Hibernate documentation.

--Hardy


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 29, 2008 9:12 am 
Newbie

Joined: Sat Jul 19, 2008 1:29 am
Posts: 13
hardy.ferentschik wrote:
Hi,

have you tried explicitly setting the jtaTransactionManager property?

Code:
<bean id="txManager" class="org.springframework.transaction.jta.JtaTransactionManager">
        <property name="allowCustomIsolationLevels" value="true"/>
        <property name="nestedTransactionAllowed" value="true"/>
</bean>

<bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
        <property name="configurationClass" value="org.hibernate.cfg.AnnotationConfiguration"/>
        <property name="configLocation" value="/WEB-INF/hibernate.cfg.xml"/>
        <property name="dataSource" ref="dataSource"/>
       <property name="jtaTransactionManager">
          <bean factory-bean="txManager" factory-method="getTransactionManager"/>
        </property>
</bean>

<tx:annotation-driven transaction-manager="txManager"/>


If this does not help maybe have a closer look at the Spring Hibernate documentation.

--Hardy


It's help!
Yhank you very much.
Now all working fine.


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

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.