One of the functionalities of an App Server is to provide "object
pooling", and even though multiple clients (or client threads) calls
individual home.create(), these individual stub instances should point
to pooled EJB instances within App. Server. This case is true for
Stateless Session EJB, not for Stateful EJB.

ejbRemove will help the App. Server. Runtime to decrement remote
reference counts - hint to App. Server. for better resource management.

Regards

Binil
Communications Service Providers (CSP) Architecture Practise
Infosys Technologies Limited
"Bhavani" | http://www.technopark.org | Trivandrum  695 581 | India
Office +91-471-2700888 Extn 8424 | VOIP 2056
[EMAIL PROTECTED] | http://www.infosys.com

-----Original Message-----
From: A mailing list for Enterprise JavaBeans development
[mailto:[EMAIL PROTECTED] On Behalf Of Ian Vellosa
Sent: Tuesday, August 22, 2006 2:25 PM
To: EJB-INTEREST@JAVA.SUN.COM
Subject: 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".

**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely 
for the use of the addressee(s). If you are not the intended recipient, please 
notify the sender by e-mail and delete the original message. Further, you are 
not to copy, disclose, or distribute this e-mail or its contents to any other 
person and any such actions are unlawful. This e-mail may contain viruses. 
Infosys has taken every reasonable precaution to minimize this risk, but is not 
liable for any damage you may sustain as a result of any virus in this e-mail. 
You should carry out your own virus checks before opening the e-mail or 
attachment. Infosys reserves the right to monitor and review the content of all 
messages sent to or from this e-mail address. Messages sent to or from this 
e-mail address may be stored on the Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***

===========================================================================
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".
  • EJB remove Ian Vellosa
    • Re: EJB remove Binil Das Christudas

Reply via email to