EclipseLink1.0 - 20080707 API Reference

org.eclipse.persistence.config
Class EntityManagerProperties

java.lang.Object
  extended by org.eclipse.persistence.config.EntityManagerProperties

public class EntityManagerProperties
extends java.lang.Object

The class defines EclipseLink properties' names for use at the EntityManager level. This properties are specific to an EnityManger and should be passed to createEntityManager methods of EntityManagerFactory. Property values are usually case-insensitive with some common sense exceptions, for instance class names.


Field Summary
static java.lang.String CONNECTION_POLICY
          ConnectionPolicy Allows to specify an entire ConnectionPolicy.
static java.lang.String EXCLUSIVE_CONNECTION_IS_LAZY
          Determines when write connection is acquired lazily.
static java.lang.String EXCLUSIVE_CONNECTION_MODE
          Determines when reads are performed through the write connection.
static java.lang.String JDBC_DRIVER
          JDBC Driver class name.
static java.lang.String JDBC_PASSWORD
          DataSource or JDBC DriverManager password.
static java.lang.String JDBC_URL
          JDBC Connection String.
static java.lang.String JDBC_USER
          DataSource or JDBC DriverManager user name.
static java.lang.String JOIN_EXISTING_TRANSACTION
          Set to "true" this property forces persistence context to read through JTA-managed ("write") connection in case there is an active transaction.
static java.lang.String JTA_DATASOURCE
          JTA DataSource.
static java.lang.String NON_JTA_DATASOURCE
          NON JTA DataSource.
static java.lang.String ORACLE_PROXY_TYPE
          This property is used to specify proxy type that should be passed to OarcleConnection.openProxySession method.
static java.lang.String PERSISTENCE_CONTEXT_REFERENCE_MODE
          Specifies whether there should be hard or soft references used within the Persistence Context.
 
Constructor Summary
EntityManagerProperties()
           
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JOIN_EXISTING_TRANSACTION

public static final java.lang.String JOIN_EXISTING_TRANSACTION
Set to "true" this property forces persistence context to read through JTA-managed ("write") connection in case there is an active transaction. Valid values are case-insensitive "false" and "true"; "false" is default. The property could also be set in persistence.xml or passed to createEntityManagerFactory, Note that if the property set to "true" then objects read during transaction won't be placed into the shared cache unless they have been updated. in that case it affects all EntityManagers created by the factory.

See Also:
Constant Field Values

PERSISTENCE_CONTEXT_REFERENCE_MODE

public static final java.lang.String PERSISTENCE_CONTEXT_REFERENCE_MODE
Specifies whether there should be hard or soft references used within the Persistence Context. Default is "HARD". With soft references entities no longer referenced by the application may be garbage collected freeing resources. Any changes that have not been flushed in these entities will be lost. The property could also be set in persistence.xml or passed to createEntityManagerFactory, in that case it affects all EntityManagers created by the factory.

See Also:
ReferenceMode, Constant Field Values

ORACLE_PROXY_TYPE

public static final java.lang.String ORACLE_PROXY_TYPE
This property is used to specify proxy type that should be passed to OarcleConnection.openProxySession method. Requires Oracle jdbc version 10.1.0.2 or later. Requires Oracle9Platform or later as a database platform (TARGET_DATABASE property value should be TargetDatabase.Oracle9 or later). The valid values are: OracleConnection.PROXYTYPE_USER_NAME, OracleConnection.PROXYTYPE_DISTINGUISHED_NAME, OracleConnection.PROXYTYPE_CERTIFICATE. Property property corresponding to the specified type should be also provided: OracleConnection.PROXY_USER_NAME, OracleConnection.PROXY_DISTINGUISHED_NAME, OracleConnection.PROXY_CERTIFICATE. Typically these properties should be set into EntityManager (either through createEntityManager method or using proprietary setProperties method on EntityManagerImpl) - that causes EntityManager to use proxy connection for writing and reading inside transaction. If proxy-type and the corresponding proxy property set into EntityManagerFactory then all connections created by the factory will be proxy connections.

See Also:
Constant Field Values

EXCLUSIVE_CONNECTION_MODE

public static final java.lang.String EXCLUSIVE_CONNECTION_MODE
Determines when reads are performed through the write connection. This property alters ConnectionPolicy.

See Also:
ExclusiveConnectionMode, Constant Field Values

EXCLUSIVE_CONNECTION_IS_LAZY

public static final java.lang.String EXCLUSIVE_CONNECTION_IS_LAZY
Determines when write connection is acquired lazily. Valid values are case-insensitive "false" and "true"; "true" is default. This property alters ConnectionPolicy.

See Also:
Constant Field Values

JTA_DATASOURCE

public static final java.lang.String JTA_DATASOURCE
JTA DataSource. The value may be either data source or its name. Note that this property will be ignore in case persistence unit was setup to NOT use JTA: persistence.xml or createEntityManagerFactory had property "javax.persistence.transactionType" with RESOURCE_LOCAL value. To avoid a conflict resulting in exception don't specify this property together with either JDBC_DRIVER or JDBC_URL; however this property may override JDBC_DRIVER or JDBC_URL specified in persistence.xml or in createEntityManagerFactory method. This property alters ConnectionPolicy.

See Also:
Constant Field Values

NON_JTA_DATASOURCE

public static final java.lang.String NON_JTA_DATASOURCE
NON JTA DataSource. The value may be either data source or its name. Note that this property will be ignore in case persistence unit was setup to use JTA: persistence.xml or createEntityManagerFactory had property "javax.persistence.transactionType" with JTA value. To avoid a conflict resulting in exception don't specify this property together with either JDBC_DRIVER or JDBC_URL; however this property may override JDBC_DRIVER or JDBC_URL specified in persistence.xml or in createEntityManagerFactory method. This property alters ConnectionPolicy.

See Also:
Constant Field Values

JDBC_DRIVER

public static final java.lang.String JDBC_DRIVER
JDBC Driver class name. To avoid a conflict resulting in exception don't specify this property together with either JTA_DATASOURCE or JTA_DATASOURCE; however this property may override JTA_DATASOURCE or JTA_DATASOURCE specified in persistence.xml or in createEntityManagerFactory method. This property alters ConnectionPolicy.

See Also:
Constant Field Values

JDBC_URL

public static final java.lang.String JDBC_URL
JDBC Connection String. To avoid a conflict resulting in exception don't specify this property together with either JTA_DATASOURCE or JTA_DATASOURCE; however this property may override JTA_DATASOURCE or JTA_DATASOURCE specified in persistence.xml or in createEntityManagerFactory method. This property alters ConnectionPolicy.

See Also:
Constant Field Values

JDBC_USER

public static final java.lang.String JDBC_USER
DataSource or JDBC DriverManager user name. Non-empty value overrides the value assigned in persistence.xml or in createEntityManagerFactory; empty string value causes removal this property and JDBC_PASSWORD property specified in persistence.xml or in createEntityManagerFactory method. This property alters ConnectionPolicy.

See Also:
Constant Field Values

JDBC_PASSWORD

public static final java.lang.String JDBC_PASSWORD
DataSource or JDBC DriverManager password. Non-empty value overrides the value assigned in persistence.xml or in createEntityManagerFactory; empty string value causes removal this property specified in persistence.xml or in createEntityManagerFactory method. This property alters ConnectionPolicy.

See Also:
Constant Field Values

CONNECTION_POLICY

public static final java.lang.String CONNECTION_POLICY
ConnectionPolicy Allows to specify an entire ConnectionPolicy. Note that in case any other ConnectionPolicy-altering properties are present they will be applied to this ConnectionPolicy.

See Also:
Constant Field Values
Constructor Detail

EntityManagerProperties

public EntityManagerProperties()

EclipseLink1.0 - 20080707 API Reference