My Oracle Support Banner

Stateless EJB Pool Not Initialized Immediately After Its Application is Loaded in Oracle Glassfish Server (Doc ID 1333192.1)

Last updated on SEPTEMBER 19, 2023

Applies to:

Oracle GlassFish Server - Version 2.1 to 2.1.1 [Release 2.1]
Information in this document applies to any platform.

Symptoms

Both Stateless Session Beans (EJB) and Message Driven Beans are resources that are pooled within the Application Server, and those pooled instances used as needed. The pool configuration can be set by editing the Global configuration in the "EJB Container Pool" and setting the appropriate minimum (steady) and maximum pool sizes.

The issue seen is that the stateless EJB or MDB instance are not created until the first EJB request is received. If no request is present to trigger a EJB execution, no EJB instance will be created even if the EJB settings have set a steady bean pool size of non zero. For certain application use-cases where EJB instance creation takes a long time, it is preferable to have the EJB instances created in the EJB pool at application start up instead of during the first request.

You may check the server log to see if you are running into this scenario. The following is an example where it takes 10 minutes for "MDBWithConcurrentProcessing" message-driven bean to appear in the log file after it has been invoked.


Changes

The Tuning the EJB Container section of the Glassfish Performance Tuning Guide describes the EJB pooling and the individual meaning of these settings, as well as how to configure the EJB pool per EJB component using an application's sun-ejb-jar.xml deployment descriptor file.

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
References

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.