For anyone else who might be having this problem: I think I have figured it out.

My initial conclusion was correct; JBoss was creating more message threads than 
it had the heap capacity to support, causing an OutOfMemoryError.  The minimum 
and maximum number of message threads for a standard MDB queue is regulated by 
the message-driven-bean invoker-proxy-binding in conf/standardjboss.xml:


  | <invoker-proxy-bindings>
  |      <invoker-proxy-binding>
  |          <name>message-driven-bean</name>
  | ...
  |                <MinimumSize>1</MinimumSize>
  |                <MaximumSize>15</MaximumSize>
  | ...
  | 

You can change the default values, or specify custom minimum/maximum number of 
threads for the MDB(s) in your app by doing the following:

1. Copy the "message-driven-bean" invoker-proxy-binding from standardjboss.xml 
into the jboss.xml for your application.  Remember to enclose it in 
<invoker-proxy-bindings> tags.

2. Change the name tag to something else.

3. Copy the "Standard Message Driven Bean" container-configuration into your 
application's jboss.xml.  It should look something like this:


  | <container-configuration>
  |      <container-name>Standard Message Driven Bean</container-name>
  |      <call-logging>false</call-logging>
  |      
<invoker-proxy-binding-name>message-driven-bean</invoker-proxy-binding-name>
  | ...
  | <container-configuration>
  | 

Remember to enclose it in <container-configurations> tags.

4. Change the container-name tag value to something else.

5. Change the invoker-proxy-binding-name tag to reflect the new name of your 
invoker-proxy-binding.

6. Make sure that all the MDB references in jboss.xml refer to the new 
container configuration by changing/adding the configuration-name tag:


  | <enterprise-beans>
  |      <message-driven>
  |           <ejb-name>SomeMDB</ejb-name>
  |           <destination-jndi-name>queue/SomeMDBQueue</destination-jndi-name>
  |           
<configuration-name>WhateverNameYouGaveTheContainerConfig</configuration-name>
  |      </message-driven>
  | 
  | ...
  | 

I think that the process is similar for stateless session beans as well, but 
might require some research as to how it differs.

Relevant links:

http://wiki.jboss.org/wiki/Wiki.jsp?page=ConfigJBossMDB
http://www.precisejava.com/javaperf/j2ee/EJB.htm#EJB148

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3935243#3935243

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3935243


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to