Bug 958217
Summary: | Unable to call Stateless bean methods from Singleton PreDestroy callback | ||||||
---|---|---|---|---|---|---|---|
Product: | [JBoss] JBoss Enterprise Application Platform 6 | Reporter: | Thomas Segismont <tsegismo> | ||||
Component: | EJB | Assignee: | Jaikiran Pai <jpai> | ||||
Status: | CLOSED NOTABUG | QA Contact: | |||||
Severity: | high | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 6.1.0 | CC: | dimitris | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2013-05-15 11:50:16 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 957689, 963167 | ||||||
Attachments: |
|
Description
Thomas Segismont
2013-04-30 15:27:22 UTC
Created attachment 741906 [details]
Sample application
Added sample application showing the problem
As explained in an internal mail thread, you'll have to add a @DependsOn annotation on the singleton bean to depend on the stateless bean: @Singleton @Startup @javax.ejb.DependsOn("StatelessBean") // depend on the stateless bean public class SingletonBean { .... @PreDestroy public void shutdown() { System.out.println("###############################"); System.out.println("SingletonBean.shutdown"); System.out.println("###############################"); statelessBean.doSomething(); } } |