-
1. Re: Stateless Session Beans Memory Leak
stefan_meyer Dec 1, 2004 6:57 AM (in response to mitchelln)did you ever find a reason for that ? i have the same problem on 3.2.3.
-
2. Re: Stateless Session Beans Memory Leak
mitchelln Dec 1, 2004 9:21 AM (in response to mitchelln)no never got to the bottom of it the application seems to run fine though so it might not be worth worrying about :-) but if you discover a solution please let me know.
sorry
neil -
3. Re: Stateless Session Beans Memory Leak
mdonato Sep 25, 2006 11:00 AM (in response to mitchelln)Hi All,
I'm Facing the same problem.
I'm using jboss 4.0.2 and the creation of stateless session bean increments over max size of 100, and the remove method is never called by the container.
There are a lot of user's using my application, and it become unstable, couse memory leaks and give me an OutOfMemory Error.
It occurs many times..
I face this only with Jboss, with Other AS like Websphere it doesn't happens!
Some One has an answer for this ???
Please -
4. Re: Stateless Session Beans Memory Leak
jaikiran Sep 25, 2006 11:25 AM (in response to mitchelln)and the remove method is never called by the container
Its the client which has to call the remove method and not the server. Have a look at:
http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/EJBConcepts9.html
Here's an extract from that url:At the end of the life cycle, the client invokes the remove method and the EJB container calls the bean's ejbRemove method. The bean's instance is ready for garbage collection.
-
5. Re: Stateless Session Beans Memory Leak
mdonato Sep 25, 2006 11:33 AM (in response to mitchelln)Thanks for reply,
So, after using the bean, i have to call remove(), right?
Then when the container will release the instance and put it for garbage?? Imidiatelly? Or will take some time ??
What is the rule for it? -
6. Re: Stateless Session Beans Memory Leak
jaikiran Sep 25, 2006 11:35 AM (in response to mitchelln)The moment you say myBean.remove(), the server will invoke ejbRemove() on your bean implementation. And once this callback method completes, the bean will be released back to the EJB pool.
-
7. Re: Stateless Session Beans Memory Leak
mdonato Sep 25, 2006 12:47 PM (in response to mitchelln)Hi,
I made a modification in my application, and now i see the call of method remove() by web-console, but it appears in section Invocation Statistics, but do not appear in Bean Statistics.
Like this:
Bean Statistics
- CreateCount === 27
- RemoveCount == 0
Invokations Statistics
-- create == 27
-- remove == 27
What is wrong now ??? -
8. Re: Stateless Session Beans Memory Leak
mdonato Sep 25, 2006 1:56 PM (in response to mitchelln)Now:
Bean Statistics
- CreateCount === 176
- RemoveCount == 0
Invokations Statistics
-- create == 176
-- remove == 176