jsr338-experts@jpa-spec.java.net

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

From: Rainer Kwesi Schweigkoffer <kwesi_at_sap.com>
Date: Tue, 22 Nov 2011 10:29:27 +0100

Hi Linda, all,

Am 21 Nov 2011 um 14:41 hat Linda DeMichiel geschrieben:

> Hmmmm... Only container-managed persistence contexts can be designated
> as SynchronizationType.(UN)SYNCHRONIZED and referred to as such, so I thought
> this point was pretty clear. I'll make a sweep through the spec to verify
> though.

This is what I got, too, however at some passages of the spec I felt
unsure whether an application-managed persistent context could be
meant to implicitly be considered as of type
SynchronizationType.UNSYNCHRONIZED (like it always is of
PersistenceContextType.EXTENDED) and whether a phrase like "a
persistence context of type SynchronizationType.UNSYNCHRONIZED" was
always applying to container-managed persistence contexts designated
as of type SynchronizationType.UNSYNCHRONIZED only. In short, I
would have preferred "container-managed persistence context of type
SynchronizationType.(UN)SYNCHRONIZED" to be used consistently all
over the place.
 
> > Actually, I am still not convinced that this addNamedQuery method on
> > the EMF is the way to go rather than an EMF creation callback that
> > allows adding of named (criteria) queries before the EMF becomes
> > available. In April/May the discussion seemed to me to take that
> > direction.
> >
>
> I believe the issue here was that EMF creation time is not specified and may
> occur before any components which would receive these callbacks.

In that case, maybe the term "creation callback" is somewhat
misleading. At least before the EMF (or the resulting EM) gets
injected (or looked-up) the component must be available. We would
therefore need kinda pre-inject callback triggered by the container.

Best regards
Rainer
---
Rainer Schweigkoffer                      SAP AG Walldorf
Business Solution & Technology            TD Core JI
Technology Development                    Dietmar-Hopp-Allee 16
Java Server Core                          D-69190 Walldorf
JEE Implementation Group           phone: +49 6227 7 45305
Building 3, I.3.14                 fax:   +49 6227 7 821177
rainer.schweigkoffer_at_sap.com
Sitz der Gesellschaft/Registered Office: Walldorf, Germany
Vorstand/SAP Executive Board: Werner Brandt, Bill McDermott (Co-CEO), 
Gerhard Oswald, Vishal Sikka, Jim Hagemann Snabe (Co-CEO)
Vorsitzender des Aufsichtsrats/Chairperson of the SAP Supervisory 
Board: Hasso Plattner
Registergericht/Commercial Register Mannheim No HRB 350269
Diese E-Mail kann Betriebs- oder Geschaeftsgeheimnisse oder sonstige
vertrauliche Informationen enthalten. Sollten Sie diese E-Mail 
irrtuemlich erhalten haben, ist Ihnen eine Verwertung des Inhalts, 
eine Vervielfaeltigung oder Weitergabe der E-Mail ausdruecklich 
untersagt. Bitte benachrichtigen Sie uns und vernichten Sie die 
empfangene E-Mail. Vielen Dank.
This e-mail may contain trade secrets or privileged, undisclosed, or
otherwise confidential information. If you have received this e-mail 
in
error, you are hereby notified that any review, copying, or 
distribution
of it is strictly prohibited. Please inform us immediately and 
destroy the
original transmittal. Thank you for your cooperation.