[EJB 3.0] - EJB3 Timers: OutOfMemory error when handling large number of
by abollaert
Hi,
I have an MDB that needs to start a timer in some cases when it receives a message. This is implemented in terms of an EJB3 timeout method. However, it seems that JBoss is creating a thread per timer. This is causing OutOfMemory errors because the VM cannot allocate new threads for the timers, eventually resulting in a crash of the server when handling large loads (20000 timers). It is necessary to create the timers, so changing the code to not use timers is not an option.
I've googled around a bit for a a solution to this problem, and came across https://jira.jboss.org/jira/browse/EJBTHREE-1330. This issue does mention a workaround (using StrictMaxPool instead of the standard evergrowing ThreadlocalPool. But my MDBs are already using the StrictMaxPool (15 instances strictMaximum), and this does not seem to help.
I would assume that there is a way to configure the TimerService itself to use a thread pool, but the Jira issue does not specify how this could be done, nor does the documentation.
I would really appreciate it someone could shed some light on this... If there is no way of limiting the threads created by the TimerService, I'll have to change the implementation. But if there is some way of changing this, I would like to know how to do this because it would be the most elegant solution...
Thanks in advance,
Alexander
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4223548#4223548
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4223548
15 years, 9 months
[JBoss AOP] - Standalone after-throwing sample works fine, but not work on
by ienvyou
Hello,
Thank you for JBoss AOP effort first.
I'm using JBoss AOP and trying to use after-throwing for exception handling.
As like subject, the after-throwing sample in jboss-aop-2.0.1.GA works fine but same sample on AS5.0.1GA doesn't work.
These are my environment :
JDK : JDK1.6.0
Platform : Microsoft Windows XP
JBoss AS : JBoss AS 5.0.1 GA
I also included javaagent switch and loadtime config to true in conf/bootstrap/aop.xml
-javaagent:deployers/jboss-aop-jboss5.deployer/pluggable-instrumentor.jar
Exception :
14:14:50,188 INFO [STDOUT] Catching Exception org.jboss.aop.advice.NoMatchingAdviceException: No matching around advice called 'afterThrowing' could be found in Aspect for joinpoint Method[method=public void jboss.POJO.throwPOJOExceptionMethod(java.lang.String) throws POJOException]
Is there any missing point here?
Thanks in advance!
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4223536#4223536
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4223536
15 years, 9 months