问题
JBoss: 6 or 7
Question1:
How many instances of Message Driven Bean are created by Jboss to handle messages?
Question2:
How to configure number of Message Driven Beans created by JBoss?
回答1:
According to this JBoss EAP 5 (JBoss AS 6) documentation:
https://access.redhat.com/site/documentation/en-US/JBoss_Enterprise_Application_Platform/5/html/Performance_Tuning_Guide/sect-Performance_Tuning_Guide-Message_Driven_Beans.html
You need to take care of two concepts
- Pool Size: This pool is named StrictMaxPool and the default values is 15. It must be configurated on JBoss config files (read link)
Session Size: This is the parameter configured according to the standard with the following annotations:
@ActivationConfigProperty(propertyName="minSessions" , propertyValue="25") @ActivationConfigProperty(propertyName="maxSessions" , propertyValue="50")
Where minSession and maxSessions are the number of instances created by JBoss. But if the StrictMaxPool is set to 15 then you cannot create more than 15 instances although you configure maxSessions to 50
For JBoss EAP 6 (JBoss AS 7) the pool is named mdb-strict-max-pool and their default max pool size is 20.
来源:https://stackoverflow.com/questions/19469271/how-many-message-driven-beans-are-created-in-jboss