jungm opened a new pull request, #3014: URL: https://github.com/apache/tomee/pull/3014
Backport of #2951 to `tomee-10.x`. Fixes [TOMEE-4712](https://issues.apache.org/jira/browse/TOMEE-4712), which was reported against 10.2.0: an MDB can receive messages before the other EJBs of its application are started, and calls into an injected `@Stateless` bean then fail with an NPE in `StatelessInstanceManager`. With this change, `MdbContainer` and `MdbInstanceManager` activate the endpoint in `start()` instead of `deploy()`. That way, stateless pools and `@Startup` singletons are ready before any message is delivered. An endpoint whose activation fails is no longer deactivated on undeploy. The cherry-pick applies cleanly and is identical to the change on `main`. ## Testing `openejb-core` `org.apache.openejb.core.mdb` tests: `Tests run: 26, Failures: 0, Errors: 0, Skipped: 0`. This includes the new `MdbActivationOrderTest` for `Pool=false` and `Pool=true`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
