jsr345-experts@ejb-spec.java.net

[jsr345-experts] Fwd: Re: Re: PassivationTimeout (was: [JIRA] Commented: (EJB_SPEC-56) Preventing Passivation of SFSBs)

From: Jean-Louis MONTEIRO <jeanouii_at_gmail.com>
Date: Sat, 16 Jun 2012 09:42:08 +0200

Did not reply to the list as usual ;)
---------- Message transféré ----------
De : "Jean-Louis MONTEIRO" <jeanouii_at_gmail.com>
Date : 16 juin 2012 09:40
Objet : Re: [jsr345-experts] Re: PassivationTimeout (was: [JIRA] Commented:
(EJB_SPEC-56) Preventing Passivation of SFSBs)
À : <marina.vatkina_at_oracle.com>

Like Serializable or similar I prefer NonPassivatable.

Jlouis
Le 16 juin 2012 00:49, "Marina Vatkina" <marina.vatkina_at_oracle.com> a
écrit :

I propose to call it NonPassivatable (similar to what is originally
> proposed in the JIRA).
>
> Let me know if you prefer the verb (DoNotPassivate) instead.
>
> thanks,
> -marina
>
> Adam Bien wrote:
>
>> On 09.05.2012, at 01:25, Linda DeMichiel wrote:
>>
>>
>>
>>> The timeout itself strikes me as more a tuning parameter that is more
>>> appropriate to a product configuration than as something that
>>> we should be standardizing on.
>>>
>>> If destroying the instance is preferable to passivating it, that
>>> can be achieved by throwing an exception from the PrePassivate method.
>>>
>>> Otherwise, this seems to provide advice to the container that in
>>> deciding how to manage resources, passivation of the given bean type
>>> should come low on the list. If it is important to specify
>>> that, then I guess I'd prefer to see a DoNotPassivate metadata
>>> annotation/element rather than a timeout value.
>>>
>>>
>> +1 for DoNotPassivate. Timeout is o.k., but DoNotPassivate would solve
>> many current problems.
>>
>>
>>> What requests for a timeout value per se have we otherwise seen?
>>>
>>> On 5/8/2012 3:07 PM, Marina Vatkina wrote:
>>>
>>>
>>>> Experts,
>>>>
>>>> Please vote
>>>>
>>>> A) if you agree to add the @PassivationTimeout to the EJB3.2
>>>> B) if you don't think it is necessary
>>>>
>>>> thanks,
>>>> -marina
>>>>
>>>> -------- Original Message --------
>>>> Subject: [ejb-spec issues] [JIRA] Commented: (EJB_SPEC-56) Preventing
>>>> Passivation of SFSBs
>>>> Date: Tue, 8 May 2012 21:30:20 +0000 (GMT+00:00)
>>>> From: Carlo de Wolf (JIRA) <jira-no-reply_at_java.net>
>>>> Reply-To: issues_at_ejb-spec.java.net
>>>> To: issues_at_ejb-spec.java.net
>>>>
>>>>
>>>>
>>>> [
>>>> http://java.net/jira/browse/**EJB_SPEC-56?page=com.**
>>>> atlassian.jira.plugin.system.**issuetabpanels:comment-**
>>>> tabpanel&focusedCommentId=**339309#action_339309<http://java.net/jira/browse/EJB_SPEC-56?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=339309#action_339309>
>>>> ]
>>>> Carlo de Wolf commented on EJB_SPEC-56:
>>>> ------------------------------**---------
>>>>
>>>> http://docs.oracle.com/javaee/**6/api/javax/ejb/**
>>>> StatefulTimeout.html#value%28%**29<http://docs.oracle.com/javaee/6/api/javax/ejb/StatefulTimeout.html#value%28%29>
>>>>
>>>> A value of -1 means the bean will never be passivated due to timeout.
>>>>
>>>>
>>>>
>>>>> Preventing Passivation of SFSBs
>>>>> ------------------------------**-
>>>>>
>>>>> Key: EJB_SPEC-56
>>>>> URL: http://java.net/jira/browse/**EJB_SPEC-56<http://java.net/jira/browse/EJB_SPEC-56>
>>>>> Project: ejb-spec
>>>>> Issue Type: New Feature
>>>>> Affects Versions: 3.2
>>>>> Reporter: abien
>>>>>
>>>>> Stateful Session Beans can be passivated (and so often serialized) by
>>>>> the container to disk to save resources. This
>>>>> behavior can lead to problems with performance, scalability and even
>>>>> robustness of the application. A SFSB may contain
>>>>> non-serializable attributes which prevent a successful serialization
>>>>> and lead to runtime exceptions.
>>>>> Proposal: introduction of @NotPassivable annotation (TODO: suggest
>>>>> better name) to prevent passivation of SFSB. SFSB
>>>>> denoted with this annotation should never be passivated and the
>>>>> methods ejbActivate and ejbPassivate never invoked. In
>>>>> an overload scenario the container is supposed to destroy the SFSB
>>>>> instances, instead of passivating them.
>>>>> @Documented
>>>>> @Target({ElementType.METHOD, ElementType.TYPE})
>>>>> @Retention(RetentionPolicy.**RUNTIME)
>>>>> public @interface NotPassivable {
>>>>> }
>>>>>
>>>>>
>>>>
>>
>>
>