users@jpa-spec.java.net

[jpa-spec users] [jsr338-experts] Re: updated spec draft: unsynchronized persistence contexts

From: Emmanuel Bernard <emmanuel.bernard_at_jboss.com>
Date: Wed, 30 Nov 2011 15:33:05 +0100

On 29 nov. 2011, at 21:25, Linda DeMichiel wrote:

>>
>> 7.6.3.1
>>> If the stateful session beans differ in declared synchronization type, the EJBException is thrown by the container.
>>
>> Wild thought, should we try and make sure an deployment time exception occurs? That would be much better and nicer than waiting for the first call to blow up on the user.
>>
>>
>> I don't think the spec defines what's going on if a SfulSB defines an EPC and called upon a SlessSB which defines a PC. It might be implied but that was not clear from my readings:
>> - if a JTA tx is present, is the PC propagated? Or is a new PC created for the SlessSB?
>
> PC is propagated to the SLSB
>
>> - what happens if no Tx is present?
>
> No propagation

OK cool, maybe we should add this a bit more explicitly in the spec.

>
>>
>> 7.6.4
>>> OPEN ISSUE: Whether to add support for the propagation of extended persistence contexts when no transaction exists.
>>
>> Does this use case applies currently ? Let me know if I derail.
>>
>> EPC are propagated along Stateful Session Beans regardless of a transaction so this side is covered.
>
> Sort of. The terminology the spec uses is "inheritance", since it is pegged to creation rather
> than to transactional propagation. After the EPC is created in this way, it propagates normally.
>
>> We don't have EPC outside Stateful Session Beans so the open question does not apply. Am I correct?
>>
>
> Correct
>
>> Say we open up EPC for non SfulSB, then, I think it would be nice to get EPC propagation even without transaction to mimic what SfulSB do.
>>
>
> Other than in the abstract, do you see a compelling use case for this?

I guess that will depend on the discussion you and Pete started on having EPC on some CDI components. If that discussion goes nowhere, we don't need this feature in the current spec.