You will have to find a UserTransaction object in JNDI and programatically
access it...
However, you'll soon find other painless alternatives to it:
Facade Pattern: Wrapping the Entity Beans in Session Beans (possibly
Stateless)
with a use case pattern, thus having a single method on the session bean for
each use case
to DECLARATIVELY control Transaction properties (kinda like CMT, but
achieving
many of your objectives)
Another could be a variance of the prior accesing a UserTransaction
object...
you can even do so with a Stateful Session EJB, and begin a TX in a method,
execute some other, and commit in a third one;
However, for Entity Beans, you'll find that persistence methods are
extremely close to
tx properties, the whole idea is to conceal it from the programmer. So
posibly, you'll want
to write your own persistence logic to actually enforce bean managed tx.
I would go for a Facade Pattern anyway, it would give you a whole lotta
options without
consuming too much time
My 2c,
JP
-----Original Message-----
From: Nagaraj, Anilkumar (CTS) [mailto:[EMAIL PROTECTED]]
Sent: Lunes, 08 de Enero de 2001 11:01
To: [EMAIL PROTECTED]
Subject: Re: How to make a CMP a BMT?
I would like to make myself clear. May be I was not.
I was talking about Bean Managed TRANSACTION and not Bean Managed
Persistence.
Nagaraj Anilkumar
Cognizant Technology Solutions
India
-----Original Message-----
From: Sandeep Dath [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 08, 2001 6:57 PM
To: [EMAIL PROTECTED]
Subject: Re: How to make a CMP a BMT?
Hi,
Well, you need to write your own operations for persistence - i,.e for
saving, loading, finding data.
Like use ejbCreate() and ejbRemove() to insert and delete records, and
ejbLoad() and ejbStore() to keep in sync with the data store.
Sandeep Dath
----- Original Message -----
From: "Nagaraj, Anilkumar (CTS)" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, January 08, 2001 5:29 PM
Subject: How to make a CMP a BMT?
> Hi All
> Can anybody let me know how to make a Container managed persistence Entity
> Bean be made to manage it own transaction (BMT).
>
> Thanks in advance,
> Nagaraj Anilkumar
> Cognizant Technology Solutions
> India
>
>
> This e-mail and any files transmitted with it are for the sole use of the
intended recipient(s) and may contain confidential and privileged
information.
> If you are not the intended recipient, please contact the sender by reply
e-mail and destroy all copies of the original message.
> Any unauthorised review, use, disclosure, dissemination, forwarding,
printing or copying of this email or any action taken in reliance on this
e-mail is strictly
> prohibited and may be unlawful.
>
> Visit us at http://www.cognizant.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".
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.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".
This e-mail and any files transmitted with it are for the sole use of the
intended recipient(s) and may contain confidential and privileged
information.
If you are not the intended recipient, please contact the sender by reply
e-mail and destroy all copies of the original message.
Any unauthorised review, use, disclosure, dissemination, forwarding,
printing or copying of this email or any action taken in reliance on this
e-mail is strictly
prohibited and may be unlawful.
Visit us at http://www.cognizant.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".