| Summary: | [GSS](6.4.z) EJBs accessible too early (spec violation) | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [JBoss] JBoss Enterprise Application Platform 6 | Reporter: | dereed | ||||||
| Component: | EJB | Assignee: | Fedor Gavrilov <fgavrilo> | ||||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Jan Martiska <jmartisk> | ||||||
| Severity: | unspecified | Docs Contact: | |||||||
| Priority: | unspecified | ||||||||
| Version: | 6.4.6 | CC: | bbaranow, bmaxwell, cdewolf, david.lloyd, fgavrilo, ivassile, jbilek, jtruhlar, lakagwu, msochure, vtunka | ||||||
| Target Milestone: | CR1 | ||||||||
| Target Release: | EAP 6.4.9 | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | |||||||||
| : | 1350355 (view as bug list) | Environment: | |||||||
| Last Closed: | Type: | Bug | |||||||
| Regression: | --- | Mount Type: | --- | ||||||
| Documentation: | --- | CRM: | |||||||
| Verified Versions: | Category: | --- | |||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||
| Bug Depends On: | |||||||||
| Bug Blocks: | 1324262, 1350355, 1366526 | ||||||||
| Attachments: |
|
||||||||
Attached test case, test.zip. Deploy both singleton.jar and client.war. Start EAP. The @Singleton's @PostConstruct will log to stdout "starting pause" and sleep. Hit client.war -- http://localhost:8080/client/ which accesses another bean in single ton.war. Expected: EJB call waits until @PostConstruct finishes. Actual: EJB call completes immediately (logs to stdout "Singleton TestBean"). Created attachment 1129567 [details]
test.zip
Workaround: Add @DependsOn("SingletonEJBName"), or @DependsOn("ejb.jar#SingletonEJBName") for separate modules in an ear, to each EJB for each singleton it needs to wait on.
Created attachment 1137443 [details]
auto-test-reproducer.zip - just deploy jars and it will log an error and stacktrace if issue occurs
Fedor Gavrilov <fgavrilo> updated the status of jira WFLY-6402 to Coding In Progress Fedor Gavrilov <fgavrilo> updated the status of jira WFLY-6402 to Coding In Progress Fedor Gavrilov <fgavrilo> updated the status of jira WFLY-6402 to Open Fedor Gavrilov <fgavrilo> updated the status of jira WFLY-6402 to Resolved Fedor Gavrilov <fgavrilo> updated the status of jira WFLY-6402 to Reopened test.zip works auto-test-reproducer.zip does not work (https://bugzilla.redhat.com/show_bug.cgi?id=1350355) Verified with EAP 6.4.9.CP.CR2 Retroactively bulk-closing issues from released EAP 6.4 cummulative patches. Retroactively bulk-closing issues from released EAP 6.4 cummulative patches. Retroactively bulk-closing issues from released EAP 6.4 cummulative patches. |
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. EAP does not implement this correctly, and allows calls to other EJBs before a @Startup @Singleton finishes its @PostConstruct call.