Storing in a transient object would allow access from one particular bean.
This would partially work, however, I need to access some values from
various EJB's inside of the same transaction.
We have a mechanism which allows us to "plug" additional business logic into
various functions during deployment time, and external from the ACTUAL
implementation of those functions. So for example, we can "externally" add
business logic to setQuantity(...) or setItem(...) API to update some table.
However, if the user is going to call setQuantity(...) followed by
setItem(...) we only want to update the table once. Thus, we would like to
store a boolean tableUpdated = true, somewhere in the state of the
transaction so that setItem(...) or setQuantity(...) api could check that
boolean and not insert into the table again.
The setItem(...) or setQuantity(...) could be in the SAME (in this case the
transient map would work) or different EJB objects, thus it would be nice to
be able to access the "same" boolean tableUpdated from both functions.
Thanks for replying.
-AP_
-----Original Message-----
From: A mailing list for Enterprise JavaBeans development
[mailto:[EMAIL PROTECTED]]On Behalf Of Franck Rasolo
Sent: Saturday, June 16, 2001 3:43 AM
To: [EMAIL PROTECTED]
Subject: Re: Question regarding usage of the transaction context...
Alex,
Did you consider storing the values in a transient Map ?
Franck
--- Alex Paransky <[EMAIL PROTECTED]> wrote:
> 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_
__________________________________________________
Do You Yahoo!?
Spot the hottest trends in music, movies, and more.
http://buzz.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".
===========================================================================
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".