[jboss-jira] [JBoss JIRA] (WFLY-6402) EJBs accessible too early (spec violation)
Brad Maxwell (JIRA)
issues at jboss.org
Thu Mar 17 12:41:00 EDT 2016
[ https://issues.jboss.org/browse/WFLY-6402?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brad Maxwell updated WFLY-6402:
-------------------------------
Attachment: auto-test-reproducer.zip
Deploy the client.jar & singleton.jar. The ClientSingleton in client.jar will attempt to invoke the Stateless EJB in singleton.jar, there is a SIngleton inside of singleton.jar also which will sleep for 60 sec in PostConstruct, according to the EJB spec, the container must initialize all Singletons with @Startup before allowing external requests to be made to any of the other EJBs in singleton.jar
I have the Singleton set a system property once it finishes and when the Stateless is invoked it will check the system property, if it is not set to true, it will log an error indicating that it was invoked prior to the Singleton PostConstruct finishing.
> EJBs accessible too early (spec violation)
> ------------------------------------------
>
> Key: WFLY-6402
> URL: https://issues.jboss.org/browse/WFLY-6402
> Project: WildFly
> Issue Type: Bug
> Components: EJB
> Affects Versions: 10.0.0.Final
> Reporter: Brad Maxwell
> Attachments: auto-test-reproducer.zip
>
>
> {code}
> EJB 3.1 spec, section 4.8.1:
> "If the Startup annotation appears on the Singleton bean class or if the Singleton has been designated via the deployment descriptor as requiring eager initialization, the container must initialize the Singleton bean instance during the application startup sequence. The container must initialize all such startup-time Singletons before any external client requests (that is, client requests originating outside of the application) are delivered to any enterprise bean components in the application.
> {code}
> Wildlfy does not implement this correctly, and allows calls to other EJBs before a @Startup @Singleton finishes its @PostConstruct call.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the jboss-jira
mailing list