Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1064990

Summary: @PreDestroy not called in @service
Product: [JBoss] JBoss Fuse Service Works 6 Reporter: gbonocor
Component: SwitchYardAssignee: Tomohisa Igarashi <toigaras>
Status: CLOSED UPSTREAM QA Contact: Matej Melko <mmelko>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.0.0 GACC: aileenc, ganandan, sappleto, soa-p-jira, tasato
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: 2025-02-10 03:35:04 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 Flags
Contains src and jar for reproducing bug none

Description gbonocor 2014-02-13 16:33:08 UTC
Created attachment 862881 [details]
Contains src and jar for reproducing bug

Description of problem:

In a @Service annotated bean, the @PreDestroy annotated method is not called.

@PostConstruct, instead, is called.

We exclude the problem is related to logging issue (log call get lost), since we also tried hooking the creation of a temp file in @PostContruct, and no file is created.

Version-Release number of selected component (if applicable):

JBoss Red Hat JBoss Fuse Service Works 6.0.0.GA-redhat-2 (AS 7.2.1.Final-redhat-10)

How reproducible:

Deploy the "test-project-0.0.1-SNAPSHOT.jar" contained in the attached tar.gz in FSW. 
Shutdown EAP.


Steps to Reproduce:
1. Deploy test-project-0.0.1-SNAPSHOT.jar in FSW.
2. Shutdown EAP.
3. Check that no message is logged on "PreDestroy" annotated method
4. Check that /tmp/test.dump is not created (should be created in "PreDestroy" annotated method)

Actual results:

- No message is logged on "PreDestroy" annotated method
- /tmp/test.dump is not created (should be created in "PreDestroy" annotated method)

Expected results:

- A message is logged on "PreDestroy" annotated method
- /tmp/test.dump file is created 

Additional info:

May be related to a bug in DeltaSpike. See:

https://community.jboss.org/thread/229937

https://issues.apache.org/jira/browse/DELTASPIKE-371

Comment 5 Keith Babo 2015-01-28 13:19:30 UTC
Not sure about the status of the EAP fix, but DeltaSpike got a big bump for SY version 2.0, so it's probably worth retesting this with 2.0.0.Beta1.  The root cause of this issue is out of our hands, though.

Comment 12 Tomohisa Igarashi 2015-01-31 05:01:32 UTC
I found a way to trigger destroy event from SwitchYard side, Please see this JIRA for the details:
 https://issues.jboss.org/browse/SWITCHYARD-2510

Comment 17 Red Hat Bugzilla 2025-02-10 03:35:04 UTC
This product has been discontinued or is no longer tracked in Red Hat Bugzilla.