Called ejbActive after the create() call on home interface is incorrect by spec. 10.1.3 There are two possible transitions from the pooled to the ready state: through the ejbCreate<METHOD> and ejbPostCreate<METHOD> methods, or through the ejbActivate method. The container invokes the ejbCreate<METHOD> and ejbPostCreate<METHOD> methods when the instance is assigned to an entity object during entity object creation. The container invokes the ejbActivate method on an instance when an instance needs to be activated to service an invocation on an existing entity object—this occurs because there is no suitable instance in the ready state to service the client’s call or the ejbTimeout method. This tescase should be testing the lifecycle callbacks' behaviour. https://github.com/ochaloup/jboss-as/tree/entitybean-lifecycle-test It tests the problem of postCreate and activate method. The create and postCreate method should be called in case of moving bean from pooled state to ready when the entity is created by home create method and business method is called. The postCreate should not be called before the business method is called. The activate callback should not be called in this case. The activate method should be called in case that entity bean with the id exists but the entity bean instance is in pool (e.g. after finder method is called).
Can you please attach the logs of the failing test, so that I can quickly check if this is really an issue or a testcase problem?
Created attachment 703305 [details] Logs taken from the reproducer testcase
Wolf-Dieter Fink <wolfdieter.fink> updated the status of jira AS7-6635 to Coding In Progress
This issue should have different status.
Brian Stansberry <brian.stansberry> updated the status of jira AS7-6635 to Resolved
Brian Stansberry <brian.stansberry> made a comment on jira AS7-6635 Resolving as Won't Fix as CMP support has been removed from upstream AS. The linked bugzilla entry can track this for EAP.
@Wolf, is this fixed (or planned to be fixed) in EAP?
This has been fixed since 6.2.0 through commits 3689fb0, 475d984, f7fbc989. The provided tests pass. Closing.