AW: EJB remove

Andreas Berg <[email protected]> Tue, 22 Aug 2006 11:04:43 +0200
Newsgroups gmane.comp.java.sun.ejb.general
Message-ID <[email protected]>
Ian,

the container provides a pool for stateless beans, so no need to worry =
about that. Unless you have more concurrent invocations of your beans =
methods than your limit of bean instances.

Kind regards,

Andreas.

=20
Andreas Berg
Zelfi AG
Hechtsheimer Stra=DFe 33
55131 Mainz
Telefon: 06131-9064850
Telefax: 06131-9064853
[email protected]
http://www.zelfi.com/

-----Urspr=FCngliche Nachricht-----
Von: A mailing list for Enterprise JavaBeans development =
[mailto:[email protected]] Im Auftrag von Ian Vellosa
Gesendet: Dienstag, 22. August 2006 10:55
An: [email protected]
Betreff: EJB remove

Hi,

I'm just looking through some code trying to tidy up and noticed =
something I'm not to sure about, so was hoping you guys could help out.

We have helper methods that get references to EJBs, something like:

public Remote getEjb()
{
  if (home =3D=3D null)
  {
    Context initial =3D new InitialContext();
    home =3D initial.lookup(JNDI_NAME);
    initial.close();
  }

  return home.create();
}

This is then called from lots of places and therfore we are creating =
lots of instances of the EJBs.

Now I am wondering what happens when we reach the limit of the number of =
beans that we have defined in the descriptor files?

I understand that if they were stateful beans, the container would =
passify one, saving its state so that the bean can be reused.

In our case these are stateless beans, so what happens? Does my =
container simply reuse one? Does it implicitly call the ejbRemove method =
to free up an EJB?

Is it something that is app server dependant? (We are using Weblogic
8.1 ;-)

Thanks for any hints
IV

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=

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

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
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".