The only potential obstacle I see is the 'random' order of invoking
those methods.
In transactional work the order is most of the time important.
But this can easily be mitigated by using one method, so there is no
real issue here.
Carlo
On 09/23/2011 01:38 AM, Marina Vatkina wrote:
> Experts,
>
> So far everybody else who voiced their opinion, said that it should be
> only one. If anybody strongly agrees with Pete, please say so now.
> Otherwise, I'll leave everything as is.
>
> -marina
>
> Pete Muir wrote:
>> On 15 Sep 2011, at 16:18, Marina Vatkina wrote:
>>
>>> May be I also do not understand your concern...
>>>
>>> If there is no way to pick-and-choose which e.g. AfterBegin method
>>> to be executed, and we are talking about methods on the same bean
>>> class, the developer is free to separate a large method into several
>>> smaller ones, then call them from that single AB method. Or am I
>>> missing something?
>>
>> IMO it's more natural to do this with multiple annotated methods.
>>
>>> thanks,
>>> -marina
>>>
>>> Pete Muir wrote:
>>>> Unless I seriously misunderstood the issue or the use cases, I
>>>> don't think that is true.
>>>>
>>>> If it is stated upfront that the order is undefined, then people
>>>> can still use multiple methods to isolate out different,
>>>> un-inter-linked concerns from their apps.
>>>>
>>>> Please note there is a very strong precedent for this approach, it
>>>> is taken by both CDI and @Inject, which are the two specs I know of
>>>> which allow multiple such methods in this fashion.
>>>>
>>>> On 12 Sep 2011, at 18:14, Marina Vatkina wrote:
>>>>
>>>>
>>>>> That won't help anybody, because their apps will be guaranteed to
>>>>> be non-portable :(...
>>>>>
>>>>> -marina
>>>>>
>>>>> Pete Muir wrote:
>>>>>> I would leave it unspecified.
>>>>>>
>>>>>> On 9 Sep 2011, at 18:38, Marina Vatkina wrote:
>>>>>>
>>>>>>> How would you specify the order in which they are called?
>>>>>>>
>>>>>>> thanks,
>>>>>>> -marina
>>>>>>>
>>>>>>> Pete Muir wrote:
>>>>>>>> Not sure about clarification, but in general, I don't see why
>>>>>>>> we would want to limit it to one?
>>>>>>>>
>>>>>>>> On 7 Sep 2011, at 02:50, Marina Vatkina wrote:
>>>>>>>>
>>>>>>>>> Experts,
>>>>>>>>>
>>>>>>>>> Please advise on the following clarification request marked as
>>>>>>>>> XXX under
>>>>>>>>> section 4.3.6 The Session Synchronization Notifications for
>>>>>>>>> Stateful Session Beans
>>>>>>>>>
>>>>>>>>> Q Needs clarification whether [...] If annotation are used,
>>>>>>>>> there must be at most one AfterBegin method, one
>>>>>>>>> BeforeCompletion method, and one AfterCompletion method for
>>>>>>>>> the bean.
>>>>>>>>>
>>>>>>>>> thanks,
>>>>>>>>> -marina
>>>>>>>>>
>>>>
>>