[
https://issues.jboss.org/browse/WFLY-12814?page=com.atlassian.jira.plugin...
]
Cheng Fang updated WFLY-12814:
------------------------------
Description:
When a stateful bean is configured to have timeout value 0, its preDestroy method is not
called when removing it. The expected behavior is the bean should timeout and be eligible
for removal immediately (since the stateful timeout is 0), and its preDestroy method is
called before the bean is removed.
The problem seems to be in {{org.jboss.as.ejb3.cache.simple.SimpleCache}}, which removes
the bean with 0 timeout value directly, instead of submitting it to
{{org.wildfly.clustering.ee.cache.scheduler.LocalScheduler}} for removal. The direct
removal does not have all the proper setup for the preDestroy method to be invoked.
was:When a stateful bean is configured to have timeout value 0, its preDestroy method is
not called when removing it. The expected behavior is the bean should timeout and be
eligible for removal immediately (since the stateful timeout is 0), and its preDestroy
method is called before the bean is removed.
PreDestroy method not called by stateful beans with timeout 0
--------------------------------------------------------------
Key: WFLY-12814
URL:
https://issues.jboss.org/browse/WFLY-12814
Project: WildFly
Issue Type: Bug
Components: EJB
Affects Versions: 18.0.0.Final
Reporter: Cheng Fang
Assignee: Cheng Fang
Priority: Major
Fix For: 19.0.0.Beta1
When a stateful bean is configured to have timeout value 0, its preDestroy method is not
called when removing it. The expected behavior is the bean should timeout and be eligible
for removal immediately (since the stateful timeout is 0), and its preDestroy method is
called before the bean is removed.
The problem seems to be in {{org.jboss.as.ejb3.cache.simple.SimpleCache}}, which removes
the bean with 0 timeout value directly, instead of submitting it to
{{org.wildfly.clustering.ee.cache.scheduler.LocalScheduler}} for removal. The direct
removal does not have all the proper setup for the preDestroy method to be invoked.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)