How to Configure Bean Pools for Session and Message-Driven Beans using the Management Console or Configuration File for Jboss EAP 7.0 and Jboss AS 6.1.0.Final

Latest response

I found solution for creating and editing the bean pool configuration for Jboss version EAP 6.0
I need same solution for both Jboss EAP 7.0 and Jboss AS 6.1.0.Final ?

https://access.redhat.com/documentation/en-US/JBoss_Enterprise_Application_Platform/6.1/html/Administration_and_Configuration_Guide/Create_a_Bean_Pool1.html

https://access.redhat.com/documentation/en-US/JBoss_Enterprise_Application_Platform/6/html/Administration_and_Configuration_Guide/Edit_a_Bean_Pool1.html

Worker MDB:

@MessageDriven(activationConfig = {
        @ActivationConfigProperty(propertyName="destinationType"
        , propertyValue="javax.jms.Queue"),
        @ActivationConfigProperty(propertyName="destination"
        , propertyValue="queue/replenish")
        @ActivationConfigProperty(propertyName=”minSessions”
        , propertyValue=”25”)
        @ActivationConfigProperty(propertyName=”maxSessions”
        , propertyValue=”50”)
})

I need same solution for both Jboss EAP 7.0 and Jboss AS 6.1.0.Final ?
[ How To create or edit bean pools, “Create a Bean Pool” and , “Edit a Bean Pool” using the Management Console and the CLI tool for both Jboss EAP 7.0 and Jboss AS 6.1.0.Final ?
slsb-strict-max-pool
mdb-strict-max-pool ]

Responses

Please any one can responce for this.. How I need same solution for both Jboss EAP 7.0 and Jboss AS 6.1.0.Final

Hi Hareesh,

For MBDs, have a look at the Configuring Messaging Guide. I think this section on MDB Thread Pools may help you.

For EJBs, I think this section on EJB thread pools in the Developing EJB Applications guide may help.

If you need further help, I'm sure our support team will be able to address your specific situation if you open a support request.

Hi Lucas Costi,

Thanks for responding, I am looking into links you shared.

I Increased the maxsession=30 in workerMDB but It's creating only 10 @ActivationConfigProperty(propertyName=”maxSessions” , propertyValue=”30”

As per this link Information I am Tuning: The maxSize parameter on the StrictMaxPool needs to be the same as the maxSessions set on the bean itself.

https://access.redhat.com/documentation/en-US/JBoss_Enterprise_Application_Platform/5/html/Performance_Tuning_Guide/sect-Performance_Tuning_Guide-Message_Driven_Beans.html

I need to Increase the number of worker MDB, I need configuration steps to match StrictMaxPool to be the same as the maxSessions. How to configure them via config File ?

The MDBS are created only on demand if you see only 10 being created it means that there is no need for more.

Hi Tom Ross,

Thanks for response

We have 20 Threads but only 10 MBDs are using repeatedly, remaining threads we are not using.

I need configuration steps to match StrictMaxPool size to be the same as the maxSessions. How to configure them via configuration File for Jboss EAP 7.0 and Jboss AS 6.1.0.Final ?

Hi Tom Ross,

There's a relationship between the pool and the sessions parameters: maxSessions and minSessions. Assume that the number of maxSessions is set to a number larger than the default of 15, perhaps 50, but the default pool size to hold the instances of the MDB is only 15. Only 15 instances will process messages at once, not the 50 as might be expected. The reason for only getting 15 is that the default pool size (as defined in the configuration file) is 15, like the default maxSessions. So changing the maxSessions does not actually help unless the pool's configuration is changed to match.

Link: https://access.redhat.com/documentation/en-US/JBoss_Enterprise_Application_Platform/5/html/Performance_Tuning_Guide/sect-Performance_Tuning_Guide-Message_Driven_Beans.html

maxSession I can able to modified in worker MDB:

@MessageDriven(activationConfig = {
@ActivationConfigProperty(propertyName="destinationType"
, propertyValue="javax.jms.Queue"),
@ActivationConfigProperty(propertyName="destination"
, propertyValue="queue/replenish")
@ActivationConfigProperty(propertyName=”minSessions”
, propertyValue=”25”)
@ActivationConfigProperty(propertyName=”maxSessions”
, propertyValue=”50”)
})

But how to configure the StrictMaxPool=50 to match with maxSession. I need configuration steps to match StrictMaxPool size to be the same as the maxSessions. How to configure them via configuration File for Jboss EAP 7.0 and Jboss AS 6.1.0.Final ?

I found this solution but @pool is annotation based Jboss specific one

import org.jboss.ejb3.annotation.Pool;
import org.jboss.ejb3.annotation.defaults.PoolDefaults;
@Stateless
@Pool (value=PoolDefaults.POOL_IMPLEMENTATION_STRICTMAX,maxSize=5,timeout=1000)
@Remote(StrictlyPooledSession.class)
public class StrictlyPooledSessionBean implements StrictlyPooledSession

{
...
}


XML:
<?xml version="1.0" encoding="UTF-8"?>
<aop xmlns="urn:jboss:aop-beans:1.0">
   <domain name="Strictly Pooled Stateless Bean" extends="Stateless Bean" inheritBindings="true">
      <annotation expr="!class(@org.jboss.ejb3.annotation.Pool)">
          @org.jboss.ejb3.annotation.Pool (value="StrictMaxPool", maxSize=5, timeout=10000)
      </annotation>
   </domain>

   <domain name="Strictly Pooled Message Driven Bean" extends="Message Driven Bean" inheritBindings="true">
      <annotation expr="!class(@org.jboss.ejb3.annotation.Pool)">
          @org.jboss.ejb3.annotation.Pool (value="StrictMaxPool", maxSize=5, timeout=10000)
      </annotation>
   </domain>
</aop>

Found in Link: http://docs.jboss.org/ejb3/docs/reference/1.0.7/html/SessionBean_and_MDB_configuration.html

Please suggest Above explained annotation based is this right way to Implement and use strictMaxPool or NOT?

If it's not Right way then How I can configure the same "strictMaxPool" throught the xml file or configuration Files or annotation based ?

I think that the @Pool annotation just binds a MDB to a specific pool defined in the standalone*.xml file, the default is the mdb-strict-max-pool. I don'

/subsystem=ejb3/strict-max-bean-instance-pool=mdb-strict-max-pool:write-attribute(name=max-pool-size,value=50)

You can find the documentation for the @Pool annotation in the Jboss EAP public API documentation that can be downloaded from the customer portal. Be careful since there seems to be lots of Web sites that describe the @Pool annotation but they are not applicable to EAP 7.