This one time, at band camp, David Colwell said:
DC>I am attempting a long transaction in which I load an object in one
DC>transaction and modify/store it in another. The update( ) call fails with
DC>"org.exolab.castor.jdo.LockNotGrantedException: persist.writeLockTimeout"
DC>
DC>The first transaction does something like:
DC>begin( )
DC>OQL query for the object
DC>commit( )
DC>
DC>The second transaction:
DC>begin( )
DC>modify the object
DC>update( )
DC>commit( )
DC>
DC>Does anyone have any experience with this exception?
David,
What kind of locking are you using on your objects in the mapping
descriptor? If you've not specified any, the default lock type is
'shared'.
BTW, typically a long transaction goes as follows:
begin()
query for object
commit()
modify object
begin()
update( object )
commit()
The notable difference is that the changes are performed between the two
transactions. The reason for the difference is that Database.update()
makes the current transaction aware of the object that was made available
in another transaction, and modified outside of the current transaction.
Bruce
--
perl -e 'print unpack("u30","<0G)U8V4\@4VYY9&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev