Stateless session beans are held in a pool which can be configured at EJB Container level. You can define as many pool configuration as you want and then decide which one to use for your EJB container.

One thing which if often requested is to apply some specific settings for a particular EJB.

With JBoss AS 7 /EAP 6 and WildFly it is possible to apply some specific pool settings by decorating your class with the @org.jboss.ejb3.annotation.Pool annotation:

import org.jboss.ejb3.annotation.Pool;


public class  ServiceBean   {
. . .

 The value for the pool needs to be defined in your server configuration:

                    <strict-max-pool name="poolcustom" max-pool-size="20" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>

 Please note that you can also define the Pool size using the jboss-ejb3.xml file as follows:

<jboss:ejb-jar xmlns:jboss="" xmlns=""
xmlns:xsi="" xmlns:p="urn:ejb-pool:1.0" xsi:schemaLocation="" version="3.1" impl-version="2.0">



Related articles available on

EJB 3.0 tutorial : Session Beans

Enterprise JavaBeans (EJB) technology is a J2EE technology for de

JBoss MDB 3.0

Message-driven beans (MDBs) are stateless, server-side, transacti


In a Bean Managed Transaction, the code in the EJB or Message Dri

How do you keep your EJB callbacks separated from biz. methods?

JBoss daily recipe

How to set EJB timeout period ?

JBoss recipe of the day

How to add a Selector with MDB 3.0 ?

Message selectors allow an MDB to be more selective about the mes