Hi,
We are experiencing serious design problem: in our
system, there is only one stateful session bean
SessionBeanB, another session bean (say SessionBean
A) calls SessionBeanB in A's method: invokeB(), and
then tries to remove it within invokeB(). (both
SessionBeanA and SessionBeanB are TX_REQUIRED).
According to EJB spec, a stateful session bean cannot
be removed if it participates in a transaction.
Therefore, we have to delay the
removing of SessionBeanB until the transaction
completes, which means it cannot be removed in A's
method invokeB().
My question is : where and when shall we remove B?
The approach we try to use is to delay the removal of
SessionBeanB until we remove the parent bean
SessionBeanA. The code is somthing like this:
SessionBeanA: ejbRemove() {
SessionBeanB.remove();
}
However, another problem arises: In order to make
the above code work, we have to model SessionBeanA as
a stateful session bean, for a stateless session
bean's ejbRemove is never called by the client.
Therefore, we have to model all of the session beans
in our system which access SessionBeanB as stateful
session beans as well, just for being able to remove
SessionBeanB in their ejbRemove() method.
Sorry for the long post, but we really need help to
solve the design issue. We are using Weblogic Server
4.5.1.
Thanks!!!
---Lan
__________________________________________________
Do You Yahoo!?
Get Yahoo! Mail - Free email you can access from anywhere!
http://mail.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".