A SFSB maintains conversational state and has hooks into transaction
events. If the SFSB is transactional, then it makes sense that it can't
be killed until the transaction commits. Presumably your app has an
outer SFSB that initiates the transaction and is the caller of the
builder SFSB remove(). Implement SessionSynchronization in the outer
SFSB and kill the builder SFSB in afterCompletion().

Fred Loney
Spirited Software, Inc.
www.spiritedsw.com


----- Original Message -----
From: "Alex Paransky" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, November 26, 2001 2:37 PM
Subject: Problem with deleting Stateful Session beans during a
transaction...


> We are using a builder pattern to create some of the objects.  In a
> transaction we create the Builder (Statefull Session Bean) and then
execute
> methods on it in order to setup certain properties.  At the end of the
> transaction, we call the build(...) API which constructs the object
> according to the specifications.  At the end of the transaction, we
attempt
> to remove(...) the builder, since it's no longer needed, however, we
get an
> exception stating that Statefull Session beans cannot be removed
during
> transaction.
>
> If Statefull Session beans cannot be removed during a transaction,
what are
> they good for?  Since I am not sure how the deplorer will wrap
transactions
> around my beans, I am not really able to use Statefull Session beans
in ANY
> of my EJB development.
>
> Is there a way around this?  Perhaps the bean can be submitted to some
> garbage collector that would wait for the transaction to be over
before
> removing the bean?
>
> Has any one worked around this nasty problem?
>
>
> 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