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.

 
Andreas Berg
Zelfi AG
Hechtsheimer Straße 33
55131 Mainz
Telefon: 06131-9064850
Telefax: 06131-9064853
[EMAIL PROTECTED]
http://www.zelfi.com/

-----Ursprüngliche 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: EJB-INTEREST@JAVA.SUN.COM
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 == null)
  {
    Context initial = new InitialContext();
    home = 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

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