I have a message driven bean which calls a save method on a DAO class. I have the DAO save method declaratively wrapped in a Propogation_required transaction. The transaction manager managing this transaction is the HibernateTransactionManager. The message driven bean calling the DAO is within a jboss container managed transaction. When the MDB calls the DAO I get an exception. It seems as if there is a problem having a JDBC transaction nested within a container managed transaction. The behaviour i am looking for is that the DAO simply participates in the Message Driven Bean transaction. I'll paste some of the exception below. Thanks.
Karl
Caused by: java.sql.SQLException: You cannot commit during a managed transaction!
at org.jboss.resource.adapter.jdbc.BaseWrapperManaged Connection.jdbcCommit()V(BaseWrapperManagedConnect ion.java:
525)
at org.jboss.resource.adapter.jdbc.WrappedConnection. commit()V(WrappedConnection.java:464)
at net.sf.hibernate.transaction.JDBCTransaction.commi t()V(JDBCTransaction.java:63)
at org.springframework.orm.hibernate.HibernateTransac tionManager.doCommit(Lorg.springframework.transact ion.suppo
rt.DefaultTransactionStatusV(HibernateTransactionManager.java:386)
at org.springframework.transaction.support.AbstractPl atformTransactionManager.commit(Lorg.springframewo rk.transa
ction.TransactionStatusV(AbstractPlatformTransactionManager.java:376)
at org.springframework.transaction.interceptor.Transa ctionAspectSupport.doCommitTransactionAfterReturni ng(Lorg.s
pringframework.transaction.interceptor.Transaction AspectSupport$TransactionInfoV(TransactionAspectSupport.java:278)
at org.springframework.transaction.interceptor.Transa ctionInterceptor.invoke(Lorg.aopalliance.intercept .MethodIn
vocationLjava.lang.Object;(TransactionInterceptor.java:67)
at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed()Ljava.lang.Object;(ReflectiveM ethodInvo
cation.java:140)


V(HibernateTransactionManager.java:386)
Reply With Quote