-
Task
-
Resolution: Done
-
Major
-
None
-
None
Passivation of the parent context that holds nested beans should not occur if any of the beans are in use. The potential that child beans are in use while the parent is not increases the possibility that the passivation thread will attempt to passivate an in-use context.
To deal with this, StatefulTreeCache will listen for prePassivate events and check whether any bean in the context's tree is in use. If it is, a custom RuntimeException will be thrown in order to abort the passivation.
The cache will use a special LRUPolicy subclass that will recognize the custom exception and not log an error for it, just retrying the passivation on the next run of the eviction thread. (The standard LRUPolicy will retry, but will log an ERROR if an exception is caught. We don't want any error logged, as this is not an unexpected situation.)
- blocks
-
EJBTHREE-849 @PrePassivate and @PostActivate callbacks not properly handled for nested SFSBS
- Closed