Is it possible that you are using two different connections from a connection pool and the first connection has not committed so the second connection cannot read the data from the first connection?
I believe the issue has to do with optimistic or pessimistic concurrency and in your case it must be using optimistic concurrency.
With optimisitic concurrency, the data is not stored until the transaction completes which is why the dao cannot read the data saved via EJB.
With pessimistic concurrency, the transaction is started as soon as the first EJB stores its data.
I have only come across this scenario using a different J2EE server as JBoss has not had optimistic concurrency until lately.
Which version of JBoss are you using?
Hi, it might be possible but I don't know how to test it's really happening!
I don't know if the container uses the same connection for the persistence of the CMP and the JDBC connection when everything is happening at the same transaction!
I'm using jboss 3.0.3
Is there any way to force a CMP Entity Bean to store the data? Or some kind of time out?