dear all,

i found that there are two ways in getting the underlying JDBC Connection.

1.
>   conn =
(Connection)((org.exolab.castor.jdo.engine.DatabaseImpl)db).getConnection();

or:

2.
>   conn = org.exolab.castor.jdo.engine.DatabaseRegistry.getDatabaseRegistry(
>        myJDO.instance().getDatabaseName()).createConnection();

but then when i use the connection obtained in 2 i found that under the
following scenario:

i.  using a seperate thread i get the connection in 2, then set autoCommit() =
false,
    try to update a row, without commiting
ii. then i using a seperate thread and use castor and try to update the same row
in
    the same table

i found that the the thread using castor got hold up (synchronized).  but i
would expect the thread to fail after the timeout period?  i didnt try the
connection obtained from 1 but i would expect the thread using castor also get
hold up.
any suggestion?  or have i done sth wrong?  or is it sth to do with JDBC not
castor?
i ve also found that if i use a third thread using castor to update the same
row, then this thread with throw deadlock exception(which is the behaviour i
would expect)
and if i use a fourth thread using JDBC to update the same row, this thread will
synchronized with the first JDBC thread.


regards,

dave


_______________________
CONFIDENTIALITY NOTICE:

This message, together with any attachment, is intended only for the use of the 
individual or entity to whom it is addressed and contains information that is 
privileged and confidential.  If you are not the intended recipient, please be 
informed that any dissemination, distribution or reproduction of this message 
(including any attachment) is strictly prohibited.  If you have received this message 
in error, please notify us immediately by return e-mail and delete the original 
message.  Thank you.

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to