I'm using :
Hibernate 3.2.1
Spring 2.0.1
Jencks 1.3 (tried also 2.0)
The configuration I've been working on do not work. I've trouble with
gerenimo :
Caused by: javax.transaction.SystemException: Caller context is not a bean
managed transaction context
at
org.apache.geronimo.transaction.context.TransactionContextManager.suspendBeanTransactionContext(TransactionContextManager.java:114)
at
org.apache.geronimo.transaction.context.GeronimoTransactionManager.suspend(GeronimoTransactionManager.java:149)
at
org.hibernate.engine.transaction.Isolater$JtaDelegate.delegateWork(Isolater.java:94)
Searching the web, I wasn't hable to find a configuration for my
application.
Please tell me what's wrong with the folowwing configuration :
<!-- Transaction -->
<bean id="transactionContextManager"
class="org.jencks.factory.TransactionContextManagerFactoryBean">
<property name="transactionLog" ref="transactionLog" />
<property name="xidFactory" ref="xidFactory" />
</bean>
<bean id="userTransaction"
class="org.jencks.factory.GeronimoTransactionManagerFactoryBean">
<property name="transactionContextManager"
ref="transactionContextManager" />
</bean>
<bean id="transactionManager"
class="org.springframework.transaction.jta.JtaTransactionManager"
autowire="constructor">
<constructor-arg>
<bean
class="org.jencks.factory.TransactionManagerFactoryBean" />
</constructor-arg>
</bean>
...
<!-- AOP -->
<tx:advice id="txAdvice" transaction-manager="transactionManager">
<tx:attributes>
<tx:method name="..."/>
...
</tx:attributes>
</tx:advice>
<aop:config>
<!-- définition des méthodes de service -->
<aop:pointcut id="serviceMethodes" expression="..." />
<!-- transactions -->
<aop:advisor advice-ref="txAdvice" pointcut-ref="serviceMethodes" />
</aop:config>
...
<!-- DataSource -->
<bean id="poolingSupportRg"
class="org.jencks.factory.SinglePoolFactoryBean">
<property name="matchOne" value="true" />
<property name="matchAll" value="true" />
<property name="selectOneAssumeMatch" value="true" />
<property name="maxSize" value="${jdbc.rg.pool.maxSize}" />
<property name="minSize" value="${jdbc.rg.pool.minSize}" />
<property name="blockingTimeoutMilliseconds"
value="${jdbc.rg.pool.blockingTimeoutMilliseconds}" />
<property name="idleTimeoutMinutes"
value="${jdbc.rg.pool.idleTimeoutMinutes}" />
</bean>
<bean id="dataSourceRg"
class="org.springframework.jca.support.LocalConnectionFactoryBean">
<property name="managedConnectionFactory">
<bean class="org.jencks.tranql.XAPoolDataSourceMCF">
<property name="driverName"
value="${jdbc.rg.driverClassName}" />
<property name="url" value="${jdbc.rg.url}" />
<property name="user" value="${jdbc.rg.username}" />
<property name="password" value="${jdbc.rg.password}" />
</bean>
</property>
<property name="connectionManager">
<bean
class="org.jencks.factory.ConnectionManagerFactoryBean">
<property name="transactionSupport">
<bean
class="org.jencks.factory.XATransactionFactoryBean">
<property name="useTransactionCaching"
value="true" />
<property name="useThreadCaching"
value="true" />
</bean>
</property>
<property name="poolingSupport" ref="poolingSupportRg"
/>
<property name="connectionTracker"
ref="connectionTrackerRg" />
</bean>
</property>
</bean>
<!-- Hibernate -->
<bean id="sessionFactorySc"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="mappingResources">
<list>...</list>
</property>
<property name="hibernateProperties">
<ref bean="HibernatePropertiesSc" />
</property>
<property name="dataSource">
<ref bean="dataSourceSc" />
</property>
<property name="entityInterceptor">
<ref bean="scIntercepteur" />
</property>
<property name="jtaTransactionManager" ref="userTransaction" />
</bean>
--
View this message in context:
http://www.nabble.com/JTA---Hibernate---Spring-tf3266642.html#a9080637
Sent from the jencks - user mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email