Rickard �berg wrote:

> Hi!
>
> Consider the following:
> If I have a stateful sessionbean which is marked with TX_REQUIRES_NEW,
> and a method is invoked which updates some variables in the bean, but
> before it can return the tx is for some reason rolled back. What will
> happen with the state of the bean?
>
> Since it is transactional one would imagine that the state would be
> restored to what it was before the method was invoked.

I don't think so. Whether it is transactional or not doesn't matter as it is
still a session bean.
 According to the specs. "A session bean's conversational state is not
transactional"..
 "the bean developer must use the afterCompletion notification to manually
reset it's state"
 EJB spec 1.0 chapter 6 pg 25-26

> However, this
> would require that the bean was stored (i.e. serialized) prior to the
> invocation. Is this the intent of the spec. (Vlada?), and are any
> vendors implementing it this way? Is the SessionSynchronization-interface
> supposed to cover this?
>

  Yes.  the javax.ejb.SessionSynchronization has the notification mechanism to
handle rollback/recovery in transactions that involve session beans.

>
> Thanks,
>   Rickard
>
> --
> Rickard �berg
>
> Computer Science student@LiTH
> @home: +46 13 177937
> Email: [EMAIL PROTECTED]
> Homepage: http://www-und.ida.liu.se/~ricob684
>
> ===========================================================================
> 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".

--

                    (| (.)(.)|)
-------------------OOOo--()--oOOO.---------------

Nishi Nidamarty                 TDI Inc. ,
TEL  : 408-330-3466             5000 Old IronSides Dr,
FAX  : 408-330-3444             Santa Clara  CA 95054.

mailto:[EMAIL PROTECTED]         http://www.tdiinc.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".

Reply via email to