1 /*
2  * Copyright (c) 2011, 2019 Oracle and/or its affiliates. All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v. 2.0 which is available at
6  * http://www.eclipse.org/legal/epl-2.0,
7  * or the Eclipse Distribution License v. 1.0 which is available at
8  * http://www.eclipse.org/org/documents/edl-v10.php.
9  *
10  * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
11  */

12
13 // Contributors:
14 //     Linda DeMichiel - 2.1
15
16 package javax.persistence;
17
18 /**
19  * Specifies whether the persistence context is always automatically 
20  * synchronized with the current transaction or whether the persistence context
21  * must be explicitly joined to the current transaction by means of the
22  * {@link EntityManager#joinTransaction} method.
23  *
24  * @since 2.1
25  */

26 public enum SynchronizationType {
27
28     /** Persistence context is automatically synchronized with the current transaction */
29     SYNCHRONIZED,
30
31     /** Persistence context must be explicitly joined to the current transaction */
32     UNSYNCHRONIZED,
33 }
34