I have stateless session beans calling local BMP entity beans. The transactions are container managed and both session bean and entity beans have the transaction attribute set to Required.
While in the middle of the remote call ejbStore is called multiple times (to be precise 2). Then a few more fields are modified in the local entity bean model (no calls are actually made to the bean, the bean model is updated).
Then the remote methof finishes and transaction commits (the updates which fired off against the DB from the intermmediate ejbStore's are committed), however the last changes (between the last ejbStore and the commit of the session level bean transaction) are not being saved to the DB because there is no call to ejbStore.
Is there a setting that I am missing?
A quick follow up. Setting sync-on-commit-only to true removes the intermittent ejbStores and does make JBoss call the ejbStore at the end of transaction but according to the EJB spec what I described in the original post should also work.
Does anybody have any ideas?