Hi,
I am having a problem with concurrent Castor transactions from different
machines accessing the same database.
I am using access="db-locked", as I have two jboss servers accessing the same
datbase via Castor. However, I am still seeing the following error when both
servers attempt to update the same object in the database :
--- snip ---
org.exolab.castor.jdo.ObjectModifiedException: Transaction aborted:
Object of type com.ilumin.dcx.entity.jdo.Message with identity
57,000 has been modified by a concurrent transaction
--- snip ---
It then goes on to say that the cached object does not match that in the
database, even though I have also set <cache-type cache="none"/> in my mappings
file.
After some further digging, it appears that this problem is occurring because I
am retrieving the message objects from the database using Database.load(). The
javadocs say that this method will take into account the type of locking being
used, but this doesn't appear to be the case. If I change this to run an OQL
query that selects from the database on object id, I get the behaviour that I
expect. I've turned on full debugging and have noticed that the SQL for loading
message objects doesn't have the "HOLDLOCK" hint that I would expect, but the
OQL query generated select statement does.
I am using the latest Castor - 0.9.4.2 - has anyone else experienced this? Is
this a known problem with Database.load().
Cheers
--
Keir Bowden
Olive Systems Limited
http://www.olive.co.uk
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev
- Re: [castor-dev] Concurrent Transaction Problems Keir Bowden
- Re: [castor-dev] Concurrent Transaction Problems Bruce Snyder
- Re: [castor-dev] Concurrent Transaction Problems Keir Bowden
