Last updated on NOVEMBER 05, 2016
Applies to:Oracle GlassFish Server - Version: 2.1 to 2.1.1 - Release: 2.1 to 2.1
Information in this document applies to any platform.
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.
[#|2010-08-06T16:56:07.351-0700|INFO|sun-appserver2.1|com.stc.jmsjca.core.Activation|_ThreadID=67;_ThreadName=JMSJCA connect;|JMSJCA-E015: [cc-QueueReceiver(lookup://jms/myConcurrentQueue) @ [mq://localhost:7676]]: message delivery initiation was successful.|#]
[#|2010-08-06T17:06:06.705-0700|INFO|sun-appserver2.1|com.foo.MDBWithConcurrentProcessing|_ThreadID=62;_ThreadName=p: thread-pool-1; w: 5;|In MDBWithConcurrentProcessing constructor...|#]
Sign In with your My Oracle Support account
Don't have a My Oracle Support account? Click to get started
Million Knowledge Articles and hundreds of Community platforms