Hi
I have a problem with last project that integrates EJB, Spring and Hibernate.
First, i would like to present architecture:
WEB TIER -> EJBRemote ServiceA(BMT) -> Transaction Interceptor (Propagation Required, READ ONLY) -> POJO ServiceA (logic including some hibernate DAO)-> EJBLOCAL ServiceB(CMT) ->
POJO ServiceB -> EJBLOCAL ServiceB(CMT) - REQUIRES NEW-> POJO ServiceB (login including some hibernate DAO).
I realize that it looks quite weird - but it is all because of IBM folks who encourage to avoid transaction suspending in Websphere.
Everything seems to work fine but the main problem is that SINGLE hibernate session is used by DAO executed in POJO ServiceA and POJO ServiceB.
I see websphere trace files and all transactions are created as well.
In logs i see:
Does anyone know how it is possible that sharing pre-bound hibernate session occurs between transactions ??Code:javax.ejb.TransactionRolledbackLocalException: ; nested exception is: org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in read-only mode (FlushMode.NEVER/MANUAL): Turn your Session into FlushMode.COMMIT/AUTO or remove 'readOnly' marker from transaction definition.


Reply With Quote
.