Parag,
EntityBeans are required to use Container Managed Transactions. In order to
force a rollback within an entity bean you should use the methods on the
EntityContext object
_entityContext.setRollbackOnly();
This will force the currently executing tx to rollback. The scope of the
running tx is determined by the tx properties of all beans enlisted in the
tx.
The SessionSynchronization interface is really designed for the container to
callback to the bean to notify it of certain states of the tx, like
afterBegin() beforeCommit() etc. Its not used in most cases to actually
control a tx.
You should instead in a CMT use the primitives on the context objects.
Dave Wolf
Internet Applications Division
Sybase
> -----Original Message-----
> From: A mailing list for Enterprise JavaBeans development
> [mailto:[EMAIL PROTECTED]]On Behalf Of Parag Bhagwat
> Sent: Monday, September 04, 2000 1:01 AM
> To: [EMAIL PROTECTED]
> Subject: Transcation Control in entity
>
>
> hi all
> we have a sessionsynchronization interface in sessionbeans ,so that we can
> control the transaction and know its exact process.but in entity
> beans there
> is no sessionsynchronization so how do i have control
> on my transaction.i want to update 3 different tables from 3
> diffeernt calls
> to the same remote interface.if any of it fails then the
> transcation should
> be rolled back else commit
> how should i do that.
> Thanks in advance.
> Parag B .Bhagwat
>
>
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
> Share information about yourself, create your own public profile at
> http://profiles.msn.com.
>
> ==================================================================
> =========
> To unsubscribe, send email to [EMAIL PROTECTED] and include
> in the body
> of the message "signoff EJB-INTEREST". For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
>
>
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".