Alex,
to the best of my knowledge in EJB 2.0 (pdf2):
1. You can get the javax.transaction.UserTransaction interface from the
EjbContext for
Session and Message-Driven Beans with Bean Managed Transaction Demarcation,
but not in the case of EntityBeans
This can give you the status of the transaction, but really nothing in the
sense of attributes etc.
2. You can use the EjbContext, and its subinterfaces - EntityContext,
MessageDrivenContext & SessionContext -
to obtain the context of the current instance, its home & component
interfaces (but not for MessageDrivenBeans) and primarykey in the case of
entitybeans,
but this relates to the current instance and not to the transaction
3. You can use the EJBHome.getEJBMetaData() to return the EJBMetaData
interface. This
however is useful only in the case of Remote interfaces (and not local) and
it gives you
general information about the EJB (wether is Stateless of not, or its
PrimaryKey Class) - but not with MessageDriven Beans
4. Set a general set of Environment Properties in the deployment descriptor
for each EJB.
These environment entries can be set for each EJB using the <env-entry> tag
and retrieved using JNDI lookup on the environment naming context. These are
however 'above' transactions.


In other words,
nothing compared to the straight setAttribute/getAttribute functionality

Max

----- Original Message -----
From: "Alex Paransky" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, June 16, 2001 8:35 AM
Subject: Question regarding usage of the transaction context...


> In HTTP world a single HttpServletRequest ties together execution of
> multiple Servlets on the same http request.  It is similar to the way a
> Transaction ties together multiple API calls to various EJB objects.  Like
a
> common thread, both HttpServletRequest and a Transaction "meander" through
> various servlets or APIs respectively.
>
> Is there a way to achieve something similar to
> HttpServletRequest.getAttribute/setAttribute functionality in the EJB
world
> in relation to Transactions?
>
> In other words, I would like to attach some values to existing
transaction,
> and be able to retrieve these values in other methods (executing inside of
> the transaction boundry) without having to explicitly alter the interfaces
> of the EJBs.
>
> Thanks.
> -AP_
>
>
===========================================================================
> 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