I have a chain of four ejbs, two stateless and two entity that uses cmp with sqlServer (JBoss 304).
The first steteless (trans-attribute supported) does some work and than invokes the second stateless deployed with trans-attribure required; this one calls two entity that works on db. Everything works correctly, also from the transactional point of view.
Problem is; if I insert a record passing through the ejbContainer, then delete it directly from a simple dbClient, then insert it again, the container tells me that the entity already exists in the persistence storage.
What I read from 'Jboss administration and development' book' is that with commit option B 'The container will synchronize the in-memory state at the beginning of each transaction'. Why in this case, even though a transaction is started from the second stateless, the container continue to think that the entity inserted is already present in the db ? How does synchronization is supposed to work with commit option B ?
That said, modifying commit option from B to C, everything works; still, can't understand why in this particular case commit option b is not enough.
Thank you for every suggestion, bye from Italy.