Although not specifically prohibited in the spec why would you call a
statefull session bean from a stateless session bean? the session would only
last as long as the method call. It seems redundant to me.

Yes I know this is not an answer, but now im curious as to the whys and
wherefores. :)

Al
----- Original Message -----
From: "Lan Zhong" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 23, 2000 12:08 PM
Subject: Help!! How to remove a stateful session bean from another session
bean


> 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".
>

===========================================================================
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