hiernate version - Hibernate 3.0
We use hibernate with Oracle J2ee container Oc4j 1012.
We have some troubles during transactions, that the hibernate session is synchronized with DB in a way the updated data are "commited" to the db before transaction is finished. This situation happens during transaction and when some error later occures, rollbacked are only some of the data.
We use CMT session beans - all transaction logic is managed declaratively. That means RuntimeExccption or SessionContext session.setRollbackOnly() cant invoke transaction rollback.
There is no code, no call over BusinessDelegate to another session bean (possible point to open another).
Do you have any idea what can involve this early flush out of DB transaction.
-------------------------------------
hibernate.cnf.xml
<session-factory>
<!-- properties -->
<property name="connection.datasource">jdbc/JachymDS</property>
<property name="dialect">org.hibernate.dialect.Oracle9Dialect</property>
<property name="show_sql">false</property>
<property name="use_outer_join">false</property>
<property name="transaction.manager_lookup_class">cz.itsys.bc.business.util.OC4jTransactionManagerLookup</property>
-------------------------------------
lookup manager
public class OC4jTransactionManagerLookup extends JNDITransactionManagerLookup {
/**
* @see JNDITransactionManagerLookup#getName()
*/
public String getName() {
return "java:comp/pm/TransactionManager";
}
/**
* Returns jndi name under which is UserTransaction bound.
* @return jndi name under which is UserTransaction bound.
*/
public String getUserTransactionName() {
return "java:comp/UserTransaction";
}
|