The reason I want to know about programmatically removing a CMP entity bean
from memory is because I'm retrieving an enumeration/collection of CMP
entity beans from the database through a CMP finder method, this finder
method is called each time a particular web page is served, and each time
the finder method is called a whole new set of active entity beans is
created.  There are hundreds of active CMP entity beans being created even
though the collection of CMP entity beans being returned is the same 10 or
15 CMP entity beans each time.

Danny

----- Original Message -----
From: "Harish Vajha" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, December 19, 2001 1:55 AM
Subject: Re: Removing a CMP Entity Bean from Memory


> Generically speaking, The container can use multiple entity beans to
> represent the same obj or use only a single entity bean
> to represent one obj(a row in a rel DB). This is, as Ashwani mentioned,
> internal to the App server and
> unless the container vendor gives a configuration option, cannot be
> altered.
>
> I am curious to know why you would want to remove entity beans from the
> memory. IMHO, you must try
> increasing the bean pool size(if you think that's going to be an issue).
> Any specific reasons other than that?
>
> Harish
>
> Ashwani Kalra wrote:
>
> >Here is how finder method works. When you execute the finder on existing
cmp
> >then container picks the Idle cmp in the pool and executes its load
method
> >to initialize its state and returns its remote reference. So for one
finder
> >you have two cmp active. This is what the specs says. IMO you cannot
alter
> >this behaviour
> >
> >~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >Cheers
> >Ashwani Kalra
> >Sr. Mem. Dev. Staff
> >Aithent Technologies
> >India
> >www.geocities.com/ashwani_kalra/
> >~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >: A mailing list for Enterprise JavaBeans development
> >[mailto:[EMAIL PROTECTED]]On Behalf Of Danny
> >Sent: Tuesday, December 18, 2001 1:57 PM
> >To: [EMAIL PROTECTED]
> >Subject: Removing a CMP Entity Bean from Memory
> >
> >
> >Is there a way to programmatically tell the container to remove a CMP
entity
> >bean from memory without removing it's persistent data?  I did many
searches
> >on the web relating to this question but the answer still eludes me.  As
a
> >test example, I call a CMP entity bean finder method twice with the same
> >parameters each time.  The finder method returns a collection of 2 entity
> >beans for each call.  When I monitor the containers CMP entity beans
after
> >the first call, there are 2 active entity beans.  When I monitor the
> >containers CMP entity beans after the second call, there are 4 active
entity
> >beans.  It seems like there should only be 2 active entity beans since
the
> >second call to the finder method is returning the same 2 entity beans as
the
> >first call.  If the container is going to produce new active entity beans
> >every time a CMP entity bean finder method is called, then I would like
to
> >be able to programmatically remove the active entity beans from memory.
> >
> >Danny
> >
>
>===========================================================================
> >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".
> >
>
>
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
>
===========================================================================
> 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