This is easily achieved using glassfish-ejb-jar.xml deployment descriptor:
<glassfish-ejb-jar> <enterprise-beans> <ejb> <ejb-name>YourMDB</ejb-name> <bean-pool> <resize-quantity>1</resize-quantity> <max-pool-size>1</max-pool-size> <steady-pool-size>1</steady-pool-size> </bean-pool> </ejb> </enterprise-beans> </glassfish-ejb-jar>
The section above will limit the number of beans processed strictly to 1, regardless of what the global pool says. Thus, you can easily configure the system.
source share