Bug 884684
| Summary: | EJB @PreDestroy not called when AS/EAP stopped | ||||||
|---|---|---|---|---|---|---|---|
| Product: | OpenShift Online | Reporter: | Bill DeCoste <wdecoste> | ||||
| Component: | Containers | Assignee: | Dan Mace <dmace> | ||||
| Status: | CLOSED NOTABUG | QA Contact: | libra bugs <libra-bugs> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | low | ||||||
| Version: | 2.x | CC: | chunchen, dmcphers, mmcgrath, sannam, xtian | ||||
| 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-07-09 19:41:00 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: | |||||||
| Attachments: |
|
||||||
|
Description
Bill DeCoste
2012-12-06 14:51:42 UTC
Use kill -9 instead of kill - TERM if graceful shutdown fails Moved during bug triage meeting Created attachment 771201 [details]
Lifecycle demo code
I'm closing this issue as NOTABUG, and have attached example code which can be added to a jbossas-7 application demonstrating the lifecycle methods. The code provides a LifecycleDemo class which is a @Singleton/@Startup EJB. When the example code is built and deployed, the following output will appear in the JBoss server.log during startup, demonstrating @PostConstruct: 2013/07/09 15:34:41,027 INFO [stdout] (MSC service thread 1-1) !!!!!!!!!!! in postconstruct When an `rhc app stop` is issued to the application, the following output will appear in the JBoss boot.log demonstrating @PreDestroy: 15:34:59,821 INFO [stdout] !!!!!!!!!!! in predestroy The jbossas-7 cartridge issues a SIGTERM to the container for shutdown, which is equivalent to using the JBoss CLI 'shutdown' command. This is a graceful shutdown, and the lifecycle is honored in both cases. |