[JBoss-user] Dirty read with commit option B on JBoss 3.2.0
I use JBoss 3.2.0 with container configuration Standard CMP 2.x EntityBean (commit option B, pessimistic locking). All code run within transactions, user or container (required). I see next strange behavior: 1. JBoss starts first transaction that find some Entity Bean instance A, use it with get and set methods and lock it within transaction. 2. Started second transaction that try to gain lock on the same object A and waiting. 3. First transaction end it's actions and commit changed A property to DB. 4. From this moment second transaction can continue to run , gains lock on A, but when it try to call get property i see inconsistence and view that actually read value that was before commit of first transaction - dirty read. What i do wrong and should change ? --- This SF.Net email is sponsored by the new InstallShield X. From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Dirty read with commit option B on JBoss 3.2.0
Did the second transaction found the instance with on-find read-ahead? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Maxim Mikhelman Sent: Thursday, June 03, 2004 11:08 AM To: [EMAIL PROTECTED] Subject: [JBoss-user] Dirty read with commit option B on JBoss 3.2.0 I use JBoss 3.2.0 with container configuration Standard CMP 2.x EntityBean (commit option B, pessimistic locking). All code run within transactions, user or container (required). I see next strange behavior: 1. JBoss starts first transaction that find some Entity Bean instance A, use it with get and set methods and lock it within transaction. 2. Started second transaction that try to gain lock on the same object A and waiting. 3. First transaction end it's actions and commit changed A property to DB. 4. From this moment second transaction can continue to run , gains lock on A, but when it try to call get property i see inconsistence and view that actually read value that was before commit of first transaction - dirty read. What i do wrong and should change ? --- This SF.Net email is sponsored by the new InstallShield X. From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Dirty read with commit option B on JBoss 3.2.0
Hi, thanx for response. On you question : No. I use default JBoss preferences for entity beans without on-find or on-load strategies. Actually i have 2 entity beans with CMR relation 1 to 1, for example entity A has entity B in relation. First transaction find A and modified it's CMR B. On commit in DB log i see that all committed right and B changed. Second transactions use findByPK for find A and get from A entity B entity. Here i get B with old values. More strange that in DB log and by debugger i see that ejbLoad() for entity B called after first transaction committed, BUT container return for me old values for B, like if some cashing was enabled... Regards, On Thu, 2004-06-03 at 12:09, Alexey Loubyansky wrote: Did the second transaction found the instance with on-find read-ahead? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Maxim Mikhelman Sent: Thursday, June 03, 2004 11:08 AM To: [EMAIL PROTECTED] Subject: [JBoss-user] Dirty read with commit option B on JBoss 3.2.0 I use JBoss 3.2.0 with container configuration Standard CMP 2.x EntityBean (commit option B, pessimistic locking). All code run within transactions, user or container (required). I see next strange behavior: 1. JBoss starts first transaction that find some Entity Bean instance A, use it with get and set methods and lock it within transaction. 2. Started second transaction that try to gain lock on the same object A and waiting. 3. First transaction end it's actions and commit changed A property to DB. 4. From this moment second transaction can continue to run , gains lock on A, but when it try to call get property i see inconsistence and view that actually read value that was before commit of first transaction - dirty read. What i do wrong and should change ? --- This SF.Net email is sponsored by the new InstallShield X. From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user --- This SF.Net email is sponsored by the new InstallShield X. From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Dirty read with commit option B on JBoss 3.2.0
You need to post the deployment descriptors, logs with SQL statements and relevant details. Please, try our forums. Thanks. alex -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Maxim Mikhelman Sent: Thursday, June 03, 2004 2:15 PM To: JBoss List Subject: RE: [JBoss-user] Dirty read with commit option B on JBoss 3.2.0 Hi, thanx for response. On you question : No. I use default JBoss preferences for entity beans without on-find or on-load strategies. Actually i have 2 entity beans with CMR relation 1 to 1, for example entity A has entity B in relation. First transaction find A and modified it's CMR B. On commit in DB log i see that all committed right and B changed. Second transactions use findByPK for find A and get from A entity B entity. Here i get B with old values. More strange that in DB log and by debugger i see that ejbLoad() for entity B called after first transaction committed, BUT container return for me old values for B, like if some cashing was enabled... Regards, --- This SF.Net email is sponsored by the new InstallShield X. From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user