Hi,
we're implementing an entity bean with transactional (container managed)
methods. This bean is accessed by
a session statefull bean. We have transactional problem when a method fails
(that is throws an EJBException) because orion doesn't rollback the
transaction.
Does anybody figure out how to make orion rollback the transaction?
We have also tried with a session stateless/stateful having the same problem
.
Also implementing the SessionSycronization interface doesn't trap the
transaction
boundaries.
Our data-source.xml is:
<data-source
class="com.evermind.sql.DriverManagerDataSource"
name="SetmoveDS"
location="jdbc/SetmoveDS"
xa-location="jdbc/xa/MySetmoveDS"
ejb-location="jdbc/myEJBDS"
connection-driver="oracle.jdbc.OracleDriver"
username="test"
password="test"
url="jdbc:oracle:thin:test/test@testsun:1521:test"
inactivity-timeout="30"
/>
we use orion 1.5.2.
the ejb-jar.xml is:
.....
<session>
<display-name>LogEntJAR</display-name>
<description>LogEntJAR</description>
<ejb-name>MyLogEnt</ejb-name>
<home>setmove.beans.logica.LogEntHome</home>
<remote>setmove.beans.logica.LogEnt</remote>
<ejb-class>setmove.beans.logica.LogEntEJB</ejb-class>
<session-type>Stateful</session-type>
<transaction-type>Container</transaction-type>
<ejb-ref>
<ejb-ref-name>MyEntUtente</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<home>setmove.beans.logica.EntUtenteHome</home>
<remote>setmove.beans.logica.EntUtente</remote>
</ejb-ref>
</session>
.....
<entity>
<display-name>EntUtenteJAR</display-name>
<description>EntUtenteJAR</description>
<ejb-name>MyEntUtente</ejb-name>
<home>setmove.beans.logica.EntUtenteHome</home>
<remote>setmove.beans.logica.EntUtente</remote>
<ejb-class>setmove.beans.logica.EntUtenteEJB</ejb-class>
<persistence-type>Bean</persistence-type>
<prim-key-class>java.lang.String</prim-key-class>
<reentrant>false</reentrant>
<resource-ref>
<description>description</description>
<res-ref-name>jdbc/SetmoveDS</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</entity>
.....
<container-transaction>
<method>
<ejb-name>LogEntEJB</ejb-name>
<method-name>*</method-name>
</method>
<method>
<ejb-name>EntUtenteEJB</ejb-name>
<method-name>*</method-name>
</method>
</container-transaction>
thanks a lot.
Christian