Actually what you need to do is make your layer a transaction Resource to
the EJB container. This is typically done via JTA. In GemStone/J we use
CORBA OTS for the underlying transaction machinery, so you can implement
this as an OTS Resource.

Regards,

-Chris.



> -----Original Message-----
> From: Daniel HERLEMONT [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, February 28, 2000 6:52 AM
> To:   [EMAIL PROTECTED]
> Subject:      Transactions: ODMG vs EJB models
>
> Hello
>
> I have developed a thin persistent layer on top of JDBC interface.
> This persistent layer try to stick with the ODMG (www.odmg.org) for
> transactions: transactions are attached to the current thread, so that I
> can
> retrieve the current transaction by Transaction.current(), anywhere
> without
> passing the transaction object.
>
> I am wondering how this will mathc with EJB. My guess is that I have to
> implement a UserTransaction that will encapsulate my 'ODMG' transaction,
> but
> I saw many discussion around threads and I am wondering if I can
> manipulate
> threads while implementing this UserTransaction ? and if I can implement
> such interface at aplliction level ?
>
> I saw that the user transaction has some nice thing such as
> setRollbackOnly.
> I would also expect some other things such as readonly transactions, ...
>
> Any hint (I am a newbiee in EJB)
>
>
>
> BTW  there are ohter advantage of doing this encapsulation: my Transaction
> object has a finalizer that try to rollback the transaction and give back
> the connection to my pool, then I can program wihtout fear of keeping
> running connections and locks, even in case of exceptions
>
> I supposed that EJB managed transactions could provide the same thing, but
> i
> am not sure of that.
>
> ==========================================================================
> =
> 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".

Reply via email to