Open amykang2020 opened 7 years ago
From @glassfishrobot on June 23, 2014 15:14
kingsob said: I am seeing the same thing. Is this a bug? How else would I add a task to the executor on ejb start up?
From @glassfishrobot on July 14, 2014 20:46
mreichman said: Also seeing the same in 4.0.1b8, from an @Asynchronous method called from a @PostConstruct.
Was able to work around it by throwing a Thread.sleep in my @Asynchronous method, but that is certainly not a workable solution.
From @glassfishrobot on December 17, 2014 20:17
afcarv said: Got the same issue. Are you using module/application versioning?
Cause appears to be some mix-up at "org.glassfish.concurrent.runtime.ContextSetupProviderImpl"; method "isApplicationEnabled" checks to see if the current context application is enabled, but I think the app name contains only the base name (e.g. "my-application") while the app list contains the full name (e.g. "my-application:1.0.0"). So no match is found.
I was able to work around by deploying the app without the version but the obvious consequence is losing the versioning feature. Not sure if there's a better way.
From @glassfishrobot on April 28, 2015 10:26
jiggster said: You can configure the deployment order of the ManagedExecutorService resource. Set it to some low value (e.g. 0, by default it's 100), restart the server and check if that helped.
From @glassfishrobot on May 1, 2015 18:53
payara_steve said: This is a related issue with the same cause https://java.net/jira/browse/GLASSFISH-21216
From @glassfishrobot on June 12, 2014 1:22
Was assigned to srini.gf
From @glassfishrobot on April 21, 2017 8:29
This issue was imported from java.net JIRA GLASSFISH-21087
From @glassfishrobot on June 12, 2014 1:22
Reported by tomdcc
This behavior is confirmed with latest GlassFish5 build. However as commented in #21216, the EJB spec for Singleton Session Bean lists explicitly the operations that PostConstruct can perform, so at most this is in a spec "gray" area that needs spec clarification
From @glassfishrobot on June 12, 2014 1:22
I'm attempting to schedule a task from inside a singleton bean which is initialised at startup:
I then get the following in the logs:
And the submitted task is not run. (glassfish-executor-test is just the name of the standalone test case that I created).
Surely either the executor service should be initialized and available by the time tt>@PostConstruct</tt stuff is executed, or it should queue submitted tasks and execute them once the application is started.
This is just using the default managed executor service in a default domain.xml file.
Environment
Glassfish 4.0, Java 7, currently testing on Windows 7
Affected Versions
[4.0]
Copied from original issue: javaee/glassfish#21087