Sorry to state the obvious....but...

Just looked at the spec.  You can't remove a Stateful session bean that is
participating in a transaction.  Look in section "Restriction for
transactions"

Bill

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of marc
> fleury
> Sent: Tuesday, July 03, 2001 3:30 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [JBoss-dev] remove transactional
>
>
>
> |Nope, with the old code, B would be removed from the cache when
> b.remove()
> |was called even if it was invoked from within a transaction.  Also, all
>
> I know, I am reading the old code, and that doesn't sound right to me
> frankly.
>
> say b is a stateful bean and you remove it and then rollback the work, the
> bean is STILL REMOVED. (!)
>
> Say it is a "I want to leave the store now" and that is
> transactional and it
> "removes" the cart you have been using and then it asks "are you sure you
> want to leave?" if you say yes then you commit the removal, if you say no
> then you rollback and stay in the store.
>
> With the code as was you lose your cart all the time,
>
>
> |I think that is the safe and correct approach to remove any bean from the
> |cache that is part of a rollback.  Otherwise you may have corrupted data.
>
> that is true for entity since you reload the state (equiv to
> setValid(false)) but for the stateful...?
>
> marcf
>
> |
> |Bill
> |
> |> -----Original Message-----
> |> From: [EMAIL PROTECTED]
> |> [mailto:[EMAIL PROTECTED]]On Behalf Of marc
> |> fleury
> |> Sent: Tuesday, July 03, 2001 2:57 PM
> |> To: Jboss-Development@Lists. Sourceforge. Net
> |> Subject: [JBoss-dev] remove transactional
> |>
> |>
> |> as I wrap up the stuff, sanity check
> |>
> |> bean a and bean b
> |>
> |> a starts transaction and calls b.remove() and then rolls back
> |>
> |> b is still there in cache right?
> |>
> |> marcf
> |>
> |> _________________
> |> Marc Fleury, Ph.D
> |> [EMAIL PROTECTED]
> |> _________________
> |>
> |>
> |> _______________________________________________
> |> Jboss-development mailing list
> |> [EMAIL PROTECTED]
> |> http://lists.sourceforge.net/lists/listinfo/jboss-development
> |>
> |
> |
> |
> |_______________________________________________
> |Jboss-development mailing list
> |[EMAIL PROTECTED]
> |http://lists.sourceforge.net/lists/listinfo/jboss-development
>
>
>
> _______________________________________________
> Jboss-development mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-development
>



_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to