-
1. Re: java.lang.OutOfMemoryError
adrian.brock Nov 16, 2002 4:30 AM (in response to muradhak)Have you changed the bean cache size?
By default it is set at 1,000,000 PER BEAN in
standardjboss.xml which is probably too large
for your memory.
The 2.x default was 1,000 but that is probably too small.
Regards,
Adrian -
2. Re: java.lang.OutOfMemoryError
muradhak Nov 16, 2002 5:29 AM (in response to muradhak)Hi,
Thanks for the suggestion....
The PC in which I am running the JBoss is having 1gb RAM. Just FYI.
Then while searching the FORUM, I got the follwing inputs.
One is to use JBoss3.0.4, currently I am using 3.0.0, which has some memory leaks fixed.
Next is to use -Xincgc as a java option while starting JBoss.
What is your opinion on this?
How can I find the optimal size of cache for my apllication?
Currently I am going to bring it by half, just blindly.
Cheers
Muraly -
3. Re: java.lang.OutOfMemoryError
adrian.brock Nov 16, 2002 6:06 AM (in response to muradhak)Opinions cost money :-)
It really does depend upon your application/data.
Without analysis, the next best thing is experiment.
e.g. You have 2000 Customers of which maybe 20-100 get
used a normal working data set.
Is it the same customers all the time (your main
customers) or does it depend on the orders being taken?
The cache is per bean. You can add the settings to
jboss.xml that fit each bean.
Regards,
Adrian -
4. Re: java.lang.OutOfMemoryError
muradhak Nov 16, 2002 6:57 AM (in response to muradhak)Hi,
Message Understood, Sound and Clear..;)
Thanks
Muraly -
5. Re: java.lang.OutOfMemoryError
vickyk Nov 16, 2002 7:15 AM (in response to muradhak)Hi Adrian,
I dont have the docs for Jboss and find harder to work with Jboss but still prefer this due to its opensource.For Stateless session option in standardjboss.xml,Can you explain why there is no
<container-cache-conf> ...
but the folliwng is:
<container-pool-conf>
100
</container-pool-conf>
The lifecycle of the EJBs is clear ,I would appericiate if you could give explaination with the life cycle of the EJBs.
Regards
Vicky -
6. Re: java.lang.OutOfMemoryError
adrian.brock Nov 16, 2002 3:12 PM (in response to muradhak)Try to keep posts on topic.
There is no bean cache for stateless beans.
They are all equivalent and just need pooling.
If there are too many to back in the pool
after use, they are thrown away.
Regards,
Adrian -
7. Re: java.lang.OutOfMemoryError
taiwubrian Nov 16, 2002 10:15 PM (in response to muradhak)Hi,
I had the memory problem since 3.0.0alpha. In addition to the memory leak problem, the cache size is the key, isn't it? If I use the default of 1,000,000, does this mean that any bean will be cached until the number of beans reach the limit?
Are the beans being cached by different clients shared?
I cache data on the client side. Then, the client can do anything offline before she ever needs to persist her data. In this case, is it recommended to set the bean cache size as small as possible?
Best Regards,
Brian -
8. Re: java.lang.OutOfMemoryError
adrian.brock Nov 17, 2002 3:21 PM (in response to muradhak)Like I said above, the cache is per bean.
The clients share the cache.
Set the maximum cache to whatver will fit in memory.
You will need to trade-off between beans, which beans
have what maximum cache size.
The other (probably better) alternative is to buy more
memory. The more caching the better performance you
will get.
Regards,
Adrian -
9. Re: java.lang.OutOfMemoryError
vickyk Nov 18, 2002 1:08 AM (in response to muradhak)Hi Adrian,
> There is no bean cache for stateless beans.
> They are all equivalent and just need pooling.
I do understand this.
> If there are too many to back in the pool
> after use, they are thrown away.
What about the Container pool,I mean do the Jboss implementation creats the container pool for the each type of ejb? What I can understand is that there will be one container for each type of the EJB which will be instantiated at the start of the Jboss,and these Container Objects can be pooled.Please clasrify this?
regards
Vicky -
10. Re: java.lang.OutOfMemoryError
adrian.brock Nov 18, 2002 1:31 AM (in response to muradhak)I already told you once to stay on topic,
if you continue to fork I will stop answering your
questions. Start a new thread for new questions.
This thread is about bean cache and memory.
There is no such thing as a container pool,
bean object instances are pooled. The containers
are JMX mbeans.
Regards,
Adrian -
11. Re: java.lang.OutOfMemoryError
taiwubrian Nov 18, 2002 4:58 AM (in response to muradhak)Hi, Adrian,
Please help.
In standardjboss.xml, the max-capacity element for the container IIOP CMP 2.x EntityBean is used as default cache size. Right?
Is the element list-cache-max in jbosscmp-jdbc.xml used to set the per bean cache?
Do you mean that I should set the max-capacity to fit the size of memory and trade off the cahch size among beans by adjusting list-cache-max for each bean?
Best Regards,
Brian -
12. Re: java.lang.OutOfMemoryError
adrian.brock Nov 18, 2002 8:17 AM (in response to muradhak)max-capacity is for the bean cache.
list-cache-max is for the read-ahead results.
Regards,
Adrian -
13. Re: java.lang.OutOfMemoryError
adrian.brock Nov 18, 2002 8:18 AM (in response to muradhak)> There is no such thing as a container pool
Apologies, the bean pool is called container-pool in
jboss.xml
Regards,
Adrian