Hi Bruce ,

Thanks a lot for your prompt response.

We are able to figure out the update scenarios.

We still have problems in insert scenario.

The insert scenarion where we do a �new DataObject()�,
does not rollback with the transaction.

It seems that the "DataObject"  is not loaded through
castor and so Castor does not have its reference, and
such DO�s are not being rolled back.

Please help





--- Niraj Juneja <[EMAIL PROTECTED]> wrote:
> We have a scenario where we start the Transaction .
> 
> Perform some work (query , updates and inserts) and
> then commit the transaction.
> 
> We are using the following methods
> 
> The Methods for transactions are as follows
> public void begin() throws
> javax.transaction.NotSupportedException,
>               javax.transaction.SystemException {
>               getTransactionManager().begin();
>       }
> 
> public void commit() throws
> javax.transaction.RollbackException,
> javax.transaction.HeuristicMixedException,
> javax.transaction.HeuristicRollbackException,
> java.lang.SecurityException,
> java.lang.IllegalStateException,
> javax.transaction.SystemException {
>               getTransactionManager().commit();
>       }
> 
> 
> The Transaction Manager is a sub class of
> 
> javax.transaction.TransactionManager
> 
> 
> Now what is happening is as follows.
> 1.We are not able to make updates to database using
> transaction.
>  Castor makes a changed DataObject persistent by
> itself, so we need not give a explicit call to
> update 
>  (as per docs update should be done in a transaction
> different from the one the object was read in, and
> we
> have only one transaction now). 
> 2.When a record is inserted, and read again (in the
> same transaction), LockNotGrantedException is being
> thrown. 
> 3.Updates to the database are rolled back, inserts
> are
> not. 
> 
> Please help
> 
> 
> 
> 
> 
> =====
>
*****************************************************
> Niraj Juneja
> cell : 818 917 8276
>
*****************************************************
> 


=====
*****************************************************
Niraj Juneja
cell : 818 917 8276
*****************************************************

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

Reply via email to