jsr338-experts@jpa-spec.java.net

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

From: Rainer Kwesi Schweigkoffer <kwesi_at_sap.com>
Date: Mon, 21 Nov 2011 16:33:00 +0100

Hi Linda, all,

please see below...

Am 14 Nov 2011 um 15:22 hat Linda DeMichiel geschrieben:

> This is covered pretty explicitly in section 3.2.4:
>
> "... a persistence context of type SynchronizationType.UNSYNCHRONIZED
> or an application-managed persistence context that has been created
> outside the scope of the current transaction will only be synchronized
> to the database if it has been joined to the current transaction by
> the application´s use of the EntityManager joinTransaction method."

Maybe I am the only one who finds it confusing that the spec
sometimes speaks of a "container-managed persistence context of type
SynchronizationType.(UN)SYNCHRONIZED" and sometimes just of a
"persistence context of type SynchronizationType.(UN)SYNCHRONIZED".

> > With respect to 7.4., p. 323, addNamedQuery, I would like to remind
> > of the thread synchronisation issues brought up by Evan and would
> > prefer to at least see them mentioned as open issue before going EDR.
> >
>
> Could you be more specific as to what you would like to see stated
> in such a note? That the provider must ensure that the addNamedQuery
> method is atomic? That we should contemplate adding a hasNamedQuery
> method? Other?

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.

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.