I have two stateless session beans in which bean A uses bean B.  Until now,
we have been creating an instance of bean B in every method of bean A.
However, I am thinking that we should just create one instance of bean B in
the ejbCreate and remove it in the ejbRemove methods.

So instead of:

class A {
  void foo() {
    create B;
    invoke B.method;
    remove B;
  }
}

VS:

class A {
  void ejbCreate() ... {
    create B;
  }

  void foo() ... {
    invoke B.method;
  }

  void ejbRemove() ...{
    remove B;
  }
}

Any comments?  What are the benefits of one VS the other method, if any?

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