I'm not able to configure Geronimo/ActiveMQ so that more then 10 Messages get processed at once.
I tried the suggestions from this mailing list,
but setting the maxSessions
to something higher than 10 doesn't have any effect. Setting it to something lower than that has an effect though...
Also I'tried to set the InstanceLimit
by setting:
<module name="org.apache.geronimo.configs/j2ee-server/2.1.4/car">
<gbean name="org.apache.geronimo.configs/j2ee-server/2.1.4/car?ServiceModule=org.apache.geronimo.configs/j2ee-server/2.1.4/car,j2eeType=GBean,name=CustomPropertiesGBean"
gbeanInfo="org.apache.geronimo.system.properties.SystemProperties">
<attribute name="systemProperties">Default\ MDB\ Container.InstanceLimit=50</attribute>
</gbean>
</module>
Okay, finally I got it! Here is a lengthy explanation, which hopefully will help someone too.
After tinkering around with these examples I figured out that the activation parameters of ActiveMQ doesnt limit the upper bound, we can reduce the parallel instance though:
So I decided to go down the road of OpenSource! After attaching all needed source code of the involved components:
and going up the stacktrace I figured out, that the InstanceLimit is a GBean Property which is explicitly queried. Its default value is 10, which is hardcoded in Geronimo. By tweeking this value in the debugger I got the wished results!
But setting the InstanceLimit was also suggested in the mailing list which suggested to add this to Geronimos config.xml
(Of course with the correct version numbers) But this doesn't had any effect. After carefully rereading this hint:
<artifactId>.<Resource Group Name>-<listener interface>
<artifactId>
= artifactId of the jms RA<Resource Group Name>
- The resource Group name u gave while creating the RA<listener interface>
- javax.jms.MessageListener in this caseand examining Geronimos code and runtime state I figured out it was looking for the InstanceLimit in
org.apache.geronimo.openejb.OpenEjbSystemGBean
line 309, with a destinct ID which was in the example project:org.apache.geronimo.configs/activemq-ra/2.2.1/car.ActiveMQ RA-javax.jms.MessageListener
Equiped with this information i gave this a try:
and it worked! Whereby I got the used ID from the debugging session... Now we can set InstanceLimit=0 and can configured the parallel working MDB by the
maxSessions
property of ActiveMQ!