I am using stateless EJB to communication Hibernate (Weblogic 8.1). In order to control transaction in EJB, I have following in ejb-jar.xml:
<container-transaction>
<method>
<ejb-name>MySessionBean</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
I am getting error:
java.sql.SQLException: Cannot call Connection.commit in distributed transaction. Transaction Manager will commit the resource manager when the distributed transaction is committed.
In either trun on/off hibernate transaction feature, it still happens. But if I remove EJB transaction from ejb-jar.xml, it works fine. I am wondering if it is possible to control HIbernate transaction over EJB.
JW
|