Bug 914738 - EJB2 CMB beans: ejbActivate callback is called after the bean creation
Summary: EJB2 CMB beans: ejbActivate callback is called after the bean creation
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: EJB
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: wfink
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-02-22 16:31 UTC by Ondrej Chaloupka
Modified: 2014-10-25 12:36 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-07-08 09:24:57 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Logs taken from the reproducer testcase (15.71 KB, application/zip)
2013-02-27 09:00 UTC, Ondrej Chaloupka
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker AS7-6635 0 Major Resolved EJB2 CMB beans: ejbActivate callback is called after the bean creation 2014-07-08 09:25:02 UTC

Description Ondrej Chaloupka 2013-02-22 16:31:46 UTC
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).

Comment 1 Jaikiran Pai 2013-02-26 14:23:02 UTC
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?

Comment 4 Ondrej Chaloupka 2013-02-27 09:00:34 UTC
Created attachment 703305 [details]
Logs taken from the reproducer testcase

Comment 6 JBoss JIRA Server 2013-02-27 16:48:10 UTC
Wolf-Dieter Fink <wolfdieter.fink> updated the status of jira AS7-6635 to Coding In Progress

Comment 7 baranowb 2013-03-18 13:49:02 UTC
This issue should have different status.

Comment 8 JBoss JIRA Server 2013-03-28 19:51:22 UTC
Brian Stansberry <brian.stansberry> updated the status of jira AS7-6635 to Resolved

Comment 9 JBoss JIRA Server 2013-03-28 19:51:22 UTC
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.

Comment 10 Jan Martiska 2013-08-27 14:13:06 UTC
@Wolf, is this fixed (or planned to be fixed) in EAP?

Comment 11 Jan Martiska 2014-07-08 09:24:57 UTC
This has been fixed since 6.2.0 through commits 3689fb0, 475d984, f7fbc989. The provided tests pass. Closing.


Note You need to log in before you can comment on or make changes to this bug.