-
1. Re: Problems with CMP/DAO Patter
duncan Jul 22, 2003 7:58 PM (in response to wellington.pinheiro)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?
-
2. Re: Problems with CMP/DAO Patter
bkross Aug 7, 2003 6:33 AM (in response to wellington.pinheiro)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? -
3. Re: Problems with CMP/DAO Patter
wellington.pinheiro Aug 14, 2003 2:29 PM (in response to wellington.pinheiro)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! -
4. Re: Problems with CMP/DAO Patter
wellington.pinheiro Aug 14, 2003 2:31 PM (in response to wellington.pinheiro)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?
Thanks!!