Skip to main content

[ejb-spec issues] [JIRA] Created: (EJB_SPEC-116) @PrePassivate / @PostActivate erroneously get called during checkpointing when Availability is enabled

  • From: "lprimak (JIRA)" <jira-no-reply@...>
  • To: issues@...
  • Subject: [ejb-spec issues] [JIRA] Created: (EJB_SPEC-116) @PrePassivate / @PostActivate erroneously get called during checkpointing when Availability is enabled
  • Date: Tue, 19 Nov 2013 17:57:49 +0000 (UTC)
  • Auto-submitted: auto-generated

@PrePassivate / @PostActivate erroneously get called during checkpointing 
when Availability is enabled
------------------------------------------------------------------------------------------------------

                 Key: EJB_SPEC-116
                 URL: https://java.net/jira/browse/EJB_SPEC-116
             Project: ejb-spec
          Issue Type: Improvement
    Affects Versions: 3.2
         Environment: All
            Reporter: lprimak
            Priority: Critical


I am trying to upgrade my software to GF 4.0, and I am running into this 
issue,

Basically, the annotated methods get called on every method invocation when 
HA for
the SFSB is enabled, Availability for the application is enabled, and 
availability-enabed in ejb-jar is set.

Everything works correctly in GF3.1

I always thought that these methods were only supposed to be called when SFSB
was actually removed from memory and brought back into memory, i.e.
SFSB pool runs out of storage.
Method Checkpointing isn't supposed to be part of this as far as I know.

Here is an excerpt from Oracle documentation:

"
 You only need to use this annotation, along with its partner @PrePassivate, 
if you want to allow your stateful session bean to maintain the open 
resources that need to be closed prior to a bean instance's passivation and 
then reopened during the bean instance's activation.
"

So the new behavior doesn't make any sense to me.
Also, it looks like the passivation and checkpointing mechanism has changed 
between GF 3.1 and 4.0 (for the worse)
I don't think GF 3.1 used serialization, but GF 4.0 does, hence why this 
issue is coming up now.
I think GF 3.1 used to restore state into an existing object, but now a new 
object is being created
during checkpointing deserialization.

Looks like here is the confusion: Passivation isn't checkpointing and 
@PrePassivate shouldn't have been called.
Also, if all the application servers are doing it this way and it's wrong and 
doesn't match documentation this should be corrected?  This behavior clearly 
doesn't match the documentation or even more importantly the intent of the 
Passivation mechanism. 
If Passivation happens, its intended for the object to be removed from 
memory. 
The intent is that Passivation callbacks don't happen unless the object is 
being removed from memory or brought back to memory. 

I posted in the Glassfish forum:
https://www.java.net/forum/topic/glassfish/glassfish/gf4-sfsb-prepassivate-postactivate-get-called-every-bean-invocation-when-availability-enabled

I also filed a Glassfish bug report for this:
https://java.net/jira/browse/GLASSFISH-20899

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://java.net/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


[ejb-spec issues] [JIRA] Created: (EJB_SPEC-116) @PrePassivate / @PostActivate erroneously get called during checkpointing when Availability is enabled

lprimak (JIRA) 11/19/2013

[ejb-spec issues] [JIRA] Commented: (EJB_SPEC-116) @PrePassivate / @PostActivate erroneously get called during checkpointing when Availability is enabled

lprimak (JIRA) 11/19/2013

[ejb-spec issues] [JIRA] Issue Comment Edited: (EJB_SPEC-116) @PrePassivate / @PostActivate erroneously get called during checkpointing when Availability is enabled

lprimak (JIRA) 11/19/2013

[ejb-spec issues] [JIRA] Issue Comment Edited: (EJB_SPEC-116) @PrePassivate / @PostActivate erroneously get called during checkpointing when Availability is enabled

lprimak (JIRA) 11/19/2013

[ejb-spec issues] [JIRA] Commented: (EJB_SPEC-116) @PrePassivate / @PostActivate erroneously get called during checkpointing when Availability is enabled

lprimak (JIRA) 11/19/2013

[ejb-spec issues] [JIRA] Issue Comment Edited: (EJB_SPEC-116) @PrePassivate / @PostActivate erroneously get called during checkpointing when Availability is enabled

lprimak (JIRA) 11/19/2013

[ejb-spec issues] [JIRA] Commented: (EJB_SPEC-116) @PrePassivate / @PostActivate erroneously get called during checkpointing when Availability is enabled

marina vatkina (JIRA) 11/19/2013

[ejb-spec issues] [JIRA] Commented: (EJB_SPEC-116) @PrePassivate / @PostActivate erroneously get called during checkpointing when Availability is enabled

Carlo de Wolf (JIRA) 11/20/2013

[ejb-spec issues] [JIRA] Commented: (EJB_SPEC-116) @PrePassivate / @PostActivate erroneously get called during checkpointing when Availability is enabled

lprimak (JIRA) 11/20/2013

[ejb-spec issues] [JIRA] Resolved: (EJB_SPEC-116) @PrePassivate / @PostActivate erroneously get called during checkpointing when Availability is enabled

Carlo de Wolf (JIRA) 11/21/2013
 
 
Close
loading
Please Confirm
Close