Hi All,
I have been trying for a while now to get Spring managed transactions
working on GAE without success. I have searched these forums and the
web and find a few examples, all slightly different, and none of which
work for me. I am getting the error "class javax.jdo.JDOUserException:
Transaction is still active. You should always close your transactions
correctly using commit() or rollback()." This makes total sense to me
in that Spring is not closing the transaction but I don't understand
why I am getting it with the following configuration.... any ideas/
examples greatly appreciated.
When I don't use transactions it all works great. But I really need
the transactions and would love it to be controlled via Spring.
I am using the latest version of GAE 1.3.2.
<bean id="persistenceManagerFactory"
class="org.springframework.orm.jdo.LocalPersistenceManagerFactoryBean">
<property name="persistenceManagerFactoryName" value="transactions-
optional" />
</bean>
<bean id="txManager"
class="org.springframework.orm.jdo.JdoTransactionManager">
<property name="persistenceManagerFactory"
ref="persistenceManagerFactory" />
<property name="jdoDialect" ref="dataNucleusJdoDialect"/>
</bean>
<bean id="dataNucleusJdoDialect"
class="org.datanucleus.springframework.DataNucleusJdoDialect"/>
<tx:advice id="txAdvice" transaction-manager="txManager">
<tx:attributes>
<tx:method name="clearAndCreate" propagation="REQUIRED" rollback-
for="Throwable" />
<tx:method name="create" propagation="REQUIRED" rollback-
for="Throwable"/>
<tx:method name="update" propagation="REQUIRED" rollback-
for="Throwable" />
<tx:method name="delete" propagation="REQUIRED" rollback-
for="Throwable" />
<tx:method name="*" propagation="NOT_SUPPORTED" read-only="true"/>
</tx:attributes>
</tx:advice>
<aop:config>
<aop:advisor pointcut="execution(* com.mydomain.myapp.dao.*.*(..))"
advice-ref="txAdvice"/>
</aop:config>
--
You received this message because you are subscribed to the Google Groups
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine-java?hl=en.