82
82
* with the "unitName" attribute, or no attribute at all (for the default unit).
83
83
* If those annotations are present with the "name" attribute at the class level,
84
84
* they will simply be ignored, since those only serve as deployment hint
85
- * (as per the Java EE 5 specification).
85
+ * (as per the Java EE specification).
86
86
*
87
87
* <p>This post-processor can either obtain EntityManagerFactory beans defined
88
88
* in the Spring application context (the default), or obtain EntityManagerFactory
@@ -167,9 +167,9 @@ public class PersistenceAnnotationBeanPostProcessor
167
167
implements InstantiationAwareBeanPostProcessor , DestructionAwareBeanPostProcessor ,
168
168
MergedBeanDefinitionPostProcessor , PriorityOrdered , BeanFactoryAware , Serializable {
169
169
170
- /* Check JPA 2.1 PersistenceContext.synchronizationType attribute */
171
- private static final Method synchronizationTypeAttribute =
172
- ClassUtils .getMethodIfAvailable (PersistenceContext .class , "synchronizationType " );
170
+ /* Check JPA 2.1 PersistenceContext.synchronization() attribute */
171
+ private static final Method synchronizationAttribute =
172
+ ClassUtils .getMethodIfAvailable (PersistenceContext .class , "synchronization " );
173
173
174
174
175
175
private Object jndiEnvironment ;
@@ -231,16 +231,16 @@ public void setResourceRef(boolean resourceRef) {
231
231
* for the {@link #setDefaultPersistenceUnitName default persistence unit}
232
232
* will be taken (by default, the value mapped to the empty String),
233
233
* or simply the single persistence unit if there is only one.
234
- * <p>This is mainly intended for use in a Java EE 5 environment, with all
235
- * lookup driven by the standard JPA annotations, and all EntityManagerFactory
234
+ * <p>This is mainly intended for use in a Java EE environment, with all lookup
235
+ * driven by the standard JPA annotations, and all EntityManagerFactory
236
236
* references obtained from JNDI. No separate EntityManagerFactory bean
237
237
* definitions are necessary in such a scenario.
238
238
* <p>If no corresponding "persistenceContexts"/"extendedPersistenceContexts"
239
239
* are specified, {@code @PersistenceContext} will be resolved to
240
240
* EntityManagers built on top of the EntityManagerFactory defined here.
241
241
* Note that those will be Spring-managed EntityManagers, which implement
242
242
* transaction synchronization based on Spring's facilities.
243
- * If you prefer the Java EE 5 server's own EntityManager handling,
243
+ * If you prefer the Java EE server's own EntityManager handling,
244
244
* specify corresponding "persistenceContexts"/"extendedPersistenceContexts".
245
245
*/
246
246
public void setPersistenceUnits (Map <String , String > persistenceUnits ) {
@@ -258,11 +258,11 @@ public void setPersistenceUnits(Map<String, String> persistenceUnits) {
258
258
* for the {@link #setDefaultPersistenceUnitName default persistence unit}
259
259
* will be taken (by default, the value mapped to the empty String),
260
260
* or simply the single persistence unit if there is only one.
261
- * <p>This is mainly intended for use in a Java EE 5 environment, with all
261
+ * <p>This is mainly intended for use in a Java EE environment, with all
262
262
* lookup driven by the standard JPA annotations, and all EntityManager
263
263
* references obtained from JNDI. No separate EntityManagerFactory bean
264
264
* definitions are necessary in such a scenario, and all EntityManager
265
- * handling is done by the Java EE 5 server itself.
265
+ * handling is done by the Java EE server itself.
266
266
*/
267
267
public void setPersistenceContexts (Map <String , String > persistenceContexts ) {
268
268
this .persistenceContexts = persistenceContexts ;
@@ -279,11 +279,11 @@ public void setPersistenceContexts(Map<String, String> persistenceContexts) {
279
279
* for the {@link #setDefaultPersistenceUnitName default persistence unit}
280
280
* will be taken (by default, the value mapped to the empty String),
281
281
* or simply the single persistence unit if there is only one.
282
- * <p>This is mainly intended for use in a Java EE 5 environment, with all
282
+ * <p>This is mainly intended for use in a Java EE environment, with all
283
283
* lookup driven by the standard JPA annotations, and all EntityManager
284
284
* references obtained from JNDI. No separate EntityManagerFactory bean
285
285
* definitions are necessary in such a scenario, and all EntityManager
286
- * handling is done by the Java EE 5 server itself.
286
+ * handling is done by the Java EE server itself.
287
287
*/
288
288
public void setExtendedPersistenceContexts (Map <String , String > extendedPersistenceContexts ) {
289
289
this .extendedPersistenceContexts = extendedPersistenceContexts ;
@@ -632,8 +632,8 @@ public PersistenceElement(Member member, PropertyDescriptor pd) {
632
632
}
633
633
this .unitName = pc .unitName ();
634
634
this .type = pc .type ();
635
- this .synchronizedWithTransaction = (synchronizationTypeAttribute == null ||
636
- "SYNCHRONIZED" .equals (ReflectionUtils .invokeMethod (synchronizationTypeAttribute , pc ).toString ()));
635
+ this .synchronizedWithTransaction = (synchronizationAttribute == null ||
636
+ "SYNCHRONIZED" .equals (ReflectionUtils .invokeMethod (synchronizationAttribute , pc ).toString ()));
637
637
this .properties = properties ;
638
638
}
639
639
else {
0 commit comments