When stateless session bean A has a dependency on stateless session bean B,
we create an instance of B b in the a.ejbCreate method.  Similarly, we
dispose of b in the a.ejbRemove() method.  Since the stateless session beans
are never passivated, this seems to work ok (any comments?).

However, when entity bean A a has a dependency on stateless session bean B
b, we tend to create b in each method of bean a where object of type B is
needed.  This adds to the complexity of our methods, since we must make sure
to trap all exceptions and remove a reference to object B in the finally
clause of the A's function call.

Is there a better way to have entity bean A reference stateless session bean
B?  For example, could I create a reference to SSB B in A.setContext() and
remove the reference to SSB B in A.unsetContext()?  This would simplify the
coding of functions in entity bean A.

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

Reply via email to