diff --git a/docs/docs.ug/pom.xml b/docs/docs.ug/pom.xml
new file mode 100644
index 00000000000..fbb4be35784
--- /dev/null
+++ b/docs/docs.ug/pom.xml
@@ -0,0 +1,97 @@
+
+
+
+ 4.0.0
+
+ Documentation - Solutions
+ Documentation - User Guide (Old)
+ org.eclipse.persistence
+ org.eclipse.persistence.documentation.userguide
+ 5.0.0-SNAPSHOT
+ pom
+
+
+ org.eclipse.persistence
+ org.eclipse.persistence.documentation
+ 5.0.0-SNAPSHOT
+ ../pom.xml
+
+
+
+ main.adoc
+ ${project.basedir}/src/main/asciidoc
+ user-guide
+
+
+
+
+
+ maven-resources-plugin
+
+
+ copy-source-documents
+ generate-resources
+
+
+
+
+ org.apache.maven.plugins
+ maven-dependency-plugin
+
+
+ unpack-shared-docs
+ generate-resources
+
+
+
+
+ org.asciidoctor
+ asciidoctor-maven-plugin
+
+
+ asciidoc-to-html
+ generate-resources
+
+ ${output.document.name}.html
+
+
+
+ asciidoc-to-html-img-text
+ generate-resources
+
+
+ asciidoc-to-pdf
+ generate-resources
+
+ ${output.document.name}.pdf
+
+
+
+ asciidoc-to-epub
+ generate-resources
+
+ ${output.document.name}.epub
+
+
+
+
+
+
+
diff --git a/docs/docs.ug/src/main/asciidoc/core/Acquiring_and_Using_Sessions_at_Run_Time_(ELUG).adoc b/docs/docs.ug/src/main/asciidoc/core/Acquiring_and_Using_Sessions_at_Run_Time_(ELUG).adoc
new file mode 100644
index 00000000000..cf482742bf6
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Acquiring_and_Using_Sessions_at_Run_Time_(ELUG).adoc
@@ -0,0 +1,732 @@
+image:Elug_draft_icon.png[Image:Elug draft
+icon.png,title="Image:Elug draft icon.png"] *For the latest EclipseLink
+documentation, please see
+http://www.eclipse.org/eclipselink/documentation/*
+
+'''''
+
+*TOC*
+Special:Whatlinkshere_Acquiring_and_Using_Sessions_at_Run_Time_(ELUG)[Related
+Topics]
+
+After you create and configure sessions, you can use the session manager
+to acquire a session instance at run time.
+
+== Introduction to Session Acquisition
+
+We recommend that you export session instances from the Workbench to one
+or more uniquely named `+sessions.xml+` files and then use the session
+manager to load sessions from these `+sessions.xml+` files.
+
+The EclipseLink session manager lets you build a series of sessions that
+are maintained under a single entity. The session manager is a static
+utility class that loads EclipseLink sessions from the `+sessions.xml+`
+file, caches the sessions by name in memory, and provides a single
+access point for EclipseLink sessions. The session manager supports the
+following session types:
+
+* Server Session
+* Database Session
+* SessionBroker
+
+See
+link:Introduction%20to%20EclipseLink%20Sessions%20(ELUG)#CACJAFDF[Introduction
+to EclipseLink Sessions] for detailed information on these available
+sessions.
+
+The session manager has two main functions: it creates instances of the
+sessions and it ensures that only a single instance of each named
+session exists for any instance of a session manager.
+
+This is particularly useful for EJB applications in that an enterprise
+bean can acquire the session manager and acquire the desired session
+from it.
+
+=== Session Manager
+
+When a client application requires a session, it requests the session
+from the EclipseLink session manager. The two main functions of the
+session manager are to instantiate EclipseLink sessions for the server,
+and to hold the sessions for the life of the application. The session
+manager instantiates database sessions, server sessions, or session
+brokers based on the configuration information in the `+sessions.xml+`
+file.
+
+The session manager instantiates sessions as follows:
+
+* The client application requests a session by name.
+* The session manager looks up the session name in the `+sessions.xml+`
+file. If the session name exists, the session manager instantiates the
+specified session; otherwise, it throws an exception.
+* After instantiation, the session remains viable until the application
+is shut down.
+
+=== Multiple Sessions
+
+We recommend that you acquire sessions from the session manager and
+perform all persistence operations using a client session or the unit of
+work.
+
+Note that in the case of a server session or a session broker that
+contains server sessions, after you acquire the session you will acquire
+a client session from it. From a given server session (or session broker
+that contains server sessions), you can acquire as many client sessions
+as you have clients.
+
+Each client can easily manage concurrent access and referential
+constraints by acquiring a unit of work from its client session and
+performing all persistence operations using the unit of work.
+
+== Acquiring the Session Manager
+
+EclipseLink maintains only one instance of the session manager class.
+The singleton session manager maintains all the named EclipseLink
+sessions at run time. When an application requests a session by name,
+the session manager retrieves the specified session from the appropriate
+configuration file.
+
+As the link:#Example_86-1[Acquiring a Session Manager Instance] example
+illustrates, to access the session manager instance, use the
+`+org.eclipse.persistence.tools.sessionmanagement.SessionManager+`
+method `+getManager+`. You can then use the session manager instance to
+load EclipseLink sessions.
+
+[#Example 86-1]## *_Acquiring a Session Manager Instance_*
+
+[source,java]
+----
+ import org.eclipse.persistence.tools.sessionmanagement.SessionManager;
+ SessionManager sessionManager = SessionManager.getManager();
+----
+
+== Acquiring a Session from the Session Manager
+
+When the session manager loads a session that is not yet in its cache,
+the session manager creates an instance of the appropriate session type
+and configures it according to the `+sessions.xml+` file configuration.
+
+[width="100%",cols="<100%",]
+|===
+|*Note:* To best use the methods associated with the session type that
+is being instantiated, cast the session that is returned from the
+`+getSession+` method. This type must match the session type that is
+defined in the `+sessions.xml+` file for the named session.
+|===
+
+This section explains the following:
+
+* link:#How_to_Load_a_Session_from_sessions.xml_Using_Defaults[How to
+Load a Session from sessions.xml Using Defaults]
+* link:#How_to_Load_a_Session_from_sessions.xml_with_an_Alternative_Class_Loader[How
+to Load a Session from sessions.xml with an Alternative Class Loader]
+* link:#How_to_Load_a_Session_from_an_Alternative_Session_Configuration_File[How
+to Load a Session from an Alternative Session Configuration File]
+* link:#How_to_Load_a_Session_Without_Logging_In[How to Load a Session
+Without Logging In]
+* link:#How_to_Reload_and_Refresh_Session_Configuration[How to Reload
+and Refresh Session Configuration]
+* link:#How_to_Refresh_a_Session_when_the_Class_Loader_Changes[How to
+Refresh a Session when the Class Loader Changes]
+
+=== How to Load a Session from sessions.xml Using Defaults
+
+If you have a single sessions configuration file (`+sessions.xml+`) that
+contains all the session instances created by the Workbench, then you
+can load a session by name, as this example illustrates.
+
+[#Example 86-2]## *_Acquiring a Named Session from Session Manager Using
+Defaults_*
+
+[source,java]
+----
+ // Load a named session (mysession) defined in the sessions.xml file
+ SessionManager manager = SessionManager.getManager();
+ Session session = manager.getSession("mysession");
+----
+
+In this example, the following session manager default configuration
+applies:
+
+* Class loader – The thread-based class loader is used to find and load
+the `+sessions.xml+` resource and resolve any classes referenced in the
+`+sessions.xml+` and `+project.xml+` files. If you acquire the session
+in an application class, this will typically be the application’s class
+loader, which is correct. In a Java EE application, it is best to
+specify this as the class loader from a class in the same JAR file that
+the `+sessions.xml+` file is deployed in.
+* File – By default, the file named `+sessions.xml+` in the root
+directory relative to the class loader is used. If the file is named
+differently, or not in the root directory, the relative path must be
+specified. Relative resource paths in Java must use `+" / "+`, not
+`+" \ "+`.
+* Session name – The name passed into the `+getSession+` call. This name
+must be unique for the entire application server, not just unique within
+the application.
+* Login – `+true+`. The session will be connected by default. If you
+must manually configure the session before login, set this option to
+`+false+` (see link:#How_to_Load_a_Session_Without_Logging_In[How to
+Load a Session Without Logging In]).
+* Refresh – `+false+`. If already loaded, the same session will be
+returned. Refresh should only be used, if it is known that the existing
+session is not being used, and the configuration has changed, such as in
+a Java EE environment redeployment scenario.
+* Verify class loader – false. The session manager will not refresh the
+session if the class loader changes. This should normally be set to
+`+true+`. It must be set to `+true+` in a Java EE environment, if hot
+deployment or redeployment to a running application server is required
+(see link:#How_to_Refresh_a_Session_when_the_Class_Loader_Changes[How to
+Refresh a Session when the Class Loader Changes]).
+
+=== How to Load a Session from sessions.xml with an Alternative Class Loader
+
+You can use an alternative class loader to load sessions. This is common
+when your EclipseLink application integrates with a Java EE container.
+The session manager uses the class loader to find and load the
+`+sessions.xml+` resource and resolve any classes referenced in the
+`+sessions.xml+` and `+project.xml+` files.
+
+In most cases, you use the class loader from the current thread context,
+as the link:#Example_86-3[Loading a Session Using the Current Thread
+Context Class Loader] example illustrates. In this example, the session
+named `+mysession+` is loaded from the first file in the application
+classpath named `+sessions.xml+` using the class loader associated with
+the current thread context.
+
+[#Example 86-3]## *_Loading a Session Using the Current Thread Context
+Class Loader_*
+
+[source,java]
+----
+ /* Use the specified ClassLoader to load a session (mysession) defined in the sessions.xml file */
+
+ SessionManager manager = SessionManager.getManager();
+ Session session = manager.getSession(
+ "mysession", // session name to load
+ Thread.current().getContextClassLoader() // ClassLoader instance to use
+ );
+----
+
+However, if your Java EE container does not support using the current
+thread context class loader, you can use the class loader from the
+current class, as this example illustrates.
+
+[#Example 86-4]## *_Loading a Session Using the Current Class’s Class
+Loader_*
+
+[source,java]
+----
+ /* Use the specified ClassLoader to load a session (mysession) defined in the sessions.xml file */
+ SessionManager manager = SessionManager.getManager();
+ Session session = manager.getSession(
+ "mysession", // session name to load
+ this.getClass().getClassLoader() // ClassLoader instance to use
+ );
+----
+
+[width="100%",cols="<100%",]
+|===
+|*Note*: Oracle Containers for J2EE supports the use of the class loader
+from the current thread.
+|===
+
+=== How to Load a Session from an Alternative Session Configuration File
+
+If your session instances are contained in multiple, uniquely named
+session configuration files (`+sessions.xml+` files), then you must
+explicitly create an `+XMLSessionConfigLoader+` object initialized with
+the name of the `+sessions.xml+` file and pass that
+`+XMLSessionConfigLoader+` into the `+SessionManager+` method
+`+getSession+`, as the link:#Example_86-5[Loading a Session from an
+Alternative Configuration File] example illustrates.
+
+The file path you specify is relative to the class loader root
+directory. Relative resource paths in Java must use the forward slash (
+`+/+` ), not back slash ( `+\+` ).
+
+In this example, the session named `+mysession+` is loaded by the
+specified class loader from the first file in the application classpath
+named `+eclipselink-sessions.xml+`.
+
+[#Example 86-5]## *_Loading a Session from an Alternative Configuration
+File_*
+
+[source,java]
+----
+ // XMLSessionConfigLoader loads the eclipselink-sessions.xml file
+ SessionManager manager = SessionManager.getManager();
+ manager.getSession(
+ new XMLSessionConfigLoader("eclipselink-sessions.xml"),
+ "mysession",
+ this.class.getClassLoader()
+ );
+----
+
+=== How to Load a Session Without Logging In
+
+The `+XMLSessionConfigLoader+` (see
+link:#How_to_Load_a_Session_from_an_Alternative_Session_Configuration_File[How
+to Load a Session from an Alternative Session Configuration File]) lets
+you call a session using the `+SessionManager+` method `+getSession+`,
+without invoking the `+Session+` method `+login+`, as the
+link:#Example_86-6[Open Session with No Login] example shows. This lets
+you prepare a session for use and leave login to the application.
+
+[#Example 86-6]## *_Open Session with No Login_*
+
+[source,java]
+----
+ SessionManager manager = SessionManager.getManager();
+ Session session = manager.getSession(
+ new XMLSessionConfigLoader(), // XMLSessionConfigLoader (sessions.xml file)
+ "mysession", // session name
+ YourApplicationClass.getClassLoader(), // class loader
+ false, // do not log in session
+ false); // do not refresh session
+----
+
+=== How to Reload and Refresh Session Configuration
+
+You can tell the session manager to refresh an existing session from the
+`+sessions.xml+` file. Typically, this would only ever be used in a Java
+EE environment at redeployment time, or after a reset of a running
+server. You should only use this option when you know that the existing
+session is not being used.
+
+[#Example 86-7]## *_Forcing a Reparse of the sessions.xml File_*
+
+[source,java]
+----
+ //In this example, XMLSessionConfigLoader loads sessions.xml from the classpath
+ SessionManager manager = SessionManager.getManager();
+ Session session = manager.getSession(
+ new XMLSessionConfigLoader(), // XMLSessionConfigLoader (sessions.xml file)
+ "mysession", // session name
+ YourApplicationClass.getClassLoader(), // class loader
+ true, // log in session
+ true // refresh session
+ );
+----
+
+=== How to Refresh a Session when the Class Loader Changes
+
+In an unmanaged (POJO) Java EE environment, if you require hot
+deployment or redeployment to a running application server, you must
+tell the session manager to refresh your session if the class loader
+changes, as the link:#Example_86-8[Forcing a Reparse of the sessions.xml
+File] example shows. This option makes the session manager refresh the
+session if the class loader changes, which occurs when the application
+is redeployed. When this option is set to `+true+`, the same class
+loader must always be used to retrieve the session.
+
+[#Example 86-8]## *_Forcing a Reparse of the sessions.xml File_*
+
+[source,java]
+----
+ //In this example, XMLSessionConfigLoader loads sessions.xml from the classpath
+ SessionManager manager = SessionManager.getManager();
+ Session session = manager.getSession(
+ new XMLSessionConfigLoader(), // XMLSessionConfigLoader (sessions.xml file)
+ "mysession", // session name
+ YourApplicationClass.getClassLoader(), // class loader
+ true, // log in session'''
+ false, // do not refresh session when loaded
+ true // do refresh session if class loader changes
+ );
+----
+
+== Acquiring a Client Session
+
+Before you can acquire a client session, you must first use the session
+manager to acquire a server session or a session broker that contains
+server sessions (see
+link:#Acquiring_a_Session_from_the_Session_Manager[Acquiring a Session
+from the Session Manager]).
+
+This table summarizes the methods used to acquire various types of
+client sessions from a server session and a session broker session that
+contains server sessions.
+
+[#Table 86-1]## *_Method Used to Acquire a Client Session_*
+
+[width="100%",cols="<22%,<40%,<38%",options="header",]
+|===
+|*Client Session* |*Server Session Method* |*Session Broker Session
+Method*
+|Regular or Isolated |`+acquireClientSession()+`
+|`+acquireClientSessionBroker()+`
+
+|Regular or Isolated |`+acquireClientSession(ConnectionPolicy)+` |_not
+applicable_
+
+|Historical |`+acquireHistoricalSession(AsOfClause)+`
+|`+acquireHistoricalSession(AsOfClause)+`
+|===
+
+The `+acquireClientSession+` method returns a session of type
+`+ClientSession+`.
+
+The `+acquireClientSessionBroker+` method returns a session of type
+`+SessionBroker+`.
+
+In both cases, you should cast the returned object to type `+Session+`
+and use it as you would any other session.
+
+For more information, see the following:
+
+* link:#How_to_Acquire_an_Isolated_Client_Session[ow to Acquire an
+Isolated Client Session]
+* link:#Acquiring_a_Historical_Session[Acquiring a Historical Session]
+* link:#How_to_Acquire_a_Client_Session_that_Uses_Exclusive_Connections[How
+to Acquire a Client Session that Uses Exclusive Connections]
+* link:#How_to_Acquire_a_Client_Session_that_Uses_Connection_Properties[ow
+to Acquire a Client Session that Uses Connection Properties]
+* link:#How_to_Acquire_a_Client_Session_that_Uses_a_Named_Connection_Pool[How
+to Acquire a Client Session that Uses a Named Connection Pool]
+* link:#How_to_Acquire_a_Client_Session_that_Does_Not_Use_Lazy_Connection_Allocation[How
+to Acquire a Client Session that Does Not Use Lazy Connection
+Allocation]
+
+=== How to Acquire an Isolated Client Session
+
+If in your EclipseLink project you configure all classes as isolated
+(see
+link:Configuring%20a%20Project%20(ELUG)#Configuring_Cache_Isolation_at_the_Project_Level[Configuring
+Cache Isolation at the Project Level]), or one or more classes as
+isolated (see
+link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_Cache_Isolation_at_the_Descriptor_Level[Configuring
+Cache Isolation at the Descriptor Level]), then all client sessions that
+you acquire from a parent server session will be isolated client
+sessions (see
+link:Introduction%20to%20EclipseLink%20Sessions%20(ELUG)#Isolated_Client_Sessions[Isolated
+Client Sessions]).
+
+Using a `+ConnectionPolicy+`, you can acquire an isolated client session
+that uses exclusive connections (see
+link:#How_to_Acquire_a_Client_Session_that_Uses_Exclusive_Connections[How
+to Acquire a Client Session that Uses Exclusive Connections]). This
+isolated client session can be configured with connection properties for
+use with the Oracle Virtual Private Database (VPD) feature (see
+link:#How_to_Acquire_a_Client_Session_that_Uses_Connection_Properties[How
+to Acquire a Client Session that Uses Connection Properties]).
+Typically, you use Oracle Database proxy authentication to pass user
+credentials to the Oracle Database. For more information about Oracle
+Database proxy authentication, see
+link:Introduction%20to%20Data%20Access%20(ELUG)#Oracle_Database_Proxy_Authentication[Oracle
+Database Proxy Authentication].
+
+For more information about VPD, see
+link:Introduction%20to%20EclipseLink%20Sessions%20(ELUG)#Isolated_Client_Sessions_and_Oracle_Virtual_Private_Database_(VPD)[Isolated
+Client Sessions and Oracle Virtual Private Database (VPD)].
+
+=== How to Acquire a Client Session that Uses Exclusive Connections
+
+This example illustrates how to configure a `+ConnectionPolicy+` and use
+it to acquire a client session that uses exclusive connections.
+
+[#Example 86-9]## *_Acquiring a Client Session that Uses Connection
+Properties_*
+
+[source,java]
+----
+ ConnectionPolicy connectionPolicy = new ConnectionPolicy();
+ // Use an exclusive connection for the session
+ connectionPolicy.setShouldUseExclusiveConnection(true);
+
+ Session clientSession = server.acquireClientSession(connectionPolicy);
+ // By default, an exclusive connection will be acquired lazily
+----
+
+An exclusive connection is allocated from a shared connection pool. The
+connection is dedicated to the client session that acquires it.
+
+Note: Typically, the life cycle of a client session is the duration of a
+server request. However, if you are using JTA, it is the life cycle of a
+JTA transaction.
+
+You cannot hold the client session across the JTA transaction
+boundaries. If you are not using a unit of work in your transaction and
+you are configuring a client session to use an exclusive connection (see
+Configuring Exclusive Isolated Client Sessions for Virtual Private
+Database), you must explicitly acquire and release the session when you
+are finished using it. Although client sessions have a finalizer that
+would release the session when it is garbage-collected, you must not
+rely on the finalizer and release the exclusive client session (or a
+non-lazy session) in the application to release the data source
+connection. Note that the requirement to release the session is not
+JTA-specific.
+
+If you are using a unit of work (see Using Advanced Unit of Work API),
+you do not have to worry about releasing its client session as the unit
+of work always automatically releases it at the end of the JTA
+transaction.
+
+A named query can also use an exclusive connection (see
+link:Configuring%20a%20Descriptor%20(ELUG)[Configuring Named Query
+Advanced Options]).
+
+For more information, see the following:
+
+* link:#How_to_Acquire_a_Client_Session_that_Does_Not_Use_Lazy_Connection_Allocation[How
+to Acquire a Client Session that Does Not Use Lazy Connection
+Allocation]
+* link:Configuring%20a%20Session%20(ELUG)#Configuring_Connection_Policy[Configuring
+Connection Policy]
+
+=== How to Acquire a Client Session that Uses Connection Properties
+
+The link:#Example_86-10[Acquiring an Isolated Session Using Connection
+Properties] example illustrates how to configure a `+ConnectionPolicy+`
+and use it to acquire a client session that uses connection properties.
+In this example, the properties are used by the Oracle VPD feature (see
+link:Introduction%20to%20EclipseLink%20Sessions%20(ELUG)#Isolated_Client_Sessions_and_Oracle_Virtual_Private_Database_(VPD)[Isolated
+Client Sessions and Oracle Virtual Private Database (VPD)]). You can use
+connection properties for other application purposes.
+
+[#Example 86-10]## *_Acquiring an Isolated Session Using Connection
+Properties_*
+
+[source,java]
+----
+ ConnectionPolicy connectionPolicy = new ConnectionPolicy();
+ // Set VPD specific properties to be used in the events
+ connectionPolicy.setProperty("userLevel", new Integer(5));
+
+ Session clientSession = server.acquireClientSession(connectionPolicy);
+----
+
+For more information, see
+link:Configuring%20a%20Session%20(ELUG)#Configuring_Connection_Policy[Configuring
+Connection Policy].
+
+=== How to Acquire a Client Session that Uses a Named Connection Pool
+
+Before you can acquire a client session that uses a named connection
+pool, you must configure your session with a named connection pool. For
+more information on named connection pools, see
+link:Introduction%20to%20Data%20Access%20(ELUG)[Application-Specific
+Connection Pools]. For more information on creating a named connection
+pool, see
+link:Creating%20an%20Internal%20Connection%20Pool%20(ELUG)[Introduction
+to the Internal Connection Pool Creation].
+
+To acquire a client session that uses a named connection pool, use
+`+Server+` method `+acquireClientSession+`, passing in a
+`+ConnectionPolicy+` configured with the desired connection pool. The
+acquired `+ClientSession+` uses connections from the specified pool for
+writes (reads still go through the `+Server+` read connection pool).
+
+This example illustrates how to configure a `+ConnectionPolicy+` to
+specify a named connection pool named `+myConnectionPool+`.
+
+[#Example 86-11]## *_Acquiring a Client Session that Uses a Named
+Connection Pool_*
+
+[source,java]
+----
+ // Assuming you created a connection pool named "myConnectionPool"
+ Session clientSession = server.acquireClientSession(
+ new ConnectionPolicy("myConnectionPool")
+ );
+----
+
+For more information, see
+link:Configuring%20a%20Session%20(ELUG)#Configuring_Connection_Policy[Configuring
+Connection Policy].
+
+=== How to Acquire a Client Session that Does Not Use Lazy Connection Allocation
+
+By default, the server session does not allocate a data source
+connection for a client session until a transaction starts (a lazy data
+source connection). Alternatively, you can acquire a client session that
+allocates a connection immediately.
+
+This example illustrates how to configure a `+ConnectionPolicy+` to
+specify that lazy connection allocation is not used.
+
+[#Example 86-12]## *_Acquiring a Client Session that Does Not Use Lazy
+Connections_*
+
+[source,java]
+----
+ ConnectionPolicy connectionPolicy = new ConnectionPolicy();
+ connectionPolicy.setIsLazy(false);
+ Session clientSession = server.acquireClientSession(connectionPolicy);
+----
+
+For more information, see
+link:Configuring%20a%20Session%20(ELUG)#Configuring_Connection_Policy[Configuring
+Connection Policy].
+
+== Acquiring a Historical Session
+
+After you configure EclipseLink to access historical data (see
+link:Configuring%20Historical%20Sessions%20(ELUG)#Introduction_to_Historical_Session_Configuration[Introduction
+to Historical Session Configuration]), you can query historical data
+using any session type.
+
+When you query historical data using a regular client session or
+database session, you must always set `+ObjectLevelReadQuery+` method
+`+maintainCache+` to `+false+` in order to prevent old (historical) data
+from corrupting the session cache. However, you can query both current
+and historical object versions.
+
+As a convenience, EclipseLink provides a historical session to simplify
+this process. When you query historical data using a historical session,
+you do not need to set `+ObjectLevelReadQuery+` method `+maintainCache+`
+to `+false+`. However, you can query objects only as of the specified
+time.
+
+Before you can acquire a historical session, you must first use the
+session manager to acquire a server session.
+
+To acquire a historical session, use `+Server+` method
+`+acquireHistoricalSession+` passing in an `+AsOfClause+`.
+
+The `+AsOfClause+` specifies a point in time that applies to all queries
+and expressions subsequently executed on the historical session. The
+historical session’s cache is a read-only snapshot of object versions as
+of the specified time. Its cache is isolated from its parent server
+session’s shared object cache.
+
+== Logging In to a Session
+
+Before you can use a session, you must first log in to the session using
+`+Session+` method `+login+`.
+
+By default, when you load a session using the session manager,
+EclipseLink automatically logs in to the session using the zero-argument
+`+login+` method. For information on loading a session without
+automatically logging into the session, see
+link:#How_to_Load_a_Session_Without_Logging_In[How to Load a Session
+Without Logging In].
+
+If you load a session without logging in, you can choose from the
+following signatures of the `+login+` method:
+
+* `+login()+`: Use the Login, user name, and password defined in the
+corresponding `+sessions.xml+` file.
+* `+login(Login login)+`: Override the `+Login+` defined in the
+corresponding `+sessions.xml+` file with the specified `+Login+`.
+* `+login(String username, String password)+`: Override the user name
+and password defined in the corresponding `+sessions.xml+` file with the
+specified user name and password.
+
+When you log in to a session broker, the session broker logs in all
+contained sessions and initializes the descriptors in the sessions.
+After login, the session broker appears and functions as a regular
+session. EclipseLink handles the multiple database access transparently.
+
+== Using Session API
+
+For more information on using session API, for caching, see
+link:Introduction%20to%20Cache%20(ELUG)[Introduction to Cache].
+
+For more information on using session API for queries, see
+link:Introduction%20to%20EclipseLink%20Queries%20(ELUG)[Introduction to
+EclipseLink Queries].
+
+For more information on using session API for transactions, see
+link:Introduction%20to%20EclipseLink%20Transactions_(ELUG)[Introduction
+to EclipseLink Transactions].
+
+== Logging Out of a Session
+
+When you are finished using a server session, session broker session, or
+database session, you must log out of the session using `+Session+`
+method `+logout+`. Logging out of a session broker session logs out of
+all sessions registered with the session broker.
+
+When you are finished using a client session, you must release the
+session using `+Session+` method `+release+`.
+
+You can configure a `+Session+` with a finalizer to release the session
+using `+Session+` method `+setIsFinalizersEnabled(true)+`. By default,
+finalizers are disabled. If you choose to enable a finalizer for a
+session, you should do so only as a last resort. We recommend that you
+always log out of or release your sessions.
+
+== Storing Sessions in the Session Manager Instance
+
+Although we recommend that you export all session instances from the
+Workbench to one or more `+sessions.xml+` files, alternatively, you can
+manually create a session in your application and, as the
+link:#Example_86-13[Storing Sessions Manually in the Session Manager]
+example illustrates, manually store it in the session manager using
+`+SessionManager+` method `+addSession+`. Then, you can acquire a
+session by name using the `+SessionManager+` method `+getSession+`.
+
+[width="100%",cols="<100%",]
+|===
+|*Note*: The `+addSession+` method is not necessary if you are loading
+sessions from a session configuration file.
+|===
+
+[#Example 86-13]## *_Storing Sessions Manually in the Session Manager_*
+
+[source,java]
+----
+ // create and log in to the session programmatically
+ Session theSession = project.createDatabaseSession();
+ theSession.login();
+ // store the session in the SessionManager instance
+ SessionManager manager = SessionManager.getManager();
+ manager.addSession("mysession", theSession);
+ // retrieve the session
+ Session session = SessionManager.getManager().getSession("mysession");
+----
+
+== Destroying Sessions in the Session Manager Instance
+
+You can destroy sessions individually by name or destroy all sessions.
+
+[width="100%",cols="<100%",]
+|===
+|*Note:* You should only do this when a Java EE application is
+un-deployed, or when the entire application is shut down and only when
+it is known that the session is no longer in use. You should log out of
+a session before destroying it (see
+link:#Logging_Out_of_a_Session[Logging Out of a Session]). If you do not
+log out of a session, the session manager will at the time you use it to
+destroy a session.
+|===
+
+To destroy one session instance by name, use `+SessionManager+` method
+`+destroySession+`, as the link:#Example_86-14[Destroying a Session in
+the Session Manager] example illustrates. If the specified session is
+not in the session manager cache, a `+ValidationException+` is thrown.
+
+[#Example 86-14]## *_Destroying a Session in the Session Manager_*
+
+[source,java]
+----
+ SessionManager manager = SessionManager.getManager();
+ Server server = (Server) manager.getSession("myserversession");
+ …
+ // Destroy session by name. If the session named myserversession is not in the
+ // session manager cache, throw a ValidationException'''
+ manager.destroySession("myserversession");
+----
+
+To destroy all session instances, use the `+SessionManager+` method
+`+destoryAllSessions+`, as this example illustrates.
+
+[#Example 86-15]## *_Destroying All Sessions in the Session Manager_*
+
+[source,java]
+----
+ SessionManager manager = SessionManager.getManager();
+ Server server = (Server) manager.getSession("myserversession");
+ SessionBroker broker = (SessionBroker) manager.getSession("mysessionbroker");
+ …
+ // Destroy all sessions stored in the session manager
+ manager.destroyAllSessions();
+----
+
+>
+
+'''''
+
+_link:EclipseLink_User's_Guide_Copyright_Statement[Copyright Statement]_
+
+Category:_EclipseLink_User's_Guide[Category: EclipseLink User’s Guide]
+Category:_Release_1[Category: Release 1] Category:_Task[Category: Task]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Category:Architecture.adoc b/docs/docs.ug/src/main/asciidoc/core/Category:Architecture.adoc
new file mode 100644
index 00000000000..72d5081756d
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Category:Architecture.adoc
@@ -0,0 +1,14 @@
+*image:Elug_draft_icon.png[Warning,title="Warning"] This page is
+obsolete. Please see the
+_http://www.eclipse.org/eclipselink/documentation/[EclipseLink
+Documentation Center]_ for current information.*
+
+This page lists all sections in the
+_link:EclipseLink_UserGuide[EclipseLink User’s Guide 1.x]_, organized by
+architecture.
+
+See
+link:Introduction_to_EclipseLink_Application_Development_%28ELUG%29#Selecting_an_Architecture_with_EclipseLink[Selecting
+an Architecture with EclipseLink] for more information.
+
+Category:EclipseLink_User's_Guide[Category:EclipseLink User’s Guide]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Category:DBWS.adoc b/docs/docs.ug/src/main/asciidoc/core/Category:DBWS.adoc
new file mode 100644
index 00000000000..c5e980fc4fc
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Category:DBWS.adoc
@@ -0,0 +1,16 @@
+*'`image:Elug_draft_icon.png[Warning,title="Warning"] This page is
+obsolete. Please see the
+http://www.eclipse.org/eclipselink/documentation/[EclipseLink
+Documentation Center]* for current information.`'’’
+
+*NOTOC*
+
+[width="100%",cols="36%,64%",]
+|===
+|image:Eclipselink_dbws.png[Image:Eclipselink_dbws.png,title="Image:Eclipselink_dbws.png"]
+|This page lists all sections in the
+_link:EclipseLink_UserGuide[EclipseLink User’s Guide 1.x]_ for *DBWS*
+(Database Web Services) projects.
+|===
+
+Category:EclipseLink_User's_Guide[Category:EclipseLink User’s Guide]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Category:JPA.adoc b/docs/docs.ug/src/main/asciidoc/core/Category:JPA.adoc
new file mode 100644
index 00000000000..72f7e7c4591
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Category:JPA.adoc
@@ -0,0 +1,51 @@
+*'`image:Elug_draft_icon.png[Warning,title="Warning"] This page is
+obsolete. Please see the
+http://www.eclipse.org/eclipselink/documentation/[EclipseLink
+Documentation Center]* for current information.`'’’
+
+*NOTOC*
+
+[width="100%",cols="25%,75%",]
+|===
+|image:Eclipselink_jpa.png[Image:Eclipselink
+jpa.png,title="Image:Eclipselink jpa.png"] |This page lists all sections
+in the _link:EclipseLink_UserGuide[EclipseLink User’s Guide 1.x]_ for
+*JPA* (Java Persistence API) projects. You can also use
+:Category:ORM[EclipseLink’s Native ORM support] to extend JPA.
+|===
+
+== Developing Applications using EclipseLink JPA
+
+== Step 1
+
+Define your persistence units in `+persistence.xml+`.
+
+* link:Introduction_to_Java_Persistence_API_(ELUG)#persistence.xml_File[About
+the persistence.xml file]
+* link:Packaging_and_Deploying_EclipseLink_JPA_Applications_(ELUG)#How_to_Specify_the_Persistence_Unit_Name[Specifying
+the persistence unit]
+
+== Step 2
+
+Annotate classes with @Entity, @Embeddable, and @MappedSuperClass and/or
+define classes in your mapping file (orm.xml).
+
+* link:Introduction_to_EclipseLink_JPA_%28ELUG%29#Configuring_an_Entity[Configuring
+an entity]
+* link:Using_EclipseLink_JPA_Extensions_%28ELUG%29[EclipseLink
+extensions]
+
+== Step 3
+
+Configure your application with:
+
+* javax.persistence.transactionType
+* javax.persistence.jtaDataSource
+* javax.persistence.nonJtaDataSource
+
+* link:Developing_Applications_Using_EclipseLink_JPA_%28ELUG%29[Application
+development]
+* link:Packaging_and_Deploying_EclipseLink_JPA_Applications_%28ELUG%29[Packaging
+and deployment]
+
+Category:EclipseLink_User's_Guide[Category:EclipseLink User’s Guide]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Category:SDO.adoc b/docs/docs.ug/src/main/asciidoc/core/Category:SDO.adoc
new file mode 100644
index 00000000000..20e248e6ab6
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Category:SDO.adoc
@@ -0,0 +1,37 @@
+*NOTOC*
+
+[width="100%",cols="36%,64%",]
+|===
+|image:Eclipselink_sdo.png[Image:Eclipselink
+sdo.png,title="Image:Eclipselink sdo.png"] |This page lists all sections
+in the _link:EclipseLink_UserGuide[EclipseLink User’s Guide]_ for *SDO*
+(Service Data Objects) projects.
+|===
+
+== Developing EclipseLink Applications using SDO
+
+== Step 1
+
+Initialize.
+
+* loadSchema();
+
+* Define SDO Types and Properties from an XML Schema
+
+== Step 2
+
+Unmarshall the XML document.
+
+== Step 3
+
+Modify the data objects.
+
+* augmentDocument
+
+== Step 4
+
+Marshall the data objects.
+
+* marshallDataObject
+
+Category:EclipseLink_User's_Guide[Category:EclipseLink User’s Guide]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Category:Status.adoc b/docs/docs.ug/src/main/asciidoc/core/Category:Status.adoc
new file mode 100644
index 00000000000..ead23748407
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Category:Status.adoc
@@ -0,0 +1,5 @@
+This page lists all sections in the
+_link:EclipseLink_UserGuide[EclipseLink User’s Guide]_, organized by
+*status*.
+
+Category:EclipseLink_User's_Guide[Category:EclipseLink User’s Guide]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Category:Type.adoc b/docs/docs.ug/src/main/asciidoc/core/Category:Type.adoc
new file mode 100644
index 00000000000..ade69ea19c1
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Category:Type.adoc
@@ -0,0 +1,5 @@
+This page lists all sections in the
+_link:EclipseLink_UserGuide[EclipseLink User’s Guide]_, organized by
+*information type*.
+
+Category:EclipseLink_User's_Guide[Category:EclipseLink User’s Guide]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Category:XML.adoc b/docs/docs.ug/src/main/asciidoc/core/Category:XML.adoc
new file mode 100644
index 00000000000..d33fc3e8768
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Category:XML.adoc
@@ -0,0 +1,19 @@
+’’’image:Elug_draft_icon.png[Warning,title="Warning"] This page is
+obsolete.
+
+Please see the
+_http://www.eclipse.org/eclipselink/documentation/latest/moxy/toc.htm[Developing
+JAXB Applications Using EclipseLink MOXy]_ for current information.’’’
+
+'''''
+
+[width="100%",cols="30%,70%",]
+|===
+|image:Eclipselink_moxy.png[Image:Eclipselink
+moxy.png,title="Image:Eclipselink moxy.png"] |This page lists all
+sections in the _link:EclipseLink_UserGuide[EclipseLink User’s Guide]_
+for *MOXy* (Mapping Objects to XML), with support for Java Architecture
+for XML Binding (JAXB).
+|===
+
+Category:EclipseLink_User's_Guide[Category:EclipseLink User’s Guide]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Configuring_Database_Sessions_(ELUG).adoc b/docs/docs.ug/src/main/asciidoc/core/Configuring_Database_Sessions_(ELUG).adoc
new file mode 100644
index 00000000000..2078cdd6d81
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Configuring_Database_Sessions_(ELUG).adoc
@@ -0,0 +1,75 @@
+image:Elug_draft_icon.png[Image:Elug draft
+icon.png,title="Image:Elug draft icon.png"] *For the latest EclipseLink
+documentation, please see
+http://www.eclipse.org/eclipselink/documentation/*
+
+'''''
+
+*TOC* Special:Whatlinkshere_Configuring_Database_Sessions_(ELUG)[Related
+Topics]
+
+This table lists the configurable options for database sessions.
+
+[#Table 91-1]##
+
+Option
+
+Workbench
+
+Java
+
+Configuring External Connection Pools
+
+Configuring a Primary Mapping Project
+
+Configuring a Session Login
+
+Configuring Logging
+
+Configuring Multiple Mapping Projects
+
+Configuring a Performance Profiler
+
+Configuring an Exception Handler
+
+Configuring a Session Customizer Class
+
+Configuring the Server Platform
+
+Configuring Session Event Listeners
+
+Configuring a Coordinated Cache
+
+Configuring the Integrity Checker
+
+Configuring Named Queries at the Session Level
+
+== Configuring External Connection Pools
+
+Unlike a server session, a database session does not provide internal
+connection pools. A database session only has a single database
+connection that it uses for its life cycle.
+
+We recommend that you use a server and client session in a three-tier
+environment. Alternatively, you can use a database session with an
+external connection pool (see
+link:Configuring%20a%20Data%20Source%20Login%20(ELUG)#Configuring_External_Connection_Pooling[Configuring
+External Connection Pooling]): in this case, you should allocate a new
+database session per user/thread or request.
+
+[width="100%",cols="<100%",]
+|===
+|*WARNING:* Do not allow the concurrent use of a database session by
+multiple users/threads.’’’
+|===
+
+The usage of an external connection pool reduces the number of the
+database session login and logout attempts to acquire the database
+connection.
+
+'''''
+
+_link:EclipseLink_User's_Guide_Copyright_Statement[Copyright Statement]_
+
+Category:_EclipseLink_User's_Guide[Category: EclipseLink User’s Guide]
+Category:_Release_1[Category: Release 1] Category:_Task[Category: Task]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Configuring_Exclusive_Isolated_Client_Sessions_for_Virtual_Private_Database_(ELUG).adoc b/docs/docs.ug/src/main/asciidoc/core/Configuring_Exclusive_Isolated_Client_Sessions_for_Virtual_Private_Database_(ELUG).adoc
new file mode 100644
index 00000000000..50d1f9ccf99
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Configuring_Exclusive_Isolated_Client_Sessions_for_Virtual_Private_Database_(ELUG).adoc
@@ -0,0 +1,231 @@
+image:Elug_draft_icon.png[Image:Elug draft
+icon.png,title="Image:Elug draft icon.png"] *For the latest EclipseLink
+documentation, please see
+http://www.eclipse.org/eclipselink/documentation/*
+
+'''''
+
+*TOC*
+Special:Whatlinkshere_Configuring_Exclusive_Isolated_Client_Sessions_for_Virtual_Private_Database_(ELUG)[Related
+Topics]
+
+This table lists the configurable options for isolated sessions.
+
+[#Table 88-1]##
+
+Option to Configure
+
+Workbench
+
+Java
+
+Configuring Cache Isolation at the Descriptor Level
+
+Configuring Connection Policy
+
+How to Configure Oracle Database Proxy Authentication Using Java
+
+Using PostAcquireExclusiveConnection Event Handler
+
+Using PreReleaseExclusiveConnection Event Handler
+
+Using NoRowsModifiedSessionEvent Event Handler
+
+Accessing Indirection
+
+These options are used throughout the isolated session life cycle (see
+link:Introduction%20to%20EclipseLink%20Sessions%20(ELUG)#Isolated_Client_Session_Life_Cycle[Isolated
+Client Session Life Cycle]).
+
+== Using PostAcquireExclusiveConnection Event Handler
+
+EclipseLink raises this event after an exclusive connection is allocated
+to an isolated session after the user has logged in to the database with
+it.
+
+If you are using Oracle Database proxy authentication (see
+link:Introduction%20to%20Data%20Access%20(ELUG)#Oracle_Database_Proxy_Authentication[Oracle
+Database Proxy Authentication]), then you do not need to implement this
+session event handler.
+
+If you are not using Oracle Database proxy authentication, then, as part
+of the isolated session life cycle, you must implement a
+`+SessionEventListener+` for
+`+SessionEvent.PostAcquireExclusiveConnection+`.
+
+[width="100%",cols="<100%",]
+|===
+|*Note:* You must add this session event listener to the server session
+from which you acquire your isolated client session. You cannot add them
+to the isolated client session itself. For more information, see
+link:Configuring%20a%20Session%20(ELUG)#Configuring_Session_Event_Listeners[Configuring
+Session Event Listeners]
+|===
+
+=== How to Use Java
+
+The `+SessionEvent.PostAcquireExclusiveConnection+` event listener is
+your opportunity to authenticate your user and interact with the
+underlying database platform: for example, to execute PL/SQL to create
+VPD packages and set VPD context information.
+
+This example illustrates a typical session event listener used to handle
+`+postAcquireExclusiveConnection+` events for an isolated session.
+
+[#Example 88-1]## *_Session Event Listener for an Isolated Session_*
+
+`+class VPDEventListener extends SessionEventAdaptor{+`
+`+ public void postAcquireExclusiveConnection(SessionEvent event){+`
+`+ ClientSession session = (ClientSession)event.getSession();+`
+`+ +`*`+//\'\' \'\'Get\'\' \'\'property\'\' \'\'set\'\' \'\'on\'\' \'\'the\'\' \'\'ConnectionPolicy\'\' \'\'prior\'\' \'\'to\'\' \'\'acquiring\'\' \'\'the\'\' \'\'connection+`*
+`+ String userLevel = session.getConnectionPolicy().getProperty("userLevel");+`
+`+ +`*`+//\'\' \'\'Make\'\' \'\'the\'\' \'\'Stored\'\' \'\'Procedure\'\' \'\'call\'\' \'\'for\'\' \'\'VPD\'\' \'\'to\'\' \'\'set\'\' \'\'up\'\' \'\'the\'\' \'\'Context\'\' \'\'Information+`*
+
+`+ session.executeNonSelectingSQL("StoreProcSetContextUser("+ userLevel + ")");+`
+`+ }+` `+}+`
+
+To get the required user credentials, use `+ClientSession+` method
+`+getConnectionPolicy+` to get the associated `+ConnectionPolicy+`, and
+then use `+ConnectionPolicy+` method `+getProperty+`. The
+`+ConnectionPolicy+` associated with the `+ClientSession+` should
+contain all required user credentials (see
+link:Configuring%20a%20Session%20(ELUG)#Configuring_Connection_Policy[Configuring
+Connection Policy]).
+
+After you implement the required `+SessionEventListener+`, add it to the
+parent server session from which you acquire your isolated client
+session. For more information, see
+link:Configuring%20a%20Session%20(ELUG)#Configuring_Session_Event_Listeners[Configuring
+Session Event Listeners].
+
+== Using PreReleaseExclusiveConnection Event Handler
+
+EclipseLink raises a `+SessionEvent.PreReleaseExclusiveConnection+`
+event after you call the isolated session method `+release+`.
+
+If you are using Oracle Database proxy authentication (see
+link:Introduction%20to%20Data%20Access%20(ELUG)#Oracle_Database_Proxy_Authentication[Oracle
+Database Proxy Authentication]), then you do not need to implement this
+session event handler.
+
+If you are not using Oracle Database proxy authentication, then as part
+of the isolated session life cycle, you must implement a
+`+SessionEventListener+` for
+`+SessionEvent.PreReleaseExclusiveConnection+`.
+
+[width="100%",cols="<100%",]
+|===
+|*Note:* You must add this session event listener to the server session
+from which you acquire your isolated client session. You cannot add them
+to the isolated client session itself. For more information, see
+link:Configuring%20a%20Session%20(ELUG)#Configuring_Session_Event_Listeners[Configuring
+Session Event Listeners]
+|===
+
+=== How to Use Java
+
+The `+SessionEvent.PreReleaseExclusiveConnection+` event listener gives
+you an opportunity to interact with the underlying database platform:
+for example, to perform any VPD-specific cleanup such as executing
+PL/SQL to delete VPD packages or context information.
+
+This example illustrates a typical session event listener used to handle
+`+preReleaseExclusiveConnection+` events for an isolated session.
+
+[#Example 88-2]## *_Session Event Listener for an Isolated Session_*
+
+`+class VPDEventListener extends SessionEventAdaptor{+`
+`+ public void preReleaseExclusiveConnection(SessionEvent event){+`
+`+ Session session event.getSession();+`
+`+ +`*`+//\'\' \'\'Make\'\' \'\'the\'\' \'\'Stored\'\' \'\'Procedure\'\' \'\'call\'\' \'\'for\'\' \'\'VPD\'\' \'\'to\'\' \'\'reset\'\' \'\'the\'\' \'\'Context\'\' \'\'Information+`*
+`+ session.executeNonSelectingSQL("StoreProcResetContext()");+`
+`+ }+` `+}+`
+
+To get the required user credentials, use `+ClientSession+` method
+`+getConnectionPolicy+` to get the associated `+ConnectionPolicy+`, and
+then use `+ConnectionPolicy+` method `+getProperty+`. The
+`+ConnectionPolicy+` associated with the `+ClientSession+` should
+contain all required user credentials (see
+link:Configuring%20a%20Session%20(ELUG)#Configuring_Connection_Policy[Configuring
+Connection Policy]).
+
+After you implement the required `+SessionEventListener+`, add it to the
+parent server session, from which you acquire your isolated client
+session. For more information, see
+link:Configuring%20a%20Session%20(ELUG)#Configuring_Session_Event_Listeners[Configuring
+Session Event Listeners].
+
+== Using NoRowsModifiedSessionEvent Event Handler
+
+As part of your general error handling strategy, you should implement a
+`+SessionEventListener+` for
+`+SessionEvent.NoRowsModifiedSessionEvent+`.
+
+EclipseLink raises this event when an update or delete query is executed
+against the database, but no rows are updated, that is, a zero row count
+is returned.
+
+If optimistic locking is not enabled and you query the database and
+violate your VPD security configuration, no exception is thrown: the
+query simply returns zero rows updated.
+
+If optimistic locking is enabled and you query the database and violate
+your VPD security configuration, an `+OptimisticLockException+` is
+thrown even though the root cause of the failure was a security
+violation, not an optimistic locking issue.
+
+[width="100%",cols="<100%",]
+|===
+|*Note:* You must add this session event listener to the server session
+from which you acquire your isolated client session. You cannot add them
+to the isolated client session itself. For more information, see
+link:Configuring%20a%20Session%20(ELUG)#Configuring_Session_Event_Listeners[Configuring
+Session Event Listeners]
+|===
+
+=== How to Use Java
+
+This event listener gives you an opportunity to determine whether the
+update failure was due to a security violation (in which case you should
+not retry the operation), or due to an optimistic lock issue (in which
+case a retry may be appropriate).
+
+You can use the existing session event API, such as
+`+getQuery().getResult()+`, to get the affected object, if any.
+
+After you implement the required `+SessionEventListener+`, add it to the
+parent server session, from which you acquire your isolated client
+session. For more information, see
+link:Configuring%20a%20Session%20(ELUG)#Configuring_Session_Event_Listeners[Configuring
+Session Event Listeners].
+
+== Accessing Indirection
+
+As part of your general error handling strategy, your application should
+be prepared to handle a `+ValidationException+` of type
+`+ISOLATED_SESSION_IS_NO_LONGER_AVAILABLE+`.
+
+EclipseLink throws an `+ISOLATED_SESSION_IS_NO_LONGER_AVAILABLE+` when a
+client triggers the indirection (lazy loading) on an isolated object
+when the isolated session used to load that object is no longer
+available, that is, after you call the isolated session method
+`+release+`.
+
+Ensure that you have instantiated every relationship that you need prior
+to calling the `+release+` method: to instantiate a one-to-one
+relationship, call the `+get+` method; to instantiate a one-to-many
+relationship, call the `+size+` method on the collection.
+
+Fore more information, see the following:
+
+* link:Introduction%20to%20EclipseLink%20Sessions%20(ELUG)#Exception_Handlers[Exception
+Handlers]
+* link:Configuring%20a%20Session%20(ELUG)#Configuring_an_Exception_Handler[Configuring
+an Exception Handler]
+
+'''''
+
+_link:EclipseLink_User's_Guide_Copyright_Statement[Copyright Statement]_
+
+Category:_EclipseLink_User's_Guide[Category: EclipseLink User’s Guide]
+Category:_Release_1[Category: Release 1] Category:_Task[Category: Task]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Configuring_Historical_Sessions_(ELUG).adoc b/docs/docs.ug/src/main/asciidoc/core/Configuring_Historical_Sessions_(ELUG).adoc
new file mode 100644
index 00000000000..57a86ecbeca
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Configuring_Historical_Sessions_(ELUG).adoc
@@ -0,0 +1,81 @@
+image:Elug_draft_icon.png[Image:Elug draft
+icon.png,title="Image:Elug draft icon.png"] *For the latest EclipseLink
+documentation, please see
+http://www.eclipse.org/eclipselink/documentation/*
+
+'''''
+
+*TOC*
+Special:Whatlinkshere_Configuring_Historical_Sessions_(ELUG)[Related
+Topics]
+
+For information on configuring a historical session using an Oracle
+Database platform, see
+link:#How_to_Configure_Historical_Sessions_Using_an_Oracle_Platform[How
+to Configure Historical Sessions Using an Oracle Platform].
+
+For information on configuring a historical session using any supported
+database platform and a EclipseLink `+HistoryPolicy+`, see
+link:#How_to_Configure_Historical_Sessions_Using_a_EclipseLink_HistoryPolicy[How
+to Configure Historical Sessions Using a EclipseLink HistoryPolicy].
+
+For more information about historical sessions, see
+link:Introduction%20to%20EclipseLink%20Sessions%20(ELUG)#Historical_Sessions[Historical
+Sessions].
+
+== Introduction to Historical Session Configuration
+
+There are two following ways to configure EclipseLink to access the
+historical versions of objects maintained by your data source:
+
+* using an Oracle platform (see
+link:#How_to_Configure_Historical_Sessions_Using_an_Oracle_Platform[How
+to Configure Historical Sessions Using an Oracle Platform])
+* using EclipseLink `+HistoryPolicy+` (see
+link:#How_to_Configure_Historical_Sessions_Using_a_EclipseLink_HistoryPolicy[How
+to Configure Historical Sessions Using a EclipseLink HistoryPolicy])
+
+=== How to Configure Historical Sessions Using an Oracle Platform
+
+Oracle9__i__ Database Server (or later) automatically maintains
+historical versions of objects and extends SQL with an `+AS_OF+` clause
+used to query this historical data. Oracle refers to these as flashback
+queries.
+
+If you configure your `+Session+` with an `+OraclePlatform+` (see
+link:Configuring%20a%20Database%20Login%20(ELUG)[Configuring a
+Relational Database Platform at the Session Level]) for Oracle9__i__
+Database Server (or later), you can query the historical versions of
+objects automatically maintained by Oracle Database.
+
+No further session configuration is required.
+
+For more information, see the following:
+
+* link:Acquiring%20and%20Using%20Sessions%20at%20Run%20Time%20(ELUG)#Acquiring_a_Historical_Session[Acquiring
+a Historical Session]
+* link:Introduction%20to%20EclipseLink%20Queries%20(ELUG)#Historical_Queries[Historical
+Queries].
+
+=== How to Configure Historical Sessions Using a EclipseLink HistoryPolicy
+
+If you use a schema that you designed to maintain historical versions of
+objects and if that schema can be described by EclipseLink
+`+HistoryPolicy+`, you can query the historical versions of objects
+maintained by your database in accordance with your schema.
+
+For more information, see the following:
+
+* link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_a_History_Policy[Configuring
+a History Policy]
+* link:Acquiring%20and%20Using%20Sessions%20at%20Run%20Time%20(ELUG)#Acquiring_a_Historical_Session[Acquiring
+a Historical Session]
+* link:Introduction%20to%20EclipseLink%20Queries%20(ELUG)#Historical_Queries[Historical
+Queries].
+
+'''''
+
+_link:EclipseLink_User's_Guide_Copyright_Statement[Copyright Statement]_
+
+Category:_EclipseLink_User's_Guide[Category: EclipseLink User’s Guide]
+Category:_Release_1[Category: Release 1] Category:_Task[Category: Task]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Configuring_Server_Sessions_(ELUG).adoc b/docs/docs.ug/src/main/asciidoc/core/Configuring_Server_Sessions_(ELUG).adoc
new file mode 100644
index 00000000000..10264ff38bc
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Configuring_Server_Sessions_(ELUG).adoc
@@ -0,0 +1,90 @@
+*TOC* Special:Whatlinkshere_Configuring_Server_Sessions_(ELUG)[Related
+Topics]
+
+This table lists the configurable options for server and client
+sessions.
+
+[#Table 87-1]##
+
+Option to Configure
+
+Workbench
+
+Java
+
+Configuring Internal Connection Pools
+
+Configuring a Primary Mapping Project
+
+Configuring a Session Login
+
+Configuring Logging
+
+Configuring External Connection Pools
+
+Configuring Multiple Mapping Projects
+
+Configuring a Performance Profiler
+
+Configuring an Exception Handler
+
+Configuring a Session Customizer Class
+
+Configuring the Server Platform
+
+Configuring Session Event Listeners
+
+Configuring a Coordinated Cache
+
+Configuring the Integrity Checker
+
+Configuring Named Queries at the Session Level
+
+== Configuring Internal Connection Pools
+
+An internal connection pool is a collection of reusable connections to a
+single data source provided by any session that persists to a data
+source. By default, such a session provides both an internal read and
+write connection pool.
+
+In this case, you can do the following:
+
+* Configure read and write connection pool options such as minimum and
+maximum number of connections, alternate connection configuration, and
+properties (arbitrary, application-specific named values).
+* Create named connection pools for whatever application-specific
+purpose you choose.
+* Create sequence connection pools that EclipseLink uses exclusively for
+obtaining object identifiers.
+
+For more information about creating and configuring internal connection
+pools, see the following:
+
+* link:Creating%20an%20Internal%20Connection%20Pool%20(ELUG)[Creating an
+Internal Connection Pool]
+* link:Configuring%20an%20Internal%20Connection%20Pool%20(ELUG)[Configuring
+an Internal Connection Pool]
+
+For more information about configuring the type of connection pool your
+session uses, see
+link:Configuring%20a%20Data%20Source%20Login%20(ELUG)#Configuring_External_Connection_Pooling[Configuring
+External Connection Pooling].
+
+== Configuring External Connection Pools
+
+An external connection pool is a collection of reusable connections to a
+single data source provided by a JDBC driver or Java EE container.
+
+By default, a session uses internal connection pools (see
+link:#Configuring_Internal_Connection_Pools[Configuring Internal
+Connection Pools]). For more information about configuring a session to
+use an external connection pool, see
+link:Configuring%20a%20Data%20Source%20Login%20(ELUG)#Configuring_External_Connection_Pooling[Configuring
+External Connection Pooling].
+
+'''''
+
+_link:EclipseLink_User's_Guide_Copyright_Statement[Copyright Statement]_
+
+Category:_EclipseLink_User's_Guide[Category: EclipseLink User’s Guide]
+Category:_Release_1[Category: Release 1] Category:_Task[Category: Task]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Configuring_Session_Broker_and_Client_Sessions_(ELUG).adoc b/docs/docs.ug/src/main/asciidoc/core/Configuring_Session_Broker_and_Client_Sessions_(ELUG).adoc
new file mode 100644
index 00000000000..b9146a54f8f
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Configuring_Session_Broker_and_Client_Sessions_(ELUG).adoc
@@ -0,0 +1,86 @@
+*TOC*
+Special:Whatlinkshere_Configuring_Session_Broker_and_Client_Sessions_(ELUG)[Related
+Topics]
+
+This table lists the configurable options for session broker sessions.
+
+[#Table 90-1]##
+
+Option to Configure
+
+Workbench
+
+Java
+
+Removing, renaming, or adding sessions
+
+Primary mapping project
+
+Session login
+
+Logging
+
+Multiple mapping projects
+
+Performance profiler
+
+Exception handler
+
+Session customizer class
+
+Server platform
+
+Session event listeners
+
+Coordinated cache
+
+Integrity checker
+
+Named queries
+
+== Removing, Renaming, or Adding Sessions
+
+You can manage the sessions contained by a session broker with the
+Workbench.
+
+[width="100%",cols="<100%",]
+|===
+|*Note*: Add only sessions of the same type to any given session broker.
+Do not mix sessions of different types within a session broker.
+|===
+
+=== How to Use Workbench to Remove, Rename, or Add Sessions
+
+To add sessions to, remove sessions from, or rename sessions in a
+session broker, use this procedure:
+
+[arabic]
+. Select a session broker in the *Navigator*. Its properties appear in
+the Editor.
+. Click the *General* tab. The General tab appears.
+. Click the *Sessions* subtab. The Sessions subtab
+appears.[#Figure 90-1]## *_General Tab, Sessions Subtab_*
+image:sesbk.gif[General Tab, Sessions
+Subtab,title="General Tab, Sessions Subtab"]
+. To manage the sessions in this session broker, choose one of the
+following:
+* To remove a session, select the session in the Sessions tab’s list and
+click *Remove*.
+* To rename a session, select the session in the Sessions tab’s list and
+click *Rename*. The Rename dialog box appears. Enter a new name and
+click *OK*.
+* To add a session, click *Add Session*. The Sessions dialog box appears
+showing a list of all the sessions currently configured in the session
+configuration that owns this session broker. [#Figure 90-2]##*’’
+Sessions Dialog Box*’’ image:sesbkadd.gif[Sessions Dialog
+Box,title="Sessions Dialog Box"]
++
+Check the sessions in the Session dialog that you want to add to the
+session broker and click *OK*.
+
+'''''
+
+_link:EclipseLink_User's_Guide_Copyright_Statement[Copyright Statement]_
+
+Category:_EclipseLink_User's_Guide[Category: EclipseLink User’s Guide]
+Category:_Release_1[Category: Release 1] Category:_Task[Category: Task]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Configuring_a_CORBA_Coordinated_Cache_(ELUG).adoc b/docs/docs.ug/src/main/asciidoc/core/Configuring_a_CORBA_Coordinated_Cache_(ELUG).adoc
new file mode 100644
index 00000000000..dfb57bbe92e
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Configuring_a_CORBA_Coordinated_Cache_(ELUG).adoc
@@ -0,0 +1,38 @@
+*TOC*
+Special:Whatlinkshere_Configuring_a_CORBA_Coordinated_Cache_(ELUG)[Related
+Topics]
+
+[#Table 102-1]## *_Configurable Options for a CORBA Coordinated Cache_*
+
+Option to Configure
+
+EclipseLink Workbench
+
+Java
+
+Cache coordination change propagation at the descriptor level
+
+Synchronous change propagation mode
+
+Service channel
+
+Multicast group address
+
+Multicast port
+
+Naming service type
+
+Announcement delay
+
+Connection handling
+
+Context properties
+
+Packet time-to-live
+
+'''''
+
+_link:EclipseLink_User's_Guide_Copyright_Statement[Copyright Statement]_
+
+Category:_EclipseLink_User's_Guide[Category: EclipseLink User’s Guide]
+Category:_Release_1[Category: Release 1] Category:_Task[Category: Task]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Coordinated_Cache_(ELUG).adoc b/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Coordinated_Cache_(ELUG).adoc
new file mode 100644
index 00000000000..3360296954a
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Coordinated_Cache_(ELUG).adoc
@@ -0,0 +1,999 @@
+image:Elug_draft_icon.png[Image:Elug draft
+icon.png,title="Image:Elug draft icon.png"] *For the latest EclipseLink
+documentation, please see
+http://www.eclipse.org/eclipselink/documentation/*
+
+'''''
+
+*TOC*
+Special:Whatlinkshere_Configuring_a_Coordinated_Cache_(ELUG)[Related
+Topics]
+
+[#Table 99-1]## *_Configuring EclipseLink Coordinated Caches_*
+
+If you are configuring a…
+
+See…
+
+JMS Coordinated Cache
+
+Configuring a JMS Coordinated Cache
+
+RMI Coordinated Cache
+
+Configuring an RMI Coordinated Cache
+
+CORBA Coordinated Cache
+
+Configuring a CORBA Coordinated Cache
+
+Custom Coordinated Cache
+
+Configuring a Custom Coordinated Cache
+
+For more information, see
+link:Introduction%20to%20Cache%20(ELUG)#Cache_Coordination[Cache
+Coordination].
+
+== Configuring Common Coordinated Cache Options
+
+This table lists the configurable options shared by two or more
+EclipseLink coordinated cache types. In addition, you must configure the
+options described for specific
+link:Introduction%20to%20Cache%20(ELUG)#Coordinated_Cache_Types[Coordinated
+Cache Types], as shown in the link:#Table_99-1[Configuring EclipseLink
+Coordinated Caches] table.
+
+[#Table 99-2]## *_Common Coordinated Cache Options_*
+
+Option to Configure
+
+Workbench
+
+Java
+
+Cache coordination change propagation at the descriptor level
+
+Synchronous change propagation mode
+
+Service channel
+
+Multicast group address
+
+Multicast port
+
+Naming service type
+
+Announcement delay
+
+Connection handling
+
+Context properties
+
+Packet time-to-live
+
+== Configuring the Synchronous Change Propagation Mode
+
+You can configure whether the coordinated cache should propagate object
+changes asynchronously or synchronously.
+
+The following table summarizes which coordinated caches support
+propagation mode configuration.
+
+[#Table 99-3]## *_Coordinated Cache Support for Propagation Mode
+Configuration_*
+
+Coordinated Cache
+
+Using Workbench
+
+Using Java
+
+JMS Coordinated Cache (asynchronous only)
+
+RMI Coordinated Cache
+
+CORBA Coordinated Cache
+
+Oracle Application Server 10g Cluster Coordinated Cache
+
+Custom Coordinated Cache
+
+Synchronous propagation mode forces the session to wait for an
+acknowledgement before sending the next object change notification: this
+reduces the likelihood of stale data at the expense of performance.
+
+Asynchronous propagation mode allows the session to create separate
+threads to propagate changes to remote servers. EclipseLink returns
+control to the client immediately after the local commit operation,
+whether or not the changes merge successfully on the remote servers.
+This offers superior performance for applications that are somewhat
+tolerant of stale data.
+
+For more information,
+link:Introduction%20to%20Cache%20(ELUG)#Handling_Stale_Data[Handling
+Stale Data].
+
+=== How to Configure the Synchronous Change Propagation Mode Using Workbench
+
+To specify the change propagation mode, use this procedure:
+
+[arabic]
+. Select a session or session broker in the *Navigator*. Its properties
+appear in the Editor.
+. Click the *Cache Coordination* tab. The Cache Coordination tab
+appears.
+. Ensure the *Enable Cache Coordination* option is selected, then select
+the appropriate coordinated cache *Type* (see the
+link:#Table_99-4[Coordinated Cache Support for Propagation Mode
+Configuration] table). The cache coordination options appear on the tab.
+*_Cache Coordination Tab, Synchronous Field_* image:sesrmisy.gif[Cache
+Coordination Tab, Synchronous
+Field,title="Cache Coordination Tab, Synchronous Field"]
+. Select the *Synchronous* option to use synchronous change propagation.
+Do not select this option to use asynchronous change propagation.
+
+=== How to Configure the Synchronous Change Propagation Mode Using Java
+
+Use the
+`+org.eclipse.persistence.sessions.coordination.RemoteCommandManager+`
+method `+setShouldPropagateAsynchronously+` to define whether changes
+should be propagated synchronously or asynchronously for this
+coordinated cache.
+
+For more information, see
+link:Introduction%20to%20Cache%20(ELUG)#Cache_Coordination_API[Cache
+Coordination API].
+
+== Configuring a Service Channel
+
+The *service channel* is the name of the EclipseLink coordinated cache
+channel to which sessions subscribe in order to participate in the same
+coordinated cache. Such sessions use the service channel to exchange
+messages with each other. Messages sent on other service channels will
+not be exchanged with this coordinated cache.
+
+This table summarizes which coordinated caches support service channel
+configuration.
+
+[#Table 99-4]## *_Coordinated Cache Support for Service Channel
+Configuration_*
+
+Coordinated Cache
+
+Using Workbench
+
+Using Java
+
+JMS Coordinated Cache
+
+RMI Coordinated Cache
+
+CORBA Coordinated Cache
+
+Oracle Application Server 10g Cluster Coordinated Cache
+
+Custom Coordinated Cache
+
+=== How to Configure a Service Channel Using Workbench
+
+To specify the service channel, use this procedure:
+
+[arabic]
+. Select a session or session broker in the *Navigator*. Its properties
+appear in the Editor.
+. Click the *Cache Coordination* tab. The Cache Coordination tab
+appears.
+. Ensure the *Enable Cache Coordination* option is selected, then select
+the appropriate coordinated cache *Type* (see the
+link:#Table_99-4[Coordinated Cache Support for Service Channel
+Configuration] table). The cache coordination options appear on the tab.
+*_Cache Coordination Tab, Channel Field_* image:cachchannel.gif[Cache
+Coordination Tab, Channel
+Field,title="Cache Coordination Tab, Channel Field"]
+. In the *Channel* field, enter the name of the service channel for this
+coordinated cache.
+
+=== How to Configure a Service Channel Using Java
+
+Use the
+`+org.eclipse.persistence.sessions.coordination.RemoteCommandManager+`
+method `+setChannel+` to set the name of the service channel for this
+coordinated cache.
+
+For more information, see
+link:Introduction%20to%20Cache%20(ELUG)#Cache_Coordination_API[Cache
+Coordination API].
+
+== Configuring a Multicast Group Address
+
+A multicast group address is an Internet Protocol (IP) address in the
+range 224.0.0.0 to 239.255.255.255 that identifies the members of an IP
+multicast group. To efficiently broadcast the same message to all
+members of an IP multicast group, you configure each recipient with the
+same multicast group address and send the message to that address.
+
+This table summarizes which coordinated caches support multicast group
+address configuration.
+
+[#Table 99-5]## *_Coordinated Cache Support for Multicast Group Address
+Configuration_*
+
+Coordinated Cache
+
+Using Workbench
+
+Using Java
+
+JMS Coordinated Cache
+
+RMI Coordinated Cache
+
+CORBA Coordinated Cache
+
+Oracle Application Server 10g Cluster Coordinated Cache
+
+Custom Coordinated Cache
+
+[width="100%",cols="<100%",]
+|===
+|*Note:* Ensure your host and network are configured to support
+multicast operation before configuring this option.
+|===
+
+In addition to configuring the multicast group address, you must also
+configure the multicast port (see
+link:#Configuring_a_Multicast_Port[Configuring a Multicast Port]) for
+the coordinated cache types shown in the link:#Table_99-5[Coordinated
+Cache Support for Multicast Group Address Configuration] table.
+
+=== How to Configure a Multicast Group Address Using Workbench
+
+To specify the multicast group address, use this procedure:
+
+[arabic]
+. Select a session or session broker in the *Navigator*. Its properties
+appear in the Editor.
+. Click the *Cache Coordination* tab. The Cache Coordination tab
+appears.
+. Ensure the *Enable Cache Coordination* option is selected, then select
+the appropriate coordinated cache *Type* (see the
+link:#Table_99-5[Coordinated Cache Support for Multicast Group Address
+Configuration] table). The cache coordination options appear on the tab.
+*_Cache Coordination Tab, Multicast Group Address Field_*
+image:rmiclumg.gif[Cache Coordination Tab, Multicast Group Address
+Field,title="Cache Coordination Tab, Multicast Group Address Field"]
+. Enter the multicast group address in the range 224.0.0.0 to
+239.255.255.255 to subscribe this session to a given coordinated cache.
+
+=== How to Configure a Multicast Group Address Using Java
+
+Use the
+`+org.eclipse.persistence.sessions.coordination.DiscoveryManager+`
+method `+setMulticastGroupAddress+` to subscribe this session to a given
+coordinated cache. Ensure that the address falls in the range 224.0.0.0
+to 239.255.255.255.
+
+For more information, see
+link:Introduction%20to%20Cache%20(ELUG)#Cache_Coordination_API[Cache
+Coordination API].
+
+== Configuring a Multicast Port
+
+The multicast port is the port on which multicast messages are received.
+Members of a multicast group (see
+link:#Configuring_a_Multicast_Group_Address[Configuring a Multicast
+Group Address]) rely on messages broadcast to their multicast group
+address to communicate with one another.
+
+This table summarizes which coordinated caches support multicast port
+configuration.
+
+[#Table 99-6]## *_Coordinated Cache Support for Multicast Port
+Configuration_*
+
+Coordinated Cache
+
+Using Workbench
+
+Using Java
+
+JMS Coordinated Cache
+
+RMI Coordinated Cache
+
+CORBA Coordinated Cache
+
+Oracle Application Server 10g Cluster Coordinated Cache
+
+Custom Coordinated Cache
+
+[width="100%",cols="<100%",]
+|===
+|*Note:* Ensure your host and network are configured to support
+multicast operation before configuring this option
+|===
+
+=== How to Configure a Multicast Port Using Workbench
+
+To specify the multicast port, use this procedure:
+
+[arabic]
+. Select a session or session broker in the *Navigator*. Its properties
+appear in the Editor.
+. Click the *Cache Coordination* tab. The Cache Coordination tab
+appears.
+. Ensure the *Enable Cache Coordination* option is selected, then select
+the appropriate coordinated cache *Type* (see the
+link:#Table_99-6[Coordinated Cache Support for Multicast Port
+Configuration] table). The cache coordination options appear on the tab.
+*_Cache Coordination Tab, Multicast Port Field_*
+image:rmiclump.gif[Cache Coordination Tab, Multicast Port
+Field,title="Cache Coordination Tab, Multicast Port Field"]
+. Enter the multicast port on which messages broadcast to the multicast
+group address are received.
+
+=== How to Configure a Multicast Port Using Java
+
+Use the
+`+org.eclipse.persistence.sessions.coordination.DiscoveryManager+`
+method `+setMulticastPort+` to define the multicast port on which
+messages broadcast to the multicast group address are to be received.
+
+For more information, see
+link:Introduction%20to%20Cache%20(ELUG)#Cache_Coordination_API[Cache
+Coordination API].
+
+== Configuring a Naming Service Type
+
+The session’s message transport service uses a naming service when it
+looks up connections to other sessions in the coordinated cache. You can
+configure the message transport service to look up remote objects using
+an RMI registry or Java Naming and Directory Interface (JNDI). By
+default, JNDI is used.
+
+This table summarizes which coordinated caches support naming service
+configuration.
+
+[#Table 99-7]## *_Coordinated Cache Support for Naming Service
+Configuration_*
+
+Coordinated Cache
+
+JNDI Naming Service
+
+RMI Registry Naming Service
+
+JMS Coordinated Cache
+
+RMI Coordinated Cache
+
+CORBA Coordinated Cache
+
+Oracle Application Server 10g Cluster Coordinated Cache
+
+Custom Coordinated Cache
+
+== Configuring JNDI Naming Service Information
+
+The session’s message transport service uses a naming service when it
+looks up connections to other sessions in the coordinated cache. If you
+choose to use a JNDI naming service, you must configure JNDI naming
+service information.
+
+This table summarizes which coordinated caches support JNDI naming
+service configuration.
+
+[#Table 99-8]## *_Coordinated Cache Support for JNDI Naming Service
+Configuration_*
+
+Coordinated Cache
+
+Using Workbench
+
+Using Java
+
+JMS Coordinated Cache
+
+RMI Coordinated Cache
+
+CORBA Coordinated Cache
+
+Oracle Application Server 10g Cluster Coordinated Cache
+
+Custom Coordinated Cache
+
+EclipseLink uses JNDI naming service information differently, depending
+on the type of coordinated cache.
+
+For a JMS coordinated cache, when a particular session’s coordinated
+cache starts up, it uses its JNDI naming service information to locate
+and create a connection to the JMS server. The coordinated cache is
+ready when all participating sessions are connected to the JMS server.
+At this point, sessions can start sending and receiving object change
+messages. You can then configure all sessions that are participating in
+the same coordinated cache with the same JNDI naming service
+information.
+
+For an RMI or CORBA coordinated cache, when a particular session’s
+coordinated cache starts up, the session binds its connection in JNDI,
+creates an announcement message (that includes its own JNDI naming
+service information), and broadcasts the announcement to its multicast
+group (see link:#Configuring_a_Multicast_Group_Address[Configuring a
+Multicast Group Address] and
+link:#Configuring_a_Multicast_Port[Configuring a Multicast Port]). When
+a session that belongs to the same multicast group receives this
+announcement, it uses the JNDI naming service information in the
+announcement message to establish bidirectional connections with the
+newly announced session’s coordinated cache. The coordinated cache is
+ready when all participating sessions are interconnected in this way, at
+which point, sessions can start sending and receiving object change
+messages. You can then configure each session with JNDI naming
+information that identifies the host on which the session is deployed.
+
+=== How to Configure JNDI Naming Service Information Using Workbench
+
+To specify the sessions’s JNDI naming service, use this procedure:
+
+[arabic]
+. Select a session or session broker in the *Navigator*. Its properties
+appear in the Editor.
+. Click the *Cache Coordination* tab. The Cache Coordination tab
+appears.
+. Ensure the *Enable Cache Coordination* option is selected, then select
+the appropriate coordinated cache *Type* (see the
+link:#Table_99-8[Coordinated Cache Support for JNDI Naming Service
+Configuration] table). The cache coordination options appear on the tab.
+*_Cache Coordination Tab, JNDI Naming Service Options_*
+image:jndisrvc.gif[Cache Coordination Tab, JNDI Naming Service
+Options,title="Cache Coordination Tab, JNDI Naming Service Options"]
+. Complete the Naming Service options.
+
+Use the following information to enter data in the fields of the Cache
+Coordination tab to configure the naming service options:
+
+Field
+
+Description
+
+URL
+
+The location of the JNDI naming service.
+
+For a JMS coordinated cache: If you are using the Oracle Containers for
+J2EE (OC4J) JNDI naming service and all the hosts in your coordinated
+cache can communicate using the OC4J proprietary RMI protocol ORMI, use
+a URL similar to the following:
+
+ormi://:
+
+where JMS-host-IP is the IP address of the host on which the JMS service
+provider is running and JMS-host-port is the port on which the JMS
+service provider is listening for JMS requests.
+
+For an RMI or CORBA coordinated cache: If you are using the OC4J JNDI
+naming service and all the hosts in your coordinated cache can
+communicate using the OC4J proprietary RMI protocol ORMI on OC4J default
+port 23791, use a URL similar to the following:
+
+ormi://:23791
+
+where session-host-IP is the IP address of the host on which this
+session is deployed.
+
+Username
+
+The user name required to log in to the JNDI naming service.
+
+The value you enter defines the Context.SECURITY_PRINCIPAL environment
+property.
+
+Password
+
+The plain text (unencrypted) password required to log in to the JNDI
+naming service.
+
+The password appears in plain text in Workbench, but it is encrypted
+when written to the sessions.xml file.
+
+The value you enter defines the Context.SECURITY_CREDENTIALS environment
+property.
+
+Initial Context Factory
+
+The name of the factory class, provided by your JNDI naming service
+provider, that implements the javax.naming.spi.InitialContextFactory
+interface. This factory class is used to create a javax.naming.Context
+instance that can access the JNDI naming service provider’s context
+implementation.
+
+The value you enter defines the Context.INITIAL_CONTEXT_FACTORY
+environment property.
+
+Properties
+
+The JNDI context properties.
+
+Click Properties to configure custom JNDI context properties (see
+Configuring Context Properties).
+
+=== How to Configure JNDI Naming Service Information Using Java
+
+Use the
+`+org.eclipse.persistence.sessions.coordination.TransportManager+`
+method `+setNamingServiceType+` as follows:
+
+`+setNamingServiceType(TransportManager.JNDI_NAMING_SERVICE)+`
+
+Then use the following TransportManager methods to configure the JNDI
+naming service options:
+
+* `+setUserName+`–Set the user name required to log in to the JNDI
+naming service. The value you enter defines the
+`+Context.SECURITY_PRINCIPAL+` environment property.
+* `+setPassword+`–Set the unencrypted password required to log in to the
+JNDI naming service. The value you enter defines the
+`+Context.SECURITY_CREDENTIALS+` in the cached context properties.
+* `+setEncriptedPassword+`–Set the encrypted password required to log in
+to the JNDI naming service. The value you enter defines the
+`+Context.SECURITY_CREDENTIALS+` in the cached context properties.
+* `+setInitialContextFactoryName+`–The name of the factory class,
+provided by your JNDI naming service provider, that implements the
+`+javax.naming.spi.InitialContextFactory+` interface. This factory class
+is used to create a `+javax.naming.Context+` instance that can access
+the JNDI naming service provider’s context implementation. The value you
+enter defines the `+Context.INITIAL_CONTEXT_FACTORY+` in the cached
+context properties.
+* `+setLocalContextProperties+`–Set the properties that will be used to
+create the initial context for local JNDI access. For more information,
+see …
+
+Do not forget to specify the location of the JNDI naming service by
+providing its URL. Consider the following:
+
+* For a JMS coordinated cache, if you are using the OC4J JNDI naming
+service and all the hosts in your coordinated cache can communicate
+using the OC4J proprietary RMI protocol ORMI, use a URL similar to the
+following:
+
+`+ormi://+``+:+`
+
+where `+JMS-host-IP+` is the IP address of the host on which the JMS
+service provider is running, and `+JMS-host-port+` is the port on which
+the JMS service provider is listening for JMS requests.
+
+* For an RMI or CORBA coordinated cache, if you are using the OC4J JNDI
+naming service and all the hosts in your coordinated cache can
+communicate using the OC4J proprietary RMI protocol ORMI on OC4J default
+port 23791, use a URL similar to the following:
+
+`+ormi://+``+:23791+`
+
+where `+session-host-IP+` is the IP address of the host on which this
+session is deployed.
+
+Note that the default protocol value is "`ormi`", and the default port
+value is "`23791`". You can also use the
+`+TransportManager.DEFAULT_URL_PROTOCOL+` and `+DEFAULT_URL_PORT+`.
+
+For more information, see
+link:Introduction%20to%20Cache%20(ELUG)#Cache_Coordination_API[Cache
+Coordination API].
+
+== Configuring RMI Registry Naming Service Information
+
+The session’s message transport service uses a naming service when it
+looks up connections to other sessions in the coordinated cache. If you
+choose to use an RMI registry naming service, you can configure RMI
+registry naming service options.
+
+This table summarizes which coordinated caches support RMI registry
+naming service configuration.
+
+[#Table 99-9]## *_Coordinated Cache Support for RMI Registry Naming
+Service Configuration_*
+
+Coordinated Cache
+
+Using Workbench
+
+Using Java<
+
+JMS Coordinated Cache
+
+RMI Coordinated Cache
+
+CORBA Coordinated Cache
+
+Oracle Application Server Cluster 10g Coordinated Cache
+
+Custom Coordinated Cache
+
+For an RMI coordinated cache, when a particular session’s coordinated
+cache starts up, the session binds its connection in its RMI registry,
+creates an announcement message (that includes its own naming service
+information), and broadcasts the announcement to its multicast group
+(see link:#Configuring_a_Multicast_Group_Address[Configuring a Multicast
+Group Address] and link:#Configuring_a_Multicast_Port[Configuring a
+Multicast Port]). When a session that belongs to the same multicast
+group receives this announcement, it uses the JNDI naming service
+information in the announcement message to establish bidirectional
+connections with the newly announced session’s coordinated cache. The
+coordinated cache is ready when all participating sessions are
+interconnected in this way, at which point, sessions can start sending
+and receiving object change messages. You can then configure each
+session with RMI registry naming information that identifies the host on
+which the session is deployed.
+
+=== How to Configure RMI Registry Naming Service Information Using Workbench
+
+To specify the sessions’s registry naming service, use this procedure:
+
+[arabic]
+. Select a session or session broker in the *Navigator*. Its properties
+appear in the Editor window.
+. Click the *Cache Coordination* tab. The Cache Coordination tab
+appears.
+. Ensure the *Enable Cache Coordination* option is selected, then select
+the appropriate coordinated cache *Type* (see the
+link:#Table_99-9[Coordinated Cache Support for RMI Registry Naming
+Service Configuration] table). The cache coordination options appear on
+the tab. *_Cache Coordination Tab, Naming Service Options_*
+image:rmisrvc.gif[Cache Coordination Tab, Naming Service
+Options,title="Cache Coordination Tab, Naming Service Options"]
+. Complete the Registry Naming Service options.
+
+Use the following information to configure the naming service options:
+
+Field
+
+Description
+
+URL
+
+Assuming that you are using the OC4J JNDI naming service and that all
+the hosts in your coordinated cache can communicate using the OC4J
+proprietary RMI protocol ORMI on OC4J default port 23791, use a URL
+similar to the following:
+
+ormi://:23791
+
+where session-host-IP is the IP address of the host on which this
+session is deployed.
+
+=== How to Configure RMI Registry Naming Service Information Using Java
+
+Use the
+`+org.eclipse.persistence.sessions.coordination.TransportManager+`
+method `+setNamingServiceType+` as follows:
+
+`+setNamingServiceType(TransportManager.REGISTRY_NAMING_SERVICE)+`
+
+Then specify the location of the JNDI naming service by providing its
+URL. Consider the following:
+
+For an RMI or CORBA coordinated cache, if you are using the OC4J JNDI
+naming service and all the hosts in your coordinated cache can
+communicate using the OC4J proprietary RMI protocol ORMI on OC4J default
+port 23791, use a URL similar to the following:
+
+`+ormi://+``+:23791+`
+
+where `+session-host-IP+` is the IP address of the host on which this
+session is deployed.
+
+Note that the default protocol value is "`ormi`", and the default port
+value is "`23791`". You can also use the
+`+TransportManager.DEFAULT_URL_PROTOCOL+` and `+DEFAULT_URL_PORT+`
+contstants.
+
+For more information, see
+link:Introduction%20to%20Cache%20(ELUG)#Cache_Coordination_API[Cache
+Coordination API].
+
+== Configuring an Announcement Delay
+
+Use the announcement delay option to set the amount of time (in
+milliseconds) that a session should wait between the time that it is
+available and the time that it broadcasts its announcement message to
+the members of the coordinated cache. This additional delay may be
+necessary to give some systems more time to post their connections into
+the naming service (see
+link:#Configuring_a_Naming_Service_Type[Configuring a Naming Service
+Type]).
+
+This table summarizes which coordinated caches support announcement
+delay configuration.
+
+[#Table 99-10]## *_Coordinated Cache Support for Announcement Delay
+Configuration_*
+
+Coordinated Cache
+
+Using Workbench
+
+Using Java
+
+JMS Coordinated Cache
+
+RMI Coordinated Cache
+
+CORBA Coordinated Cache
+
+Oracle Application Server 10g Cluster Coordinated Cache
+
+Custom Coordinated Cache
+
+In addition to announcement delay, you may also need to consider packet
+time-to-live configuration (see
+link:#Configuring_a_Packet_Time-to-Live[Configuring a Packet
+Time-to-Live]).
+
+=== How to Configure an Announcement Delay Using Workbench
+
+To specify the announcement delay (in milliseconds) for an RMI
+coordinated cache, use this procedure:
+
+[arabic]
+. Select a session or session broker in the *Navigator*. Its properties
+appear in the Editor.
+. Click the *Cache Coordination* tab. The Cache Coordination tab
+appears.
+. Ensure the *Enable Cache Coordination* option is selected, then select
+the appropriate coordinated cache *Type* (see the
+link:#Table_99-10[Coordinated Cache Support for Announcement Delay
+Configuration] table). The cache coordination options appear on the tab.
+*_Cache Coordination Tab, Announcement Delay Field_*
+image:rmicluad.gif[Cache Coordination Tab, Announcement Delay
+Field,title="Cache Coordination Tab, Announcement Delay Field"]
+. Select the amount of time (in milliseconds) that this session should
+wait between the time that it is available and the time that it
+broadcasts its announcement message to the members of the coordinated
+cache.
+
+See Also:
+
+link:#Configuring_a_Packet_Time-to-Live[Configuring a Packet
+Time-to-Live]
+
+=== How to Configure an Announcement Delay Using Java
+
+Use the
+`+org.eclipse.persistence.sessions.coordination.DiscoveryManager+`
+method `+setAnnouncementDelay+` to select the amount of time (in
+milliseconds) that this session should wait between the time that it is
+available and the time that it broadcasts its announcement message to
+the members of the coordinated cache.
+
+For more information, see
+link:Introduction%20to%20Cache%20(ELUG)#Cache_Coordination_API[Cache
+Coordination API].
+
+== Configuring Connection Handling
+
+The session’s transport manager creates connections to the various
+members of the coordinated cache. If a communication error occurs on one
+of these connections, you can configure the session to either ignore the
+error or remove the connection.
+
+This table summarizes which coordinated caches support connection
+handling configuration.
+
+[#Table 99-11]## *_Coordinated Cache Support for Connection Handling
+Configuration_*
+
+Coordinated Cache
+
+Using Workbench
+
+Using Java
+
+JMS Coordinated Cache
+
+RMI Coordinated Cache
+
+CORBA Coordinated Cache
+
+Oracle Application Server 10g Cluster Coordinated Cache
+
+Custom Coordinated Cache
+
+If you configure the session to remove the connection on error, the next
+time the session tries to communicate with that coordinated cache
+member, it will construct a new connection.
+
+If you configure the session to ignore the error, the next time the
+session tries to communicate with that coordinated cache member, it will
+continue to use the same connection.
+
+=== How to Configure Connection Handling Using Workbench
+
+To specify how EclipseLink handles session connections in the event of
+an error, use this procedure:
+
+[arabic]
+. Select a session or session broker in the *Navigator*. Its properties
+appear in the Editor.
+. Click the *Cache Coordination* tab. The Cache Coordination tab
+appears.
+. Ensure the *Enable Cache Coordination* option is selected, then select
+the appropriate coordinated cache *Type* (see the
+link:#Table_99-11[Coordinated Cache Support for Connection Handling
+Configuration] table). The cache coordination options appear on the tab.
+*_Cache Coordination Tab, Remove Connection on Error Option_*
+image:clonerr.gif[Cache Coordination Tab, Remove Connection on Error
+Option,title="Cache Coordination Tab, Remove Connection on Error Option"]
+. Select the *Remove Connection on Error* option to configure the
+session to remove the data source connection in the event of an error.
+
+=== How to Configure Connection Handling Using Java
+
+Use the
+`+org.eclipse.persistence.sessions.coordination.TransportManager+`
+method `+setShouldRemoveConnectionOnError+` to configure the session to
+remove the data source connection if an error occurs.
+
+For more information, see
+link:Introduction%20to%20Cache%20(ELUG)#Cache_Coordination_API[Cache
+Coordination API].
+
+== Configuring Context Properties
+
+When you configure a coordinated cache to use a JNDI naming service (see
+link:#Configuring_a_Naming_Service_Type[Configuring a Naming Service
+Type]), you can add new environment properties to the environment of the
+initial JNDI context.
+
+This table summarizes which coordinated caches support context
+properties.
+
+[#Table 99-12]## *_Coordinated Cache Support for Context Properties_*
+
+Coordinated Cache
+
+Using Workbench
+
+Using Java
+
+JMS Coordinated Cache
+
+RMI Coordinated Cache 1
+
+CORBA Coordinated Cache
+
+Oracle Application Server 10g Cluster Coordinated Cache
+
+Custom Coordinated Cache
+
+1When JNDI naming service is selected (see
+link:#Configuring_a_Naming_Service_Type[Configuring a Naming Service
+Type]). Using Workbench, EclipseLink uses the new environment properties
+you add to create the initial context for both local and remote JNDI
+access.
+
+Using Java, you can configure different properties for local and remote
+JNDI access using a session customizer class to call
+`+TransportManager+` methods `+setLocalContextProperties+` and
+`+setRemoteContectProperties+` (for more information, see
+link:Configuring%20a%20Session%20(ELUG)#Configuring_a_Session_Customizer_Class[Configuring
+a Session Customizer Class]).
+
+=== How to Configure Context Properties Using Workbench
+
+To define JNDI context properties, use this procedure:
+
+[arabic]
+. Select a session or session broker in the *Navigator*. Its properties
+appear in the Editor.
+. Ensure the *Enable Cache Coordination* option is selected, then select
+the appropriate coordinated cache *Type* (see the
+link:#Table_99-12[Coordinated Cache Support for Context Properties]
+table). The cache coordination options appear on the tab.
+. Ensure the *JNDI Naming Service* option is selected. See
+link:#Configuring_a_Naming_Service_Type[Configuring a Naming Service
+Type].
+. In the JNDI Naming Service area, click *Properties*. The Edit
+Properties dialog box appears. *_Edit Properties Dialog Box_*
+image:cachepropdialog.gif[Edit Properties Dialog
+Box,title="Edit Properties Dialog Box"]
+. Click *Add* to create a new property. The Add New Property dialog box
+appears.
+
+Use this table to enter data in the following fields on the dialog box.
+
+[cols="<,<",options="header",]
+|===
+|*Field* |*Description*
+|*Name* |The name of the property.
+|*Value* |The value of the property.
+|===
+
+To change (or delete) an existing property, select the property and
+click *Edit* (or *Remove*).
+
+=== How to Configure Context Properties Using Java
+
+Use the
+`+org.eclipse.persistence.sessions.coordination.TransportManager+`
+method `+setLocalContextProperties+` to define a `+Hashtable+` of the
+JNDI context properties that will be used to create the initial context
+for the local JNDI access. Note that the "`dedicated.connection`" is the
+default key with the default value of "`true`".
+
+For more information, see
+link:Introduction%20to%20Cache%20(ELUG)#Cache_Coordination_API[Cache
+Coordination API].
+
+== Configuring a Packet Time-to-Live
+
+The *packet time-to-live* is the number of hops that session data
+*packets* can take before expiring. The default is 2. This allows for a
+*hub* and an interface card, and prevents the data packets from leaving
+the local network. If sessions are hosted on different local area
+networks (LANs) that are part of wide area network (WAN), or if a
+firewall configuration prevents it, the announcement sent by one session
+may not reach the other sessions in the coordinated cache. In this case,
+consult your network administrator for the correct time-to-live value.
+
+This table summarizes which coordinated caches support packet
+time-to-live configuration.
+
+[#Table 99-13]## *_Coordinated Cache Support for Packet Time-to-Live
+Configuration_*
+
+Coordinated Cache
+
+Using Workbench
+
+Using Java
+
+JMS Coordinated Cache
+
+RMI Coordinated Cache
+
+CORBA Coordinated Cache
+
+Oracle Application Server 10g Cluster Coordinated Cache
+
+Custom Coordinated Cache
+
+In addition to configuring packet time-to-live, you may also need to
+configure announcement delay (see
+link:#Configuring_an_Announcement_Delay[Configuring an Announcement
+Delay]).
+
+=== How to Configure a Packet Time-to-Live Using Workbench
+
+To specify the number of hops that session data packets can take before
+expiring, use this procedure:
+
+[arabic]
+. Select a session or session broker in the *Navigator*. Its properties
+appear in the Editor.
+. Ensure the *Enable Cache Coordination* option is selected, then select
+the appropriate coordinated cache *Type* (see the
+link:#Table_99-12[Coordinated Cache Support for Packet Time-to-Live
+Configuration] table). The cache coordination options appear on the tab.
+*_Cache Coordination Tab, Packet Time to Live Field_*
+image:rmipacket.gif[DCache Coordination Tab, Packet Time to Live
+Field,title="DCache Coordination Tab, Packet Time to Live Field"]
+. In the *Packet Time to Live* field, specify the number of hops
+(default = `+2+`) that session data packets can take before expiring.
+
+=== How to Configure a Packet Time-to-Live Using Java
+
+Use the
+`+org.eclipse.persistence.sessions.coordination.DiscoveryManager+`
+method `+setPacketTimeToLive+` to specify the number of hops (default =
+2) that session data packets can take before expiring.
+
+For more information, see
+link:Introduction%20to%20Cache%20(ELUG)#Cache_Coordination_API[Cache
+Coordination API].
+
+'''''
+
+_link:EclipseLink_User's_Guide_Copyright_Statement[Copyright Statement]_
+
+Category:_EclipseLink_User's_Guide[Category: EclipseLink User’s Guide]
+Category:_Release_1[Category: Release 1] Category:_Task[Category: Task]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Custom_Coordinated_Cache_(ELUG).adoc b/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Custom_Coordinated_Cache_(ELUG).adoc
new file mode 100644
index 00000000000..2f22d79c9a7
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Custom_Coordinated_Cache_(ELUG).adoc
@@ -0,0 +1,66 @@
+*TOC*
+Special:Whatlinkshere_Configuring_a_Custom_Coordinated_Cache_(ELUG)[Related
+Topics]
+
+[#Table 103-1]## *_Configurable Options for a Custom Coordinated Cache_*
+
+Option to Configure
+
+Workbench
+
+Java
+
+Configuring cache coordination change propagation at the descriptor
+level
+
+Configuring a service channel
+
+Configuring transport class
+
+Configuring connection handling
+
+For more information, see
+link:Introduction%20to%20Cache%20(ELUG)#Custom_Coordinated_Cache[Custom
+Coordinated Cache].
+
+== Configuring Transport Class
+
+To configure a custom coordinated cache, you must specify your custom
+instance of
+`+org.eclipse.persistence.sessions.coordination.TransportManager+`.
+
+=== How to Configure Transport Class Using Workbench
+
+To select the transport class for the user defined coordinated cache,
+use this procedure:
+
+[arabic]
+. Select a session or session broker in the *Navigator*. Its properties
+appear in the Editor.
+. Click the *Cache Coordination* tab. The Cache Coordination tab
+appears.
+. Ensure the *Enable Cache Coordination* option is selected and the
+*Type* is *User Defined* (see
+link:Introduction%20to%20Cache%20(ELUG)#Cache_Coordination[Cache
+Coordination]). [#Figure 103-1]##*_Cache Coordination, Transport Class
+Option_* image:chcusttr.gif[Cache Coordination, Transport Class
+Option,title="Cache Coordination, Transport Class Option"]
+. Click *Browse* and select the transport class for the user-defined
+coordinated cache.
+
+=== How to Configure Transport Class Using Java
+
+Create a custom instance of the
+`+org.eclipse.persistence.sessions.coordination.TransportManager+` that
+you use as a transport class for your coordinated cache.
+
+You obtain the `+TransportManager+` using the following `+Session+` API:
+
+`+Session.getCommandManager().getTransportManager()+`
+
+'''''
+
+_link:EclipseLink_User's_Guide_Copyright_Statement[Copyright Statement]_
+
+Category:_EclipseLink_User's_Guide[Category: EclipseLink User’s Guide]
+Category:_Release_1[Category: Release 1] Category:_Task[Category: Task]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Data_Source_Login_(ELUG).adoc b/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Data_Source_Login_(ELUG).adoc
new file mode 100644
index 00000000000..9948e128e9c
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Data_Source_Login_(ELUG).adoc
@@ -0,0 +1,392 @@
+image:Elug_draft_icon.png[Image:Elug draft
+icon.png,title="Image:Elug draft icon.png"] *For the latest EclipseLink
+documentation, please see
+http://www.eclipse.org/eclipselink/documentation/*
+
+'''''
+
+*TOC*
+Special:Whatlinkshere_Configuring_a_Data_Source_Login_(ELUG)[Related
+Topics]
+
+This table lists the types of EclipseLink data source logins that you
+can configure, and provides a cross-reference to the type-specific
+section that lists the configurable options supported by that type.
+
+[#Table 93-1]## *_Configuring EclipseLink Data Source Logins_*
+
+[width="100%",cols="<50%,<50%",options="header",]
+|===
+|*If you are configuring a…* |*See…*
+|link:Introduction%20to%20Data%20Access%20(ELUG)#DatabaseLogin[DatabaseLogin]
+|link:Configuring%20a%20Database%20Login%20(ELUG)[Configuring a Database
+Login]
+
+|link:Introduction%20to%20Data%20Access%20(ELUG)#EISLogin[EISLogin]
+|link:Configuring%20an%20EIS%20Login%20(ELUG)#[Configuring an EIS Login]
+|===
+
+When using the `+sessions.xml+` file to configure login information,
+EclipseLink will override any login information in the `+project.xml+`
+and instead use the information from the `+sessions.xml+` configuration.
+
+For more information, see the following:
+
+* link:Introduction%20to%20Data%20Access%20(ELUG)#Introduction_to_Data_Access[Introduction
+to Data Access]
+* link:Configuring%20a%20Relational%20Project%20(ELUG)#Configuring_Login_Information_at_the_Project_Level[Configuring
+Login Information at the Project Level]
+
+== Configuring Common Data Source Login Options
+
+The following table lists the configurable options shared by two or more
+EclipseLink data source login types. In addition to the configurable
+options described here, you must also configure the options described
+for the specific data source login types (see
+link:Introduction%20to%20Data%20Access%20(ELUG)#Data_Source_Login_Types[Data
+Source Login Types]), as shown in the link:#Table_93-1[Configuring
+EclipseLink Data Source Logins] table.
+
+[#Table 93-2]## *_Common Data Source Login Options_*
+
+[width="99%",cols="<57%,<23%,<20%",options="header",]
+|===
+|*Option to Configure* |*Workbench* |*Java*
+|link:#Configuring_User_Name_and_Password[User name and password]
+|image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:#Configuring_Password_Encryption[Password encryption]
+|image:unsupport.gif[Unsupported,title="Unsupported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:#Configuring_External_Connection_Pooling[Configuring external
+connection pooling] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:#Configuring_Properties[Configuring properties]
+|image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:#Configuring_a_Default_Null_Value_at_the_Login_Level[Default null
+value at the login level]
+|image:unsupport.gif[Unsupported,title="Unsupported"]
+|image:support.gif[Supported,title="Supported"]
+|===
+
+== Configuring User Name and Password
+
+Optionally, you can specify the user name and password of a login.
+
+We recommend that you do not save the password with a deployment login.
+
+If you specify a password, using an EclipseLink tool or Java, enter the
+plain text (not encrypted) value. EclipseLink will encrypt the password
+using JCE encryption.
+
+By default, EclipseLink writes passwords to and read passwords from the
+`+sessions.xml+` file in encrypted form using JCE encryption.
+
+By default, EclipseLink does not write passwords to and read passwords
+from the `+project.xml+` file unless you configure your project-level
+data source login accordingly. When you configure EclipseLink to write
+passwords and read passwords from the `+project.xml+` file, by default,
+it does so in encrypted form using JCE encryption.
+
+For more information, see the following:
+
+* link:Configuring%20a%20Relational%20Project%20(ELUG)#Configuring_Login_Information_at_the_Project_Level[Configuring
+Login Information at the Project Level]
+* link:#Configuring_Password_Encryption[Configuring Password Encryption]
+
+=== How to Configure User Name and Password Using Workbench
+
+To specify a user name and password, use this procedure:
+
+[arabic]
+. Select a server or database session in the *Navigator*. Its properties
+appear in the Editor.
+. Click the *Login* tab. The Login tab appears.
+. Click the *Connection* subtab. The Connection subtab appears.
+[#Figure 93-1]##*_Login Tab, Connection Subtab, User Name and Password
+Fields_* image:unpwlog.gif[Login Tab, Connection Subtab, User Name and
+Password
+Fields,title="Login Tab, Connection Subtab, User Name and Password Fields"]
+. Enter a user name and password in plain text (not encrypted).
+
+== Configuring Password Encryption
+
+By default, EclipseLink writes passwords to and read passwords from the
+`+sessions.xml+` file in encrypted form using JCE encryption.
+
+By default, EclipseLink does not write passwords to and read passwords
+from the `+project.xml+` file unless you configure your project-level
+data source login accordingly. When you configure EclipseLink to write
+passwords and read passwords from the `+project.xml+` file, by default,
+it does so in encrypted form using JCE encryption.
+
+You can implement your own encryption class and configure your session
+`+DatasourceLogin+` to use it.
+
+Currently, the Workbench does not support specifying the encryption
+class used. To change the encryption class used, you must modify the
+login in Java.
+
+For more information, see the following:
+
+* link:Configuring%20a%20Relational%20Project%20(ELUG)#Configuring_Login_Information_at_the_Project_Level[Configuring
+Login Information at the Project Level]
+* link:#Configuring_User_Name_and_Password[Configuring User Name and
+Password]
+
+=== How to Configure Password Encryption Using Java
+
+To configure a password encryption class, follow this procedure:
+
+[arabic]
+. Create your encryption class. Your encryption class must implement the
+`+org.eclipse.persistence.internal.security.Securable+` interface, as
+this example shows.
++
+[#Example 93-1]## *_Custom Encryption Class Implementing Securable_*
++
+`+import org.eclipse.persistence.internal.security.Securable;+`
+
+`+public class MyEncryptor implements Securable {+`
+
+`+ public String encryptPassword(String pswd) {+` `+ ...+`
+`+ }+`
+
+`+ public String decryptPassword(String encryptedPswd) {+`
+`+ ...+` `+ }+` `+}+`
+. Create a session event listener class for the `+preLogin+` event that
+calls `+DatasourceLogin+` method `+setEncryptionClassName+` to configure
+your session with your encryption class. Use the `+SessionEventAdapter+`
+to simplify your session event listener, as this examle shows.
++
+[#Example 93-2]## *_Specifying a Custom Encryption Class in a Session
+Event Listener_*
++
+`+import org.eclipse.persistence.tools.sessionconfiguration.SessionEventAdapter;+`
+`+import org.eclipse.persistence.sessions.SessionEvent;+`
+`+import org.eclipse.persistence.sessions.Session;+`
+`+import org.eclipse.persistence.sessions.DatasourceLogin;+`
+
+`+public class MySessionEventListener extends SessionEventAdapter {+`
+
+`+ public void preLogin(SessionEvent event) {+`
+`+ Session session = event.getSession();+`
+`+ DatasourceLogin login = session.getDatasourceLogin();+`
+`+ login.setEncryptionClassName(MyEncryptor.class.getName());+`
+`+ }+` `+}+`
+. Associate your session event listener class with your session. For
+more information, see
+link:Configuring%20a%20Session%20(ELUG)#Configuring_Session_Event_Listeners[Configuring
+Session Event Listeners].
+
+== Configuring External Connection Pooling
+
+For non-Java EE applications, you typically use
+link:Introduction%20to%20Data%20Access%20(ELUG)#Internal_Connection_Pools[Internal
+Connection Pools] provided by EclipseLink. In this case, you can use
+Workbench to configure connection pool options and to create a sequence
+connection pool and application-specific (named) connection pools.
+
+For Java EE applications, you typically use
+link:Introduction%20to%20Data%20Access%20(ELUG)#External_Connection_Pools[External
+Connection Pools] provided by a JDBC driver or Java EE container.
+Optionally, you can configure a read connection pool to use a
+nontransactional login, and you can configure a sequence connection pool
+to use a separate (preferably nontransactional) login of its own.
+
+Because JTA external transaction controllers are dependent upon the
+external transaction service that the application server provides, you
+must configure EclipseLink to use external connection pools if you are
+using an external transaction controller (see
+link:Using%20Advanced%20Unit%20of%20Work%20API%20(ELUG)#Integrating_the_Unit_of_Work_with_an_External_Transaction_Service[Integrating
+the Unit of Work with an External Transaction Service]).
+
+External connection pools enable your EclipseLink application to do the
+following:
+
+* Integrate into a Java EE-enabled system.
+* Integrate with JTA transactions (JTA transactions require a
+JTA-enabled data source).
+* Leverage a shared connection pool in which multiple applications use
+the same data source.
+* Use a data source configured and managed directly on the server.
+
+For more information about connection pools, see
+link:Introduction%20to%20Data%20Access%20(ELUG)#Connection_Pools[Connection
+Pools].
+
+=== How to Configure External Connection Pooling Using Workbench
+
+To specify if the session login uses external connection pooling, use
+this procedure:
+
+[arabic]
+. Configure a data source on the application server. If you are using
+the external connection pool with an external transaction controller
+(see
+link:Configuring%20a%20Session%20(ELUG)#Configuring_the_Server_Platform[Configuring
+the Server Platform]), be sure to configure a JTA-enabled data source.
+For more information, see your Java EE container documentation.
+. Select a server or database session in the *Navigator*. Its properties
+appear in the Editor.
+. Click the *Login* tab. The Login tab appears.
+. Click the *Connection* subtab. The Connection subtab appears. *_Login
+Tab, Connection Subtab, External Connection Pooling Field, Database
+Driver_* image:ecpdblog.gif[Login Tab, Connection Subtab, External
+Connection Pooling Field, Database
+Driver,title="Login Tab, Connection Subtab, External Connection Pooling Field, Database Driver"]
++
+*** Connection Tab, External Connection Pooling Field, Java EE Data
+Source*** image:ecpj2log.gif[Connection Tab, External Connection Pooling
+Field, Java EE Data
+Source,title="Connection Tab, External Connection Pooling Field, Java EE Data Source"]
+. Select the External Connection Pooling option. For a database driver,
+external connection pooling is optional. For a Java EE data source,
+external connection pooling is mandatory. Specify if this login uses
+External Connection Pooling. For a database driver, external connection
+pooling is optional. For a Java EE data source, external connection
+pooling is mandatory.
+
+=== How to Configure External Connection Pooling Using Java
+
+To configure the use of an external connection pool in Java, do the
+following:
+
+[arabic]
+. Configure the data source on the application server. If you are using
+the external connection pool with an external transaction controller
+(see
+link:Configuring%20a%20Session%20(ELUG)#Configuring_the_Server_Platform[Configuring
+the Server Platform]), be sure to configure a JTA-enabled data source.
+For more information, see your Java EE container documentation.
+. Configure the `+DatasourceLogin+` to specify the data source and to
+use an external connection pool by using the
+`+useExternalConnectionPooling+` method.
+
+== Configuring Properties
+
+For all `+DatasourceLogin+` types, you can specify custom named values,
+called properties. Some data sources require additional, driver-specific
+properties not supported in the `+DatasourceLogin+` API (for example,
+see
+link:Optimizing%20the%20EclipseLink%20Application%20(ELUG)#How_to_Optimize_JDBC_Driver_Properties[How
+to Optimize JDBC Driver Properties]). Add these properties to the
+`+DatasourceLogin+` so that EclipseLink can pass them to the driver.
+
+For relational sessions, you must first enable advanced option *Use
+Properties* (see
+link:Configuring%20a%20Database%20Login%20(ELUG)#Configuring_Advanced_Options[Configuring
+Advanced Options]).
+
+For EIS sessions, properties are always enabled.
+
+[width="100%",cols="<100%",]
+|===
+|*Note:* Do not set a password as a property. Always use the Workbench
+or `+DatabaseLogin+` method `+setPassword+`. For more information on
+configuring a password, see
+link:#Configuring_User_Name_and_Password[Configuring User Name and
+Password].
+|===
+
+When using Workbench, you can only set character values, which
+EclipseLink returns as `+String+` objects (see
+link:#How_to_Configure_Properties_Using_Workbench[How to Configure
+Properties Using Workbench]).
+
+When using Java, you can set any `+Object+` value (see
+link:#How_to_Configure_Properties_Using_Java[How to Configure Properties
+Using Java]).
+
+=== How to Configure Properties Using Workbench
+
+To specify arbitrary named value pairs that EclipseLink associates with
+a `+DatasourceLogin+`, use this procedure:
+
+[arabic]
+. Select a server or database session in the *Navigator*. Its properties
+appear in the Editor.
+. Click the *Login* tab. The Login tab appears.
+. If necessary, enable support for properties:
+* for relational sessions, you must first enable advanced option *Use
+Properties* (see
+link:Configuring%20a%20Database%20Login%20(ELUG)#Configuring_Advanced_Options[Configuring
+Advanced Options]);
+* for EIS sessions, properties are always enabled.
+. Click the *Properties* subtab. The Properties subtab appears. *_Login
+Tab, Properties Subtab_* image:sesprop.gif[Login Tab, Properties
+Subtab,title="Login Tab, Properties Subtab"]
+. You can add, edit, or remove properties using Add Property dialog box.
+. To add (or change) a new *Name*/*Value* property, click *Add* (or
+*Edit*). Add Property dialog box appears.
+
+Use the following information to add or edit a login property on the Add
+Property dialog box:
+
+[width="100%",cols="<6%,<94%",options="header",]
+|===
+|*Option* |*Description*
+|*Name* |The name by which EclipseLink retrieves the property value
+using the `+DatasourceLogin+` method `+getProperty+`.
+
+|*Value* |The value EclipseLink retrieves using the `+DatasourceLogin+`
+method `+getProperty+` passing in the corresponding property name. Using
+Workbench, you can set only character values that EclipseLink returns as
+`+String+` objects.
+|===
+
+To delete an existing property, select the *Name*/*Value* row and click
+*Remove*.
+
+=== How to Configure Properties Using Java
+
+Using Java, you can set any `+Object+` value using `+DatasourceLogin+`
+method `+setProperty+`. To remove a property, use `+DatasourceLogin+`
+method `+removeProperty+`.
+
+== Configuring a Default Null Value at the Login Level
+
+A default null value is the Java `+Object+` type and value that
+EclipseLink uses instead of `+null+` when EclipseLink reads a `+null+`
+value from a data source.
+
+When you configure a default null value at the login level, it applies
+to all mappings used in a session. In this case, EclipseLink uses it to
+translate in one direction only: when EclipseLink reads `+null+` from
+the data source, it converts this `+null+` to the specified type and
+value.
+
+You can also use EclipseLink to set a default null value on a
+per-mapping basis (see
+link:Configuring%20a%20Mapping%20(ELUG)#Configuring_a_Default_Null_Value_at_the_Mapping_Level[Configuring
+a Default Null Value at the Mapping Level]).
+
+[width="100%",cols="<100%",]
+|===
+|*Note*: A default null value must be an `+Object+`. To specify a
+primitive value (such as `+int+`), you must use the corresponding
+`+Object+` wrapper (such as `+Integer+`).
+|===
+
+=== How to Configure a Default Null Value at the Login Level Using Java
+
+Using Java API, you can configure a default null value for all mappings
+used in a session with the `+DatabaseLogin+` method
+`+setDefaultNullValue(Class,Object)+`.
+
+For example:
+
+*`+//\'\' \'\'Defaults\'\' \'\'all\'\' \'\'null\'\' \'\'String\'\' \'\'values\'\' \'\'read\'\' \'\'from\'\' \'\'the\'\' \'\'database\'\' \'\'to\'\' \'\'empty\'\' \'\'String+`*
+`+session.getLogin().setDefaultNullValue(String.class, "");+`
+
+'''''
+
+_link:EclipseLink_User's_Guide_Copyright_Statement[Copyright Statement]_
+
+Category:_EclipseLink_User's_Guide[Category: EclipseLink User’s Guide]
+Category:_Release_1[Category: Release 1] Category:_Task[Category: Task]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Database_Login_(ELUG).adoc b/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Database_Login_(ELUG).adoc
new file mode 100644
index 00000000000..8670d07b412
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Database_Login_(ELUG).adoc
@@ -0,0 +1,921 @@
+*TOC* Special:Whatlinkshere_Configuring_a_Database_Login_(ELUG)[Related
+Topics]
+
+In a relational database project, EclipseLink retrieves the table
+information from the database, for each descriptor. Each Workbench
+project contains an associated database. You can create multiple logins
+for each database.
+
+The following table lists the configurable options for a database login.
+
+[#Table 94-1]##
+
+[width="100%",cols="<62%,<20%,<18%",options="header",]
+|===
+|*Option to Configure* |*Workbench* |*Java*
+|link:#Configuring_a_Relational_Database_Platform_at_the_Session_Level[Relational
+database platform at the session level]
+|image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:#Configuring_Database_Login_Connection_Options[Database login
+connection options] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:#Configuring_Sequencing_at_the_Session_Level[Sequencing at the
+session level] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:#Configuring_JDBC_Options[JDBC options]
+|image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Data%20Source%20Login%20(ELUG)#Configuring_User_Name_and_Password[User
+name and password] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:#Configuring_a_Table_Qualifier[Table qualifier]
+|image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:#Configuring_Advanced_Options[Advanced options]
+|image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Data%20Source%20Login%20(ELUG)#Configuring_Password_Encryption[Password
+encryption] |image:unsupport.gif[Unsupported,title="Unsupported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Data%20Source%20Login%20(ELUG)#Configuring_External_Connection_Pooling[External
+connection pooling] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Data%20Source%20Login%20(ELUG)#Configuring_Properties[Properties]
+|image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:#Configuring_Oracle_Database_Proxy_Authentication[Oracle Database
+proxy authentication]
+|image:unsupport.gif[Unsupported,title="Unsupported"]
+|image:support.gif[Supported,title="Supported"]
+|===
+
+== Configuring a Relational Database Platform at the Session Level
+
+For each database session, you must specify the database platform (such
+as Oracle9__i__ Database Server). This platform configuration overrides
+the platform at the project level, if configured.
+
+For more information, see the following:
+
+* link:Configuring%20a%20Relational%20Project%20(ELUG)#Configuring_Relational_Database_Platform_at_the_Project_Level[Configuring
+Relational Database Platform at the Project Level]
+* link:Introduction%20to%20Data%20Access%20(ELUG)#Data_Source_Platform_Types[Data
+Source Platform Types]
+
+=== How to Configure a Relational Database Platform at the Session Level Using Workbench
+
+To specify the database platform options for a relational server (or
+database) session login, use this procedure:
+
+[arabic]
+. Select a relational server (or database) session in the *Navigator*.
+Its properties appear in the Editor.
+. Click the *Login* tab. The Login tab appears.
+. Click the *Connection* subtab. The Connection subtab appears.
+[#Figure 94-1]##*_Login Tab, Connection Subtab, Database Platform
+Option_* image:dplalog.gif[Login Tab, Connection Subtab, Database
+Platform
+Option,title="Login Tab, Connection Subtab, Database Platform Option"]
+. Select the database platform from the menu of options. This menu
+includes all instances of `+DatabasePlatform+` in the EclipseLink
+classpath.
+
+== Configuring Database Login Connection Options
+
+You configure connection information at the session level for your
+EclipseLink application. This information is stored in the
+`+sessions.xml+` file. The EclipseLink runtime uses this information
+whenever you perform a persistence operation using the session in your
+application.
+
+This connection configuration overrides the connection information at
+the project level, if configured. For more information about
+project-level configuration, see
+link:Configuring%20a%20Relational%20Project%20(ELUG)#Configuring_Development_and_Deployment_Logins[Configuring
+Development and Deployment Logins].
+
+This connection configuration is overridden by the connection
+information at the connection pool level. For more information, see
+link:Configuring%20an%20Internal%20Connection%20Pool%20(ELUG)#Configuring_Connection_Pool_Connection_Options[Configuring
+Connection Pool Connection Options].
+
+=== How to Configure Database Login Connection Options Using Workbench
+
+To specify the connection options for a relational server (or database)
+session login, use this procedure:
+
+[arabic]
+. Select a relational server (or database) session in the *Navigator*.
+Its properties appear in the Editor.
+. Click the *Login* tab. The Login tab appears.
+. Click the *Connection* subtab. The Connection subtab appears. *_Login
+Tab, Connection Subtab, Database Driver_* image:dbconn.gif[Login Tab,
+Connection Subtab, Database
+Driver,title="Login Tab, Connection Subtab, Database Driver"] *_Login
+Tab, Connection Subtab_* image:j2cconn.gif[Login Tab, Connection
+Subtab,title="Login Tab, Connection Subtab"]
+. Complete each field on the Connection subtab.
+
+Use the following information to enter data in the driver fields on the
+tab:
+
+Field
+
+Description
+
+Database Driver
+
+Specify the appropriate database driver:
+
+Driver Manager: specify this option to configure the driver class and
+URL used to connect to the database. In this case, you must configure
+the Driver Class and Driver URL fields.
+
+J2EE Data Source: specify this option to use a Java EE data source
+already configured on your target application server. In this case, you
+must configure the Datasource Name field.
+
+Note: If you select J2EE Datasource, you must use external connection
+pooling. You cannot use internal connection pools with this Database
+Driver option (for more information, see Configuring External Connection
+Pooling).
+
+Driver Class 1
+
+Configure this field when Database Driver is set to Driver Manager.
+Select from the menu of options. This menu includes all JDBC drivers in
+the EclipseLink classpath.
+
+Driver URL 1
+
+Configure this field when Database Driver is set to Driver Manager.
+Select from the menu of options relevant to the selected Driver Class,
+and edit the URL to suit your data source.
+
+Data Source Name 2
+
+Configure this field when Database Driver is set to J2EE Datasource.
+Specify any valid JNDI name that identifies the Java EE data source
+preconfigured on your target application server (example:
+jdbc/EmployeeDB).
+
+By convention, all such names should resolve to the JDBC subcontext
+(relative to the standard java:comp/env naming context that is the root
+of all provided resource factories).
+
+Lookup Type2
+
+Configure this field when Database Driver is set to J2EE Datasource.
+Specify the lookup method for determining the JNDI name:
+
+Composite Name
+
+Compound Name
+
+String
+
+1Applicable only when *Database Driver* is set to *Driver Manager*.
+2Applicable only when *Database Driver* is set to *J2EE Datasource*.
+
+== Configuring Sequencing at the Session Level
+
+You configure EclipseLink sequencing at the session or project level to
+tell EclipseLink how to obtain sequence values: that is, what type of
+sequences to use.
+
+You can configure a session directly by using a session-level sequence
+configuration to override project-level sequence configuration, on a
+session-by-session basis, if required.
+
+Using Workbench (see
+link:#How_to_Configure_Sequencing_at_the_Session_Level_Using_Workbench[How
+to Configure Sequencing at the Session Level Using Workbench]), you can
+configure table sequencing (see
+link:Introduction%20to%20Relational%20Projects%20(ELUG)#Table_Sequencing[Table
+Sequencing]) and native sequencing
+(link:Introduction%20to%20Relational%20Projects%20(ELUG)#Native_Sequencing_with_an_Oracle_Database_Platform[Native
+Sequencing with an Oracle Database Platform] and
+link:Introduction%20to%20Relational%20Projects%20(ELUG)#Native_Sequencing_with_a_Non-Oracle_Database_Platform[Native
+Sequencing with a Non-Oracle Database Platform]), and you can configure
+a preallocation size that applies to all sequences (see
+link:Introduction%20to%20Relational%20Projects%20(ELUG)#Sequencing_and_Preallocation_Size[Sequencing
+and Preallocation Size]).
+
+Using Java (see
+link:#How_to_Configure_Sequencing_at_the_Session_Level_Using_Java[How to
+Configure Sequencing at the Session Level Using Java]), you can
+configure any sequence type that EclipseLink supports (
+link:Introduction%20to%20Relational%20Projects%20(ELUG)#Sequencing_Types[Sequencing
+Types]). You can create any number and combination of sequences. You can
+create a sequence object explicitly or use the default sequence that the
+platform creates. You can associate the same sequence with more than one
+descriptor and you can configure a separate preallocation size for each
+descriptor’s sequence.
+
+If you are migrating a WebLogic CMP application to OC4J and EclipseLink
+persistence, after migration, you must manually configure your project
+to use EclipseLink unary sequence tables if your application originally
+used single-column sequence tables in WebLogic.
+
+After configuring the sequence type at the session (or project) level,
+to enable sequencing, you must configure a descriptor with a sequence
+field and a sequence name (see
+link:Configuring%20a%20Relational%20Descriptor%20(ELUG)#Configuring_Sequencing_at_the_Descriptor_Level[Configuring
+Sequencing at the Descriptor Level]).
+
+For more information about sequencing, see
+link:Introduction%20to%20Relational%20Projects%20(ELUG)#Sequencing_in_Relational_Projects[Sequencing
+in Relational Projects].
+
+=== How to Configure Sequencing at the Session Level Using Workbench
+
+To specify the sequencing information for a relational server (or
+database) session, use this procedure:
+
+[arabic]
+. Select the session object in the *Navigator*.
+. Click the *Login* tab in the *Editor*.
+. Click the *Sequencing* subtab. The Sequencing subtab appears.
+[#Figure 94-4]##*_Login Tab, Sequencing Subtab_*
+image:sequence.gif[Login Tab, Sequencing
+Subtab,title="Login Tab, Sequencing Subtab"]
+. Complete each field on Login–Sequencing subtab.
+
+Use the following information to enter data in each field of the
+Sequencing subtab to configure the persistence type:
+
+[width="100%",cols="<5%,<95%",options="header",]
+|===
+|*Field* |*Description*
+|*Preallocation Size* |Select the
+link:Introduction%20to%20Relational%20Projects%20(ELUG)#Sequencing_and_Preallocation_Size[default
+preallocation size]. Default is *50*. The preallocation size you
+configure applies to all sequences.
+
+|*Default Sequence Table* |Select this option to use
+link:Introduction%20to%20Relational%20Projects%20(ELUG)#Table_Sequencing[table
+sequencing] with default sequence table name `+SEQUENCE+`, default
+sequence name field `+SEQ_NAME+`, and default sequence count field
+`+SEQ_COUNT+`.
+
+|*Native Sequencing* |Select this option to use a sequencing object (see
+link:Introduction%20to%20Relational%20Projects%20(ELUG)#Native_Sequencing_with_an_Oracle_Database_Platform[Native
+Sequencing with an Oracle Database Platform] or
+link:Introduction%20to%20Relational%20Projects%20(ELUG)#Native_Sequencing_with_a_Non-Oracle_Database_Platform[Native
+Sequencing with a Non-Oracle Database Platform]) created by the database
+platform. This option applies to supported database platforms (see
+link:Introduction%20to%20Data%20Access%20(ELUG)#Database_Platforms[Database
+Platforms]).
+
+|*Custom Sequence Table* |Select this option to use
+link:Introduction%20to%20Relational%20Projects%20(ELUG)#Table_Sequencing[table
+sequencing] with a sequence table name, sequence name field, and
+sequence count field name that you specify.
+
+|*Name* |Select the name of the sequence table.
+
+|*Name Field* |Select the name of the column used to store the sequence
+name.
+
+|*Counter Field* |Select the name of the column used to store the
+sequence count.
+|===
+
+=== How to Configure Sequencing at the Session Level Using Java
+
+Using Java, you can perform the following sequence configurations:
+
+* link:#Using_the_Platform_Default_Sequence[Platform Default Sequence]
+* link:#Configuring_Multiple_Sequences[Multiple Sequences]
+* link:#Configuring_Query_Sequencing[Query Sequencing]
+
+==== Using the Platform Default Sequence
+
+After you configure your login with a platform (see
+link:#Configuring_a_Relational_Database_Platform_at_the_Session_Level[Configuring
+a Relational Database Platform at the Session Level]), you can use the
+default sequence that the platform provides.
+
+If you associate a descriptor with an unspecified sequence, the
+EclipseLink runtime will create an instance of `+DefaultSequence+` to
+provide sequencing for that descriptor. For more information, see
+link:Configuring%20a%20Relational%20Descriptor%20(ELUG)#Configuring_the_Platform_Default_Sequence[Configuring
+the Platform Default Sequence].
+
+You can access the default platform sequence directly as the
+link:#Example_94-1[Accessing the Platform Default Sequence] example
+shows. For example, by default, a `+DatabasePlatform+` creates a table
+sequence using the default table and column names (see
+link:Introduction%20to%20Relational%20Projects%20(ELUG)#Table_Sequencing[Table
+Sequencing]).
+
+[#Example 94-1]## *_Accessing the Platform Default Sequence_*
+
+*`+//\'\' \'\'assume\'\' \'\'that\'\' \'\'dbLogin\'\' \'\'owns\'\' \'\'a\'\' \'\'DatabasePlatform+`*
+`+TableSequence tableSeq2 = ((TableSequence)dbLogin.getDefaultSequence()).clone();+`
+`+tableSeq2.setName("EMP_SEQ");+`
+`+tableSeq2.setPreallocationSize(75);+`
+`+dbLogin.addSequence(tableSeq2);+`
+
+To avoid having to clone the platform default sequence, you can use the
+`+DefaultSequence+` class– a wrapper for the platform default
+sequence–-as the following example shows. The new sequence named
+`+EMP_SEQ+` will be of the same type as the platform default sequence.
+
+[#Example 94-2]## *_Using the DefaultSequence Class_*
+
+`+login.addSequence(new DefaultSequence("EMP_SEQ", 75));+`
+
+You can override the default platform sequence, as the
+link:#Example_94-3[Overriding the Platform Default Sequence] example
+shows. In this example, `+dbLogin+` owns a `+DatabasePlatform+` that
+provides a default sequence of type `+TableSequence+`. After setting the
+default sequence to type `+UnaryTableSequence+`, when you use the
+`+DefaultSequence+` class, it will access the new default sequence type.
+In this example, the sequence named `+EMP_SEQ+` will be of type
+`+UnaryTableSequence+` and have a preallocation size of 75.
+
+[#Example 94-3]## *_Overriding the Platform Default Sequence_*
+
+*`+//\'\' \'\'assume\'\' \'\'that\'\' \'\'dbLogin\'\' \'\'owns\'\' \'\'a\'\' \'\'DatabasePlatform+`*
+`+Sequence unaryTableSequence = new UnaryTableSequence();+`
+`+unaryTableSequence.setPreallocationSize(40);+`
+`+dbLogin.setDefaultSequence(unaryTableSequence);+`
+`+dbLogin.addSequence(+`
+`+ new DefaultSequence("EMP_SEQ", 75) +`*`+//\'\' \'\'UnaryTableSequence+`*
+`+);+`
+
+==== Configuring Multiple Sequences
+
+In addition to using the platform default sequence (see
+link:#Using_the_Platform_Default_Sequence[Using the Platform Default
+Sequence]), you can explicitly create sequence instances and configure a
+`+Login+` with any combination of sequence types, each with their own
+preallocation size, as the link:#Example_94-4[Configuring Multiple
+Sequences Explicitly] example shows. In this example, the sequence named
+`+EMP_SEQ+` will provide sequence values exclusively for instances of
+the `+Employee+` class and `+ADD_SEQ+` will provide sequence values
+exclusively for instances of the `+Address+` class. The sequence named
+`+PHONE_SEQ+` will use the platform default sequence with a
+preallocation size of 30 to provide sequence values for the `+Phone+`
+class.
+
+[#Example 94-4]## *_Configuring Multiple Sequences Explicitly_*
+
+`+login.addSequence(new TableSequence("EMP_SEQ", 25));+`
+`+login.addSequence(new DefaultSequence("PHONE_SEQ", 30));+`
+`+login.addSequence(new UnaryTableSequence("ADD_SEQ", 55));+`
+`+login.addSequence(new NativeSequence("NAT_SEQ", 10));+`
+
+If login owned a `+DatabasePlatform+` (whose default sequence type is
+`+TableSequence+`), you could configure your sequences using the
+platform default sequence type, as the link:#Example_94-5[Configuring
+Multiple Sequences Using the Default Sequence Type] example shows. In
+this example, sequences `+EMP_SEQ+` and `+PHONE_SEQ+` share the same
+`+TableSequence+` table: `+EMP_SEQ+` and `+PHONE_SEQ+` represent rows in
+this table.
+
+[#Example 94-5]## *_Configuring Multiple Sequences Using the Default
+Sequence Type_*
+
+`+login.addSequence(new DefaultSequence("EMP_SEQ", 25));+`
+`+login.addSequence(new DefaultSequence("PHONE_SEQ", 30));+`
+`+login.addSequence(new UnaryTableSequence("ADD_SEQ", 55));+`
+`+login.addSequence(new NativeSequence("NAT_SEQ", 10));+`
+
+==== Configuring Query Sequencing
+
+You can configure the query that EclipseLink uses to update or read a
+sequence value for any sequence type that extends `+QuerySequence+`.
+
+In most applications, the queries that EclipseLink automatically uses
+are sufficient. However, if your application has special sequencing
+needs–-for example, if you want to use stored procedures for
+sequencing–-then you can configure the update and read queries that the
+EclipseLink sequence uses.
+
+The following example illustrates how to specify a stored procedure that
+updates a sequence and returns the new sequence value with a single SQL
+select query. In this example, the stored procedure is named
+`+UPDATE_SEQ+`. It contains one input argument–-the name of the sequence
+to update (`+SEQ_NAME+`), and one output argument–-the value of the
+sequence after the updated (`+SEQ_COUNT+`). The stored procedure
+increments the sequence value associated with the sequence named
+`+SEQ_NAME+` and returns the new sequence value in the output argument
+named `+SEQ_COUNT+`.
+
+[#Example 94-6]## *_Using a Stored Procedure for both Sequence Update
+and Select_*
+
+`+ValueReadQuery seqReadQuery = new ValueReadQuery();+`
+`+StoredProcedureCall spCall = new StoredProcedureCall();+`
+`+spCall.setProcedureName("UPDATE_SEQ");+`
+`+seqReadQuery.addNamedArgument("SEQ_NAME");+`
+`+seqReadQuery.addNamedOutputArgument("SEQ_COUNT");+`
+`+seqReadQuery.setCall(spCall);+`
+`+((QuerySequence)login.getDefaultSequence()).setSelectQuery(seqReadQuery);+`
+
+link:#Example_94-7[Using a Stored Procedure for Sequence Updates Only]
+and link:#Example_94-8[Using a Stored Procedure for Sequence Selects
+Only] examples illustrate how to specify separate stored procedures for
+sequence update and select actions.
+
+In the link:#Example_94-7[Using a Stored Procedure for Sequence Updates
+Only] example, the stored procedure is named UPDATE_SEQ, and it contains
+one input argument–the name of the sequence to update (`+SEQ_NAME+`).
+The stored procedure increments the sequence value associated with the
+sequence named `+SEQ_NAME+`.
+
+[#Example 94-7]## *_Using a Stored Procedure for Sequence Updates Only_*
+
+`+DataModifyQuery seqUpdateQuery = new DataModifyQuery();+`
+`+StoredProcedureCall spCall = new StoredProcedureCall();+`
+`+spCall.setProcedureName("UPDATE_SEQ");+`
+`+seqUpdateQuery.addNamedArgument("SEQ_NAME");+`
+`+seqUpdateQuery.setCall(spCall);+`
+`+((QuerySequence)login.getDefaultSequence()).setUpdateQuery(seqUpdateQuery);+`
+
+In the link:#Example_94-8[Using a Stored Procedure for Sequence Selects
+Only] example, the stored procedure is named `+SELECT_SEQ+` and it takes
+one argument: the name of the sequence to select from (`+SEQ_NAME+`).
+The stored procedure reads one data value: the current sequence value
+associated with the sequence name `+SEQ_NAME+`.
+
+[#Example 94-8]## *_Using a Stored Procedure for Sequence Selects Only_*
+
+`+ValueReadQuery seqReadQuery = new ValueReadQuery();+`
+`+StoredProcedureCall spCall = new StoredProcedureCall();+`
+`+spCall.setProcedureName("SELECT_SEQ");+`
+`+seqReadQuery.addArgument("SEQ_NAME");+`
+`+seqReadQuery.setCall(spCall);+`
+`+login.((QuerySequence)getDefaultSequence()).setSelectQuery(seqReadQuery)+`
+
+You can also create a `+QuerySequence+` directly and add it to your
+login, as this example shows.
+
+[#Example 94-9]## *_Using the QuerySequence Class_*
+
+*`+//\'\' \'\'Use\'\' \'\'the\'\' \'\'two-argument\'\' \'\'constructor:\'\' \'\'pass\'\' \'\'in\'\' \'\'sequence\'\' \'\'name\'\' \'\'and\'\' \'\'preallocation\'\' \'\'size.+`*
+*`+//\'\' \'\'Alternatively,\'\' \'\'you\'\' \'\'can\'\' \'\'use\'\' \'\'zero-\'\' \'\'or\'\' \'\'one-argument\'\' \'\'(sequence\'\' \'\'name)\'\' \'\'constructor+`*
+`+login.addSequence(new QuerySequence("SEQ1", 75));+`
+
+== Configuring a Table Qualifier
+
+Some databases (such as Oracle Database and DB2) require that all tables
+be qualified by an identifier. This can be the creator of the table or
+database name on which the table exists. When you specify a table
+qualifier, EclipseLink uses this qualifier for all of the tables it
+references. Specify a table qualifier only if required and only if all
+of the tables have the same qualifier.
+
+=== How to Configure a Table Qualifier Using Workbench
+
+To specify a table qualifier, use this procedure:
+
+[arabic]
+. Select a relational server (or database) session in the *Navigator*.
+Its properties appear in the Editor.
+. Click the *Login* tab. The Login tab appears.
+. Click the *Options* subtab. The Options subtab
+appears.[#Figure 94-5]## *_Login Tab, Options Subtab, Table Qualifier
+Field_* image:sesopttc.gif[Login Tab, Options Subtab, Table Qualifier
+Field,title="Login Tab, Options Subtab, Table Qualifier Field"]
+
+In the *Table Qualifier* field enter the identifier used to qualify
+references to all tables in this database.
+
+=== How to Configure a Table Qualifier Using Workbench
+
+To set the default qualifier for all tables, use the
+`+org.eclipse.persistence.sessions.DatabaseLogin+` method
+`+setTableQualifier+`.
+
+== Configuring JDBC Options
+
+Most JDBC drivers support the run-time configuration of various options
+to customize driver operation to meet user needs. EclipseLink provides
+direct support (in API and the Workbench) for many of the most important
+options, as this section describes, as well as more advanced options
+(see link:#Configuring_Advanced_Options[Configuring Advanced Options]).
+
+You can also configure additional options by specifying properties (see
+link:Configuring%20a%20Data%20Source%20Login%20(ELUG)#Configuring_Properties[Configuring
+Properties]).
+
+[width="100%",cols="<100%",]
+|===
+|*Note:* Not all drivers support all JDBC options. Selecting a
+combination of options may result in different behavior from one driver
+to another. Before selecting JDBC options, consult your JDBC driver
+documentation.
+|===
+
+=== How to Configure JDBC Options Using Workbench
+
+To specify the JDBC options for a relational server (or database)
+session login, use this procedure:
+
+[arabic]
+. Select a relational server (or database) session in the *Navigator*.
+Its properties appear in the Editor.
+. Click the *Login* tab. The Login tab appears.
+. Click the *Options* subtab. The Options subtab appears.
+[#Figure 94-6]##*_Login Tab, Options Subtab, JDBC Options_*
+image:jdbcopt.gif[Login Tab, Options Subtab, JDBC
+Options,title="Login Tab, Options Subtab, JDBC Options"]
+. Complete the JDBC fields on the tab.
+
+Use this table to enter data in the fields on the Options subtab to
+select the JDBC options to use with this session login:
+
+Option
+
+Description
+
+Queries Should Bind All Parameters1
+
+By default, EclipseLink binds all of the query’s parameters.
+
+Deselect this option if you do not want EclipseLink to bind parameters.
+
+Cache All Statements1
+
+When selected, EclipseLink caches each prepared statement so that when
+reexecuted, you avoid the SQL preparation time which improves
+performance.
+
+Byte Array Binding1
+
+Select this option if you query binary large object (BLOB) data.
+
+Streams for Binding1
+
+Select this option if you use a JDBC driver that is more efficient at
+handling BLOB data using java.io.InputStream and java.io.OutputStream.
+
+Native SQL
+
+By default, EclipseLink generates SQL using JDBC SQL grammar. Select
+this option if you want EclipseLink to use database-specific SQL
+grammar, for example, if your database driver does not support the full
+JDBC SQL grammar.
+
+Batch Writing2
+
+Select this option if you use a JDBC driver that supports sending groups
+of INSERT, UPDATE, and DELETE statements to the database in a single
+transaction, rather than individually.
+
+Select JDBC to use the batch writing capabilities of your JDBC driver.
+
+Select EclipseLink to use the batch writing capabilities that
+EclipseLink provides. Select this option if your JDBC driver does not
+support batch writing.
+
+Note: if you are using Oracle 9 Database platform, and you want to use
+EclipseLink batch writing in combination with optimistic locking, then
+you must enable parameter binding.
+
+String Binding1
+
+Select this option if you query large java.lang.String objects.
+
+You can configure the maximum String length (default: 32000 characters).
+
+1For more information, see
+link:Optimizing%20the%20EclipseLink%20Application%20(ELUG)#How_to_Use_Parameterized_SQL_(Parameter_Binding)_and_Prepared_Statement_Caching_for_Optimization[How
+to Use Parameterized SQL (Parameter Binding) and Prepared Statement
+Caching for Optimization]. 2If you are using the `+MySQLPlatform+`
+database platform (see
+link:Introduction%20to%20Data%20Access%20(ELUG)#Data_Source_Platform_Types[Data
+Source Platform Types]), use *JDBC* batch writing (do not use
+*EclipseLink* batch writing). For more information, see
+link:Optimizing%20the%20EclipseLink%20Application%20(ELUG)#How_to_Use_Batch_Writing_for_Optimization[How
+to Use Batch Writing for Optimization].
+
+=== How to Configure JDBC Options Using Java
+
+To enable prepared statement caching for all queries, configure at the
+`+Login+` level, as the following example shows. For more information,
+see
+link:Optimizing%20the%20EclipseLink%20Application%20(ELUG)#How_to_Use_Parameterized_SQL_(Parameter_Binding)_and_Prepared_Statement_Caching_for_Optimization[How
+to Use Parameterized SQL (Parameter Binding) and Prepared Statement
+Caching for Optimization].
+
+[#Example 94-10]## *_Prepared Statement Caching at the Login Level_*
+
+`+databaseLogin.cacheAllStatements();+`
+`+databaseLogin.setStatementCacheSize(100);+`
+
+Parameter binding is enabled by default in EclipseLink. To disable
+binding, configure at the `+Login+` level, as the following example
+shows. For more information, see
+link:Optimizing%20the%20EclipseLink%20Application%20(ELUG)#How_to_Use_Parameterized_SQL_(Parameter_Binding)_and_Prepared_Statement_Caching_for_Optimization[How
+to Use Parameterized SQL (Parameter Binding) and Prepared Statement
+Caching for Optimization].
+
+[#Example 94-11]## *_Disabling Parameter Binding at the Login Level_*
+
+`+databaseLogin.dontBindAllParameters();+`
+
+To enable JDBC batch writing, use `+Login+` method `+useBatchWriting+`,
+as this example shows:
+
+[#Example 94-12]## *_Using JDBC Batch Writing_*
+
+`+project.getLogin().useBatchWriting();+`
+`+project.getLogin().setMaxBatchWritingSize(100);+`
+
+== Configuring Advanced Options
+
+Most JDBC drivers support the run-time configuration of various options
+to customize driver operation to meet user needs. EclipseLink provides
+direct support (in API and Workbench) for many of the most important
+options (see link:#Configuring_JDBC_Options[Configuring JDBC Options]),
+as well as more advanced options, as this section describes.
+
+You can also configure additional options by specifying properties (see
+link:Configuring%20a%20Data%20Source%20Login%20(ELUG)#Configuring_Properties[Configuring
+Properties]).
+
+[width="100%",cols="<100%",]
+|===
+|*Note:* Not all drivers support all JDBC options. Selecting a
+combination of options may result in different behavior from one driver
+to another. Before selecting JDBC options, consult your JDBC driver
+documentation.
+|===
+
+=== How to Configure Advanced Options Using Workbench
+
+To specify the advanced options for a relational server (or database)
+session login, use this procedure:
+
+[arabic]
+. Select a relational server (or database) session in the *Navigator*.
+Its properties appear in the Editor.
+. Click the *Login* tab. The Login tab appears.
+. Click the *Options* subtab. The Options subtab appears.
+[#Figure 94-7]##*_Login Tab, Options Subtab, Advanced Options_*
+image:sesadvopt.gif[Login Tab, Options Subtab, Advanced
+Options,title="Login Tab, Options Subtab, Advanced Options"]
+. Complete the Advanced Options fields on the tab.
+
+Use this table to enter data in the fields on the Options subtab to
+select the advanced options to use with this session login:
+
+[width="100%",cols="<12%,<88%",options="header",]
+|===
+|*Option* |*Description*
+|*Force Field Names to Uppercase* |By default, EclipseLink uses the case
+of field names as returned by the database. If your application expects
+field names to be uppercase but the database does not return consistent
+case (for example, if you accessing different databases), enable this
+option.
+
+|*Optimize Data Conversion* |By default, EclipseLink optimizes data
+access by accessing the data from JDBC in the format the application
+requires. If you are using an older JDBC driver that does not perform
+data conversion correctly and conflicts with this optimization, disable
+this optimization.
+
+|*Trim String* |By default, EclipseLink discards the trailing blanks
+from `+CHAR+` field values. To read and write `+CHAR+` field values
+literally (including any trailing blanks), disable this option.
+
+|*Properties* |Check this option to enable the use of properties for
+this `+DatabaseLogin+` (see
+link:Configuring%20a%20Data%20Source%20Login%20(ELUG)#Configuring_Properties[Configuring
+Properties]).
+|===
+
+=== How to Configure Advanced Options Using Java
+
+Use the following methods of
+`+org.eclipse.persistence.sessions.DatabaseLogin+` to configure advanced
+options:
+
+* `+setShouldForceFieldNamesToUpperCase+`–By default, EclipseLink uses
+the case of field names as returned by the database. If your application
+expects field names to be uppercase but the database does not return
+consistent case (for example, if you accessing different databases), use
+this method.
+* `+setShouldOptimizeDataConversion+`–By default, EclipseLink optimizes
+data access by accessing the data from JDBC in the format the
+application requires. If you are using an older JDBC driver that does
+not perform data conversion correctly and conflicts with this
+optimization, set this to `+false+`.
+* `+setShouldTrimStrings+`–By default, EclipseLink discards the trailing
+blanks from `+CHAR+` field values. To read and write `+CHAR+` field
+values literally (including any trailing blanks), set this to `+false+`.
+* `+setProperties+`–Set this to true to enable the use of properties for
+this `+DatabaseLogin+` (see
+link:Configuring%20a%20Data%20Source%20Login%20(ELUG)#Configuring_Properties[Configuring
+Properties]).
+
+== Configuring Oracle Database Proxy Authentication
+
+You can configure a session to use Oracle Database proxy authentication
+with an Oracle Database platform in JSE applications and JEE
+applications using Oracle JDBC driver release 10.1.0.2.0 or later. If an
+external connection pool is used, then it should either contain Oracle
+connections directly (`+OracleDataSource+`), or the application server
+should allow access to the underlying vendor-specific connection in the
+managed connection. To achieve the latter, the server platform class in
+Eclipselink needs to implement the `+java.sql.Connection+` method
+`+unwrapConnection(java.sql.Connection connection)+`.
+
+There is no Workbench support for this feature. To configure EclipseLink
+to use Oracle Database proxy authentication, you must use Java (see
+link:#How_to_Configure_Oracle_Database_Proxy_Authentication_Using_Java[How
+to Configure Oracle Database Proxy Authentication Using Java]).
+
+For more information, see
+link:Configuring%20a%20EclipseLink%20JPA%20%20Application%20(ELUG)#Oracle_Database_Proxy_Authentication[Oracle
+Database Proxy Authentication].
+
+For information on proxy authentication in JPA applications, see
+link:Configuring%20a%20EclipseLink%20JPA%20Application%20(ELUG)#Configuring_Oracle_Database_Proxy_Authentication_for_a_JPA_Application[Configuring
+Oracle Database Proxy Authentication for a JPA Application].
+
+You can use EclipseLink support for Oracle Database proxy authentication
+by doing the following:
+
+* link:#Providing_Authenticated_Reads_and_Writes_of_Secured_Data_Through_the_Use_of_an_Exclusive_Isolated_Client_Session[Providing
+Authenticated Reads and Writes of Secured Data Through the Use of an
+Exclusive Isolated Client Session]
+* link:#Providing_Authenticated_Writes_for_Database_Auditing_Purposes_with_a_Client_Session[Providing
+Authenticated Writes for Database Auditing Purposes with a Client
+Session]
+* link:#Providing_Authenticated_Reads_and_Writes_with_a_Database_Session[Providing
+Authenticated Reads and Writes with a Database Session]
+
+*Providing Authenticated Reads and Writes of Secured Data Through the
+Use of an Exclusive Isolated Client Session*
+
+In this configuration, the client session is an isolated client session
+(see
+link:Introduction%20to%20EclipseLink%20Sessions%20(ELUG)#Isolated_Client_Sessions[Isolated
+Client Sessions]) that uses an exclusive proxy connection. You must
+acquire the client session using properties that specify proxy
+authentication user credentials. Reads and writes of secured data are
+performed through the proxy-authenticated connection. Reads of
+nonsecured data occur through nonproxy-authenticated connections.
+
+If you are using Oracle Private Virtual Database (VPD) (see
+link:Introduction%20to%20EclipseLink%20Sessions%20(ELUG)#Isolated_Client_Sessions_and_Oracle_Virtual_Private_Database_(VPD)[Isolated
+Client Sessions and Oracle Virtual Private Database (VPD)]), use this
+configuration to set up VPD support entirely in the database. That is,
+rather than making the isolated client session execute SQL (see
+link:Configuring%20Exclusive%20Isolated%20Client%20Sessions%20for%20Virtual%20Private%20Database%20(ELUG)#Using_PostAcquireExclusiveConnection_Event_Handler[Using
+PostAcquireExclusiveConnection Event Handler] and
+link:Configuring%20Exclusive%20Isolated%20Client%20Sessions%20for%20Virtual%20Private%20Database%20(ELUG)#Using_PreReleaseExclusiveConnection_Event_Handler[Using
+PreReleaseExclusiveConnection Event Handler]), the database performs the
+required set up in an after login trigger using the proxy
+`+session_user+`.
+
+*Providing Authenticated Writes for Database Auditing Purposes with a
+Client Session*
+
+In this configuration, isolated data or exclusive connections are not
+required. You must acquire the client session using properties that
+specify the proxy authentication user credentials.
+
+Writes are performed through the proxy-authenticated connection. Reads
+occur through nonproxy-authenticated connections. This enables the
+database auditing process to access the user that performed the write
+operations.
+
+*Providing Authenticated Reads and Writes with a Database Session*
+
+In this configuration, you use a `+DatabaseSession+` with proxy
+properties.
+
+Note: We recommend that you exclusively use server and client sessions
+in a three-tier environment.
+
+Do not use database sessions in a three-tier environment. Ensure that a
+database session is used by a single user and not accessed concurrently.
+
+=== How to Configure Oracle Database Proxy Authentication Using Java
+
+To configure EclipseLink to use Oracle Database proxy authentication, do
+the following:
+
+[arabic]
+. Decide on the proxy type you want to use and create appropriate users
+and roles.
+[arabic]
+.. User Name Authentication: To authenticate a proxy user `+sarah+` by
+user name only, create the user account on the Oracle Database using the
+following:
++
+`+alter user sarah grant connect through dbadminuser+`
+`+ with roles clerk, reports;+`
++
+In this case, you will need to set the proxy properties shown in this
+table. [#Table 94-2]##
++
+*_Proxy Properties for User Name Authentication_*
++
+[width="100%",cols="<50%,<50%",options="header",]
+|===
+|*Property Name* |*Property Value*
+|`+"eclipselink.oracle.proxy-type"+` |`+PROXYTYPE_USER_NAME+`
+|`+PROXY_USER_NAME+` |`+"sarah"+`
+|`+PROXY_ROLES+` |`+String[] {"role1", "role2", ...}+`
+|===
+.. User Name and Password Authentication: To authenticate a proxy user
+`+sarah+` by user name and password, create the user account on the
+Oracle Database using the following:
++
+`+alter user sarah grant connect through dbadminuser+`
+`+ authenticated using password+` `+ with roles clerk, reports;+`
++
+In this case, you will need to set the proxy properties shown in this
+table. [#Table 94-3]##
++
+*_Proxy Properties for User Name and Password Authentication_*
++
+[width="100%",cols="<50%,<50%",options="header",]
+|===
+|*Property Name* |*Property Value*
+|`+"eclipselink.oracle.proxy-type"+` |`+PROXYTYPE_USER_NAME+`
+|`+PROXY_USER_NAME+` |`+"sarah"+`
+|`+PROXY_PASSWORD+` |`+"passwordforsarah"+`
+|`+PROXY_ROLES+` |`+String[] {"role1", "role2", ...}+`
+|===
+.. Distinguished Name Authentication: To authenticate a proxy user
+`+sarah+` by globally unique distinguished name, create the user account
+on the Oracle Database using the following:
+`+create user sarah identified globally as+`
++
+`+ 'CN=sarah,OU=americas,O=oracle,L=city,ST=ca,C=us';+`
+`+alter user sarah grant connect through dbadminuser+`
+`+ authenticated using distinguished name+`
+`+ with roles clerk, reports;+`
++
+In this case, you will need to set the proxy properties shown in this
+table. [#Table 94-4]##
++
+*_Proxy Properties for Distinguished Name Authentication_*
++
+[width="100%",cols="<40%,<60%",options="header",]
+|===
+|*Property Name* |*Property Value*
+|`+"eclipselink.oracle.proxy-type"+` |`+PROXYTYPE_DISTINGUISHED_NAME+`
+
+|`+PROXY_DISTINGUISHED_NAME+`
+|`+"CN=sarah,OU=americas,O=oracle,L=city,ST=ca,C=us"+`
+
+|`+PROXY_ROLES+` |`+String[] {"role1", "role2", ...}+`
+|===
+.. Certificate Authentication: To authenticate a proxy user `+sarah+` by
+encrypted distinguished name, create the user account on the Oracle
+Database using the following:
++
+`+alter user sarah grant connect through dbadminuser+`
+`+ authenticated using certificate+`
+`+ with roles clerk, reports;+`
++
+In this case, you will need to set the proxy properties shown in this
+table. [#Table 94-5]##
++
+*_Proxy Properties for User Name Authentication_*
++
+[width="100%",cols="<48%,<52%",options="header",]
+|===
+|*Property Name* |*Property Value*
+|`+"eclipselink.oracle.proxy-type"+` |`+PROXYTYPE_CERTIFICATE+`
+|`+PROXY_CERTIFICATE+` |`+byte[] {+`_`+EncryptedCertificate+`_`+}+`
+|`+PROXY_ROLES+` |`+String[] {"role1", "role2", ...}+`
+|===
+. [#SessionCustomizer-config]####Configure your session login using Java
+code. Do this through a `+SessionCustomizer+`.
++
+*`+//\'\' \'\'If\'\' \'\'using\'\' \'\'Oracle\'\' \'\'VPD\'\' \'\'support,set\'\' \'\'the\'\' \'\'connection\'\' \'\'policy\'\' \'\'to\'\' \'\'exclusive+`*`+ +`
+`+policy.setShouldUseExclusiveConnection(true);+`
+. Acquire a proxy-authenticated session using properties that specify
+the user credentials:
++
+`+Session session = server.acquireClientSession();+`
+`+session.setProperty("eclipselink.oracle.proxy-type", OracleConnection.PROXYTYPE_USER_NAME);+`
+`+session.setProperty(oracle.jdbc.OracleConnection.PROXY_USER_NAME, "sarah");+`
+
+'''''
+
+_link:EclipseLink_User's_Guide_Copyright_Statement[Copyright Statement]_
+
+Category:_EclipseLink_User's_Guide[Category: EclipseLink User’s Guide]
+Category:_Release_1[Category: Release 1] Category:_Task[Category: Task]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Descriptor_(ELUG).adoc b/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Descriptor_(ELUG).adoc
new file mode 100644
index 00000000000..fa22cc111c4
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Descriptor_(ELUG).adoc
@@ -0,0 +1,4687 @@
+*TOC* Special:Whatlinkshere_Configuring_a_Descriptor_(ELUG)[Related
+Topics]
+
+This section describes how to configure EclipseLink project options
+common to two or more project types.
+
+The following table lists the types of EclipseLink descriptors that you
+can configure and provides a cross-reference to the type-specific
+chapter that lists the configurable options supported by that type.
+
+[#Table 115-1]##
+
+If you are creating…
+
+See…
+
+Relational Descriptors
+
+Configuring a Relational Descriptor
+
+Object-Relational Data Type Descriptors
+
+Configuring an Object-Relational Data Type Descriptor
+
+EIS Descriptor Concepts
+
+Configuring an EIS Descriptor
+
+XML Descriptor Concepts
+
+Configuring an XML Descriptor
+
+The link:#Table_115-2[Common Descriptor Options] table lists the
+configurable options shared by two or more EclipseLink descriptor types.
+
+For more information, see:
+
+* link:Creating%20a%20Descriptor%20(ELUG)[Introduction to Descriptor
+Creation]
+* link:Introduction%20to%20Descriptors%20(ELUG)[Introduction to
+Descriptors]
+
+== Configuring Common Descriptor Options
+
+This table lists the configurable options shared by two or more
+EclipseLink descriptor types. In addition to the configurable options
+described here, you must also configure the options described for the
+specific
+link:Introduction%20to%20Descriptors%20(ELUG)#Descriptor_Types[Descriptor
+Types], as shown in the link:#Table_115-1[Configuring EclipseLink
+Descriptor] table.
+
+[#Table 115-2]##
+
+Option to Configure
+
+EclipseLink Workbench
+
+Java
+
+Primary keys
+
+Read-only
+
+Unit of work conforming
+
+Alias
+
+Comments
+
+Classes
+
+Named queries
+
+Query timeout
+
+Cache refreshing
+
+Query keys
+
+Interface query keys
+
+Cache type and size
+
+Cache isolation
+
+Unit of work cache isolation
+
+Cache coordination change propagation
+
+Cache expiration
+
+Cache existence checking
+
+Reading subclasses on queries
+
+Inheritance for a child class descriptor
+
+Inheritance for a parent class descriptor
+
+Inheritance expressions for a parent class descriptor
+
+Inherited attribute mapping in a subclass
+
+Domain object method as an event handler
+
+Descriptor event listener as an event handler
+
+Locking policy
+
+Returning policy
+
+Instantiation policy
+
+Copy policy
+
+Change policy
+
+History policy
+
+Wrapper policy
+
+Fetch groups
+
+Amendment methods
+
+Mappings
+
+== Configuring Primary Keys
+
+A *primary key* is a unique identifier (made up of one or more
+persistent attributes) that distinguishes one instance of a class from
+all other instances of the same type. You use primary keys to define
+relationships and to define queries.
+
+For the descriptors shown in the link:#Table_115-3[Descriptor Support
+for Primary Keys] table, you must configure a primary key and you must
+ensure that your class contains one or more persistent fields suitable
+for this purpose.
+
+This table summarizes which descriptors support primary keys.
+
+[#Table 115-3]##
+
+Descriptor
+
+Using the Workbench
+
+Using Java
+
+Relational Descriptors 1
+
+Object-Relational Data Type Descriptors
+
+EIS Descriptors 2
+
+XML Descriptors
+
+1link:Creating%20a%20Relational%20Descriptor%20(ELUG)#Creating_Relational_Class_Descriptors[Relational
+class descriptors] only. 2
+link:Creating%20an%20EIS%20Descriptor%20(ELUG)#EIS_Root_Descriptors[EIS
+root descriptors] only. For a relational class (non-aggregate)
+descriptor, choose any unique database field or set of unique database
+fields from the descriptor’s
+link:Configuring%20a%20Relational%20Descriptor%20(ELUG)#Configuring_Associated_Tables[associated
+table].
+
+For an
+link:Configuring%20an%20EIS%20Descriptor%20(ELUG)#Configuring_an_EIS_Descriptor_as_a_Root_or_Composite_Type[EIS
+root descriptor], choose any unique attribute or text node or set of
+unique attributes or text nodes from
+link:Configuring%20an%20EIS%20Descriptor%20(ELUG)#Configuring_Schema_Context_for_an_EIS_Descriptor[the
+descriptor’s schema context].
+
+=== How to Configure Primary Keys Using Workbench
+
+To associate a descriptor with one or more primary keys, use this
+procedure:
+
+[arabic]
+. Select a descriptor in the *Navigator*. Its properties appear in the
+Editor.
+. Click the *Descriptor Info* tab. The Descriptor Info tab appears.
+*_Descriptor Info Tab, Primary Key Options_*
+image:desinpk.gif[Descriptor Info Tab, Primary Key
+Options,title="Descriptor Info Tab, Primary Key Options"]
+. Complete the Primary Keys options on the tab.
+
+Use this table to enter data in Primary Keys field on the descriptor’s
+*Descriptor Info* tab to specify the primary key(s):
+
+Field
+
+Description
+
+Primary Keys
+
+To specify the primary keys for the table, click Add in order to do the
+following:
+
+For a relational class descriptor, select a database field from the
+descriptor’s associated table.
+
+For an EIS root descriptor, select an attribute or text node from the
+descriptor’s schema context. For more information on choosing an element
+or attribute, see Choosing a Schema Context.
+
+To remove a primary key, select the key and click Remove.
+
+=== How to Configure Primary Keys Using Java
+
+You can use Java to configure primary keys for the following:
+
+* link:#Relational_Projects[Relational Projects]
+* link:#EIS_Projects[EIS Projects]
+
+==== Relational Projects
+
+Use `+ClassDescriptor+` method `+addPrimaryKeyFieldName+` to specify the
+primary key field of the descriptor’s table. This should be called for
+each field that makes up the primary key of the table.
+
+If the descriptor has more than one table, and all other tables have the
+same primary key, use the `+ClassDescriptor+` method
+`+addPrimaryKeyFieldName+` to specify the the primary key in the first
+table.
+
+If the descriptor has more than one table, and each table has a
+different primary key, use `+ClassDescriptor+` method
+`+addForeignKeyFieldNameForMultipleTable+` to map the source foreign key
+field name to target primary key field name.
+
+==== EIS Projects
+
+Use `+EISDescriptor+` method `+addPrimaryKeyFieldName+` to specify the
+primary key field of the descriptor’s class. Call this method for each
+field that makes up the primary key.
+
+== Configuring Read-Only Descriptors
+
+You can configure a relational class or EIS root descriptor as
+read-only. This indicates that instances of the reference class will
+never be modified.
+
+Read-only descriptors are usually used within a unit of work as a
+performance gain, because there is no need to register, clone, and merge
+the read-only classes. For more information, see
+link:Introduction%20to%20EclipseLink%20Transactions_(ELUG)[Introduction
+to EclipseLink Transactions].
+
+This table summarizes which descriptors support read-only configuration.
+
+[#Table 115-4]##
+
+Descriptor
+
+Using the Workbench
+
+Using Java
+
+Relational Descriptors 1
+
+Object-Relational Data Type Descriptors
+
+EIS Descriptor 2
+
+XML Descriptors
+
+1link:Creating%20a%20Relational%20Descriptor%20(ELUG)#Creating_Relational_Class_Descriptors[Relational
+class descriptors] only.
+2link:Creating%20an%20EIS%20Descriptor%20(ELUG)#EIS_Root_Descriptors[EIS
+root descriptors] only.
+
+[width="100%",cols="<100%",]
+|===
+|*Note:* Relational aggregate and EIS composite descriptors get their
+read-only setting from their owner.
+|===
+
+=== How to Configure Read-Only Descriptors Using Workbench
+
+To configure a descriptor as read-only use this procedure:
+
+[arabic]
+. Select a descriptor in the *Navigator*. Its properties appear in the
+Editor.
+. Click the *Descriptor Info* tab. The Descriptor Info tab appears.
+[#Figure 115-2]##*_Descriptor Info Tab, Read Only Option_*
+image:desread.gif[Descriptor Info Tab, Read Only
+Option,title="Descriptor Info Tab, Read Only Option"]
+. Select the *Read-Only* option on the tab. Specify whether this
+descriptor is read-only or not.
+
+*See Also*
+
+link:#Configuring_Read-Only_Descriptors[Configuring Read-Only
+Descriptors]
+
+link:#Configuring_a_Descriptor[Configuring a Descriptor]
+
+=== How to Configure Read-Only Descriptors Using Java
+
+Use `+ClassDescriptor+` method `+setReadOnly+`.
+
+== Configuring Unit of Work Conforming at the Descriptor Level
+
+Conforming is a query feature that lets you include new, changed, or
+deleted objects in queries within a unit of work prior to committing the
+transaction. This feature enables you to query against your relative
+logical or transaction view of a data source.
+
+This table summarizes which descriptors support descriptor level unit of
+work conforming.
+
+[#Table 115-5]##
+
+Descriptor
+
+Using the Workbench
+
+Using Java
+
+Relational Descriptors 1
+
+Object-Relational Data Type Descriptors
+
+EIS Descriptors 2
+
+XML Descriptors
+
+1link:Creating%20a%20Relational%20Descriptor%20(ELUG)#Creating_Relational_Class_Descriptors[Relational
+Class Descriptors] only.
+2link:Creating%20an%20EIS%20Descriptor%20(ELUG)#EIS_Root_Descriptors[EIS
+Root Descriptors] only. When you configure a descriptor to conform
+results in a unit of work, when you execute a query in the unit of work,
+EclipseLink filters the data source result set to the changes currently
+made in the unit of work. EclipseLink adds new or changed objects that
+correspond to the query’s selection criteria and removes changed objects
+that no longer correspond to the query’s selection criteria.
+
+[width="100%",cols="<100%",]
+|===
+|*Note:* For EIS root descriptors, only deleted objects would be
+filtered, not new or changed objects.
+|===
+
+Conforming can reduce performance. Before you enable a descriptor for
+conforming, be aware of its limitations (see
+link:Using%20Advanced%20Unit%20of%20Work%20API%20(ELUG)#How_to_Use_Conforming[How
+to Use Conforming]) and make sure that conforming is actually necessary.
+
+For examples, see the following:
+
+* link:Using%20Advanced%20Unit%20of%20Work%20API%20(ELUG)#Using_Conforming_Queries_and_Descriptors[Using
+Conforming Queries and Descriptors]
+* link:Using%20Advanced%20Unit%20of%20Work%20API%20(ELUG)#What_You_May_Need_to_Know_About_Conforming_Query_Alternatives[What
+You May Need to Know About Conforming Query Alternatives]
+
+=== How to Configure Unit of Work Conforming at the Descriptor Level Using Workbench
+
+To conform a descriptor’s results in a unit of work, use this procedure:
+
+[arabic]
+. Select a descriptor in the *Navigator*. Its properties appear in the
+Editor.
+. Click the *Descriptor Info* tab. The Descriptor Info tab appears.
+*_Descriptor Info Tab, Conform Results in Unit of Work Option_*
+image:desconform.gif[Descriptor Info Tab, Conform Results in Unit of
+Work
+Option,title="Descriptor Info Tab, Conform Results in Unit of Work Option"]
+. Select the Conform Results in Unit of Work option on the tab.
+
+Enable or disable conforming: when enabled, this feature ensures that
+any queries for this descriptor will conform the data source result with
+the current changes in the unit of work. For more information, see
+link:Using%20Advanced%20Unit%20of%20Work%20API%20(ELUG)#How_to_Use_Conforming[How
+to Use Conforming].
+
+*See Also*
+
+link:#Configuring_Unit_of_Work_Conforming_at_the_Descriptor_Level[Configuring
+Unit of Work Conforming at the Descriptor Level]
+
+link:#Configuring_a_Descriptor[Configuring a Descriptor]
+
+=== How to Configure Unit of Work Conforming at the Descriptor Level Using Java
+
+Use `+ClassDescriptor+` method
+`+setShouldAlwaysConformResultsInUnitOfWork(true)+`.
+
+== Configuring Descriptor Alias
+
+This table summarizes which descriptors support descriptor alias
+configuration.
+
+[#Table 115-6]##
+
+Descriptor
+
+Using the Workbench
+
+Using Java
+
+Relational Descriptors
+
+Object-Relational Data Type Descriptors
+
+EIS Descriptors 1
+
+XML Descriptors
+
+1link:Creating%20an%20EIS%20Descriptor%20(ELUG)#EIS_Root_Descriptors[EIS
+Root Descriptors] only.
+
+[width="100%",cols="<100%",]
+|===
+|*Note:* The alias is also used in JPA – it is the entity name. This is
+the logical name referenced in JP QL queries. It defaults to the class
+name without a path information. For more information, see
+link:Introduction%20to%20Java%20Persistence%20API%20(ELUG)[Introduction
+to Java Persistence API]
+|===
+
+=== How to Configure Descriptor Alias Using Workbench
+
+To specify a descriptor alias, use this procedure:
+
+[arabic]
+. In the *Navigator*, select a descriptor.
+. Click the *Descriptor Info* tab in the Property window. *_Descriptor
+Info Tab, Descriptor Alias Field_* image:desalias.gif[Descriptor Info
+Tab, Descriptor Alias
+Field,title="Descriptor Info Tab, Descriptor Alias Field"]
+. In the *Descriptor Alias* field, enter an alias for this descriptor.
+The default is the class name.
+
+=== How to Configure Descriptor Alias Using Java
+
+Use `+ClassDescriptor+` method `+setAlias+` passing in the descriptor
+alias as a `+String+`. The descriptor alias defaults to the class name.
+
+== Configuring Descriptor Comments
+
+You can define a free-form textual comment for each descriptor. You can
+use these comments however you whish: for example, to record important
+project implementation details such as the purpose or importance of a
+descriptor.
+
+Comments are stored in the Workbench project, in the EclipseLink
+deployment XML file. There is no Java API for this feature.
+
+This table summarizes which descriptors support descriptor comment
+configuration.
+
+[#Table 115-7]##
+
+Descriptor
+
+Using the Workbench
+
+How to Use Java
+
+Relational Descriptors
+
+Object-Relational Data Type Descriptors
+
+EIS Descriptors
+
+XML Descriptors
+
+=== How to Configure Descriptor Comments Using Workbench
+
+To create a comment for a descriptor, use this procedure:
+
+[arabic]
+. In the *Navigator*, select a descriptor.
+. Click the *Descriptor Info* tab in the Property window. *_Descriptor
+Info Tab, Comment Field_* image:descomment.gif[Descriptor Info Tab,
+Comment Field,title="Descriptor Info Tab, Comment Field"]
+. In the *Comment* field, enter a description of this descriptor.
+
+== Configuring Named Queries at the Descriptor Level
+
+A named query is an EclipseLink query that you create and store, by
+name, in a descriptor’s `+DescriptorQueryManager+` for later retrieval
+and execution. Named queries improve application performance because
+they are prepared once and they (and all their associated supporting
+objects) can be efficiently reused thereafter making them well suited
+for frequently executed operations.
+
+If a named query is global to a `+Class+`, configure it at the
+descriptor level. Alternatively, you can
+link:Configuring%20a%20Session%20(ELUG)#Configuring_Named_Queries_at_the_Session_Level[configure
+a named query at the session level].
+
+Use named queries to specify SQL or EclipseLink `+Expression+` queries
+to access your data source.
+
+[width="100%",cols="<100%",]
+|===
+|*Note:* You can use named queries in JPA (see
+link:Using%20EclipseLink%20JPA%20Extensions%20(ELUG)#Using_EclipseLink_JPA_Extensions_for_Stored_Procedure_Query[Using
+EclipseLink JPA Extensions for Stored Procedure Query]). Because the
+scope of JPA named queries is global to the session, ensure that each
+named query has a unique name.
+|===
+
+link:#How_to_Configure_Named_Queries_at_the_Descriptor_Level_Using_Workbench[Using
+the Workbench], you can configure named queries for a subset of query
+types and store them in a descriptor’s `+DescriptorQueryManager+`.
+
+link:#How_to_Configure_Named_Queries_at_the_Descriptor_Level_Using_Java[Using
+Java], you can create named queries for all query types and store them
+in a descriptor’s `+DescriptorQueryManager+`.
+
+This table summarizes which descriptors support named query
+configuration.
+
+[#Table 115-8]##
+
+Descriptor
+
+Using the Workbench
+
+Using Java
+
+Relational Descriptors1
+
+Object-Relational Data Type Descriptors
+
+EIS Descriptor2
+
+XML Descriptors
+
+1link:Creating%20a%20Relational%20Descriptor%20(ELUG)#Creating_Relational_Class_Descriptors[Relational
+Class Descriptors] only.
+2link:Creating%20an%20EIS%20Descriptor%20(ELUG)#EIS_Root_Descriptors[EIS
+Root Descriptors] only. After you create a named query, you can execute
+it by name and class on the EclipseLink session (see
+link:Using%20Basic%20Query%20API%20(ELUG)#Using_Named_Queries[Using
+Named Queries]).
+
+For more information about named queries, see
+link:Introduction%20to%20EclipseLink%20Queries%20(ELUG)#Named_Queries[Named
+Queries].
+
+=== How to Configure Named Queries at the Descriptor Level Using Workbench
+
+To create a named query, use this procedure
+
+[arabic]
+. In the *Navigator*, select a descriptor. Its properties appear in the
+Editor.
+. Click the *Queries* tab in the *Editor*. The Queries tab appear with
+three additional tabs.
+. Click the *Named Queries* tab in the Queries tab. The Named Queries
+tab appears. *_Queries Tab – Named Queries Subtab_*
+image:qrnmdfnd.gif[Queries Tab – Named Queries
+Subtab,title="Queries Tab – Named Queries Subtab"]
+. Complete each field on the Named Queries tab.
+
+Use the following information to complete each field on this tab:
+
+Field
+
+Description
+
+Queries
+
+Lists the existing queries for this descriptor.
+
+To create a new query, click Add.
+
+To delete an existing query, select the query and click Delete.
+Workbench prompts for confirmation.
+
+To rename an existing query, select the query and click Rename. The
+Rename dialog box appears. Type a new name for the query and click OK.
+
+Query Variety
+
+Displays the variety of the currently selected query (see Adding Named
+Queries).
+
+Quick View
+
+Lists the parameters and joined attributes defined for the query.
+Clicking on a heading in the Quick View area selects the corresponding
+subtab. You can also remove parameters or attributes from the Quick View
+area by selecting the item and clicking Remove.
+
+The Named Queries tab includes the following subtabs:
+
+* *General* – See
+link:#Configuring_Named_Query_Type_and_Parameters[Configuring Named
+Query Type and Parameters].
+* *Selection Criteria* – See
+link:#Configuring_Named_Query_Selection_Criteria[Configuring Named Query
+Selection Criteria].
+* *Order* – This tab appears for `+ReadAllQuery+` queries only. See
+link:#Configuring_Read_All_Query_Order[Configuring Read All Query
+Order].
+* *Optimization* – See
+link:#Configuring_Named_Query_Optimization[Configuring Named Query
+Optimization].
+* *Attributes* – This tab appears for `+ReportQuery+` queries only. See
+link:#Configuring_Named_Query_Attributes[Configuring Named Query
+Attributes].
+* *Group/Order* – This tab appears for `+ReportQuery+` queries only.
+link:#Configuring_Named_Query_Group_Order_Options[Configuring Named
+Query Group/Order Options].
+* *Calls* – This tab appears for EIS root descriptors only (for
+`+ReadAllQuery+` and `+ReadObjectQuery+` queries). See
+link:#Creating_an_EIS_Interaction_for_a_Named_Query[Creating an EIS
+Interaction for a Named Query].
+* *Options* – See link:#Configuring_Named_Query_Options[Configuring
+Named Query Options].
+
+*See Also*
+
+link:#Configuring_Named_Queries_at_the_Descriptor_Level[Configuring
+Named Queries at the Descriptor Level]
+
+==== Configuring Named Query Type and Parameters
+
+Use this tab to select the query type and add or remove parameters.
+
+[#Figure 115-8]## *_Named Queries, General Tab_*
+
+.Named Queries, General Tab
+image::qrnmdgen.gif[Named Queries, General
+Tab,title="Named Queries, General Tab"]
+
+Use the following information to complete each field on this tab:
+
+Field
+
+Description
+
+Type
+
+Select the type of query from the list. You can create any of the
+following query types:
+
+ReadAllQuery
+
+ReadObjectQuery
+
+ReportQuery1
+
+To create other types of query, you must use Java.
+
+When you change the type of an existing query, Workbench preserves any
+configuration that is common between the old and new type and warns you
+if changing the type will result in the loss of configuration that is
+not shared by the new type.
+
+Parameters
+
+For queries that take parameters, specify the parameters:
+
+To add a new parameter, click Add. The Add Query Parameter dialog box
+appears. Click Browse to select the type, specify a name, and click OK.
+
+To delete an existing parameter, select the parameter and click Remove.
+Workbench prompts for confirmation.
+
+To modify an existing parameter, select the parameter and click Edit.
+The Edit Query Parameter dialog box appears. Modify the name and type of
+the parameter and click OK.
+
+To change the order of the parameters, select an existing parameter and
+click Up or Down.
+
+Type
+
+Select the class of the parameter’s type.
+
+Name
+
+Enter the name of the parameter.
+
+1Relational descriptors only. *See Also*
+
+link:#Configuring_Named_Queries_at_the_Descriptor_Level[Configuring
+Named Queries at the Descriptor Level]
+
+==== Configuring Named Query Selection Criteria
+
+Use this tab to specify the format of the named query and enter the
+query string.
+
+*_Named Queries, Selection Criteria Tab_*
+
+.Named Queries, Selection Criteria Tab
+image::qrnmdsel.gif[Named Queries, Selection Criteria
+Tab,title="Named Queries, Selection Criteria Tab"]
+
+Use the following information to complete each field on this tab:
+
+Field
+
+Description
+
+Type
+
+Specify if query uses an EclipseLink Expression, SQL, or EJB QL.
+
+Expression or Query String
+
+If the Type is SQL or EJB QL, enter the query string (either SQL or EJB
+QL). Workbench does not validate the query string. See a note that
+follows this table for information on query syntax.
+
+Note: Use a combination of an escape character and a double-quote ( " )
+instead of just a double-quote ( ” ) when defining your query using SQL
+or EJB QL. For example:
+
+SELECT OBJECT(employee) FROM Employee employee WHERE employee.name = "Bob"
+
+If you fail to do so, the generated Java code would look as follows:
+
+query.setEJBQLString("`SELECT OBJECT(employee) FROM Employee employee WHERE employee.name = `"Bob”“);
+
+The preceding code produces an error at compile time.If you define your
+query using the correct syntax, the generated Java code will contain no
+errors and be similar to the following:
+
+query.setEJBQLString("`SELECT OBJECT(employee) FROM Employee employee WHERE employee.name = "Bob"`");
+
+*See Also*
+
+link:#Configuring_Named_Queries_at_the_Descriptor_Level[Configuring
+Named Queries at the Descriptor Level]
+
+==== Configuring Read All Query Order
+
+Use this tab to specify how the results of a read all query should be
+ordered by attribute name.
+
+*_Named Queries, Order Tab_*
+
+.Named Queries, Order Tab
+image::ordertab.gif[Named Queries, Order
+Tab,title="Named Queries, Order Tab"]
+
+Select one of the following actions:
+
+* To add a new attribute by which to order query results, click *Add*.
+The Add Ordering Attribute dialog box appears. Select the mapped
+attribute to order by, specify ascending or descending order, and then
+click *OK*.
+* To change the order of the order attributes, select an existing
+attribute and click *Up* or *Down*.
+* To modify an existing order attribute’s ordering options, select an
+existing attribute and click *Edit*.
+* To remove an order attribute, select an existing attribute and click
+*Remove*.
+
+==== Configuring Named Query Optimization
+
+You can optimize a named query by configuring batch (`+ReadAllQuery+`
+only) or joining (`+ReadAllQuery+` and `+ReadObjectyQuery+`) attributes.
+
+For more information on using batch reading, see
+link:Optimizing%20the%20EclipseLink%20Application%20(ELUG)#Optimizing_Queries[Optimizing
+Queries],
+Optimizing%20the%20EclipseLink%20Application%20(ELUG)#Reading_Case_2:_Batch_Reading_Objects[Reading
+Case 2: Batch Reading Objects], and
+link:Using%20Basic%20Query%20API%20(ELUG)#Using_Batch_Reading[Using
+Batch Reading].
+
+For more information on joining, see
+link:Introduction%20to%20EclipseLink%20Queries%20(ELUG)#Join_Reading_and_Object-Level_Read_Queries[Join
+Reading and Object-Level Read Queries] and
+link:Using%20Basic%20Query%20API%20(ELUG)#Using_Join_Reading_with_ObjectLevelReadQuery[Using
+Join Reading with ObjectLevelReadQuery].
+
+Use this tab to specify batch reading and joining attributes.
+
+[#Figure 115-11]## *_Named Queries, Optimization Tab_*
+
+.Named Queries, Optimization Tab
+image::optimization.gif[Named Queries, Optimization
+Tab,title="Named Queries, Optimization Tab"]
+
+Select one of the following actions for *Batch Read Attributes*
+(`+ReadAllQuery+` only):
+
+* To add a new batch read attribute, click *Add*. The Add Batch Read
+Attribute dialog box appears. Select the mapped attribute and click
+*OK*.
+* To change the order of the batch read attributes, select an existing
+attribute and click *Up* or *Down*.
+* To modify an existing batch read attribute’s options, select an
+existing attribute and click *Edit*.
+* To remove a batch read attribute, select an existing attribute and
+click *Remove*.
+
+Select one of the following actions for *Joined Attributes*
+(`+ReadAllQuery+` and `+ReadObjectQuery+`):
+
+* To add a new joined attribute, click *Add*. The Add Joined Attribute
+dialog box appears. [#Figure 115-12]##*’’ Add Joined Attribute Dialog
+Box*’’ image:addjoin.gif[Add Joined Attribute Dialog
+Box,title="Add Joined Attribute Dialog Box"]
++
+Select the mapped attribute. Optionally, enable or disable *Allows Null*
+or, for a `+Collection+` attribute, *Allows None*. Click *OK*.
+* To change the order of the joined attributes, select an existing
+attribute and click *Up* or *Down*.
+* To modify an existing joined attribute’s options, select an existing
+attribute and click *Edit*.
+* To remove a joined attribute, select an existing attribute and click
+*Remove*.
+
+==== Configuring Named Query Attributes
+
+For `+ReportQuery+` queries only, you can configure report query
+functions to apply to one or more attributes.
+
+For more information, see
+link:Introduction%20to%20EclipseLink%20Queries%20(ELUG)#Report_Query[Report
+Query].
+
+Use this tab to configure report query attributes.
+
+[#Figure 115-13]## *_Named Queries, Attributes Tab_*
+
+.Named Queries, Attributes Tab
+image::nqatab.gif[Named Queries, Attributes
+Tab,title="Named Queries, Attributes Tab"]
+
+Select one of the following actions for *Attributes* (`+ReportQuery+`
+only):
+
+* To add a new report query attribute, click *Add*. The Add Joined
+Attribute dialog box appears. Continue with
+link:#Adding_Report_Query_Attributes[Adding Report Query Attributes].
+* To change the order of the report query attribute attributes, select
+an existing attribute and click *Up* or *Down*.
+* To modify an existing report query attribute’s options, select an
+existing attribute and click *Edit*.
+* To remove a report query attribute, select an existing attribute and
+click *Remove*.
+
+[width="100%",cols="<100%",]
+|===
+|*Note:* You can only choose attributes that are configured with a
+direct mapping (converters included) or a user-defined query key.
+|===
+
+===== Adding Report Query Attributes
+
+Use this dialog box to add a report query attribute.
+
+[#Figure 115-14]## *_Add Report Query Attribute Dialog Box_*
+
+.Add Report Query Attribute Dialog Box
+image::nqatt.gif[Add Report Query Attribute Dialog
+Box,title="Add Report Query Attribute Dialog Box"]
+
+Select the attribute you want in this report query and use the following
+table to complete the dialog box and add the report query attribute:
+
+Option
+
+’Description
+
+Allows None or Allows Null
+
+Use the Allows Null and Allows None options to define an expression with
+an outer join. Check the Allows Null option to use the ExpressionBuilder
+method getAllowingNull.
+
+Check the Allows None option for Collection attributes to use the
+ExpressionBuilder method anyOfAllowingNone. For more information, see
+Using EclipseLink Expression API for Joins.
+
+Function
+
+Select from the list of report query functions that EclipseLink
+provides. This function will be applied to the specified attribute. You
+must select an attribute for all functions, except Count. Alternatively,
+you can enter the name of a custom function that you implement in your
+database. For more information, see Expression method getFunction in the
+EclipseLink API Reference.
+
+Name
+
+The name associated with the calculated value. By default, the name is
+.
+
+Enter the necessary information and click *OK*. Workbench adds the
+report query attribute to the list of attributes in the Attribute tab.
+
+==== Configuring Named Query Group/Order Options
+
+For `+ReportQuery+` queries only, you can configure grouping and
+ordering attributes.
+
+For more information, see
+link:Introduction%20to%20EclipseLink%20Queries%20(ELUG)#Report_Query[Report
+Query].
+
+Use this tab to specify grouping and ordering attributes.
+
+[#Figure 115-15]## *_Named Queries, Group/Order Tab_*
+
+.Named Queries, Group/Order Tab
+image::nqgror.gif[Named Queries, Group/Order
+Tab,title="Named Queries, Group/Order Tab"]
+
+Select one of the following actions for *Grouping Attributes*
+(`+ReportQuery+` only):
+
+* To add a new grouping attribute, click *Add*. The Add Grouping
+Attribute dialog appears. Select the desired mapped attribute and click
+*OK*.
+* To change the order of the grouping attributes, select an existing
+attribute and click *Up* or *Down*.
+* To modify an existing grouping attribute’s options, select an existing
+attribute and click *Edit*.
+* To remove a grouping attribute, select an existing attribute and click
+*Remove*.
+
+Select one of the four following actions for *Ordering Attributes*
+(`+ReportQuery+` only):
+
+* To add a new ordering attribute, click *Add*. The Add Ordering
+Attribute dialog box appears. Continue with
+link:#Adding_Ordering_Attributes[Adding Ordering Attributes].
+* To change the order of the ordering attributes, select an existing
+attribute and click *Up* or *Down*.
+* To modify an existing ordering attribute’s options, select an existing
+attribute and click *Edit*.
+* To remove an ordering attribute, select an existing attribute and
+click *Remove*.
+
+===== Adding Ordering Attributes
+
+Use this dialog box to add a report query ordering attribute.
+
+[#Figure 115-16]## *_Add Ordering Attribute Dialog Box_*
+
+.Add Ordering Attribute Dialog Box
+image::nqaddor.gif[Add Ordering Attribute Dialog
+Box,title="Add Ordering Attribute Dialog Box"]
+
+Use the following information to complete the fields on the dialog box
+and add an ordering attribute:
+
+[width="100%",cols="<9%,<91%",options="header",]
+|===
+|*Option* |*Description*
+|*Selected Attribute* |Select this option to view a list of the report
+query attributes you added (see
+link:#Configuring_Named_Query_Attributes[Configuring Named Query
+Attributes]). Select an attribute and choose its ordering option in the
+*Order* field.
+
+|*New Attribute* |Select this option to view a list of all class
+attributes. Select an attribute and choose its ordering option in the
+*Order* field.
+
+|*Order* |Select ascending or descending.
+|===
+
+Enter the necessary information and click *OK*. Workbench adds the
+report query attribute to the list of attributes in the Attribute tab.
+
+*See Also*
+
+link:#Configuring_Named_Query_Attributes[Configuring Named Query
+Attributes]
+
+==== Creating an EIS Interaction for a Named Query
+
+For an EIS root descriptor, you can define EIS interactions to invoke
+methods on an EIS.
+
+You can use EclipseLink to define an interaction as a named query for
+read object and read all object queries, as described here. These
+queries are not called for basic persistence operations
+(link:Configuring%20an%20EIS%20Descriptor%20(ELUG)#Configuring_Custom_EIS_Interactions_for_Basic_Persistence_Operations[Configuring
+Custom EIS Interactions for Basic Persistence Operations]); you can call
+these additional queries by name in your application for special
+purposes.
+
+Use this tab to define an interaction as a named query for read object
+and read all object queries.
+
+[#Figure 115-17]## *_Call Tab_*
+
+.Call Tab
+image::nqcall.gif[Call Tab,title="Call Tab"]
+
+Use the following information to complete each field on the tab:
+
+Field
+
+Description
+
+Interaction Type
+
+Using Workbench, you can only use XML Interactions. You cannot change
+this field.
+
+Function Name
+
+Specify the name of the EIS function that this call type (Read Object or
+Read All) invokes on the EIS.
+
+Input Record Name
+
+Specify the name passed to the JCA adapter when creating the input
+record.
+
+Input Root Element
+
+Specify the root element name to use for the input DOM.
+
+Input Arguments
+
+Specify the query argument name to map to the interaction field or XPath
+nodes in the argument record. For example, if you are using XML records,
+use this option to map input argument name to the XPath name/first-name.
+
+Output Arguments
+
+Specify the result record field or XPath nodes to map the correct nodes
+in the record used by the descriptor’s mappings. For example, if you are
+using XML records, use this option to map the output fname to
+name/first-name.
+
+Output arguments are not required if the interaction returns an XML
+result that matches the descriptor’s mappings.
+
+Input Result Path
+
+Use this option if the EIS interaction expects the interaction arguments
+to be nested in the XML record. For example, specify arguments, if the
+arguments were to be nested under the root element exec-find-order, then
+under an arguments element.
+
+Output Result Path
+
+Use this option if the EIS interaction result record contains the XML
+data that maps to the objects in a nested structure. For example,
+specify order, if the results were return under a root element results,
+then under an order element.
+
+Properties
+
+Specify any properties required by your EIS platform. For example,
+property name operation (from AQPlatform.QUEUE_OPERATION) and property
+value enqueue (from AQPlatform.ENQUEUE).
+
+==== Configuring Named Query Options
+
+Use this tab to configure additional options for the query.
+
+[#Figure 115-18]## *_Named Queries, Options Tab_*
+
+.Named Queries, Options Tab
+image::qrnmdopt.gif[Named Queries, Options
+Tab,title="Named Queries, Options Tab"]
+
+Use the following information to complete each field on the tab:
+
+Field
+
+Description
+
+Refresh Identity Map Results2
+
+Refreshes the attributes of the object(s) resulting from the query. If
+cascading is used, the private parts of the objects will also be
+refreshed.
+
+Cache Statement1
+
+Caches the prepared statements. This requires full parameter binding as
+well (see Bind Parameters).
+
+Bind Parameters1
+
+By default, EclipseLink binds all of the query’s parameters. Deselect
+this option to disable binding.
+
+Cache Usage2
+
+Selects how EclipseLink should use the session cache when a query is
+executed:
+
+Use descriptor settings
+
+Do not check cache
+
+Check cache by exact primary key
+
+Check cache by primary key
+
+Check cache then database
+
+Check cache only
+
+Conform results in unit of workFor more information, see the following:
+
+Configuring Cache Usage for In-Memory Queries.
+
+Configuring Unit of Work Conforming at the Descriptor Level
+
+In Memory Query Indirection2
+
+Selects how EclipseLink should handle indirection (lazy loading) when an
+in-memory or conforming query is executed:
+
+Throw indirection exception – if this object uses indirection and
+indirection has not been triggered, EclipseLink will throw an exception.
+
+Trigger indirection – if this object uses indirection and indirection
+has not been triggered, EclipseLink will trigger indirection.
+
+Ignore exception return conformed – returns conforming if an untriggered
+value holder is encountered. That is, you expect results from the
+database to conform, and an untriggered value holder is taken to mean
+that the underlying attribute has not changed.
+
+Ignore exception return not conformed – returns not conforming if an
+untriggered value holder is encountered.
+
+For more information, see the following:
+
+Handling Exceptions Resulting from In-Memory Queries.
+
+Indirection (Lazy Loading).
+
+Return Choice3
+
+Selects how EclipseLink should handle ReportQuery results:
+
+Result collection – return ReportQuery results as a Collection of
+ReportQueryResult objects.
+
+Single result – return only the first ReportQueryResult object (not
+wrapped in a Collection or Map). Use this option if you know that the
+ReportQuery returns only one row.
+
+Single value – return only a single value. Use this option if you know
+that the ReportQuery returns only one row that contains only one
+attribute.
+
+Single attribute – return only a single Collection of values. If the
+query returns multiple rows, but each row only has a single attribute,
+this option will return a Collection of values, instead of a Collection
+of ReportQueryResults.
+
+For more information, see Collection Query Results.
+
+Retrieve Primary Keys3
+
+Selects whether or not EclipseLink retrieves the primary key values
+within each result. You can use the primary keys to retrieve the real
+objects.
+
+None – do not retrieve primary keys
+
+All – retrieve primary keys for each object read;
+
+First – return only the first primary key value (in the case of a
+composite primary key). This can be used if you just want to know if
+something exists or not, but do not really care about the value.
+
+1 For more information, see
+link:Optimizing%20the%20EclipseLink%20Application%20(ELUG)[How to Use
+Parameterized SQL (Parameter Binding) and Prepared Statement Caching for
+Optimization]. 2For `+ReadObjectQuery+` and `+ReadAllQuery+` queries
+only. 3For `+ReportQuery+` queries only. Click *Advanced* to configure
+additional options. See
+link:#Configuring_Named_Query_Advanced_Options[Configuring Named Query
+Advanced Options].
+
+*See Also*
+
+link:#Configuring_Named_Queries_at_the_Descriptor_Level[Configuring
+Named Queries at the Descriptor Level]
+
+==== Configuring Named Query Advanced Options
+
+To configure additional advanced query options, use this procedure.
+
+[arabic]
+. From the Named Queries – Options tab, click *Advanced*. The Advanced
+Query Options dialog box appears.From the Named Queries – Options tab,
+click *Advanced*. The Advanced Query Options dialog box appears.
+[#Figure 115-19]##*_Advanced Query Options Dialog Box_*
+image:advqropt.gif[Advanced Query Options Dialog
+Box,title="Advanced Query Options Dialog Box"]
+. Complete each field in the Advanced Query Options dialog box.
+
+Use the following information to enter data in each field and click
+*OK*:
+
+Field
+
+Description
+
+Maintain Cache
+
+Specify whether to use the cache for the query or to build objects
+directly from the database result. You should only use this option if
+you are executing a Partial Object Query, whose results cannot be
+cached. For more information, see How to Disable the Identity Map Cache
+Update During a Read Query.
+
+Use Wrapper Policy
+
+Specify whether or not the named query will use the wrapper policy
+configured for this descriptor. For more information, see Configuring
+Wrapper Policy.
+
+Prepare SQL Once
+
+Specify the setShouldPrepare() for the named query. By default,
+EclipseLink optimizes queries to generate their SQL only once. You may
+need to disable this option for certain types of queries that require
+dynamic SQL based on their arguments, such as the following:
+
+Expressions that use equal where the argument value could be null. This
+may cause problems on databases that require IS NULL, instead of = NULL.
+
+Expressions that use in and use parameter binding. This will cause
+problems as the in values must be bound individually.
+
+Cache Query Results
+
+Specify the cacheQueryResults method for the query. The query will only
+access the database the first time it is executed. Subsequent execution
+will return exactly the original result. For more information, see How
+to Cache Results in a ReadQuery.
+
+Refresh Remote Identity Map Results
+
+Specify the refreshRemoteIdentityMapResult method for the query.
+EclipseLink can refresh the attributes of the object(s) resulting from
+the query. With cascading, EclipseLink will also refresh the private
+parts of the object(s).
+
+Exclusive Connection
+
+Specify whether or not the named query will use an exclusive connection.
+You can also configure exclusive connection acquisition at the session
+level (see Configuring Connection Policy.
+
+Pessimistic Locking
+
+Specify the specific pessimistic locking policy for the query or use the
+locking policy from the descriptor.
+
+Distinct State
+
+Specify if EclipseLink prints the DISTINCT clause, if a distinct has
+been set. The DISTINCT clause allows you to remove duplicates from the
+result set.
+
+Query Timeout
+
+Specify if the query will time out (or abort) after a specified number
+of seconds.
+
+Maximum Rows
+
+Specify if the query will limit the results to a specified number of
+rows. Use this to option for queries that could return an excessive
+number of objects.
+
+*See Also*
+
+link:#Configuring_Named_Queries_at_the_Descriptor_Level[Configuring
+Named Queries at the Descriptor Level]
+
+=== How to Configure Named Queries at the Descriptor Level Using Java
+
+To configure named queries in Java, Use a
+link:#Configuring_Amendment_Methods[descriptor amendment method]. The
+link:#Example_115-1[Creating a Named Query with an Amendment Method]
+example illustrates an amendment method that creates a named query and
+adds it to the `+DescriptorQueryManager+`.
+
+[#Example 115-1]## *_Creating a Named Query with an Amendment Method_*
+
+`+public class EmployeeAmmendmentMethodClass {+` `+....+`
+`+ +`*`+//\'\' \'\'Create\'\' \'\'named\'\' \'\'query\'\' \'\'with\'\' \'\'Employee\'\' \'\'as\'\' \'\'its\'\' \'\'reference\'\' \'\'class+`*
+
+`+ public static void createEmployeeQuery(ClassDescriptor descriptor) {+`
+`+ ReadObjectQuery query = new ReadObjectQuery(Employee.class);+`
+`+ ExpressionBuilder emp = query.getExpressionBuilder();+`
+`+ Expression firstNameExpression =+`
+`+ emp.get("firstName").equal(emp.getParameter("firstName"));+`
+`+ query.setSelectionCriteria(firstNameExpression);+`
+`+ query.addArgument("firstName");+`
+
+`+ descriptor.getQueryManager().addQuery(+`
+`+ "employeeReadByFirstName", query);+`
+`+ }+` `+}+`
+
+== Configuring Query Timeout at the Descriptor Level
+
+You can specify how the EclipseLink runtime handles the duration of
+queries on a descriptor’s reference class. Specifying a query timeout at
+the descriptor level applies to all queries on the descriptor’s
+reference class. A query timeout ensures that your application does not
+block forever over a hung or lengthy query that does not return in a
+timely fashion.
+
+This table summarizes which descriptors support query timeout
+configuration.
+
+[#Table 115-9]##
+
+Descriptor
+
+Using the Workbench
+
+Using Java
+
+Relational Descriptors 1
+
+Object-Relational Data Type Descriptors
+
+EIS Descriptor
+
+XML Descriptors
+
+1link:Creating%20a%20Relational%20Descriptor%20(ELUG)#Creating_Relational_Class_Descriptors[Relational
+Class Descriptors] only. You can also configure a timeout on a per-query
+basis. For more information, see the following:
+
+* link:#Configuring_Named_Query_Advanced_Options[Configuring Named Query
+Advanced Options]
+* link:Using%20Basic%20Query%20API%20(ELUG)#Configuring_Query_Timeout_at_the_Query_Level[Configuring
+Query Timeout at the Query Level]
+
+=== How to Configure Query Timeout at the Descriptor Level Workbench
+
+To configure how EclipseLink handles the duration of queries to this
+descriptor, use this procedure:
+
+[arabic]
+. Select a descriptor in the *Navigator*. Its properties appear in the
+Editor.
+. Click the *Queries* tab. The Queries tab appears.
+. Click the *Settings* tab. The Settings tab appears.
+[#Figure 115-20]##*_Descriptor Queries Settings Tab, Query Timeout
+Options_* image:desqtimo.gif[Descriptor Queries Settings Tab, Query
+Timeout
+Options,title="Descriptor Queries Settings Tab, Query Timeout Options"]
+. Select the Query Timeout options on the tab.
+
+Use the following table to enter data in the fields on the descriptor’s
+*Settings* tab to specify how EclipseLink handles query duration:
+
+[width="100%",cols="<9%,<91%",options="header",]
+|===
+|*Field* |*Description*
+|*Default Timeout* |EclipseLink throws a `+DatabaseException+` if a
+query on this descriptor does not return within the timeout period you
+configure on the parent descriptor. If there is no parent descriptor,
+the query timeout defaults to *No Timeout*.
+
+|*No Timeout* |EclipseLink blocks until a query on this descriptor
+returns.
+
+|*Timeout* |Enter the timeout period in seconds. EclipseLink throws a
+`+DatabaseException+` if a query on this descriptor does not return
+within this time.
+|===
+
+*See Also*
+
+link:#Configuring_Query_Timeout_at_the_Descriptor_Level[Configuring
+Query Timeout at the Descriptor Level]
+
+=== How to Configure Query Timeout at the Descriptor Level Java
+
+Use `+DescriptorQueryManager+` method `+setQueryTimeout+` passing in the
+timeout value as a number of milliseconds.
+
+== Configuring Cache Refreshing
+
+By default, EclipseLink caches objects read from a data source (see
+link:Introduction%20to%20Cache%20(ELUG)[Introduction to Cache]).
+Subsequent queries for these objects will access the cache and thus
+improve performance by reducing data source access and avoiding the cost
+of rebuilding object’s and their relationships. Even if a query, such as
+a read-all query, accesses the data source, if the objects corresponding
+to the records returned are in the cache, EclipseLink will use the cache
+objects.
+
+This can lead to stale data in the application. Although using an
+appropriate link:#Configuring_Locking_Policy[locking policy] is the only
+way to ensure that stale or conflicting data does not get committed to
+the data source, sometimes certain data in the application changes so
+frequently that it is desirable to always refresh the data, instead of
+only refreshing the data when a conflict is detected.
+
+You can specify how the EclipseLink runtime handles cache refreshing for
+all queries on a descriptor’s reference class.
+
+This table summarizes which descriptors support query cache refresh
+configuration.
+
+[#'Table 115-10]##
+
+Descriptor
+
+Using the Workbench
+
+Using Java
+
+Relational Descriptors 1
+
+Object-Relational Data Type Descriptors
+
+EIS Descriptor 2
+
+XML Descriptors
+
+1link:Creating%20a%20Relational%20Descriptor%20(ELUG)#Creating_Relational_Class_Descriptors[Relational
+Class Descriptors] only.
+2link:Creating%20an%20EIS%20Descriptor%20(ELUG)#EIS_Root_Descriptors[EIS
+Root Descriptors] only. Configuring descriptor-level cache refresh may
+affect performance. As an alternative, consider configuring the
+following:
+
+* link:Introduction%20to%20EclipseLink%20Queries%20(ELUG)#How_to_Refresh_the_Cache[cache
+refresh on a query-by-query basis]
+* link:#Configuring_Cache_Expiration_at_the_Descriptor_Level[cache
+expiration]
+* link:Introduction%20to%20Cache%20(ELUG)#Cache_Isolation[isolated
+caching]
+
+For more information, see
+link:Optimizing%20the%20EclipseLink%20Application%20(ELUG)#Optimizing_Cache[Optimizing
+Cache].
+
+=== How to Configure Cache Refreshing Using Workbench
+
+To configure how EclipseLink refreshes the cache for queries to this
+descriptor, use this procedure:
+
+[arabic]
+. Select a descriptor in the *Navigator*. Its properties appear in the
+Editor.
+. Click the *Queries* tab. The Queries tab appears.
+. Click the *Settings* tab. The Settings tab appears.
+[#Figure 115-21]##*_Descriptor Queries Settings Tab, Cache Refreshing
+Options_* image:descache.gif[Descriptor Queries Settings Tab, Cache
+Refreshing
+Options,title="Descriptor Queries Settings Tab, Cache Refreshing Options"]
+. Select the Refreshing Cache options on the tab.
+
+Use the following table to enter data in the fields on the descriptor’s
+*Settings* tab to specify how EclipseLink will refresh the cache for
+queries:
+
+Field
+
+Description
+
+Always Refresh
+
+Refreshes the cache on all queries. Avoids stale data by ensuring that
+any query that accesses the data source will refresh the resulting
+objects in the cache. This has no effect on queries that get a cache hit
+and never access the data source, such as read-object primary key
+queries or in-memory queries.
+
+Configuring descriptor level cache refresh may affect performance. As an
+alternative, consider configuring:
+
+cache refresh on a query-by-query basis
+
+cache expiration
+
+isolated caching
+
+Only Refresh If Newer Version
+
+Refreshes the cache only if the object in the database is newer than the
+object in the cache (as determined by the Optimistic Locking field). See
+Configuring Locking Policy for more information. Improves performance by
+avoiding unnecessary refreshing of an object if its version matches the
+data source version. This option does not cause refreshing on its own:
+you must use it in combination with Always Refresh, query refreshing, or
+cache expiration.
+
+Disable Cache Hits
+
+When selected, EclipseLink bypasses the cache and goes to the database
+for read object queries based on primary key. Using this option in
+conjunction with Always Refresh ensures that EclipseLink always goes to
+the database. This option ensures that all queries including read-object
+primary key queries will always access the data source. This option does
+not cause refreshing on its own: you must use it in combination with
+Always Refresh.
+
+This option can cause a serious performance issue: avoid whenever
+possible.
+
+[width="100%",cols="<100%",]
+|===
+|*Caution*: Use the *Always Refresh* and *Disable Cache Hits* properties
+with caution as they may lead to poor performance. As an alternative,
+consider
+link:Introduction%20to%20EclipseLink%20Queries%20(ELUG)#How_to_Refresh_the_Cache[configuring
+cache refresh on a query-by-query basis] or
+link:#Configuring_Cache_Expiration_at_the_Descriptor_Level[configuring
+cache expiration]. For more information, see
+link:Optimizing%20the%20EclipseLink%20Application%20(ELUG)#Optimizing_Cache[Optimizing
+Cache].
+|===
+
+=== How to Configure Cache Refreshing Using Java
+
+Configure cache refresh options using the following `+ClassDescriptor+`
+methods:
+
+* `+setShouldAlwaysRefreshCache+`
+* `+setShouldAlwaysRefreshCacheOnRemote+`
+* `+setShouldDisableCacheHits+`
+* `+setShouldDisableCacheHitsOnRemote+`
+* `+setShouldOnlyRefreshCacheIfNewerVersion+`
+
+Use these methods in link:#Configuring_Amendment_Methods[a descriptor
+amendment method], as this example illustrates.
+
+[#Example 115-2]## *_Configuring Remote Refreshing_*
+
+`+public void addToDescriptor(ClassDescriptor descriptor) {+`
+`+ descriptor.setShouldRefreshCacheOnRemote(true);+`
+`+ descriptor.setShouldDisableCacheHitsOnRemote(true);+` `+}+`
+
+== Configuring Query Keys
+
+A *query key* is a schema-independent alias for a database field name.
+For example, consider a class `+Employee+` with attribute `+firstName+`
+mapped directly to a database field `+F_NAME+` in database table
+`+EMPLOYEE+`. Without a query key, when you create a query or expression
+that involves `+Employee+` attribute `+firstName+`, you must use the
+database management system-specific field name `+F_NAME+`. This makes it
+more difficult to build a query and ties the query to the schema. With a
+query key, you can refer to this field using a schema-independent alias,
+such as `+firstName+`.
+
+This table summarizes which descriptors support query keys.
+
+[#Table 115-11]##
+
+Descriptor
+
+Using the Workbench
+
+Using Java
+
+Relational Descriptors
+
+Object-Relational Data Type Descriptors
+
+EIS Descriptors
+
+XML Descriptors
+
+Using query keys offers the following advantages:
+
+* Enhances code readability in EclipseLink expressions and simplifies
+expression development. You can compose expressions entirely within the
+context of your object model.
+* Increases portability by making code independent of the database
+schema. If you rename a field in your schema, you can redefine the query
+key without changing any code that uses it.
+* Query keys used with interface descriptors allow the implementor
+descriptor’s tables to have different field names.
+
+Query keys are automatically generated for all mapped attributes. The
+name of the query key is the name of the class attribute specified in
+your object model.
+
+For information on how to use query keys in queries and expressions, see
+link:Introduction%20to%20EclipseLink%20Queries%20(ELUG)#Query_Keys[Query
+Keys].
+
+When query keys are generated and how you can add or modify query keys
+depends on the type of mapping or descriptor involved:
+
+* link:#Direct_Mappings[Direct Mappings]
+* link:#Relationship_Mappings[Relationship Mappings]
+* link:#Interface_Descriptors[Interface Descriptors]
+
+=== *Direct Mappings*
+
+Workbench automatically generates query keys for all direct mappings at
+the time you create the mapping.
+
+Workbench provides support for adding or modifying query keys for simple
+unmapped attributes that could be mapped by a direct mapping: for
+example, the `+version+` field used for optimistic locking or the
+`+type+` field used for inheritance. You cannot modify or remove
+automatically generated query keys.
+
+=== *Relationship Mappings*
+
+EclipseLink automatically generates query keys for all relationship
+mappings at run time.
+
+For example, if you have a class `+Customer+` with attribute `+orders+`
+mapped in a one-to-many relationship to class `+PurchaseOrders+`, then
+the EclipseLink runtime will generate a query key named `+orders+` for
+this `+Customer+` attribute.
+
+The Workbench does not currently support adding or modifying the query
+keys for relationship mappings. If you must add or modify such a query
+key, you must do so in Java code, using a descriptor amendment method.
+
+=== *Interface Descriptors*
+
+link:Creating%20a%20Relational%20Descriptor%20(ELUG)#Creating_Relational_Interface_Descriptors[Interface
+descriptors] define only the query keys that are shared among their
+implementors. In the descriptor for an interface, only the name of the
+query key is specified.
+
+Workbench provides support for choosing the implementors of an interface
+that share at least one common automatically generated
+link:#Configuring_Interface_Query_Keys[query key].
+
+=== How to Configure Query Keys Using Workbench
+
+To add query keys to simple unmapped fields and to view the query keys
+automatically generated for directly mapped attributes, use this
+procedure:
+
+[arabic]
+. Select a descriptor in the *Navigator*. Its properties appear in the
+Editor.
+. Click the *Query Keys* tab in the *Editor*.
+[#Figure 115-22]##*_Queries, Query Keys Tab_*
+image:querykey.gif[Queries, Query Keys
+Tab,title="Queries, Query Keys Tab"]
+
+To add a new query key, click *Add.*
+
+To delete an existing query key, select the query key and click
+*Remove*.
+
+To rename an existing query key, select the query key and click
+*Rename*.
+
+Use the *Field* list to select the field in the table associated with
+the query key.
+
+=== How to Configure Query Keys Using Java
+
+To manually create a relationship query key, implement a
+link:#Configuring_Amendment_Methods[descriptor amendment method] that
+uses one of the following `+ClassDescriptor+` methods to register the
+query keys:
+
+* `+addQueryKey+` – specify a query key using an instance of
+`+QueryKey+` such as `+DirectQueryKey+`, `+DirectCollectionQueryKey+`,
+`+ManyToManyQueryKey+`, `+OneToManyQueryKey+`, or `+OneToOneQueryKey+`.
+* `+addDirectQueryKey+` – add a query key that maps directly to the
+given database field.
+* `+addAbstractQueryKey+` – add an abstract query key to an interface
+descriptor. Any implementors of that interface must define the query key
+defined by this abstract query key.
+
+The link:#Example_115-3[Defining a Query Key],
+link:#Example_115-4[Defining a One-to-Many Query Key], and
+link:#Example_115-5[Defining a Many-to-Many Query Key] examples
+illustrate how to define a query key in Java code.
+
+[#Example 115-3]## *_Defining a Query Key_*
+
+*`+//\'\' \'\'Add\'\' \'\'a\'\' \'\'query\'\' \'\'key\'\' \'\'for\'\' \'\'the\'\' \'\'foreign\'\' \'\'key\'\' \'\'field\'\' \'\'using\'\' \'\'the\'\' \'\'direct\'\' \'\'method+`*
+`+descriptor.addDirectQueryKey("managerId", "MANAGER_ID");+`
+
+*`+// The same query key can also be added through the addQueryKey method+`*
+`+DirectQueryKey directQueryKey = new DirectQueryKey();+`
+`+directQueryKey.setName("managerId");+`
+`+directQueryKey.setFieldName("MANAGER_ID");+`
+`+descriptor.addQueryKey(directQueryKey);+`
+
+*`+//\'\' \'\'Add\'\' \'\'a\'\' \'\'one-to-one\'\' \'\'query\'\' \'\'key\'\' \'\'for\'\' \'\'the\'\' \'\'large\'\' \'\'project\'\' \'\'of\'\' \'\'which\'\' \'\'the+`*
+*`+//+`*`+employee is a leader (this assumes only one project)+`
+`+OneToOneQueryKey projectQueryKey = new OneToOneQueryKey();+`
+`+projectQueryKey.setName("managedLargeProject");+`
+`+projectQueryKey.setReferenceClass(LargeProject.class);+`
+`+ExpressionBuilder builder = new ExpressionBuilder();+`
+`+projectQueryKey.setJoinCriteria(builder.getField(+`
+`+ "PROJECT.LEADER_ID").equal(builder.getParameter("EMPLOYEE.EMP_ID")));+`
+`+descriptor.addQueryKey(projectQueryKey);+`
+
+[#Example 115-4]## *_Defining a One-to-Many Query Key_*
+
+*`+//\'\' \'\'Add\'\' \'\'a\'\' \'\'one-to-many\'\' \'\'query\'\' \'\'key\'\' \'\'for\'\' \'\'the\'\' \'\'projects\'\' \'\'where\'\' \'\'the\'\' \'\'employee+`*
+*`+//+`*`+manages multiple projects +`
+`+OneToManyQueryKey projectsQueryKey = new OneToManyQueryKey();+`
+`+projectsQueryKey.setName("managedProjects");+`
+`+projectsQueryKey.setReferenceClass(Project.class);+`
+`+ExpressionBuilder builder = new ExpressionBuilder();+`
+`+projectsQueryKey.setJoinCriteria(builder.getField(+`
+`+ "PROJECT.LEADER_ID").equal(builder.getParameter("EMPLOYEE.EMP_ID")));+`
+`+descriptor.addQueryKey(projectsQueryKey);+`
+
+[#Example 115-5]## *_Defining a Many-to-Many Query Key_*
+
+*`+// Add a many-to-many query key to an employee project that uses a join table+`*
+`+ManyToManyQueryKey projectsQueryKey = new ManyToManyQueryKey();+`
+`+projectsQueryKey.setName("projects");+`
+`+projectsQueryKey.setReferenceClass(Project.class);+`
+`+ExpressionBuilder builder = new ExpressionBuilder();+`
+`+projectsQueryKey.setJoinCriteria(+`
+`+ (builder.getParameter("EMPLOYEE.EMP_ID").equal(+`
+`+ builder.getTable("EMP_PROJ").getField("EMP_ID")).and(+`
+`+ builder.getTable("EMP_PROJ").getField("PROJ_ID").equal(+`
+`+ builder.getField("PROJECT.PROJ_ID")))));+`
+`+descriptor.addQueryKey(projectsQueryKey);+`
+
+The link:#Example_115-6[Defining a One-to-One Query Key with an
+Amendment Method] example illustrates how to implement a `+Descriptor+`
+amendment method to define a one-to-one query key. In this example, the
+object model for the `+Address+` class does not include a reference to
+its owner, an `+Employee+` object. You can amend the `+Address+` class
+descriptor to add a query key named `+owner+` to make up for this
+deficiency. At run time, you can compose expressions that select
+`+Address+` objects based on this `+owner+` query key.
+
+[#Example 115-6]## *_Defining a One-to-One Query Key with an Amendment
+Method_*
+
+*`+//\'\' \'\'Static\'\' \'\'amendment\'\' \'\'method\'\' \'\'in\'\' \'\'Address\'\' \'\'class,\'\' \'\'addresses\'\' \'\'do\'\' \'\'not\'\' \'\'know+`*
+*`+//+`*`+ their owners in the object model, however you can still+`
+*`+//+`*`+ query on their owner if a user-defined query key is defined+`
+`+public static void addToDescriptor(Descriptor descriptor) {+`
+`+ OneToOneQueryKey ownerQueryKey = new OneToOneQueryKey();+`
+`+ ownerQueryKey.setName("owner");+`
+`+ ownerQueryKey.setReferenceClass(Employee.class);+`
+`+ ExpressionBuilder builder = new ExpressionBuilder();+`
+`+ ownerQueryKey.setJoinCriteria(+`
+`+ builder.getField("EMPLOYEE.ADDRESS_ID").equal(+`
+`+ builder.getParameter("ADDRESS.ADDRESS_ID")));+`
+`+ descriptor.addQueryKey(ownerQueryKey);+` `+}+`
+
+== Configuring Interface Query Keys
+
+A query key is a schema independent alias for a database field name. For
+more information about query keys, see
+link:#Configuring_Query_Keys[Configuring Query Keys].
+
+link:Creating%20a%20Relational%20Descriptor%20(ELUG)#Creating_Relational_Interface_Descriptors[Interface
+descriptors] are defined only with query keys that are shared among
+their implementors. In the descriptor for an interface, only the name of
+the query key is specified.
+
+In each implementor descriptor, the key must be defined with the
+appropriate field from one of the implementor descriptor’s tables.
+
+This allows queries and relationship mappings to be defined on the
+interface using the query key names.
+
+Interface query keys are supported in relational database projects only.
+
+This table summarizes which descriptors support interface query keys.
+
+[#Table 115-12]##
+
+Descriptor
+
+Using the Workbench
+
+Using Java
+
+Relational Descriptors
+
+Object-Relational Data Type Descriptors
+
+EIS Descriptors
+
+XML Descriptors
+
+Consider an `+Employee+` that contains a contact of type `+Contact+`.
+The `+Contact+` class is an interface with two implementors: `+Phone+`
+and `+Email+`. The `+Phone+` class has attributes `+id+` and `+number+`.
+The `+Email+` class has attributes `+id+` and `+address+`. This figure
+illustrates the generated keys:
+
+[#Figure 115-23]## *_Automatically Generated Query Keys for Phone and
+Email_*
+
+.Automatically Generated Query Keys for Phone and Email
+image::atgenkey.gif[Automatically Generated Query Keys for Phone and
+Email,title="Automatically Generated Query Keys for Phone and Email"]
+
+Both classes have an attribute, id, that is directly mapped to fields
+that have different names. However, a query key is generated for this
+attribute. For the `+Contact+` interface descriptor, you must indicate
+that the `+id+` query key must be defined for each of the implementors.
+
+If either of the implementor classes did not have the `+id+` query key
+defined the Workbench would flag that descriptor as deficient.
+
+Now that a descriptor with a commonly shared query key has been defined
+for `+Contact+`, you can use it as the reference class for a variable
+one-to-one mapping (see
+link:Using%20Advanced%20Query%20API%20(ELUG)#Using_Queries_on_Variable_One-to-One_Mappings[Using
+Queries on Variable One-to-One Mappings]).
+
+For example, you can now create a variable one-to-one mapping for the
+`+contact+` attribute of `+Employee+`. When you edit the foreign key
+field information for the mapping, you must match the `+Employee+`
+descriptor’s tables to query keys from the `+Contact+` interface
+descriptor.
+
+=== How to Configure Interface Query Keys Using Workbench
+
+To choose the implementors of an interface that share at least one
+common automatically generated query key, use this procedure.
+
+[arabic]
+. Select an interface descriptor in the *Navigator*. Its properties
+appear in the Editor. [#Figure 115-24]##*_Interface Descriptor Editor
+Window_* image:conintds.gif[Interface Descriptor Editor
+Window,title="Interface Descriptor Editor Window"]
+
+To choose an implementor of the selected interface that shares at least
+one common query key, click *Add.*
+
+To remove an implementor of the selected interface, select the
+implementor and click *Remove*.
+
+=== How to Configure Interface Query Keys Using Java
+
+This example shows how to define the `+Contact+` interface and `+Email+`
+and `+Phone+` implementors in Java.
+
+[#Example 115-7]## *_Defining Interface Query Keys_*
+
+`+Descriptor contactInterfaceDescriptor = new Descriptor();+`
+`+contactInterfaceDescriptor.setJavaInterface(Contact.class);+`
+`+contactInterfaceDescriptor.addAbstractQueryKey("id");+`
+
+`+Descriptor emailClassDescriptor = new Descriptor();+`
+`+emailClassDescriptor.setJavaClass(Email.class);+`
+`+emailClassDescriptor.addDirectQueryKey("id", "E_ID");+`
+`+emailClassDescriptor.getInterfacePolicy().addParentInterface(Contact.class);+`
+`+emailClassDescriptor.setTableName("INT_EML");+`
+`+emailClassDescriptor.setPrimaryKeyFieldName("E_ID");+`
+`+emailClassDescriptor.setSequenceNumberName("SEQ");+`
+`+emailClassDescriptor.setSequenceNumberFieldName("E_ID");+`
+`+emailClassDescriptor.addDirectMapping("emailID", "E_ID");+`
+`+emailClassDescriptor.addDirectMapping("address", "ADDR");+`
+
+`+Descriptor phoneClassDescriptor = new Descriptor();+`
+`+phoneClassDescriptor.setJavaClass(Phone.class);+`
+`+phoneClassDescriptor.getInterfacePolicy().addParentInterface(Contact.class);+`
+`+phoneClassDescriptor.addDirectQueryKey("id", "P_ID");+`
+`+phoneClassDescriptor.setTableName("INT_PHN");+`
+`+phoneClassDescriptor.setPrimaryKeyFieldName("P_ID");+`
+`+phoneClassDescriptor.setSequenceNumberName("SEQ");+`
+`+phoneClassDescriptor.setSequenceNumberFieldName("P_ID");+`
+`+phoneClassDescriptor.addDirectMapping("phoneID", "P_ID");+`
+`+phoneClassDescriptor.addDirectMapping("number", "P_NUM");+`
+
+== Configuring Cache Type and Size at the Descriptor Level
+
+The EclipseLink cache is an in-memory repository that stores recently
+read or written objects based on class and primary key values.
+EclipseLink uses the cache to do the following:
+
+* improve performance by holding recently read or written objects and
+accessing them in-memory to minimize database access;
+* manage locking and isolation level;
+* manage object identity.
+
+This table summarizes which descriptors support identity map
+configuration.
+
+[#Table 115-13]##
+
+Descriptor
+
+Using the Workbench
+
+Using Java
+
+Relational Descriptors1
+
+Object-Relational Data Type Descriptors
+
+EIS Descriptors 2
+
+XML Descriptors
+
+1link:Creating%20a%20Relational%20Descriptor%20(ELUG)#Creating_Relational_Class_Descriptors[Relational
+Class Descriptors] only.
+2link:Creating%20an%20EIS%20Descriptor%20(ELUG)#EIS_Root_Descriptors[EIS
+Root Descriptors] only. This configuration overrides the default
+identity map configuration
+link:Configuring%20a%20Project%20(ELUG)#Configuring_Cache_Type_and_Size_at_the_Project_Level[defined
+at the project level].
+
+For detailed information on caching and object identity, and the
+recommended settings to maximize EclipseLink performance, see to
+link:Introduction%20to%20Cache%20(ELUG)#Cache_Type_and_Object_Identity[Cache
+Type and Object Identity].
+
+For more information, see
+link:Introduction%20to%20Cache%20(ELUG)[Introduction to Cache].
+
+=== How to Configure Cache Type and Size at the Descriptor Level Using Workbench
+
+To specify the identity map information for a descriptor, use this
+procedure:
+
+[arabic]
+. Select the descriptor in the *Navigator*.
+. Select the *Caching* tab in the *Editor*. The Caching tab appears.
+*_Caching Tab, Identity Map Options_* image:desiden.gif[Caching Tab,
+Identity Map Options,title="Caching Tab, Identity Map Options"]
+. Complete the fields on the**Caching** tab to specify the default
+identity map for the selected descriptor.
+
+Use the following table to enter data in following fields on the
+*Caching* tab:
+
+Field
+
+Description
+
+Type1
+
+Use the Type list to choose the identity map as follows:
+
+Weak with Soft Subcache (SoftCacheWeakIdentityMap) – cache first n
+elements in soft space, anything after that in weak space (see Soft
+Cache Weak Identity Map and Hard Cache Weak Identity Map)
+
+Weak with Hard Subcache (HardCacheWeakIdentityMap) – cache first n
+elements in hard space, anything after that in weak space (see Soft
+Cache Weak Identity Map and Hard Cache Weak Identity Map)
+
+Weak (WeakIdentityMap) – cache everything in weak space
+
+Soft (SoftIdentityMap) – cache everything in soft space
+
+Full (FullIdentityMap) – cache everything permanently
+
+None (NoIdentityMap) – cache nothing.
+
+For more information, see Cache Type and Object Identity.
+
+Changing the project’s default identity map does not affect descriptors
+that already exist in the project.
+
+Size1
+
+Specify the size of the cache as follows:
+
+When using Weak with Soft Subcache or Weak with Hard Subcache, the size
+is the size of the subcache.
+
+When using Full or Weak, the size indicates the starting size of the
+identity map.
+
+Default
+
+When you enter a cache size, the Default check box is cleared. To reset
+the size to the default for the selected cache type, check the Default
+check box.
+
+1If a descriptor is a child in an inheritance hierarchy, EclipseLink
+makes this field read only and displays the options from the parent root
+descriptor.
+
+=== How to Configure Cache Type and Size at the Descriptor Level Using Java
+
+Use one of the following `+ClassDescriptor+` methods to configure the
+descriptor to use the appropriate type of identity map:
+
+* `+useFullIdentitMap+`
+* `+useWeakIdentityMap+`
+* `+useSoftIdentityMap+`
+* `+useSoftCacheWeakIdentityMap+`
+* `+useHardCacheWeakIdentityMap+`
+* `+useNoIdentityMap+`
+
+Use the `+ClassDescriptor+` method `+setIdentityMapSize+` to configure
+the size of the identity map.
+
+== Configuring Cache Isolation at the Descriptor Level
+
+If you plan to use
+link:Introduction%20to%20Cache%20(ELUG)#Cache_Isolation[isolated
+sessions], you must configure descriptors as isolated for any object
+that you want confined to an isolated session cache.
+
+Configuring a descriptor to be isolated means that EclipseLink will not
+store the object in the shared session cache and the object will not be
+shared across client sessions. Each client will have their own object
+read directly from the database. Objects in an isolated client session
+cache can reference objects in their parent server session’s shared
+session cache, but no objects in the shared session cache can reference
+objects in an isolated client session cache. Isolation is required when
+using Oracle Database Virtual Private Database (VPD) support or database
+user-based read security. Isolation can also be used if caching is not
+desired across client sessions.
+
+This table summarizes which descriptors support cache isolation
+configuration.
+
+[#Table 115-14]##
+
+Descriptor
+
+Using the Workbench
+
+Using Java
+
+Relational Descriptors 1
+
+Object-Relational Data Type Descriptors
+
+EIS Descriptors 2
+
+XML Descriptors
+
+1link:Creating%20a%20Relational%20Descriptor%20(ELUG)#Creating_Relational_Class_Descriptors[Relational
+Class Descriptors] only.
+2link:Creating%20an%20EIS%20Descriptor%20(ELUG)#EIS_Root_Descriptors[EIS
+Root Descriptors] only. This configuration overrides the default cache
+isolation configuration
+link:Configuring%20a%20Project%20(ELUG)#Configuring_Cache_Isolation_at_the_Project_Level[defined
+at the project level].
+
+[width="100%",cols="<100%",]
+|===
+|*Note:* If you configure a descriptor as isolated, it cannot
+participate in a coordinated cache (see
+link:#Configuring_Cache_Coordination_Change_Propagation_at_the_Descriptor_Level[Configuring
+Cache Coordination Change Propagation at the Descriptor Level]).
+|===
+
+=== How to Configure Cache Isolation at the Descriptor Level Using Workbench
+
+To specify the cache isolation options, use this procedure:
+
+[arabic]
+. Select the descriptor in the *Navigator*.
+. Select the *Caching* tab in the *Editor*. The Caching tab appears.
+*_Caching Tab, Isolation Options_* image:desisol.gif[Caching Tab,
+Isolation Options,title="Caching Tab, Isolation Options"]
+. Complete the *Isolation* options on the *Caching* tab.
+
+Use the *Isolation* list to choose one of the following:
+
+* *Isolated* – if you want all objects confined to an isolated client
+session cache. For more information, see
+link:Introduction%20to%20Cache%20(ELUG)#Cache_Isolation[Cache
+Isolation].
+* *Shared* – if you want all objects visible in the shared session cache
+(default).
+
+=== How to Configure Cache Isolation at the Descriptor Level Using Java
+
+To specify that a class is isolated, Use a
+link:#Configuring_Amendment_Methods[descriptor amendment method] to call
+`+ClassDescriptor+` method `+setIsIsolated+`, passing in a `+boolean+`
+of `+true+`.
+
+== Configuring Unit of Work Cache Isolation at the Descriptor Level
+
+Use this policy to determine how a unit of work uses a session cache for
+a specific class. This table lists the unit of work cache isolation
+options.
+
+[#Table 115-15]##
+
+Option
+
+Description
+
+Using the Session Cache After the Transaction
+
+USE_SESSION_CACHE_AFTER_TRANSACTION
+
+Objects built from new data accessed after a unit of work early
+transaction are stored in the session cache.This options is the most
+efficient as it allows the cache to be used after an early transaction.
+
+Isolating New Data After the Transaction
+
+ISOLATE_NEW_DATA_AFTER_TRANSACTION (default)
+
+Objects built from new data accessed after a unit of work early
+transaction are only stored in the unit of work.
+
+This still allows previously cached objects to be accessed in the unit
+of work after an early transaction, while ensuring that uncommitted data
+will never be put in the session cache by storing any object built from
+new data only in the unit of work
+
+Isolating the Cache after the Transaction
+
+ISOLATE_CACHE_AFTER_TRANSACTIONAfter a unit of work early transaction
+the session cache is no longer used for this class. Objects are directly
+built from the database data and only stored in the unit of work, even
+if previously cached.
+
+Note: This option may affect performance because you are bypassing the
+session cache after an early transaction.
+
+Always Isolating the Cache
+
+ISOLATE_CACHE_ALWAYS
+
+The session cache will never be used for the class. Objects are directly
+built from the database data and only stored in the unit of work. New
+objects and changes will never be merged into the session cache.
+
+Note: This option my affect performance because you are bypassing the
+session cache. However if this class is isolated or pessimistic locked
+and always accessed in a transaction, this can avoid having to build two
+copies of the object.
+
+Most of these options apply only to a unit of work in an early
+transaction, such as the following:
+
+* A unit of work that was flushed (`+write changes+`).
+* Issued a modify query.
+* Acquired a pessimistic lock.
+
+=== How to Configure Unit of Work Cache Isolation at the Descriptor Level Using Java
+
+To specify that a class is isolated, use a
+link:#Configuring_Amendment_Methods[descriptor amendment method] to call
+`+ClassDescriptor+` method `+setUnitOfWorkCacheIsolationLevel+`.
+
+== Configuring Cache Coordination Change Propagation at the Descriptor Level
+
+If you plan to use a
+link:Introduction%20to%20Cache%20(ELUG)#Cache_Coordination[coordinated
+cache], you can configure how, and under what conditions, a coordinated
+cache propagates changes for a given descriptor.
+
+This table summarizes which descriptors support cache isolation
+configuration.
+
+[#Table 115-16]##
+
+Descriptor
+
+Using the Workbench
+
+Using Java
+
+Relational Descriptors 1
+
+Object-Relational Data Type Descriptors
+
+EIS Descriptors 2
+
+XML Descriptors
+
+1link:Creating%20a%20Relational%20Descriptor%20(ELUG)#Creating_Relational_Class_Descriptors[Relational
+Class Descriptors] only.
+2link:Creating%20an%20EIS%20Descriptor%20(ELUG)#EIS_Root_Descriptors[EIS
+Root Descriptors] only. This configuration overrides the default cache
+coordination change propagation configuration defined at the project
+level (see
+link:Configuring%20a%20Project%20(ELUG)#Configuring_Cache_Coordination_Change_Propagation_at_the_Project_Level[Configuring
+Cache Coordination Change Propagation at the Project Level]).
+
+To complete your coordinated cache configuration, see
+link:Configuring%20a%20Coordinated%20Cache%20(ELUG)#Configuring_a_Coordinated_Cache[Configuring
+a Coordinated Cache].
+
+[width="100%",cols="<100%",]
+|===
+|*Note:* If you configure a descriptor as isolated (see
+link:#Configuring_Cache_Isolation_at_the_Descriptor_Level[Configuring
+Cache Isolation at the Descriptor Level]), it cannot participate in a
+coordinated cache.
+|===
+
+=== How to Configure Cache Coordination Change Propagation at the Descriptor Level Using Workbench
+
+To specify the coordinated cache change propagation options, use this
+procedure:
+
+[arabic]
+. Select the descriptor in the *Navigator*.
+. Select the *Caching* tab in the *Editor*. The Caching tab appears.
+[#Figure 115-27]##*_Caching Tab, Coordination Options_*
+image:descord.gif[Caching Tab, Coordination
+Options,title="Caching Tab, Coordination Options"]
+. Complete the *Coordination* options on the *Caching* tab.
+
+Use the following information to enter data in the *Coordination* field:
+
+[width="100%",cols="<8%,<59%,<33%",options="header",]
+|===
+|*Coordination Option* |*Description* |*When to Use*
+|*None* |For both existing and new instances, do not propagate a change
+notification. |Infrequently read or changed objects.
+
+|*Synchronize Changes* |For an existing instance, propagate a change
+notification that contains each changed attribute. For a new instance,
+propagate an object creation (along with all the new instance’s
+attributes) only if the new instance is related to other existing
+objects that are also configured with this change propagation option.
+|Frequently read or changed objects that contain few attributes or in
+cases where only a few attributes are frequently changed. Objects that
+have many or complex relationships.
+
+|*Synchronize Changes and New Objects* |For an existing instance,
+propagate a change notification that contains each changed attribute.
+For a new instance, propagate an object creation (along with all the new
+instance’s attributes). |Frequently read or changed objects that contain
+few attributes or in cases where only a few attributes are frequently
+changed. Objects that have few or simple relationships.
+
+|*Invalidate Changed Objects* |For an existing instance, propagate an
+object invalidation that marks the object as invalid in all other
+sessions. This tells other sessions that they must update their cache
+from the data source the next time this object is read. For a new
+instance, no change notification is propagated. |Frequently read or
+changed objects that contain many attributes in cases where many of the
+attributes are frequently changed.
+|===
+
+*See Also*
+
+link:#Configuring_Cache_Coordination_Change_Propagation_at_the_Descriptor_Level[Configuring
+Cache Coordination Change Propagation at the Descriptor Level]
+
+link:Configuring%20a%20Project%20(ELUG)#Configuring_Cache_Coordination_Change_Propagation_at_the_Project_Level[Configuring
+Cache Coordination Change Propagation at the Project Level]
+
+link:Introduction%20to%20Cache%20(ELUG)[Introduction to Cache]
+
+=== How to Configure Cache Coordination Change Propagation at the Descriptor Level Using Java
+
+Use a link:#Configuring_Amendment_Methods[descriptor amendment method]
+to invoke `+ClassDescriptor+` method `+setCacheSynchronizationType+`
+passing in one of the following parameters:
+
+* `+ClassDescriptor.DO_NOT_SEND_CHANGES+`
+* `+ClassDescriptor.SEND_OBJECT_CHANGES+`
+* `+ClassDescriptor.SEND_NEW_OBJECTS_WITH_CHANGES+`
+* `+ClassDescriptor.INVALIDATE_CHANGED_OBJECTS+`
+
+== Configuring Cache Expiration at the Descriptor Level
+
+By default, objects remain in the cache until they are explicitly
+deleted (see
+link:Using%20Basic%20Unit%20of%20Work%20API%20(ELUG)#Deleting_Objects[Deleting
+Objects]) or garbage-collected when using a weak identity map (see
+link:Configuring%20a%20Project%20(ELUG)#Configuring_Cache_Isolation_at_the_Project_Level[Configuring
+Cache Isolation at the Project Level]). Alternatively, you can configure
+an object with a `+CacheInvalidationPolicy+` that allows you to specify,
+either automatically or manually, that an object is invalid: when any
+query attempts to read an invalid object, EclipseLink will go to the
+data source for the most up-to-date version of that object and update
+the cache with this information.
+
+Using cache invalidation ensures that your application does not use
+stale data. It provides a better performing alternative to always
+refreshing (see link:#Configuring_Cache_Refreshing[Configuring Cache
+Refreshing]).
+
+This table summarizes which descriptors support a cache invalidation
+policy.
+
+[#Table 115-17]##
+
+Descriptor
+
+Using the Workbench
+
+Using Java
+
+Relational Descriptors 1
+
+Object-Relational Data Type Descriptors
+
+EIS Descriptors 2
+
+XML Descriptors
+
+1link:Creating%20a%20Relational%20Descriptor%20(ELUG)#Creating_Relational_Class_Descriptors[Relational
+Class Descriptors] only.
+2link:Creating%20an%20EIS%20Descriptor%20(ELUG)#EIS_Root_Descriptors[EIS
+Root Descriptors] only. You can override the project-level cache
+invalidation configuration (see
+link:Configuring%20a%20Project%20(ELUG)#Configuring_Cache_Expiration_at_the_Project_Level[Configuring
+Cache Expiration at the Project Level]) by defining cache invalidation
+at the descriptor or query level (see
+link:Using%20Advanced%20Query%20API%20(ELUG)#How_to_Configure_Cache_Expiration_at_the_Query_Level[How
+to Configure Cache Expiration at the Query Level]).
+
+You can customize how EclipseLink communicates the fact that an object
+has been declared invalid to improve efficiency, if you are using a
+coordinated cache. For more information, see
+link:#Configuring_Cache_Coordination_Change_Propagation_at_the_Descriptor_Level[Configuring
+Cache Coordination Change Propagation at the Descriptor Level].
+
+For more information, see
+link:Introduction%20to%20Cache%20(ELUG)#Cache_Invalidation[Cache
+Invalidation].
+
+=== How to Configure Cache Expiration at the Descriptor Level Using Workbench
+
+To specify the cache invalidation information for a descriptor, use this
+procedure:
+
+[arabic]
+. Select the descriptor in the *Navigator*.
+. Select the *Caching* tab in the *Editor*. The *Caching* tab appears.
+[#Figure 115-28]##*_Caching Tab, Expiration Options_*
+image:idcacexp.gif[Caching Tab, Expiration
+Options,title="Caching Tab, Expiration Options"]
+. Complete the Cache Expiry options on the tab.
+
+Use this table to enter data in the following fields on the *Caching*
+tab to specify the cache invalidation policy for the descriptors.
+
+[width="100%",cols="<12%,<88%",options="header",]
+|===
+|*Field* |*Description*
+|*Project Default* |Use the project’s cache expiration options for this
+descriptor. See
+link:Configuring%20a%20Project%20(ELUG)#Configuring_Cache_Expiration_at_the_Project_Level[Configuring
+Cache Expiration at the Project Level] for more information.
+
+|*No Expiry* |Specify that objects in the cache do not expire.
+
+|*Time to Live Expiry* |Specify that objects in the cache will expire
+after a specified amount of time. Use the *Expire After* field to
+indicate the time (in milliseconds) after which the objects will expire.
+
+|*Daily Expiry* |Specify that objects in the cache will expire at a
+specific time each day. Use the *Expire At* field to indicate the exact
+time to the second (using a 24-hour clock) at which the objects will
+expire.
+
+|*Update Read Time on Update* |Specify if EclipseLink should reset the
+cached object’s expiry time after the EclipseLink successfully updates
+the object.
+|===
+
+[width="100%",cols="<100%",]
+|===
+|*Note:* These options apply per descriptor. See
+link:Configuring%20a%20Project%20(ELUG)#Configuring_Cache_Expiration_at_the_Project_Level[Configuring
+Cache Expiration at the Project Level] for information on configuring
+project-level options.
+|===
+
+*See Also*
+
+link:#Configuring_Cache_Expiration_at_the_Descriptor_Level[Configuring
+Cache Expiration at the Descriptor Level]
+
+link:Configuring%20a%20Project%20(ELUG)#Configuring_Cache_Expiration_at_the_Project_Level[Configuring
+Cache Expiration at the Project Level]
+
+=== How to Configure Cache Expiration at the Descriptor Level Using Java
+
+Use `+ClassDescriptor+` method `+setCacheInvalidationPolicy+` to set an
+appropriate instance of `+CacheInvalidationPolicy+`.
+
+== Configuring Cache Existence Checking at the Descriptor Level
+
+When EclipseLink writes an object to the database, EclipseLink runs an
+existence check to determine whether to perform an insert or an update.
+
+When using JPA, EclipseLink checks against the database by default. When
+using the EclipseLink Native API it checks against the cache by default.
+We recommend that you use the default existence check option for most
+applications.
+
+This table summarizes which descriptors support existence checking.
+
+[#Table 115-18]##
+
+Descriptor
+
+Using the Workbench
+
+Using Java
+
+Relational Descriptors 1
+
+Object-Relational Data Type Descriptors
+
+EIS Descriptors 2
+
+XML Descriptors
+
+1link:Creating%20a%20Relational%20Descriptor%20(ELUG)#Creating_Relational_Class_Descriptors[Relational
+Class Descriptors] only.
+2link:Creating%20an%20EIS%20Descriptor%20(ELUG)#EIS_Root_Descriptors[EIS
+Root Descriptors] only. You can configure existence checking at the
+descriptor level to override the project level configuration (see
+link:Configuring%20a%20Project%20(ELUG)#Configuring_Existence_Checking_at_the_Project_Level[Configuring
+Existence Checking at the Project Level]).
+
+For more information see the following:
+
+* link:Introduction%20to%20Cache%20(ELUG)#Cache_Type_and_Object_Identity[Cache
+Type and Object Identity]
+* link:Introduction%20to%20EclipseLink%20Queries%20(ELUG)#Queries_and_the_Cache[Queries
+and the Cache]
+* link:Using%20Advanced%20Unit%20of%20Work%20API%20(ELUG)#How_to_Use_Registration_and_Existence_Checking[How
+to Use Registration and Existence Checking]
+
+=== How to Configure Cache Existence Checking at the Descriptor Level Using Workbench
+
+To specify the existence checking information for a descriptor, use this
+procedure:
+
+[arabic]
+. Select the descriptor in the *Navigator*.
+. Select the *Caching* tab in the *Editor*. The Caching tab appears.
+*_Caching Tab, Existence Checking Options_* image:idexichk.gif[Caching
+Tab, Existence Checking
+Options,title="Caching Tab, Existence Checking Options"]
+. Complete the *Existence Checking* options on the tab.
+
+Use this table to enter data in the following fields of the tab to
+specify the existence checking options for newly created descriptors:
+
+[width="100%",cols="<9%,<91%",options="header",]
+|===
+|*Field* |*Description*
+|*Check Cache* |Check the session cache. If the object is not in the
+cache, assume that the object does not exist (do an insert). If the
+object is in the cache, assume that the object exists (do an update). We
+recommend using this option for most applications.
+
+|*Check Cache then Database* |If an object is not in the cache, query
+the database to determine if the object exists. If the object exists, do
+an update. Otherwise, do an insert. Selecting this option may negatively
+impact performance. For more information, see
+link:Using%20Advanced%20Unit%20of%20Work%20API%20(ELUG)#Using_Check_Database[Using
+Check Database].
+
+|*Assume Existence* |Always assume objects exist: always do an update
+(never do an insert). For more information, see
+link:Using%20Advanced%20Unit%20of%20Work%20API%20(ELUG)#Using_Assume_Existence[Using
+Assume Existence].
+
+|*Assume Non-Existence* |Always assume objects do not exist: always do
+an insert (never do an update). For more information, see
+link:Using%20Advanced%20Unit%20of%20Work%20API%20(ELUG)#Using_Assume_Nonexistence[Using
+Assume Nonexistence].
+|===
+
+=== How to Configure Cache Existence Checking at the Descriptor Level Using Java
+
+To configure existence checking at the descriptor level using Java, use
+`+ClassDescriptor+` method `+getQueryManager+` to acquire the
+`+DescriptorQueryManager+` from the descriptor and then use one of the
+following `+DescriptorQueryManager+` methods (see the
+link:#Example_115-8[Configuring Existence Checking Using Java] example):
+
+* `+checkCacheForDoesExist+` – check the session cache. If the object is
+not in the cache, assume that the object does not exist (do an insert).
+If the object is in the cache, assume that the object exists (do an
+update). We recommend using this option for most applications.
+* `+checkDatabaseForDoesExist+` – if an object is not in the cache,
+query the database to determine if the object exists. If the object
+exists, do an update. Otherwise, do an insert. Selecting this option may
+negatively impact performance. For more information, see
+link:Using%20Advanced%20Unit%20of%20Work%20API%20(ELUG)#Using_Check_Database[Using
+Check Database].
+* `+assumeExistenceForDoesExist+` – always assume objects exist: always
+do an update (never do an insert). For more information, see
+link:Using%20Advanced%20Unit%20of%20Work%20API%20(ELUG)#Using_Assume_Existence[Using
+Assume Existence].
+* `+assumeNonExistenceForDoesExist+` – always assume objects do not
+exist: always do an insert (never do an update). For more information,
+see
+link:Using%20Advanced%20Unit%20of%20Work%20API%20(ELUG)#Using_Assume_Nonexistence[Using
+Assume Nonexistence].
+
+[#Example 115-8]## *_Configuring Existence Checking Using Java_*
+
+`+descriptor.getQueryManager().checkCacehForDoesExist();+`
+
+== Configuring Reading Subclasses on Queries
+
+If you are mapping an inheritance hierarchy, by default, queries on root
+or branch classes return instances of the root class and their
+subclasses.
+
+Alternatively, you can configure a root or branch class descriptor to do
+the following:
+
+* not include subclasses when the root or branch class is queried;
+* outer-join subclasses when the root or branch class is queried.
+
+You can also specify a database view to optimize the reading of
+subclasses. The view can be used to optimize queries for root or branch
+classes that have subclasses spanning multiple tables. The view must
+apply an outer-join or union all of the subclass tables.
+
+Do not configure this option for leaf classes.
+
+This table summarizes which descriptors support inherited attribute
+mapping configuration.
+
+[#Table 115-19]##
+
+Descriptor
+
+Using the Workbench
+
+Using Java
+
+Relational Descriptors
+
+Object-Relational Data Type Descriptors
+
+EIS Descriptors
+
+XML Descriptors
+
+For more information, see
+link:Introduction%20to%20Descriptors%20(ELUG)#Descriptors_and_Inheritance[Descriptors
+and Inheritance].
+
+=== How to Configure Reading Subclasses on Queries Using Workbench
+
+To configure reading classes on subqueries, use this procedure:
+
+[arabic]
+. In the *Navigator*, select a root or branch descriptor.If the
+*Inheritance* advanced property is not visible for the descriptor,
+right-click the descriptor and choose *Select Advanced Properties* >
+*Inheritance* from context menu or from the *Selected* menu.
+. Click the *Inheritance* tab. *_Inheritance Tab, Read Subclasses on
+Query Option_* image:inhrqury.gif[Inheritance Tab, Read Subclasses on
+Query Option,title="Inheritance Tab, Read Subclasses on Query Option"]
+. Enter data in the Read Subclasses on Query section on the
+*Inheritance* tab.
+
+Use the following information to enter data in Read Subclasses on Query
+and Read Subclasses View fields of the tab:
+
+[width="100%",cols="<21%,<79%",options="header",]
+|===
+|*Field* |*Description*
+|*Read Subclasses on Query* |Select this option to configure the root
+class descriptor to instantiate a subclass when the root class is
+queried.
+
+|*Read Subclasses View* |Optionally select a database view to use for
+reading subclasses.
+
+|*Outer Join All Subclasses* |Optionally use the
+`+outerJoinAllSubclsses+` option to optimize the query.
+|===
+
+*See Also*
+
+link:#Configuring_Reading_Subclasses_on_Queries[Configuring Reading
+Subclasses on Queries]
+
+=== How to Configure Reading Subclasses on Queries Using Java
+
+Create a link:#Configuring_Amendment_Methods[descriptor amendment
+method] to customize the root or branch class descriptor’s
+`+InheritancePolicy+`.
+
+This example shows an amendment method for the `+Person+` class. In this
+example, you use the `+InheritancePolicy+` method
+`+dontReadSubclassesOnQueries+` to configure the descriptor so that
+subclasses are not read on queries.
+
+[#Example 115-9]## *_Configuring Reading Subclasses on Queries_*
+
+`+...+`
+`+public static void addToPersonDescriptor(Descriptor descriptor) {+`
+`+ descriptor.getInheritancePolicy().dontReadSubclassesOnQueries();+`
+`+}+` `+...+`
+
+This example shows an amendment method for the `+Person+` class. In this
+example, you use the `+InheritancePolicy+` method
+`+setReadAllSubclassesViewName+` to optimize multiple table inheritance
+queries.
+
+[#Example 115-10]## *_Configuring Reading Subclasses on Queries Using a
+View Name_*
+
+`+...+`
+`+public static void addToPersonDescriptor(Descriptor descriptor) {+`
+`+ descriptor.getInheritancePolicy().setReadAllSubclassesViewName(myView);+`
+`+}+` `+...+`
+
+This example shows an amendment method for the `+Person+` class. In this
+example, you use the `+InheritancePolicy+` method
+`+setShouldOuterJoinSubclasses+` to configure the descriptor so that
+subclasses are outer-joined on queries.
+
+[#Example 115-11]## *_Configuring Outer-Joining Subclasses on Queries_*
+
+`+...+`
+`+public static void addToPersonDescriptor(Descriptor descriptor) {+`
+`+ descriptor.getInheritancePolicy().setShouldOuterJoinSubclasses(true);+`
+`+}+` `+...+`
+
+== Configuring Inheritance for a Child (Branch or Leaf) Class Descriptor
+
+Inheritance describes how a derived (child) class inherits the
+characteristics of its superclass (parent). When you designate a class
+as a child, you must also specify the descriptor that represents the
+child’s parent in your inheritance hierarchy.
+
+This table summarizes which descriptors support child inheritance
+configuration.
+
+[#Table 115-20]##
+
+Descriptor
+
+Using the Workbench
+
+Using Java
+
+Relational Descriptors
+
+Object-Relational Data Type Descriptors
+
+EIS Descriptors
+
+XML Descriptors
+
+For more information about inheritance, see
+link:Introduction%20to%20Descriptors%20(ELUG)#Descriptors_and_Inheritance[Descriptors
+and Inheritance].
+
+For more information about configuring inheritance for a parent (root)
+class descriptor, see
+link:#Configuring_Inheritance_for_a_Parent_(Root)_Descriptor[Configuring
+Inheritance for a Parent (Root) Descriptor].
+
+=== How to Configure Inheritance for a Child (Branch or Leaf) Class Descriptor Using Workbench
+
+To create a child (branch or leaf class) for an inheritance, use this
+procedure.
+
+[arabic]
+. In the *Navigator*, select the descriptor you wish to specify as a
+child.
+. Choose the *Inheritance* tab in the *Property* window.If the
+*Inheritance* tab is not visible, right-click the descriptor and choose
+*Select Advanced Properties* > *Inheritance*.
+. Select the *Is Child Descriptor* option to specify this descriptor is
+a child class. The *Parent Descriptor* list is now enabled and the class
+indicator information is disabled. *_Inheritance Tab, Child Descriptor
+Option_* image:inhbr_lf.gif[Inheritance Tab, Child Descriptor
+Option,title="Inheritance Tab, Child Descriptor Option"]
+. Complete each child descriptor option on the Inheritance tab.
+
+Use the following information to enter data in each child descriptor
+field on the tab:
+
+[width="100%",cols="<12%,<88%",options="header",]
+|===
+|*Field* |*Description*
+|*Is Child Descriptor* |Specify that this descriptor is a child class to
+be used in a branch or leaf.
+
+|*Parent Descriptor* |Use the list to select the parent of this
+descriptor. See
+link:Introduction%20to%20Descriptors%20(ELUG)#Descriptors_and_Inheritance[Descriptors
+and Inheritance] for more information.
+|===
+
+*See Also*
+
+link:#Configuring_Inheritance_for_a_Child_(Branch_or_Leaf)_Class_Descriptor[Configuring
+Inheritance for a Child (Branch or Leaf) Class
+Descriptor]link:#Configuring_Inheritance_for_a_Child_(Branch_or_Leaf)_Class_Descriptor[Configuring
+Inheritance for a Child (Branch or Leaf) Class Descriptor]
+
+link:Introduction%20to%20Descriptors%20(ELUG)#Descriptors_and_Inheritance[Descriptors
+and Inheritance]
+
+=== How to Configure Inheritance for a Child (Branch or Leaf) Class Descriptor Using Java
+
+Using Java, you can configure an inheritance child descriptor using
+`+InheritancePolicy+` method `+setParentClass+`, as this example shows.
+
+[#Example 115-12]## *_Configuring an Inheritance Child Descriptor_*
+
+`+descriptor.getInheritancePolicy().setParentClass(ChildClass.class);+`
+
+== Configuring Inheritance for a Parent (Root) Descriptor
+
+Inheritance describes how a derived (child) class inherits the
+characteristics of its superclass (parent). When you designate a class
+as a parent, you can configure how EclipseLink handles the class’s
+inheritance hierarchy.
+
+The following table summarizes which descriptors support parent
+inheritance configuration.
+
+[#Table 115-21]##
+
+Descriptor
+
+Using the Workbench
+
+Using Java
+
+Relational Descriptors
+
+Object-Relational Data Type Descriptors
+
+EIS Descriptors
+
+XML Descriptors
+
+For more information about configuring inheritance for a child (branch
+or leaf) class descriptor, see
+link:#Configuring_Inheritance_for_a_Child_(Branch_or_Leaf)_Class_Descriptor[Configuring
+Inheritance for a Child (Branch or Leaf) Class Descriptor].
+
+For more information, see
+link:Introduction%20to%20Descriptors%20(ELUG)#Descriptors_and_Inheritance[Descriptors
+and Inheritance].
+
+=== How to Configure Inheritance for a Parent (Root) Descriptor Using Workbench
+
+To create a root class for an inheritance, use this procedure.
+
+[arabic]
+. In the *Navigator*, select the descriptor you wish to specify as the
+root.
+. Choose the *Inheritance* tab in the *Property* window.If the
+*Inheritance* tab is not visible, right-click the descriptor and choose
+*Select Advanced Properties* > *Inheritance*.
+. Select the *Is Root Parent Descriptor* option to specify this
+descriptor is a root class. [#Figure 115-32]##*_Inheritance Tab,
+Configuring Inheritance for a Root Descriptor_*
+image:didoeis.gif[Inheritance Tab, Configuring Inheritance for a Root
+Descriptor,title="Inheritance Tab, Configuring Inheritance for a Root Descriptor"]
+. Complete each root descriptor option on the Inheritance tab.
+
+Use this table to complete the following root descriptor field on the
+Inheritance tab:
+
+[width="100%",cols="<12%,<88%",options="header",]
+|===
+|*Field* |*Description*
+|*Is Root Parent Descriptor* |Select this option to specify this
+descriptor as the root (parent) of the inheritance hierarchy.
+
+|*Use Class Extraction Method* |Choose this option to specify a class
+indicator using a class extraction method, and select your static class
+extraction method from the list. For more information, see
+link:Introduction%20to%20Descriptors%20(ELUG)#Using_Class_Extraction_Methods[Using
+Class Extraction Methods].
+
+|*Use Class Indicator Field* |Choose this option to specify a class
+indicator using a class indicator field. For more information, see
+link:Introduction%20to%20Descriptors%20(ELUG)#Using_Class_Indicator_Fields[Using
+Class Indicator Fields].
+
+|*Field Selection* |Choose the field to use as the class indicator
+field.
+
+|*Use XML Schema "`Type`" Attribute*1 |Select this option to use the
+type attribute specified in the XML schema for this descriptor’s
+reference class.
+
+|*Specify Field* |For a relational descriptor, select the field of the
+database table associated with this descriptor (see
+link:Configuring%20a%20Relational%20Descriptor%20(ELUG)#Configuring_Associated_Tables[Configuring
+Associated Tables]). For an EIS root descriptor (using XML records) or
+an XML descriptor, click *Browse* to select an element attribute or text
+node.
+
+|*Indicator Selection* |Choose between using a class name as the class
+indicator field value or specifying specific class indicator field
+values for each (nonabstract) child class.
+
+|*Use Class Name as Indicator* |Choose this option to use class names as
+the class indicator field value.
+
+|*Use Class Indicator Dictionary* |Choose this option to specify
+specific class indicator field values for each (nonabstract) child
+class. When you choose this option, you must specify the data type of
+the class indicator field and the specific class indicator field values
+for each (nonabstract) child class.
+
+|*Indicator Type* |Select the data type from the list to specify the
+data type of the class indicator field. To specify the specific class
+indicator field values for each (nonabstract) child class, click *Edit*
+and enter the appropriate value for each child class.
+|===
+
+1EIS root (see
+link:Creating%20an%20EIS%20Descriptor%20(ELUG)#EIS_Root_Descriptors[EIS
+Root Descriptors]) or XML descriptors (see
+link:Introduction%20to%20XML%20Descriptors%20(ELUG)#XML_Descriptor_Concepts[XML
+Descriptor Concepts]) only.
+
+=== How to Configure Inheritance for a Parent (Root) Descriptor Using Java
+
+Create a link:#Configuring_Amendment_Methods[descriptor amendment
+method] to customize the root class descriptor’s inheritance policy
+using `+InheritancePolicy+` methods `+setParentClass+`,
+`+setClassIndicatorFieldName+`, `+addClassIndicator+`,
+`+useClassNameAsIndicator+` and `+setClassExtractionMethodName+`, as
+required.
+
+The following example shows amendment methods for the `+Person+` and
+`+Student+` classes where `+Student+` extends `+Person+` in a relational
+project. In this example, a class indicator field is used (see
+link:Introduction%20to%20Descriptors%20(ELUG)#Using_Class_Indicator_Fields[Using
+Class Indicator Fields]).
+
+[#Example 115-13]## *_Configuring Inheritance for a Relational Root
+Class_*
+
+`+...+`
+`+public static void addToPersonDescriptor(Descriptor descriptor) {+`
+`+ descriptor.getInheritancePolicy().setClassIndicatorFieldName("CLIENT_TYPE");+`
+`+ descriptor.getInheritancePolicy().addClassIndicator(Student.class, indicator);+`
+`+}+`
+
+`+public static void addToStudentDescriptor(Descriptor descriptor) {+`
+`+ descriptor.getInheritancePolicy().setParentClass(Person.class);+`
+`+}+` `+...+`
+
+If you are using a class-extraction method (see
+link:Introduction%20to%20Descriptors%20(ELUG)#Using_Class_Extraction_Methods[Using
+Class Extraction Methods]), you may also need to use
+`+InheritancePolicy+` methods `+setOnlyInstancesExpression+` and
+`+setWithAllSubclassesExpression+` (see
+link:#Configuring_Inheritance_Expressions_for_a_Parent_(Root)_Class_Descriptor[Configuring
+Inheritance Expressions for a Parent (Root) Class Descriptor]).
+
+The following example shows amendment methods for the `+Person+` and
+`+Student+` classes where `+Student+` extends `+Person+` in an EIS
+project using XML records. In this example, a class indicator field is
+used (see
+link:Introduction%20to%20Descriptors%20(ELUG)#Using_Class_Indicator_Fields[Using
+Class Indicator Fields]).
+
+[#Example 115-14]## *_Configuring Inheritance for an EIS Root Class_*
+
+`+...+`
+`+public static void addToPersonDescriptor(Descriptor descriptor) {+`
+`+ descriptor.getInheritancePolicy().setClassIndicatorField(new XMLField("@CLIENT_TYPE"));+`
+`+ descriptor.getInheritancePolicy().addClassIndicator(Student.class, indicator);+`
+`+}+`
+
+`+public static void addToStudentDescriptor(Descriptor descriptor) {+`
+`+ descriptor.getInheritancePolicy().setParentClass(Person.class);+`
+`+ descriptor.getInheritancePolicy().setClassIndicatorField(new XMLField("@CLIENT_TYPE"));+`
+`+}+` `+...+`
+
+== Configuring Inheritance Expressions for a Parent (Root) Class Descriptor
+
+If your class uses inheritance (see
+link:Introduction%20to%20Descriptors%20(ELUG)#Descriptors_and_Inheritance[Descriptors
+and Inheritance]) with a class extraction method (see
+link:Introduction%20to%20Descriptors%20(ELUG)#Using_Class_Extraction_Methods[Using
+Class Extraction Methods]) you must provide EclipseLink with expressions
+to correctly filter sibling instances for all classes that share a
+common table.
+
+This table summarizes which descriptors support inheritance expression
+configuration.
+
+[#Table 115-22]##
+
+Descriptor
+
+How to Use Workbench
+
+Using Java
+
+Relational Descriptors
+
+Object-Relational Data Type Descriptors
+
+EIS Descriptors
+
+XML Descriptors
+
+The link:#Figure_115-33[Example Inheritance Hierarchy] figure shows a
+typical inheritance hierarchy. In this example, instances of both
+`+Person+` and `+Student+` are stored in the same `+PERSON+` table, as
+the link:#Figure_115-34[PERSON Table] figure shows: an instance of
+`+Person+` has a `+null+` value for `+STUDENT_NUMBER+`. Instances of
+`+Company+` are stored in a separate `+COMPANY+` table.
+
+[#Figure 115-33]## *_Example Inheritance Hierarchy_*
+
+.Example Inheritance Hierarchy
+image::isinst.gif[Example Inheritance
+Hierarchy,title="Example Inheritance Hierarchy"]
+
+[#Figure 115-34]## *_PERSON Table_*
+
+.PERSON Table
+image::perstbl.gif[PERSON Table,title="PERSON Table"]
+
+Queries on inheritance classes that share a common table, such as
+`+Person+` and `+Student+`, must filter out their sibling instances.
+EclipseLink performs this filtering using the `+Expression+` instances
+returned by the descriptor’s `+InheritancePolicy+` methods
+`+getOnlyInstancesExpression+` and `+getWithAllSubclassesExpression+`.
+
+Queries on a class that has its own table for its specific data, such as
+`+Company+`, and does not share this table with any sibling classes, do
+not require these expressions.
+
+If you use a class indicator type field (see
+link:Introduction%20to%20Descriptors%20(ELUG)#Using_Class_Indicator_Fields[Using
+Class Indicator Fields]), EclipseLink automatically generates the
+required expressions.
+
+If you use a class extraction method (see
+link:Introduction%20to%20Descriptors%20(ELUG)#Using_Class_Extraction_Methods[Using
+Class Extraction Methods]), you must provide EclipseLink with an
+expressions to correctly filter sibling instances for all classes that
+share a common table.
+
+For concrete classes, you must define an only- instances expression.
+
+For branch classes, you must define a with-all-subclasses expression.
+
+When EclipseLink queries for a leaf class, it uses the only- instances
+expression to filter out any sibling classes.
+
+When EclipseLink queries for a root or branch class whose subclasses do
+not define their own tables, it uses the with-all-subclasses expression.
+This is also the case when a subclass view is used (see
+link:#Configuring_Reading_Subclasses_on_Queries[Configuring Reading
+Subclasses on Queries]).
+
+When querying for a root or branch class that has subclasses that span
+multiple tables, a query is performed for each concrete class in the
+inheritance hierarchy using the only- instances expression to filter
+sibling classes.
+
+When a class extraction method is used the only-instances expression is
+used to determine if a class is concrete. If a class does not require an
+only instances expression, do not enable reading subclasses on queries
+(see link:#Configuring_Reading_Subclasses_on_Queries[Configuring Reading
+Subclasses on Queries]), otherwise EclipseLink will assume that the
+class has no instances and it will skip that class on queries.
+
+For more information about inheritance expressions, see
+link:Introduction%20to%20Descriptors%20(ELUG)#Specifying_Expressions_for_Only-Instances_and_With-All-Subclasses[Specifying
+Expressions for Only-Instances and With-All-Subclasses].
+
+=== How to Configure Inheritance Expressions for a Parent (Root) Class Descriptor Using Java
+
+Create a link:#Configuring_Amendment_Methods[descriptor amendment
+method] to customize the root class descriptor’s `+InheritancePolicy+`
+using `+InheritancePolicy+` methods `+setOnlyInstancesExpression+` and
+`+setWithAllSubclassesExpression+`, as required.
+
+This example shows amendment methods for the `+Person+` and `+Student+`
+descriptors based on the class hierarchy shown in the
+link:#Figure_115-33[Example Inheritance Hierarchy] figure and the
+database table shown in the link:#Figure_115-34[PERSON Table] figure.
+
+[#Example 115-15]## *_Configuring Only-Instances Expressions_*
+
+`+...+`
+*`+//\'\' \'\'Only-instances\'\' \'\'expression\'\' \'\'for\'\' \'\'Person+`*
+`+public static void addToPersonDescriptor(Descriptor descriptor) {+`
+`+ ExpressionBuilder builder = new ExpressionBuilder();+`
+`+ descriptor.getInheritancePolicy().setOnlyInstancesExpression(+`
+`+ builder.getField("STUDENT_NUMBER").isNull());+`
+`+}+`
+
+*`+//\'\' \'\'Only-instances\'\' \'\'expression\'\' \'\'for\'\' \'\'Student+`*
+`+public static void addToStudentDescriptor(Descriptor descriptor) {+`
+`+ ExpressionBuilder builder = new ExpressionBuilder();+`
+`+ descriptor.getInheritancePolicy().setOnlyInstancesExpression(+`
+`+ builder.getField("STUDENT_NUMBER").notNull());+`
+`+}+` `+...+`
+
+The link:#Example_115-16[Configuring Only-Instances and
+With-All-Subclasses Expressions] example shows amendment methods for the
+`+Bicycle+` and `+NonFueledVehicle+` descriptors based on the class
+hierarchy shown in link:Introduction%20to%20Descriptors%20(ELUG)[Figure
+14-1] if the vehicle hierarchy stored all of the classes in a single
+vehicle table, and there was not a class indicator, but a class
+extraction method instead.
+
+[#Example 115-16]## *_Configuring Only-Instances and With-All-Subclasses
+Expressions_*
+
+*`+//\'\' \'\'Bicycle\'\' \'\'amemndment+`*
+`+public static void addToBicycleDescriptor(Descriptor descriptor) {+`
+`+ ExpressionBuilder builder = new ExpressionBuilder();+`
+`+ descriptor.getInheritancePolicy().setOnlyInstancesExpression(+`
+`+ builder.getField("BICYCLE_DESCR").notNull());+`
+`+}+`
+
+*`+//\'\' \'\'NonFueldVehicle\'\' \'\'ammendment+`*
+`+public static void addToNonFueledVehicleDescriptor(Descriptor descriptor) {+`
+`+ ExpressionBuilder builder = new ExpressionBuilder();+`
+`+ descriptor.getInheritancePolicy().setWithAllSubclassesExpression(+`
+`+ builder.getField("FUEL_TYPE").isNull());+`
+`+}+`
+
+== Configuring Inherited Attribute Mapping in a Subclass
+
+If you are defining the descriptor for a class that inherits attributes
+from another class, then you can create mappings for those attributes.
+If you remap an attribute that was already mapped in the superclass,
+then the new mapping applies to the subclass only. Any other siblings
+that inherit the attribute are unaffected.
+
+If you leave inherited attributes unmapped, EclipseLink uses the mapping
+(if any) from the superclass if the superclass’s descriptor has been
+designated as the parent descriptor.
+
+This table summarizes which descriptors support inherited attribute
+mapping configuration.
+
+[#Table 115-23]## *_Descriptor Support for Inherited Attribute Mapping
+Configuration_*
+
+Descriptor
+
+Using the Workbench
+
+Using Java
+
+Relational Descriptors
+
+Object-Relational Data Type Descriptors
+
+EIS Descriptors
+
+XML Descriptors
+
+For more information, see
+link:Introduction%20to%20Descriptors%20(ELUG)#Descriptors_and_Inheritance[Descriptors
+and Inheritance].
+
+=== How to Configure Inherited Attribute Mapping in a Subclass Using Workbench
+
+To map inherited attributes, use this procedure:
+
+[arabic]
+. In the *Navigator*, right-click a descriptor and choose *Map Inherited
+Attributes* > _selected class_ from the context menu or choose
+*Selected* > *Map Inherited Attributes* from the menu.The mappings list
+now includes all the attributes from the superclass of this class.
+. Map any desired attributes. See
+link:Creating%20a%20Mapping%20(ELUG)[Creating a Mapping] for more
+information.
+
+=== How to Configure Inherited Attribute Mapping in a Subclass Using Java
+
+Using Java, attributes inherited by a subclass from a superclass will be
+visible and you can always create a mapping to these inherited
+attributes.
+
+== Configuring a Domain Object Method as an Event Handler
+
+You can associate a domain object method with any of the descriptor
+events shown in the link:#Table_115-25[Descriptor Events] table. You can
+register any domain object method that complies with the following
+criteria:
+
+* Is public.
+* Returns void.
+* Takes a single parameter of type `+DescriptorEvent+`
+
+This table summarizes which descriptors support domain object method
+event handler configuration.
+
+[#Table 115-24]## *_Descriptor Support for Domain Object Method Event
+Handler Configuration_*
+
+Descriptor
+
+Using the Workbench
+
+Using Java
+
+Relational Descriptors
+
+Object-Relational Data Type Descriptors
+
+EIS Descriptors
+
+XML Descriptors
+
+For example, you can add a method `+handlePostDelete+` (that is public,
+returns void, and takes a single parameter of type `+DescriptorEvent+`)
+to your `+Employee+` object to handle `+PostDeleteEvent+` descriptor
+events. After you register that method with the
+`+DescriptorEventManager+` owned by the `+Employee+` object’s descriptor
+as the handler for `+PostDeleteEvent+` descriptor events, whenever the
+EclipseLink runtime performs a post-delete operation on an instance of
+the `+Employee+` object, the runtime dispatches a `+PostDeleteEvent+` to
+the `+handlePostDelete+` method on the instance of the `+Employee+`
+object associated with that `+PostDeleteEvent+`.
+
+The *Descriptor Event ID* column in the link:#Table_115-25[Descriptor
+Events] table lists the `+DescriptorEventManager+` field name used to
+identify a particular event. The `+DescriptorEvent+` method
+`+getEventCode+` returns this value. For example:
+
+`+if (descriptorEvent.getEventCode() == DescriptorEventManager.PreUpdateEvent) {+`
+`+ +`*`+//\'\' \'\'descriptorEvent\'\' \'\'represents\'\' \'\'a\'\' \'\'pre-update\'\' \'\'event+`*
+`+}+`
+
+[#Table 115-25]## *_Descriptor Events_*
+
+Category
+
+Descriptor Event ID
+
+Description
+
+Delete
+
+PreDeleteEvent
+
+Occurs before an object is deleted from the data source.
+
+AboutToDeleteEvent
+
+Occurs when an object is deleted from the data source.
+
+PostDeleteEvent
+
+Occurs after an object is deleted from the data source.
+
+Insert
+
+PreInsertEvent
+
+Occurs before an object is inserted in the data source.
+
+AboutToInsertEvent
+
+Occurs when an object is inserted in the data source.
+
+PostInsertEvent
+
+Occurs after an object is inserted into the data source.
+
+Post-X
+
+PostBuildEvent
+
+Occurs after an object is built from the data source.
+
+PostCloneEvent
+
+Occurs after an object has been cloned into a unit of work.
+
+PostMergeEvent
+
+Occurs after an object has been merged from a unit of work.
+
+PostRefreshEvent
+
+Occurs after an object is refreshed from the data source.
+
+Update
+
+PreUpdateEvent
+
+Occurs before an object is updated in the data source. This may be
+called in a unit of work even if the object has no changes and does not
+require updating.
+
+AboutToUpdateEvent
+
+Occurs when an object is updated in the data source. This method is
+called only if the object has changes in the unit of work.
+
+PostUpdateEvent
+
+Occurs after an object is updated in the data source.
+
+Write
+
+PreWriteEvent
+
+Occurs before an object is inserted or updated in the data source. This
+occurs before PreInsertEvent and PreUpdateEvent.
+
+PostWriteEvent
+
+Occurs after an object is inserted or updated in the data source. This
+occurs after PostInsertEvent and PostUpdateEvent.
+
+Alternatively, you can configure a descriptor event listener as an event
+handler (see
+link:#Configuring_a_Descriptor_Event_Listener_as_an_Event_Handler[Configuring
+a Descriptor Event Listener as an Event Handler]).
+
+=== How to Configure a Domain Object Method as an Event Handler Using Workbench
+
+To select event methods, use this procedure:
+
+[arabic]
+. Select a descriptor in the *Navigator*. Its properties appear in the
+Editor.If the *Events* advanced property is not visible for the
+descriptor, then right-click the descriptor and choose *Select Advanced
+Properties* > *Events* from context menu or from the *Selected* menu.
+. Click the *Event* tab in the *Editor*. [#Figure 115-35]##*_Events
+Tab_* image:descevt.gif[Description of
+follows,title="Description of follows"]
+. Select the appropriate method category from the list on the left.
+. Choose the appropriate domain object method for each method in that
+category.
+
+Use this table to enter data in the following fields to select the
+appropriate domain object method:
+
+Category
+
+Option
+
+Description
+
+Deleting Methods
+
+Pre
+
+Select the domain object method that is invoked on an instance of its
+reference class before the instance is deleted from the data source.
+
+Post
+
+Select the domain object method that is invoked on an instance of its
+reference class after the instance is deleted from the data source.
+
+Inserting Methods
+
+Pre
+
+Select the domain object method that is invoked on an instance of its
+reference class before the instance is inserted in the data source.
+
+About To
+
+Select the domain object method that is invoked on an instance of its
+reference class when the instance is inserted in the data source.
+
+Post
+
+Select the domain object method that is invoked on an instance of its
+reference class after the instance is inserted into the data source.
+
+Post-X Methods
+
+Build
+
+Select the domain object method that is invoked on an instance of its
+reference class after the instance is built from the data source.
+
+Clone
+
+Select the domain object method that is invoked on an instance of its
+reference class after the instance is cloned into a unit of work.
+
+Merge
+
+Select the domain object method that is invoked on an instance of its
+reference class after the instance is merged from a unit of work.
+
+Refresh
+
+Select the domain object method that is invoked on an instance of its
+reference class after the instance is refreshed from the data source.
+
+Updating Methods
+
+Pre
+
+Select the domain object method that is invoked on an instance of its
+reference class before the instance is updated in the data source. This
+may be called in a unit of work even if the object has no changes and
+does not require updating.
+
+About to
+
+Select the domain object method that is invoked on an instance of its
+reference class when the instance is updated in the data source. This
+method is called only if the object has changes in the unit of work.
+
+Post
+
+Select the domain object method that is invoked on an instance of its
+reference class after the instance is updated in the data source.
+
+Writing Methods
+
+Pre
+
+Select the domain object method that is invoked on an instance of its
+reference class before the instance is inserted or updated in the data
+source. Note: This occurs before Pre-Insert and Pre-Update event methods
+are invoked.
+
+Post
+
+Select the domain object method that is invoked on an instance of its
+reference class after the instance is inserted or updated in the data
+source. Note: This occurs after Post-Insert or Post-Update event methods
+are invoked.
+
+=== How to Configure a Domain Object Method as an Event Handler Using Java
+
+The link:#Example_115-17[Domain Object Method as a Descriptor Event
+Handler] example shows a domain object class with method
+`+handlePostDelete+` defined to handle `+PostDeleteEvent+` descriptor
+events. The link:#Example_115-18[Registering a Domain Object Method as a
+Descriptor Event Handler] example shows how to register this method as
+the `+PostDeleteEvent+` event handler. Whenever the EclipseLink runtime
+performs a post-delete operation on an instance of `+Employee+`, the
+runtime will dispatch a `+PostDeleteEvent+` to the
+`+DescriptorEventManager+` owned by the `+Employee+` object’s
+descriptor. The `+DescriptorEventManager+` will then invoke the
+`+handlePostDelete+` method on the instance of `+Employee+` associated
+with that `+PostDeleteEvent+`.
+
+[#Example 115-17]## *_Domain Object Method as a Descriptor Event
+Handler_*
+
+`+public class Employee {+`
+`+ +`*`+//\'\' \'\'domain\'\' \'\'object\'\' \'\'methods+`*
+`+ ...+`
+`+ public void handlePostDelete(DescriptorEvent event) {+`
+`+ +`*`+//\'\' \'\'handler\'\' \'\'implementation+`* `+ }+`
+`+}+`
+
+[#Example 115-18]## *_Registering a Domain Object Method as a Descriptor
+Event Handler_*
+
+`+employeeDescriptor.getEventManager().setPostDeleteSelector("handlePostDelete");+`
+
+== Configuring a Descriptor Event Listener as an Event Handler
+
+You can create your own `+DescriptorEventListner+` and register it with
+a `+DescriptorEventManager+` in a descriptor amendment method. You can
+also configure a `+DescriptorEventListner+` to be notified of events
+through the Java event model.
+
+You can register any object that implements the
+`+DescriptorEventListener+` interface with the
+`+DescriptorEventManager+` owned by a domain object’s descriptor to
+handle any descriptor event type (see the link:#Table_115-27[Descriptor
+Events] table). To quickly implement this interface, you can extend
+abstract class `+DescriptorEventAdapter+` and override only the methods
+for the events you are interested in.
+
+This table summarizes which descriptors support descriptor event
+listener configuration.
+
+[#Table 115-26]## *_Descriptor Support for Descriptor Event Listener
+Configuration_*
+
+Descriptor
+
+Using the Workbench
+
+Using Java
+
+Relational Descriptors
+
+Object-Relational Data Type Descriptors
+
+EIS Descriptors
+
+XML Descriptors
+
+For example, you create a `+DescriptorEventListener+` to handle
+`+PostBuildEvent+` descriptor events for `+Employee+` objects. After you
+register this `+DescriptorEventListener+` with the
+`+DescriptorEventManager+` owned by the `+Employee+` object’s
+descriptor, whenever the EclipseLink runtime performs a post-build
+operation on an instance of `+Employee+`, the runtime dispatches a
+`+PostBuilEvent+` to the event listener’s `+postBuild+` method.
+
+The link:#Table_115-27[Descriptor Events] table lists the
+`+DescriptorEventListener+` methods associated with each descriptor
+event. The *Descriptor Event Listener Method* column lists the
+`+DescriptorEventListener+` methods associated with each
+`+DescriptorEvent+`.
+
+[#Table 115-27]## *_Descriptor Events_*
+
+Category
+
+Descriptor Event Listener Method
+
+Description
+
+Delete
+
+preDelete
+
+Occurs before an object is deleted from the data source.
+
+aboutToDelete
+
+Occurs when an object is deleted from the data source.
+
+postDelete
+
+Occurs after an object is deleted from the data source.
+
+Insert
+
+preInsert
+
+Occurs before an object is inserted in the data source.
+
+aboutToInsert
+
+Occurs when an object is inserted in the data source.
+
+postInsert
+
+Occurs after an object is inserted into the data source.
+
+Post-X
+
+postBuild
+
+Occurs after an object is built from the data source.
+
+postClone
+
+Occurs after an object has been cloned into a unit of work.
+
+postMerge
+
+Occurs after an object has been merged from a unit of work.
+
+postRefresh
+
+Occurs after an object is refreshed from the data source.
+
+Update
+
+preUpdate
+
+Occurs before an object is updated in the data source. This may be
+called in a unit of work even if the object has no changes and does not
+require updating.
+
+aboutToUpdate
+
+Occurs when an object is updated in the data source. This method is
+called only if the object has changes in the unit of work.
+
+postUpdate
+
+Occurs after an object is updated in the data source.
+
+Write
+
+preWrite
+
+Occurs before an object is inserted or updated in the data source. This
+occurs before PreInsertEvent and PreUpdateEvent.
+
+postWrite
+
+Occurs after an object is inserted or updated in the data source. This
+occurs after PostInsertEvent and PostUpdateEvent.
+
+Alternatively, you can configure a domain object method as an event
+handler (see
+link:#Configuring_a_Domain_Object_Method_as_an_Event_Handler[Configuring
+a Domain Object Method as an Event Handler]).
+
+=== How to Configure a Descriptor Event Listener as an Event Handler Using Workbench
+
+For more information, see
+link:#How_to_Configure_a_Domain_Object_Method_as_an_Event_Handler_Using_Workbench[Using
+the Workbench].
+
+=== How to Configure a Descriptor Event Listener as an Event Handler Using Java
+
+The link:#Example_115-19[DescriptorEventListener] example shows a
+`+DescriptorEventListener+` that handles `+PostBuildEvent+` descriptor
+events. The link:#Example_115-20[Registering a DescriptorEventListener
+with the DescriptorEventManager] example shows how to register this
+`+DescriptorEventListener+` with the `+Employee+` object’s descriptor.
+Whenever the EclipseLink runtime performs a post-build operation on an
+instance of `+Employee+`, the runtime will dispatch a post build event
+to the corresponding `+DescriptorEventListener+` method on each
+registered event listener (in this case, it calls the `+postBuild+`
+method).
+
+[#Example 115-19]## *_DescriptorEventListener_*
+
+`+public class MyDescriptorEventListener extends DescriptorEventAdapter {+`
+
+`+ public void postBuild(DescriptorEvent event) {+`
+`+ +`*`+//\'\' \'\'handler\'\' \'\'implementation+`* `+ }+`
+`+}+`
+
+[#Example 115-20]## *_Registering a DescriptorEventListener with the
+DescriptorEventManager_*
+
+`+descriptor.getEventManager().addListener(new MyDescriptorEventListener());+`
+
+== Configuring Locking Policy
+
+You can configure a descriptor with a locking policy that prevents one
+user writing over another user’s work.
+
+This table summarizes which descriptors support locking policies.
+
+[#Table 115-28]## *_Descriptor Support for Locking Policy_*
+
+Descriptor
+
+Optimistic Version Locking Policies
+
+Optimistic Field Locking Policies
+
+Pessimistic Locking Policy
+
+Using the Workbench
+
+Using Java
+
+Relational Descriptors1
+
+Object-Relational Data Type Descriptors
+
+EIS Descriptors 2
+
+XML Descriptors
+
+1link:Creating%20a%20Relational%20Descriptor%20(ELUG)#Creating_Relational_Class_Descriptors[Relational
+Class Descriptors] only.
+2link:Creating%20an%20EIS%20Descriptor%20(ELUG)#EIS_Root_Descriptors[EIS
+Root Descriptors] only. We recommend that you use a locking policy. You
+should use a locking policy in any multiuser environment to prevent one
+user writing over another user’s changes. Although locking can be
+particularly important if multiple servers or multiple applications
+access the same data, even in a single server application, the same
+locking issue still exists. In a multiple-server environment, locking is
+still relevant even if your application uses cache refreshing or cache
+coordination.
+
+If you are building a three-tier application, in order to correctly lock
+an object, you must obtain the lock before the object is sent to client
+to be edited. The type of locking you choose has an influence on how you
+can achieve this (see
+link:Introduction%20to%20Descriptors%20(ELUG)#Locking_in_a_Three-Tier_Application[Locking
+in a Three-Tier Application]).
+
+=== How to Configure Locking Policy UsingWorkbench
+
+To specify a descriptor’s locking policy, use this procedure:
+
+[arabic]
+. In the *Navigator*, select a relational or EIS root descriptor.If the
+*Locking* advanced property is not visible for the descriptor,
+right-click the descriptor and choose *Select Advanced Properties* *>*
+*Locking* from the context menu or from the *Selected* menu.
+. Click the *Locking* tab. *_Locking Tab for a Descriptor_*
+image:rellock.gif[Locking Tab for a
+Descriptor,title="Locking Tab for a Descriptor"]
++
+*** Locking Tab for an EIS Root Descriptor*** image:eislock.gif[Locking
+Tab for an EIS Root
+Descriptor,title="Locking Tab for an EIS Root Descriptor"]
+. Enter data in each field on the Locking tab.
+
+Use this table to enter data in the following fields on the tab of the
+appropriate type:
+
+Field
+
+Description
+
+Optimistic Locking
+
+Specify that the descriptor uses optimistic locking.
+
+By Version
+
+Specify to use optimistic locking, based on versioning.
+
+Database Field
+
+Select the database field that contains the version value used for
+optimistic locking. This field appears for relational descriptors only.
+
+XPath
+
+Click Browse to define the path to the element or attribute that stores
+the version value. This field appears for EIS root descriptors
+only.Ensure that the attribute’s type corresponds to the type of locking
+policy you choose (numeric for Version Locking and timestamp for
+Timestamp Locking).
+
+Version Locking
+
+Specify that the descriptor uses numeric version locking. The version
+field (defined by the Database Field, for relational descriptors, or the
+XPath, for EIS root descriptors) must be a numeric type
+
+Timestamp Locking
+
+Specify that the descriptor uses time stamp version locking, based on
+time stamp. The version field (defined by the Database Field, for
+relational descriptors, or the XPath, for EIS root descriptors) must be
+a timestamp type.
+
+Store Version in Cache
+
+Specify whether or not you want to store the version information in the
+cache. If you choose not to define a mapping for the version field, then
+you must enable this option to configure the descriptor to store the
+version value in the EclipseLink cache.
+
+If you choose to define a mapping for the version field, then you must
+disable this option in order to store the version value in the object.
+For more information, see Optimistic Locking in a Three-Tier
+Application.
+
+By Fields 1
+
+Specify to use optimistic locking, based on database fields. These
+fields appear for relational descriptors only.
+
+All Fields
+
+Select all fields for optimistic locking.
+
+Changed Fields
+
+Select only the changed fields for optimistic locking.
+
+Selected Fields
+
+Click Add to select specific database fields for optimistic locking.
+
+Pessimistic Locking
+
+Ignore this option as it is EJB CMP-specific.
+
+Wait for Lock
+
+Ignore this option as it is EJB CMP-specific.
+
+1 You cannot use field locking with the
+`+AttributeChangeTrackingPolicy+` (see
+link:Introduction%20to%20EclipseLink%20Transactions_(ELUG)#Attribute_Change_Tracking_Policy[Attribute
+Change Tracking Policy]).
+
+=== How to Configure Locking Policy Using Java
+
+This section describes the following:
+
+* link:#Configuring_an_Optimistic_Locking_Policy[Configuring an
+Optimistic Locking Policy]
+* link:#Configuring_Optimistic_Locking_Policy_Cascading[Configuring
+Optimistic Locking Policy Cascading]
+
+==== Configuring an Optimistic Locking Policy
+
+Use the `+ClassDescriptor+` method `+setOptimisticLockingPolicy+` to set
+an instance of the appropriate optimistic field locking policy:
+
+* `+AllFieldsLockingPolicy+`
+* `+ChangedFieldsLockingPolicy+`
+* `+SelectedFieldsLockingPolicy+`
+* `+VersionLockingPolicy+`
+* `+TimestampLockingPolicy+`
+
+Use the `+ClassDescriptor+` method `+getOptimisticLockingPolicy+` to get
+the selected locking policy type and configure it.
+
+==== Configuring Optimistic Locking Policy Cascading
+
+If you are using a `+VersionLockingPolicy+`, you can enable cascading to
+configure EclipseLink to automatically force a version field update on a
+parent object when its privately owned child object’s version field
+changes. Use `+VersionLockingPolicy+` method `+setIsCascaded+` passing
+in a `+boolean+` of `+true+` to enable cascading, or `+false+` to
+disable cascading.
+
+For more information, see
+link:Introduction%20to%20Descriptors%20(ELUG)#Optimistic_Version_Locking_Policies_and_Cascading[Optimistic
+Version Locking Policies and Cascading].
+
+== Configuring Returning Policy
+
+Using a `+ReturningPolicy+`, you can obtain field values from the data
+source when inserting or updating an object. EclipseLink uses the values
+that the data source returns to update the object attributes that map to
+these fields. You can specify which fields to return for inserts and
+updates. For insert fields, you can also specify whether or not to
+include the field value in the insert operation.
+
+A `+ReturningPolicy+` is useful when the data source provides default or
+initial field values through defaults, triggers, or stored procedures.
+You can also use a `+ReturningPolicy+` to allow the data source to
+assign a sequence or primary key value.
+
+Any object attribute that you do not configure in a descriptor’s
+`+ReturningPolicy+` receives the default behavior: in the context of a
+unit of work, if the attribute has changed, its value is written to the
+database. If the SQL statement invokes a trigger or stored procedure
+that modifies the database field, the database generated value is not
+reflected by the object.
+
+Use caution when deciding on whether or not to use a
+`+ReturningPolicy+`, as doing so may effect insert or update performance
+and is not compatible with batch writing (see
+link:Optimizing%20the%20EclipseLink%20Application%20(ELUG)#How_to_Use_Batch_Writing_for_Optimization[How
+to Use Batch Writing for Optimization]).
+
+By default, you can use a `+ReturningPolicy+` with an Oracle Database,
+in which case, EclipseLink uses the Oracle `+RETURNING+` clause (see
+link:#How_to_Configure_Returning_Policy_Using_Workbench[Using
+Workbench]).
+
+You can use a `+ReturningPolicy+` with a non-Oracle database if you
+configure your descriptor’s insert or update query to use a stored
+procedure that returns the desired returned values as output parameters
+(see link:#How_to_Configure_Returning_Policy_Using_Java[Using Java]).
+
+This table summarizes which descriptors support returning policy
+configuration.
+
+[#Table 115-29]## *_Descriptor Support for Fetch Group Configuration_*
+
+Descriptor
+
+Using Workbench
+
+Using Java
+
+Relational Descriptors
+
+Object-Relational Data Type Descriptors
+
+EIS Descriptors1
+
+XML Descriptors
+
+1link:Creating%20an%20EIS%20Descriptor%20(ELUG)#EIS_Root_Descriptors[EIS
+Root Descriptors] only.
+
+=== How to Configure Returning Policy Using Workbench
+
+To specify the return policy for a descriptor, use this procedure:
+
+[arabic]
+. Select a descriptor in the *Navigator*. Its properties appear in the
+Editor.If the *Returning* advanced property is not visible for the
+descriptor, right-click the descriptor and choose *Select Advanced
+Properties* > *Returning* from the context menu or from the *Selected*
+menu.
+. Click the *Returning* tab in the *Editor*. *_Returning Tab_*
+image:rettab.gif[Returning Tab,title="Returning Tab"]
+. Complete the insert and update policies of the Returning tab.
+
+Use the following information to enter data in each field on the tab:
+
+[width="100%",cols="<8%,<92%",options="header",]
+|===
+|*Field* |*Description*
+|*Insert* |These options apply to insert operations:
+
+|*Name* |Click *Add* to add a database field to this `+ReturningPolicy+`
+for insert operations.
+
+|*Return-only* |When selected, EclipseLink only returns a value for this
+field; it will not include the field in the insert. When not selected,
+EclipseLink returns a value for this field and includes the value in the
+insert.
+
+|*Update* |These options apply to update operations:
+
+|*Name* |Click *Add* to add a database field to this `+ReturningPolicy+`
+for update operations
+|===
+
+To remove a database field from the descriptor’s `+ReturningPolicy+`,
+select the field in the *Insert* or *Update* window and click *Remove*.
+
+[width="100%",cols="<100%",]
+|===
+|*Note:* If you are using Workbench, you cannot configure a returning
+policy for an attribute mapped with a transformation mapping (see
+link:Introduction%20to%20Relational%20Mappings%20(ELUG)#Transformation_Mapping[Transformation
+Mapping]).
+|===
+
+=== How to Configure Returning Policy Using Java
+
+You use a `+ReturningPolicy+` to configure how EclipseLink handles
+returning with the attributes of an object on a field-by-field basis.
+This table describes the `+ReturnPolicy+` methods you use to tell
+EclipseLink how to handle a particular database field. Each method takes
+a `+String+` or a `+DatabaseField+` type parameter as field name.
+
+[#Table 115-30]## *_Return Policy Methods_*
+
+[width="100%",cols="<21%,<25%,<29%,<25%",options="header",]
+|===
+|*Method* |*Applies to SQL Statements of Type…* |*Writes Current Value
+of Field to Database?* |*Returns Database- Generated Result?*
+|`+addFieldForInsert+` |INSERT |Yes |Yes
+
+|`+addFieldForInsertReturnOnly+` |INSERT |No |Yes
+
+|`+addFieldForUpdate+` |UPDATE |Yes |Yes
+|===
+
+You configure a descriptor with a `+ReturningPolicy+` using
+`+ClassDescriptor+` method `+setReturningPolicy+`.
+
+== Configuring Instantiation Policy
+
+The EclipseLink runtime instantiates new instances of a class according
+to the instantiation policy you configure on the class’s descriptor.
+
+This table summarizes which descriptors support an instantiation policy.
+
+[#Table 115-31]## *_Descriptor Support for Instantiation Policy_*
+
+Descriptor
+
+Using Workbench
+
+Using Java
+
+Relational Descriptors
+
+Object-Relational Data Type Descriptors
+
+EIS Descriptors
+
+XML Descriptors
+
+You can specify one of the following types of instantiation policy:
+
+* Default: EclipseLink creates a new instance of a class by calling the
+class’s default constructor.
+* Method: EclipseLink creates a new instance of a class by calling a
+public static method that you define on the class descriptor.
+* Factory: EclipseLink creates a new instance of a class by calling the
+appropriate methods on a separate class that you implement according to
+the Factory design pattern.
+
+=== How to Configure Instantiation Policy Using Workbench
+
+To set the instantiation policy for a descriptor, use this procedure:
+
+[arabic]
+. In the *Navigator*, select a descriptor.If the Instantiation advanced
+property is not visible for the descriptor, right-click the descriptor
+and choose *Select Advanced Properties* > *Instantiation* from the
+context menu or from the *Selected* menu.
+. Click the *Instantiation* tab. *_Instantiation Tab_*
+image:instant.gif[Instantiation Tab,title="Instantiation Tab"]
+. Complete each field on the *Instantiation* tab.
+
+Use the following information to enter data in each field on the tab:
+
+Field
+
+Description
+
+Use Default Constructor
+
+Specify if the default constructor of the class instantiates a new
+instance.
+
+Use Method
+
+Specify a method to execute to create objects from the database.
+
+Method
+
+Select the name of a method to be executed to create objects from the
+database. The method must be a public, static method on the descriptor’s
+class and must return a new instance of the object.
+
+Use Factory
+
+Specify an object factory method.
+
+Factory Class
+
+Select the class of the factory object that creates the new instances.
+
+Factory Method
+
+Select the method to be used to obtain a factory object. Choose to use
+the default constructor.
+
+Instantiation Method
+
+Select the method to be called on the factory object to obtain a new
+instance that will be populated with data from the data source.
+
+=== How to Configure Instantiation Policy Using Java
+
+Use one of the following `+ClassDescriptor+` methods to set the
+appropriate type of instantiation policy:
+
+* `+useDefaultConstructorInstantiationPolicy+`
+* `+useMethodInstantiationPolicy+`
+* `+useFactoryInstantiationPolicy+`
+
+== Configuring Copy Policy
+
+The EclipseLink unit of work feature must be able to produce an exact
+copy (clone) persistent objects. This table summarizes which descriptors
+support a copy policy.
+
+[#Table 115-32]##
+
+Descriptor
+
+Using the Workbench
+
+Using Java
+
+Relational Descriptors
+
+Object-Relational Data Type Descriptors
+
+EIS Descriptors
+
+XML Descriptors
+
+EclipseLink supports the following two ways of copying objects:
+
+* Instantiation policy: By default, EclipseLink creates a new copy of an
+object by using the currently configured instantiation policy (see
+link:#Configuring_Instantiation_Policy[Configuring Instantiation
+Policy]).
+* Method: EclipseLink creates a new copy of an object by calling a
+method on the object that you specify. For example, you can specify the
+object’s `+clone+` method (or any other appropriate method on the
+object). Note that the clone method should return a shallow clone of the
+object.
+
+=== How to Configure Copy Policy Using Workbench
+
+To specify the copy policy for a descriptor, use this procedure:
+
+[arabic]
+. Select a descriptor in the *Navigator*. Its properties appear in the
+Editor.If the *Copying* advanced property is not visible for the
+descriptor, right-click the descriptor and choose *Select Advanced
+Properties* > *Copying* from the context menu or from the *Selected*
+menu.
+. Click the *Copying* tab in the *Editor*. *_Copying Tab_*
+image:copying.gif[Copying Tab,title="Copying Tab"]
+. Complete each field on the Copying tab.
+
+Use the following information to enter data in each field on the tab:
+
+[width="100%",cols="<15%,<85%",options="header",]
+|===
+|*Field* |*Description*
+|*Use Instantiation Policy* |Creates a new instance of the object using
+the descriptor’s instantiation policy (see
+link:#Configuring_Instantiation_Policy[Configuring Instantiation
+Policy]).
+
+|*Use Clone Method* |Specifies whether or not to call the `+clone+`
+method of the object. Select a method from the list.
+|===
+
+=== How to Configure Copy Policy Using Java
+
+Use one of the following `+ClassDescriptor+` methods to set the
+appropriate type of copy policy:
+
+* `+useCloneCopyPolicy()+`: the object must provide a `+clone+` method
+* `+useCloneCopyPolicy(java.lang.String cloneMethodName)+`
+* `+useInstantiationCopyPolicy()+`
+
+== Configuring Change Policy
+
+Use a change policy to specify how EclipseLink should track changes made
+to objects after you register them with a unit of work. This table
+summarizes which descriptors support a change policy.
+
+[#Table 115-33]##
+
+Descriptor
+
+Deferred Change Detection Policy
+
+Object-Level Change Tracking Policy
+
+Attribute Change Tracking Policy
+
+Using the Workbench
+
+Using Java
+
+Relational Descriptors1
+
+Object-Relational Data Type Descriptors
+
+EIS Descriptors 2
+
+XML Descriptors
+
+1link:Creating%20a%20Relational%20Descriptor%20(ELUG)#Creating_Relational_Class_Descriptors[Relational
+Class Descriptors] only.
+2link:Creating%20an%20EIS%20Descriptor%20(ELUG)#EIS_Root_Descriptors[EIS
+Root Descriptors] only. By default, EclipseLink uses the deferred change
+detection policy.
+
+For JPA entities or POJO classes that you configure for weaving,
+EclipseLink weaves value holder indirection for one-to-one mappings. If
+you want EclipseLink to weave change tracking and your application
+includes collection mappings (one-to-many or many-to-many), then you
+must configure all collection mappings to use transparent indirect
+container indirection only (you may not configure your collection
+mappings to use eager loading nor value holder indirection).
+
+Mutable basic mappings affect the overhead of change tracking.
+EclipseLink can only weave an attribute change tracking policy for
+immutable mappings.
+
+EclipseLink logs a warning message at the `+CONFIG+` log level if you
+try to weave a descriptor that does not support change policy.
+
+EclipseLink supports alternative change policies (policies other than
+`+DeferredChangeDetectionPolicy+`) for attributes that use a subset of
+the mappings that EclipseLink supports.
+
+For JPA applications deployed to OC4J EclipseLink automatically uses the
+attribute change tracking policy.
+
+For more information, see the following:
+
+* link:Introduction%20to%20EclipseLink%20Transactions_(ELUG)#Unit_of_Work_and_Change_Policy[Unit
+of Work and Change Policy]
+* link:Introduction%20to%20EclipseLink%20Transactions_(ELUG)#Change_Policy_Mapping_Support[Change
+Policy Mapping Support]
+* link:Introduction_to_EclipseLink%20Application%20Development%20(ELUG)#Using_Weaving[Using
+Weaving]
+* link:Using%20EclipseLink%20JPA%20Extensions%20(ELUG)#Using_EclipseLink_JPA_Weaving[Using
+EclipseLink JPA Weaving]
+* link:Introduction_to_EclipseLink%20Application%20Development%20(ELUG)#Using_Method_and_Direct_Field_Access[Using
+Method and Direct Field Access]
+* link:Introduction_to_EclipseLink%20Application%20Development%20(ELUG)#Mutability[Mutability]
+
+=== How to Configure Change Policy Using Java
+
+This section describes how to configure a descriptor with a change
+policy using Java, and how to implement persistent classes for those
+change policies that are intrusive. It includes information on
+configuring the following:
+
+* link:#Configuring_Deferred_Change_Detection_Policy[Configuring
+Deferred Change Detection Policy]
+* link:#Configuring_Object_Change_Tracking_Policy[Configuring Object
+Change Tracking Policy]
+* link:#Configuring_Attribute_Change_Tracking_Policy[Configuring
+Attribute Change Tracking Policy]
+
+==== Configuring Deferred Change Detection Policy
+
+The `+DeferredChangeDetectionPolicy+` provides good unit of work commit
+performance for a wide range of object change characteristics. It is the
+default change policy. For more information, see
+link:Introduction%20to%20EclipseLink%20Transactions_(ELUG)#Deferred_Change_Detection_Policy[Deferred
+Change Detection Policy]).
+
+Because it is the default, you do not need to explicitly configure this
+policy.
+
+To configure EclipseLink to use a `+DeferredChangeDetectionPolicy+`,
+create a descriptor amendment method (see
+link:#Configuring_Amendment_Methods[Configuring Amendment Methods]) that
+sets the change policy, as the link:#Example_115-21[Setting the
+ObjectChangeTrackingPolicy] example illustrates.
+
+==== Configuring Object Change Tracking Policy
+
+The `+ObjectChangeTrackingPolicy+` provides improved unit of work commit
+performance for objects with few attributes, or with many attributes and
+many changed attributes. For more information, see
+link:Introduction%20to%20EclipseLink%20Transactions_(ELUG)#Object-Level_Change_Tracking_Policy[Object-Level
+Change Tracking Policy].
+
+For JPA applications deployed to an application server, for which
+EclipseLink provides integration (see
+link:Integrating%20EclipseLink%20with%20an%20Application%20Server_(ELUG)#Introduction_to_the_Application_Server_Support[Introduction
+to the Application Server Support]), when you configure an entity’s
+descriptor with an `+ObjectLevelChangeTrackingPolicy+`, EclipseLink
+automatically generates code of a concrete subclass to implement the
+EclipseLink `+ChangeTracker+` interface at deploy time. Configuring the
+`+ObjectLevelChangeTrackingPolicy+` prevents EclipseLink from
+automatically applying an `+AttributeChangeTrackingPolicy+` (see
+link:#Configuring_Attribute_Change_Tracking_Policy[Configuring Attribute
+Change Tracking Policy]).
+
+To configure EclipseLink to use an `+ObjectChangeTrackingPolicy+`, use
+this procedure:
+
+[arabic]
+. Create a descriptor amendment method (see
+link:#Configuring_Amendment_Methods[Configuring Amendment Methods]) that
+sets the change policy, as this example illustrates: [#Example 115-21]##
+*_Setting the ObjectChangeTrackingPolicy_*
++
+`+descriptor.setObjectChangePolicy(new ObjectChangeTrackingPolicy());+`
+. For plain Java objects, code each of your persistent classes to
+implement the `+ChangeTracker+` interface, as this example illustrates:
+[#Example 115-22]## *_Implementing the ChangeTracker Interface for the
+ObjectChangeTrackingPolicy_*
++
+`+public class Employee implements ChangeTracker {+`
+
+`+ PropertyChangeListener listener;+` `+ String firstName;+`
+
+`+ public PropertyChangeListener getEclipseLinkPropertyChangeListener() {+`
+`+ return this.listener;+` `+ }+`
+
+`+ public void setEclipseLinkPropertyChangeListener(PropertyChangeListener listener) {+`
+`+ this.listener = listener;+` `+ }+` `+ ...+`
+`+ public void setFirstName(String firstName) {+`
+`+ propertyChange("firstName", getFirstName(), firstName);+`
+`+ this.firstName = firstName;+` `+ }+` `+ ...+`
+`+ public void propertyChange(String propertyName, Object oldValue, Object newValue) {+`
+`+ if (listener != null) {+`
+`+ if (oldValue != newValue) {+`
+`+ listener.propertyChange(+`
+`+ new PropertyChangeEvent(this, propertyName, oldValue, newValue));+`
+`+ }+` `+ }+` `+ }+` `+}+`
+
+==== Configuring Attribute Change Tracking Policy
+
+The `+AttributeChangeTrackingPolicy+` provides improved unit of work
+commit performance for objects with many attributes and few changed
+attributes. In general, this is the most efficient change policy. It is
+the default change policy for JPA applications. For more information,
+see
+link:Introduction%20to%20EclipseLink%20Transactions_(ELUG)#Attribute_Change_Tracking_Policy[Attribute
+Change Tracking Policy]).
+
+[width="100%",cols="<100%",]
+|===
+|*Note:* You cannot use the `+AttributeChangeTrackingPolicy+` if you are
+using any instance of `+FieldsLockingPolicy+` (see
+link:Introduction%20to%20Descriptors%20(ELUG)#Optimistic_Field_Locking_Policies[Optimistic
+Field Locking Policies]).
+|===
+
+When you deploy an EclipseLink-enabled JPA application, EclipseLink
+automatically configures your persistent classes to use the
+`+AttributeChangeTrackingPolicy+` and, using bytecode weaving,
+configures your persistence classes to implement the EclipseLink
+`+ChangeTracker+` interface. In this case, you do not need to explicitly
+configure this change policy.
+
+To configure EclipseLink to use an `+AttributeChangeTrackingPolicy+` for
+plain Java objects or other application servers, use this procedure:
+
+[arabic]
+. Create a descriptor amendment method (see
+link:#Configuring_Amendment_Methods[Configuring Amendment Methods]) that
+sets the change policy, as this example illustrates: [#Example 115-23]##
+*_Setting the DeferredChangeDetectionPolicy_*
++
+`+descriptor.setObjectChangePolicy(new AttributeChangeTrackingPolicy());+`
+. Code each of your persistent classes to implement the
+`+ChangeTracker+` interface, as this example illustrates:
+[#Example 115-24]## *_Implementing the ChangeTracker Interface for the
+AttributeChangeTrackingPolicy_*
++
+`+public class Employee implements ChangeTracker {+`
+
+`+ PropertyChangeListener listener;+` `+ String firstName;+`
+
+`+ public PropertyChangeListener getEclipseLink PropertyChangeListener() {+`
+`+ return this.listener;+` `+ }+`
+
+`+ public void setEclipseLinkPropertyChangeListener(PropertyChangeListener listener) {+`
+`+ this.listener = listener;+` `+ }+` `+ ...+`
+`+ public void setFirstName(String firstName) {+`
+`+ propertyChange("firstName", getFirstName(), firstName);+`
+`+ this.firstName = firstName;+` `+ }+` `+ ...+`
+`+ public void propertyChange(String propertyName, Object oldValue, Object newValue) {+`
+`+ if (listener != null) {+`
+`+ if (oldValue != newValue) {+`
+`+ listener.propertyChange(+`
+`+ new PropertyChangeEvent(this, propertyName, oldValue, newValue));+`
+`+ }+` `+ }+` `+ }+` `+}+`
+
+== Configuring a History Policy
+
+If you want to use historical sessions (see
+link:Introduction%20to%20EclipseLink%20Sessions%20(ELUG)#Historical_Sessions[Historical
+Sessions]) to execute historical queries (see
+link:Introduction%20to%20EclipseLink%20Queries%20(ELUG)#Historical_Queries[Historical
+Queries]) against a historical schema of your own design, configure your
+descriptors with an EclipseLink `+HistoryPolicy+` that describes your
+historical schema.
+
+If you are using an Oracle Database platform for Oracle9__i__ Database
+Server (or later), you can query the historical versions of objects
+automatically maintained by the Oracle Database without the need for a
+history policy. For more information, see
+link:Configuring%20Historical%20Sessions%20(ELUG)#How_to_Configure_Historical_Sessions_Using_an_Oracle_Platform[How
+to Configure Historical Sessions Using an Oracle Platform].
+
+This table summarizes which descriptors support history policy
+configuration.
+
+[#Table 115-34]##
+
+Descriptor
+
+How to Use Workbench
+
+Using Java
+
+Relational Descriptors
+
+Object-Relational Data Type Descriptors
+
+EIS Descriptors
+
+XML Descriptors
+
+There are many ways to configure a historical database schema.
+EclipseLink supports several historical schema configurations that you
+can describe with a `+HistoryPolicy+` (see
+link:Introduction%20to%20EclipseLink%20Sessions%20(ELUG)#Historical_Session_Limitations[Historical
+Session Limitations]).
+
+*Example Historical Schema*
+
+As shown in the link:#Table_115-35[Example Table for EMPLOYEE] and
+link:#Table_115-36[Example History Table EMPLOYEE_HIST], a common
+approach is to define a special history table to store past versions of
+an object: one history table for each regular table that requires
+historical persistence. The history table typically has the same fields
+as the corresponding regular table plus fields (such as row start and
+end) used to define an interval that represents the life time of a
+particular version.
+
+[width="100%",cols="<100%",]
+|===
+|*Note:* EclipseLink assumes that the current version of an object
+corresponds to the historical table row whose row end field is `+NULL+`.
+|===
+
+EclipseLink will include the history tables described by a
+`+HistoryPolicy+` when you execute a historical query.
+
+This table shows the schema for an `+EMPLOYEE+` table. The table
+currently contains one `+EMPLOYEE+` instance.
+
+[#Table 115-35]## *_Example Table for EMPLOYEE_*
+
+[cols="<,<,<,<",options="header",]
+|===
+|*EMP_ID* |*F_NAME* |*L_NAME* |*SALARY*
+|1 |Jane |Doe |55000
+|===
+
+This table shows one possible history table `+EMPLOYEE_HIST+` that
+stores historical versions of employees. The table contains the current
+`+EMPLOYEE+` (the version with a `+ROW_END+` value of `+NULL+`) and one
+historical version.
+
+[#Table 115-36]## *_Example History Table EMPLOYEE_HIST_*
+
+[width="100%",cols="<19%,<15%,<15%,<15%,<19%,<17%",options="header",]
+|===
+|*EMP_ID* |*F_NAME* |*L_NAME* |*SALARY* |*ROW_START* |*ROW_END*
+|1 |Jane |Doe |50000 |29/08/2004 |31/08/2004
+|1 |Jane |Doe |55000 |31/08/2004 |NULL
+|===
+
+Because every record has a start and end interval, the history table can
+store multiple versions of the same object (with the same primary key).
+The unique identifier of a particular version is given by the existing
+primary key, plus the value of the start field. For example, in
+link:#Table_115-36[Example History Table EMPLOYEE_HIST], the unique
+identifier of the current version is given by
+`+(EMP_ID, START) = (1, 31/08/2004)+`.
+
+=== How to Configure a History Policy Using Java
+
+This example shows how to describe the schema shown in
+link:#Table_115-35[Example Table for EMPLOYEE] and
+link:#Table_115-36[Example History Table EMPLOYEE_HIST] using the
+EclipseLink `+HistoryPolicy+`:
+
+[#Example 115-25]## *_HistoryPolicy for One Table_*
+
+`+HistoryPolicy policy = new HistoryPolicy();+`
+`+policy.addStartFieldName("ROW_START");+`
+`+policy.addEndFieldName("ROW_END");+`
+`+policy.addHistoryTableName("EMPLOYEE", "EMPLOYEE_HIST");+`
+
+*`+//\'\' \'\'Assuming\'\' \'\'database\'\' \'\'triggers\'\' \'\'or\'\' \'\'stored\'\' \'\'procedures\'\' \'\'update\'\' \'\'history\'\' \'\'tables+`*
+`+policy.setShouldHandleWrites(false);+`
+
+`+employeeDescriptor.setHistoryPolicy(policy);+`
+
+You can specify more than one table with a `+HistoryPolicy+` as shown in
+this examle. In this example, all history tables have a start field
+named `+ROW_START+` but the `+EMPLOYEE_HIST+` and `+SALARY_HIST+` tables
+have different end fields. To avoid ambiguity, the end field names are
+prefixed with their respective history table names.
+
+[#Example 115-26]## *_HistoryPolicy for Multiple Tables_*
+
+`+HistoryPolicy policy = new HistoryPolicy();+`
+`+policy.addStartFieldName("ROW_START");+`
+`+policy.addEndFieldName("EMPLOYEE_HIST.ROW_END");+`
+`+policy.addEndFieldName("SALARY_HIST.VALID_UNTIL");+`
+`+policy.addHistoryTableName("EMPLOYEE", "EMPLOYEE_HIST");+`
+`+policy.addHistoryTableName("SALARY", "SALARY_HIST");+`
+*`+//\'\' \'\'Assuming\'\' \'\'database\'\' \'\'triggers\'\' \'\'or\'\' \'\'stored\'\' \'\'procedures\'\' \'\'update\'\' \'\'history\'\' \'\'tables+`*
+`+policy.setShouldHandleWrites(false);+`
+
+`+employeeDescriptor.setHistoryPolicy(policy);+`
+
+==== Configuring Write Responsibility
+
+Use `+HistoryPolicy+` method `+setShouldHandleWrites+` to specify
+whether or not EclipseLink is responsible for writing data to history
+tables. By default, `+setShouldHandleWrites+` is set to `+true+`.
+
+Either the database or EclipseLink can be responsible for writing data
+to the history tables.
+
+You can configure the database to write data to history tables by way of
+triggers or stored procedures that customize create, insert, and delete
+operations to modify both the regular table and the history table
+appropriately.
+
+== Configuring Wrapper Policy
+
+EclipseLink lets you use wrappers (or proxies) in cases where the
+persistent class is not the same class that is to be presented to users.
+
+For example, in the EJB specification prior to 3.0, the entity bean
+class (the class that implements `+javax.ejb.EntityBean+`) is
+persistent, but is hidden from users who interact with a class that
+implements `+javax.ejb.EJBObject+` (local or remote interface class). In
+this example, the `+EJBObject+` acts as a proxy (or wrapper) for the
+`+EntityBean+`.
+
+In cases where such a wrapper is used, EclipseLink continues to make the
+class specified in the descriptor persistent, but returns the
+appropriate instance of the wrapper whenever a persistent object is
+requested.
+
+This table summarizes which descriptors support a wrapper policy.
+
+[#Table 115-37]## *_Descriptor Support for Wrapper Policy_*
+
+Descriptor
+
+How to Use Workbench
+
+Using Java
+
+Relational Descriptors
+
+Object-Relational Data Type Descriptors
+
+EIS Descriptors
+
+XML Descriptors
+
+Use a wrapper policy to tell EclipseLink how to create wrappers for a
+particular persistent class, and how to obtain the underlying persistent
+object from a given wrapper instance.
+
+If you specify a wrapper policy, EclipseLink uses the policy to _wrap_
+and _unwrap_ persistent objects as required:
+
+* Wrapper policies implement the interface
+`+org.eclipse.persistence.descriptors.WrapperPolicy+`.
+* A wrapper policy is specified by setting the wrapper policy for the
+EclipseLink descriptor.
+* By default, no wrapper policy is used (the wrapper policy for a
+descriptor is null by default).
+
+[width="100%",cols="<100%",]
+|===
+|*Note*: Wrapper policies are advanced EclipseLink options. Using a
+wrapper policy may not be compatible with some Workbench features.
+|===
+
+Wrapper policies cannot be set using the Workbench and can be set only
+using Java code (see
+link:#How_to_Configure_Wrapper_Policy_Using_Java[Using Java]).
+
+=== How to Configure Wrapper Policy Using Java
+
+Use the `+ClassDescriptor+` method `+setWrapperPolicy+` to set the
+appropriate instance of `+WrapperPolicy+`.
+
+== Configuring Fetch Groups
+
+By default, when you execute an object-level read query for a particular
+object class, EclipseLink returns all the persistent attributes mapped
+in the object’s descriptor. With this single query, all the object’s
+persistent attributes are defined, and calling their `+get+` methods
+returns the value directly from the object.
+
+When you are interested in only some of the attributes of an object, it
+may be more efficient to return only a subset of the object’s attributes
+using a fetch group.
+
+Using a fetch group, you can define a subset of an object’s attributes
+and associate the fetch group with either a `+ReadObjectQuery+` or
+`+ReadAllQuery+` query. When you execute the query, EclipseLink
+retrieves only the attributes in the fetch group. EclipseLink
+automatically executes a query to fetch all the attributes excluded from
+this subset when and if you call a `+get+` method on any one of the
+excluded attributes.
+
+You can define more than one fetch group for a class. You can optionally
+designate at most one such fetch group as the default fetch group. If
+you execute either a `+ReadObjectQuery+` or `+ReadAllQuery+` query
+without specifying a fetch group, EclipseLink will use the default fetch
+group, unless you configure the query otherwise (see
+link:Using%20Advanced%20Query%20API%20(ELUG)#How_to_Configure_Default_Fetch_Group_Behavior[How
+to Configure Default Fetch Group Behavior]).
+
+You can use fetch groups in JPA projects for EJB objects, as well as for
+POJO classes. For POJO classes, use partial object querying (see
+link:Introduction%20to%20EclipseLink%20Queries%20(ELUG)#Partial_Object_Queries[Partial
+Object Queries]).
+
+Before using fetch groups, we recommend that you perform a careful
+analysis of system use. In many cases, the extra queries required to
+load attributes not in the fetch group could well offset the gain from
+the partial attribute loading. For more information about optimizing
+read performance, see
+link:Optimizing%20the%20EclipseLink%20Application%20(ELUG)#Read_Optimization_Examples[Read
+Optimization Examples].
+
+This table summarizes which descriptors support fetch group
+configuration.
+
+[#Table 115-38]##
+
+Descriptor
+
+Using Workbench
+
+Using Java
+
+Relational Descriptors
+
+Object-Relational Data Type Descriptors
+
+EIS Descriptors
+
+XML Descriptors
+
+For JPA entities or POJO classes that you configure for weaving,
+EclipseLink uses fetch groups to improve performance.
+
+This section describes how to create a fetch group, store it in a
+descriptor, and optionally designate a fetch group as the default fetch
+group for its descriptor reference class.
+
+For more information, see the following:
+
+* link:Introduction%20to%20Descriptors%20(ELUG)#Fetch_Groups[Fetch
+Groups]
+* link:Introduction%20to%20EclipseLink%20Queries%20(ELUG)#Fetch_Groups_and_Object-Level_Read_Queries[Fetch
+Groups and Object-Level Read Queries]
+* link:Using%20Advanced%20Query%20API%20(ELUG)#How_to_Configure_Default_Fetch_Group_Behavior[How
+to Configure Default Fetch Group Behavior]
+* link:Introduction_to_EclipseLink%20Application%20Development%20(ELUG)#Using_Weaving[Using
+Weaving]
+* link:Using%20EclipseLink%20JPA%20Extensions%20(ELUG)#Using_EclipseLink_JPA_Weaving[Using
+EclipseLink JPA Weaving]
+
+=== How to Configure Fetch Groups Using Java
+
+To configure a fetch group, Use a
+link:#Configuring_Amendment_Methods[descriptor amendment method] as this
+example shows.
+
+[#Example 115-27]## *_Configuring a Fetch Group_*
+
+*`+//Create\'\' \'\'a\'\' \'\'FetchGroupManager\'\' \'\'for\'\' \'\'the\'\' \'\'descriptor+`*
+
+`+descriptor.setFetchGroupManager(new FetchGroupManager());+`
+*`+//\'\' \'\'Create\'\' \'\'a\'\' \'\'FetchGroup+`*
+`+FetchGroup group = new FetchGroup("nameOnly");+`
+*`+//\'\' \'\'Add\'\' \'\'attributes\'\' \'\'to\'\' \'\'FetchGroup.\'\' \'\'Alternatively,\'\' \'\'use+`*
+*`+//\'\' \'\'FetchGroup\'\' \'\'method\'\' \'\'addAttributes,\'\' \'\'passing\'\' \'\'in\'\' \'\'a\'\' \'\'Set\'\' \'\'of\'\' \'\'String\'\' \'\'attribute\'\' \'\'names+`*
+`+group.addAttribute("firstName");+` `+group.addAttribute("lastName");+`
+*`+//\'\' \'\'Add\'\' \'\'the\'\' \'\'FetchGroup\'\' \'\'to\'\' \'\'the\'\' \'\'FetchGroupManager+`*
+`+descriptor.getFetchGroupManager().addFetchGroup(group);+`
+*`+//Set\'\' \'\'the\'\' \'\'default\'\' \'\'fetch\'\' \'\'group+`*
+`+descriptor.getFetchGroupManager().setDefaultFetchGroup(group);+`
+
+Each instance of `+FetchGroup+` that you store in a descriptor must be
+configured with a fetch group name that is unique for that descriptor
+(that is, each descriptor owns a set of named fetch groups).
+
+When configuring fetch groups, note that the primary key fields and
+other required fields (such as inheritance type and optimistic lock
+version) are always included in all fetch groups.Fetch groups can
+include direct and relationship attributes. Including a relationship
+attribute in a fetch group does not cause the relationship to be joined
+or instantiated: joining and indirection are set independently of fetch
+groups.
+
+After you add a fetch group to a descriptor, you can configure a
+`+ReadObjectQuery+` or `+ReadAllQuery+` query with this fetch group by
+name (`+nameOnly+`) or rely on EclipseLink to use this fetch group by
+default. For more information, see
+link:Using%20Advanced%20Query%20API%20(ELUG)#Using_Queries_with_Fetch_Groups[Using
+Queries with Fetch Groups].
+
+== Configuring a Descriptor Customizer Class
+
+A descriptor customizer class is a Java class that implements the
+`+org.eclipse.persistence.internal.sessions.factories.DescriptorCustomizer+`
+interface and provides a default (zero-argument) constructor. You can
+use a descriptor customizer to customize a descriptor at run time on a
+loaded session before login occurs, similar to how you can use an
+amendment method (see link:#Configuring_Amendment_Methods[Configuring
+Amendment Methods]).
+
+This table summarizes which sessions support customizer class
+configuration.
+
+[#Table 115-39]##
+
+Descriptor
+
+How to Configure Customizer Class Using Workbench
+
+Using Java
+
+Relational Descriptors
+
+Object-Relational Data Type Descriptors
+
+EIS Descriptors
+
+XML Descriptors
+
+For more information, see
+link:Introduction%20to%20Descriptors%20(ELUG)#Descriptor_Customization[Descriptor
+Customization].
+
+=== How to Configure Customizer Class Using Java
+
+When using Java, create a customize class that implements the
+`+org.eclipse.persistence.internal.sessions.factories.DescriptorCustomizer+`
+interface. This example illustrates the creation of a descriptor
+customizer.
+
+[#Example 115-28]## *_Creating a SessionCustomizer Class_*
+
+`+import org.eclipse.persistence.internal.sessions.factories.DescriptorCustomizer;+`
+`+import org.eclipse.persistence.descriptors.ClassDescriptor;+`
+
+`+public class EmployeeDescriptorCustomizer implements DescriptorCustomizer {+`
+
+`+ public void customize(ClassDescriptor descriptor) {+`
+`+ descriptor.setReadOnly();+` `+ }+` `+}+`
+
+== Configuring Amendment Methods
+
+Some EclipseLink descriptor features cannot be configured from the
+Workbench. To use these features, you must write a Java method to amend
+the descriptor after it is loaded as part of the project. This method
+must have the following characteristics:
+
+* Be public static.
+* Take a single parameter of type
+`+org.persistence.descriptors.structures.ClassDescriptor+`.
+
+In the implementation of this method, you can configure advanced
+features of the descriptor using any of the public descriptor and
+mapping API.
+
+This table summarizes which descriptors support amendment methods.
+
+[#Table 115-40]##
+
+Descriptor
+
+Using the Workbench
+
+How to Use Java
+
+Relational Descriptors
+
+Object-Relational Data Type Descriptors
+
+EIS Descriptors
+
+XML Descriptors
+
+This section describes how to associate an amendment method with a
+descriptor.
+
+For more information about how to implement an amendment method, see
+link:Introduction%20to%20Descriptors%20(ELUG)#Amendment_and_After-Load_Methods[Amendment
+and After-Load Methods].
+
+Alternatively, you can use a descriptor customizer class (see
+link:#Configuring_a_Descriptor_Customizer_Class[Configuring a Descriptor
+Customizer Class].
+
+To customize a session, use a session customizer class (see
+link:Configuring%20a%20Session%20(ELUG)#Configuring_a_Session_Customizer_Class[Configuring
+a Session Customizer Class]).
+
+=== How to Configure Amendment Methods Using Workbench
+
+To use an amendment method with a descriptor (after it is loaded as part
+of the project) use this procedure:
+
+[arabic]
+. Select a descriptor in the *Navigator*. Its properties appear in the
+Editor.If the *After load* advanced property is not visible for the
+descriptor, right-click the descriptor and choose *Select Advanced
+Properties* > *After Load* from context menu or from the *Selected*
+menu.
+. Click the *After Load* tab in the *Editor*. *_After Load Tab_*
+image:aftrload.gif[After Load Tab,title="After Load Tab"]
+. Complete each field on the After Load tab.
+
+[width="100%",cols="<8%,<92%",options="header",]
+|===
+|*Field* |*Description*
+|*Class* |Click *Browse* and choose the class of the method to execute.
+
+|*Static Method* |Use the *Static Method* list to choose the static
+method to execute at run time, after loading the descriptor. The method
+must be public static and take a single attribute of type
+`+org.eclipse.persistence.descriptors.ClassDescriptor+`.
+|===
+
+'''''
+
+_link:EclipseLink_User's_Guide_Copyright_Statement[Copyright Statement]_
+
+Category:_EclipseLink_User's_Guide[Category: EclipseLink User’s Guide]
+Category:_Release_1[Category: Release 1] Category:_Task[Category: Task]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Configuring_a_JMS_Coordinated_Cache_(ELUG).adoc b/docs/docs.ug/src/main/asciidoc/core/Configuring_a_JMS_Coordinated_Cache_(ELUG).adoc
new file mode 100644
index 00000000000..00da673ef12
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Configuring_a_JMS_Coordinated_Cache_(ELUG).adoc
@@ -0,0 +1,245 @@
+*TOC*
+Special:Whatlinkshere_Configuring_a_JMS_Coordinated_Cache_(ELUG)[Related
+Topics]
+
+[#Table 100-1]## *_Configurable Options for a JMS Coordinated Cache_*
+
+Option to Configure
+
+EclipseLink Workbench
+
+Java
+
+Cache coordination change propagation at the descriptor level
+
+Synchronous change propagation mode
+
+JNDI naming service information
+
+Topic name
+
+Topic connection factory name
+
+Topic host URL
+
+Connection handling
+
+Context properties
+
+Packet time-to-live
+
+== Configuring a Topic Name
+
+A JMS topic identifies a publish/subscribe destination for a JMS server.
+JMS users who wish to share messages subscribe to the same JMS topic.
+
+The topic name you configure is the name that EclipseLink uses to look
+up the `+javax.jms.Topic+` instance from the JNDI service. You must
+provide a fully qualified JNDI name, such as
+`+jms/<+`_`+topic_name+`_`+>+`.
+
+All the members of the same JMS coordinated cache must use the same JMS
+topic.
+
+=== How to Configure a Topic Name Using Workbench
+
+To specify the topic name for JMS cache coordination, use this
+procedure:
+
+[arabic]
+. Select a server session in the *Navigator*. Its properties appear in
+the Editor.
+. Click the *Cache Coordination* tab. The Cache Coordination tab
+appears.
+. Ensure *Enable Cache Coordination* is selected and the *Type* is *JMS*
+(see link:Introduction%20to%20Cache%20(ELUG)#Cache_Coordination[Cache
+Coordination] for more information). [#Figure 100-1]##*_Cache
+Coordination Tab, Topic Name Field, JMS_* image:jmsclutn.gif[Cache
+Coordination Tab, Topic Name Field,
+JMS,title="Cache Coordination Tab, Topic Name Field, JMS"]
+. Enter the topic name to use with the JMS coordinated cache for this
+session. This must be a fully qualified JNDI name, such as `+jms/+`__.
+
+Enter the topic name to use with the JMS coordinated cache for this
+session. This must be a fully qualified JNDI name, such as `+jms/+`__.
+
+=== How to Configure a Topic Name Using Java
+
+Use the
+`+org.eclipse.persistence.sessions.coordination.broadcast.BroadcastTransportManager+`
+method `+setTopicName+` to configure the Topic name for the Topic to
+which this transport manager will be connecting.
+
+You obtain the `+BroadcastTransportManager+` using the following
+`+Session+` API:
+
+`+Session.getCommandManager().getTransportManager()+`
+
+== Configuring a Topic Connection Factory Name
+
+A JMS topic connection factory creates connections with the JMS provider
+for a specific JMS destination. Each connection factory contains the
+specific configuration information to create a connection to a JMS
+destination.
+
+The topic connection factory name you configure is the name that
+EclipseLink uses to look up the `+javax.jms.TopicConnectionFactory+`
+instance from the JNDI service. This must be a fully qualified JNDI
+name, such as `+jms/<+`_`+resource_name+`_`+>+`.
+
+=== How to Configure a Topic Connection Factory Name Using Workbench
+
+To specify the topic connection factory for a JMS coordinated cache, use
+this procedure:
+
+[arabic]
+. Select a server session in the *Navigator*. Its properties appear in
+the Editor.
+. Click the *Cache Coordination* tab. The Cache Coordination tab
+appears.
+. Ensure *Enable Cache Coordination* is selected and the *Type* is *JMS*
+(see link:Introduction%20to%20Cache%20(ELUG)#Cache_Coordination[Cache
+Coordination] for more information). [#Figure 100-2]##*_Cache
+Coordination Tab, Topic Connection Factory Name Field_*
+image:jmscluto.gif[Cache Coordination Tab, Topic Connection Factory Name
+Field,title="Cache Coordination Tab, Topic Connection Factory Name Field"]
+. Enter the topic connection factory name to use with the JMS
+coordinated cache for this session. This must be a fully qualified JNDI
+name, such as `+jms/+`__.
+
+Enter the topic connection factory name to use with the JMS coordinated
+cache for this session. This must be a fully qualified JNDI name, such
+as `+jms/+`__.
+
+=== How to Configure a Topic Connection Factory Name Using Java
+
+Use the
+`+org.eclipse.persistence.sessions.coordination.jms.JMSTopicTransportManager+`
+method `+setTopicConnectionFactoryName+` to configure the the JMS Topic
+connection factory name for the JMS Topic connections.
+
+You obtain the `+JMSTopicTransportManager+` using the following
+`+Session+` API:
+
+`+Session.getCommandManager().getTransportManager()+`
+
+== Configuring a Topic Host URL
+
+The JMS topic host URL is the URL of the machine on the network that
+hosts the JMS topic (see link:#Configuring_a_Topic_Name[Configuring a
+Topic Name]).
+
+=== How to Configure a Topic Host URL Using Workbench
+
+To specify the topic host URL for a JMS coordinated cache, use this
+procedure:
+
+[arabic]
+. Select a server session in the *Navigator*. Its properties appear in
+the Editor.
+. Click the *Cache Coordination* tab. The Cache Coordination tab
+appears.
+. Ensure *Enable Cache Coordination* is selected and the *Type* is *JMS*
+(see link:Introduction%20to%20Cache%20(ELUG)#Cache_Coordination[Cache
+Coordination] for more information). [#Figure 100-3]##*_Cache
+Coordination Tab, Topic Host URL Field_* image:jmsurl.gif[Cache
+Coordination Tab, Topic Host URL
+Field,title="Cache Coordination Tab, Topic Host URL Field"]
+
+Enter the URL of the machine on the network that hosts the JMS topic
+(see link:#Configuring_a_Topic_Name[Configuring a Topic Name]) to use
+with the JMS coordinated cache for this session.
+
+=== How to Configure a Topic Host URL Using Java
+
+Use the
+`+org.eclipse.persistence.sessions.coordination.jms.JMSTopicTransportManager+`
+method `+setTopicHostUrl+` to configure the URL of the computer on the
+network that hosts the JMS Topic.
+
+You obtain the `+JMSTopicTransportManager+` using the following
+`+Session+` API:
+
+`+Session.getCommandManager().getTransportManager()+`
+
+== Configuring Connection Handling
+
+The session’s transport manager creates connections to the various
+members of the coordinated cache. If a communication error occurs on one
+of these connections, you can configure the session to either ignore the
+error or remove the connection.
+
+If you configure the session to remove the connection on error, the next
+time the session tries to communicate with that coordinated cache
+member, it will construct a new connection. If an error occurs during
+the connection creation phase, EclipseLink will either throw a
+`+RemoteCommandManagerException.ERROR_CREATING_JMS_CONNECTION+` (if the
+error occurred while sending a message) or a
+`+RemoteCommandManagerException.ERROR_CREATING_LOCAL_JMS_CONNECTION+`
+(if the error occurred while receiving a message). If you want to
+recover from this failure, consider the following options:
+
+* You may choose to take no action: messages will not be sent or
+received.
+* You may choose to handle the exception. You may do so by changing some
+of the
+`+org.eclipse.persistence.sessions.coordination.jms.JMSTopicTransportManager+`
+settings and calling the `+createExternalConnection+` or
+`+createInternalConnection+` method of the `+JMSTopicTransportManager+`.
+
+If you configure the session to ignore the error, the next time the
+session tries to communicate with that coordinated cache member, it will
+continue to use the same connection. In this case, if the listening
+(local) connection gets a
+`+RemoteCommandManagerException.ERROR_RECEIVING_JMS_MESSAGE+` exception,
+the coordinated cache waits for 10 seconds before resuming listening. If
+you want to recover from this failure, consider the following options:
+
+* You may choose to take no action (wait for the connection recovery).
+* You may choose to handle the
+`+RemoteCommandManagerException.ERROR_PROPAGATING_COMMAND+` or
+`+RemoteCommandManagerException.ERROR_RECEIVING_JMS_MESSAGE+` exception.
+You may do so by shutting down the remote command manager.
+
+In either case, if the coordinated cache receives a null JMS message, it
+will throw a
+`+RemoteCommandManagerException.ERROR_RECEIVED_JMS_MESSAGE_IS_NULL+`
+exception.
+
+=== How to Configure Connection Handling Using Workbench
+
+To specify how EclipseLink handles session connections in the event of
+an error, use this procedure:
+
+[arabic]
+. Select a session or session broker in the *Navigator*. Its properties
+appear in the Editor.
+. Click the *Cache Coordination* tab. The Cache Coordination tab
+appears.
+. Ensure the *Enable Cache Coordination* option is selected, then select
+the appropriate coordinated cache *Type* (JMS). The cache coordination
+options appear on the tab. [#Figure 100-4]##*_Cache Coordination Tab,
+Remove Connection on Error Option_* image:clonerr.gif[Cache Coordination
+Tab, Remove Connection on Error
+Option,title="Cache Coordination Tab, Remove Connection on Error Option"]
+. Select the *Remove Connection on Error* option to configure the
+session to remove the data source connection in the event of an error.
+
+=== How to Configure Connection Handling Using Java
+
+Use the
+`+org.eclipse.persistence.sessions.coordination.TransportManager+`
+method `+setShouldRemoveConnectionOnError+` to define whether
+connections to remote services should be disconnected when an error
+occurs.
+
+You obtain the `+TransportManager+` using the following `+Session+` API:
+
+`+Session.getCommandManager().getTransportManager()+`
+
+'''''
+
+_link:EclipseLink_User's_Guide_Copyright_Statement[Copyright Statement]_
+
+Category:_EclipseLink_User's_Guide[Category: EclipseLink User’s Guide]
+Category:_Release_1[Category: Release 1] Category:_Task[Category: Task]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Mapping_(ELUG).adoc b/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Mapping_(ELUG).adoc
new file mode 100644
index 00000000000..ed72db2dc0b
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Mapping_(ELUG).adoc
@@ -0,0 +1,2353 @@
+*TOC* Special:Whatlinkshere_Configuring_a_Mapping_(ELUG)[Related Topics]
+
+This section describes how to configure EclipseLink mapping options
+common to two or more mapping types. This table lists the types of
+EclipseLink mappings that you can configure and provides a
+cross-reference to the type-specific chapter that lists the configurable
+options supported by that type.
+
+[#Table 117-1]##
+
+If you are creating…
+
+See…
+
+Relational Mappings
+
+Configuring a Relational Mapping
+
+Object-Relational Data Type Mappings
+
+Configuring an Object-Relational Data Type Mapping
+
+EIS Mappings
+
+Configuring an EIS Mapping
+
+XML Mappings
+
+Configuring an XML Mapping
+
+The link:#Table_117-2[Common Mapping Options] table lists the
+configurable options shared by two or more EclipseLink mapping types.
+
+For more information, see the following:
+
+* link:Creating%20a%20Mapping%20(ELUG)#Introduction_to_Mapping_Creation[Introduction
+to Mapping Creation]
+* link:Introduction%20to%20Mappings%20(ELUG)[Introduction to Mappings]
+
+== Configuring Common Mapping Options
+
+This table lists the configurable options shared by two or more
+EclipseLink mapping types. In addition to the configurable options
+described here, you must also configure the options described for the
+specific mapping types (see
+link:Introduction%20to%20Mappings%20(ELUG)#Mapping_Types[Mapping
+Types]), as shown in the link:#Table_117-1[Configuring EclipseLink
+Mappings] table.
+
+[#Table 117-2]##
+
+Option to Configure
+
+Workbench
+
+Java
+
+Read-only
+
+Indirection (lazy loading)
+
+XPath
+
+Default null value
+
+Method or direct field access
+
+Private or independent relationships
+
+Comments
+
+Serialized object converter
+
+Serialized type conversion converter
+
+Object type converter
+
+Simple type translator
+
+JAXB typesafe enumeration converter
+
+Container policy
+
+Attribute transformer
+
+Field transformer associations
+
+Mutable mappings
+
+Bidirectional relationship
+
+Use of a single node
+
+Use of CDATA
+
+== Configuring Read-Only Mappings
+
+Mappings that are read-only will not be affected during insert, update,
+and delete operations.
+
+Use read-only mappings when multiple attributes in an object map to the
+same fields in the database but only one of the mappings can write to
+the field.
+
+You can also use read-only mappings with bi-directional many-to-many
+mappings to designate which mapping will be responsible for updating the
+many-to-many join table.
+
+[cols="<",]
+|===
+|*Note*: The primary key mappings cannot not be read-only.
+|===
+
+Mappings defined for the write-lock or class indicator field must be
+read-only, unless the write-lock is configured not to be stored in the
+cache or the class indicator is part of the primary key.
+
+Use read-only mappings only if specific mappings in a descriptor are
+read-only. If the _entire descriptor_ is read-only, use the
+descriptor-level setting (see
+link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_Read-Only_Descriptors[Configuring
+Read-Only Descriptors]).
+
+This table summarizes which mappings support this option.
+
+[#Table 117-3]##
+
+Mapping
+
+Using the Workbench
+
+Using Java
+
+Relational Mappings
+
+Object-Relational Data Type Mappings
+
+EIS Mappings
+
+XML Mappings
+
+=== How to Configure Read-Only Mappings Using Workbench
+
+To specify a mapping as read-only, use this procedure:
+
+[arabic]
+. Select the mapped attribute in the *Navigator*. Its properties appear
+in the Editor.
+. Click the *General* tab. The General tab appears.
+[#Figure 117-1]##*_General Tab, Read-Only Option_*
+image:mpdbgen3.gif[General Tab, Read-Only
+Option,title="General Tab, Read-Only Option"]
+
+Select the *Read-Only* option to set the mapping to be read-only and not
+affected during update and delete operations.
+
+*See Also*
+
+link:#Configuring_Read-Only_Mappings[Configuring Read-Only Mappings]
+
+link:#Configuring_a_Mapping[Configuring a Mapping]
+
+=== How to Configure Read-Only Mappings Using Java
+
+Use the following `+DatabaseMapping+` methods to configure the read
+access of a mapping:
+
+* `+readOnly+`–configures mapping read access to read-only;
+* `+readWrite+`–configures mapping read access to read and write
+(default).
+
+This example shows how to use these methods with a class that has a
+read-only attribute named `+phones+`.
+
+[#Example 117-1]## *_Configuring Read Only Mappings in Java_*
+
+*`+//\'\' \'\'Map\'\' \'\'the\'\' \'\'phones\'\' \'\'attribute+`*
+`+phonesMapping.setAttributeName("phones");+` `+ +`
+*`+//\'\' \'\'Specify\'\' \'\'read-only+`* `+phonesMapping.readOnly();+`
+
+== Configuring Indirection (Lazy Loading)
+
+If indirection is not enabled, when EclipseLink retrieves a persistent
+object, it retrieves all of the dependent objects to which it refers.
+When you enable indirection (lazy loading) for an attribute mapped with
+a relationship mapping, EclipseLink uses an indirection object as a
+placeholder for the referenced object: EclipseLink defers reading the
+dependent object until you access that specific attribute. This can
+result in a significant performance improvement, especially if the
+application is interested only in the contents of the retrieved object
+rather than the objects to which it refers.
+
+We strongly recommend using indirection for all relationship mappings.
+Not only does this allow you to optimize data source access, but it also
+allows EclipseLink to optimize the unit of work processing, cache
+access, and concurrency.
+
+This table summarizes which mappings support this option.
+
+[#Table 117-4]##
+
+Mapping
+
+Value Holder Indirection
+
+Transparent Indirect Container Indirection
+
+Proxy Indirection
+
+How to Configure Indirection Using Workbench
+
+How to Configure Indirection Using Java
+
+Relational Mappings
+
+Direct-to-Field Mapping
+
+Transformation Mapping
+
+One-to-One Mapping
+
+Variable One-to-One Mapping
+
+One-to-Many Mapping
+
+Many-to-Many Mapping
+
+Aggregate Collection Mapping
+
+Direct Collection Mapping
+
+Direct Map Mapping
+
+Object-Relational Data Type Mappings
+
+Object-Relational Data Type Reference Mapping
+
+Object-Relational Data Type Nested Table Mapping
+
+EIS Mappings
+
+EIS One-to-One Mapping
+
+EIS One-to-Many Mapping
+
+XML Mappings
+
+XML Transformation Mapping
+
+In general, we recommend that you use value holder indirection for
+one-to-one mappings and transparent indirect container indirection for
+collection mappings. Enable indirection for transformation mappings if
+the execution of the transformation is a resource-intensive task (such
+as accessing a database, in a relational project).
+
+When using indirection with EJB, the version of EJB and application
+server you use affects how indirection is configured and what types of
+indirection are applicable.
+
+When using indirection with an object that your application serializes,
+you must consider the effect of any untriggered indirection objects at
+deserialization time.
+
+For JPA entities or POJO classes that you configure for weaving,
+EclipseLink weaves value holder indirection for one-to-one mappings. If
+you want EclipseLink to weave change tracking and your application
+includes collection mappings (one-to-many or many-to-many), then you
+must configure all collection mappings to use transparent indirect
+container indirection only (you may not configure your collection
+mappings to use eager loading nor value holder indirection).
+
+For more information, see the following:
+
+* link:Introduction%20to%20Mappings%20(ELUG)#Indirection_(Lazy_Loading)[Indirection
+(Lazy Loading)]
+* link:Introduction%20to%20Mappings%20(ELUG)#Value_Holder_Indirection[Value
+Holder Indirection]
+* link:Introduction%20to%20Mappings%20(ELUG)#Transparent_Indirect_Container_Indirection[Transparent
+Indirect Container Indirection]
+* link:Introduction%20to%20Mappings%20(ELUG)#Indirection,_Serialization,_and_Detachment[Indirection,
+Serialization, and Detachment]
+* link:Introduction_to_EclipseLink%20Application%20Development%20(ELUG)#Using_Weaving[Using
+Weaving]
+* link:Using%20EclipseLink%20JPA%20Extensions%20(ELUG)#Using_EclipseLink_JPA_Weaving[Using
+EclipseLink JPA Weaving]
+
+=== How to Configure Indirection Using Workbench
+
+To complete the indirection options on a mapping’s *General* tab use
+this procedure:
+
+[arabic]
+. Select the mapped attribute in the *Navigator*. Its properties appear
+in the Editor.
+. Click the *General* tab. The General tab appears.
+[#Figure 117-2]##*_General Tab, Indirection Options_*
+image:indirection.gif[General Tab, Indirection
+Options,title="General Tab, Indirection Options"]
+. Select the *Use Indirection* option and indicate the type of
+indirection to use.
+
+Use the following information to complete the *Indirection* fields on
+the tab:
+
+[width="100%",cols="<10%,<90%",options="header",]
+|===
+|*Field* |*Description*
+|*Use Indirection* |Specify if this mapping uses indirection.
+
+|:*ValueHolder* |Specify that the mapping uses *Value Holder*
+indirection. See
+link:Introduction%20to%20Mappings%20(ELUG)#Value_Holder_Indirection[Value
+Holder Indirection] for more information.
+
+|:*Proxy* |Specify that the mapping uses *Proxy* indirection. See
+link:Introduction%20to%20Mappings%20(ELUG)#Proxy_Indirection[Proxy
+Indirection] for more information.
+|===
+
+*See Also*
+
+link:#Configuring_Indirection_(Lazy_Loading)[Configuring Indirection
+(Lazy Loading)]
+
+=== How to Configure Indirection Using Java
+
+When creating mappings through the Java API, all foreign reference
+mappings default to using value-holder indirection and all
+transformation mappings default to not using indirection.
+
+To disable indirection use `+ForeignReferenceMapping+` method
+`+dontUseIndirection+`.
+
+To enable value holder indirection, use `+ForeignReferenceMapping+`
+method `+useBasicIndirection+`.
+
+To enable transparent container indirection, use one of the following
+`+CollectionMapping+` methods:
+
+* `+useTransparentCollection+`
+* `+useTransparentList+`
+* `+useTransparentMap+`
+* `+useTransparentSet+`
+
+To enable proxy indirection, use `+ObjectReferenceMapping+` method
+`+useProxyIndirection+`.
+
+This section provides additional information on the following:
+
+* link:#Configuring_ValueHolder_Indirection[Configuring ValueHolder
+Indirection]
+* link:#Configuring_ValueHolder_Indirection_With_Method_Accessing[Configuring
+ValueHolder Indirection With Method Accessing]
+* link:#Configuring_IndirectContainer_Indirection[Configuring
+IndirectContainer Indirection]
+* link:#Configuring_Proxy_Indirection[Configuring Proxy Indirection]
+
+==== Configuring Value Holder Indirection
+
+Instances of
+`+org.eclipse.persistence.mappings.ForeignReferenceMapping+` and
+`+org.eclipse.persistence.mappings.foundation.AbstractTransformationMapping+`
+provide the `+useBasicIndirection+` method to configure a mapping to an
+attribute that you code with an
+`+org.eclipse.persistence.indirection.ValueHolderInterface+` between it
+and the real object.
+
+If the attribute is of a `+Collection+` type (such as a `+Vector+`),
+then you can either use an `+IndirectContainer+` (see
+link:#Configuring_IndirectContainer_Indirection[Configuring
+IndirectContainer Indirection]) or define the `+ValueHolder+` in the
+constructor as follows:
+
+`+addresses = new ValueHolder(new Vector());+`
+
+This example illustrates the `+Employee+` class using `+ValueHolder+`
+indirection. The class definition conceals the use of ValueHolder within
+the existing getter and setter methods.
+
+[#Example 117-2]## *_Class Using ValueHolder Indirection_*
+
+`+public class Employee {+`
+
+`+ protected ValueHolderInterface address;+`
+
+`+ +`*`+//\'\' \'\'Initialize\'\' \'\'ValueHolders\'\' \'\'in\'\' \'\'constructor+`*
+
+`+ public Employee() {+` `+ address = new ValueHolder();+`
+`+ }+`
+
+`+ public Address getAddress() {+`
+`+ return (Address) this.addressHolder.getValue();+` `+ }+`
+
+`+ public void setAddress(Address address) {+`
+`+ this.addressHolder.setValue(address);+` `+ }+` `+}+`
+
+This example shows how to configure a one-to-one mapping to the
+`+address+` attribute.
+
+[#Example 117-3]## *_Mapping Using ValueHolder Indirection_*
+
+`+OneToOneMapping mapping = new OneToOneMapping();+`
+`+mapping.useBasicIndirection();+`
+`+mapping.setReferenceClass(Employee.class);+`
+`+mapping.setAttributeName("address");+`
+
+The application uses `+Employee+` methods `+getAddress+` and
+`+setAddress+` to access the `+Address+` object. Because basic
+indirection is enabled, EclipseLink expects the persistent fields to be
+of type `+ValueHolderInterface+`.
+
+==== Configuring Value Holder Indirection with Method Accessing
+
+If you are using `+ValueHolder+` indirection with method accessing (see
+link:#Configuring_Method_or_Direct_Field_Accessing_at_the_Mapping_Level[Configuring
+Method or Direct Field Accessing at the Mapping Level]), in addition to
+changing your attributes types in your Java code to
+`+ValueHolderInterface+`, you must also provide EclipseLink with two
+pairs of getter and setter methods:
+
+* getter and setter of the _indirection_ object that are registered with
+the mapping and used only by EclipseLink. They include a `+get+` method
+that returns an instance that conforms to `+ValueHolderInterface+`, and
+a `+set+` method that accepts one argument that conforms to the same
+interface;
+* getter and setter of the actual attribute value used by the
+application.
+
+This example illustrates the `+Employee+` class using `+ValueHolder+`
+indirection with method access. The class definition is modified so that
+the `+address+` attribute of `+Employee+` is a `+ValueHolderInterface+`
+instead of an `+Address+`, and appropriate getter and setter methods are
+supplied.
+
+[#Example 117-4]## *_Class Using ValueHolder Indirection with Method
+Accessing_*
+
+`+public class Employee {+`
+
+`+ protected ValueHolderInterface address;+`
+
+`+ +`*`+//\'\' \'\'Initialize\'\' \'\'ValueHolders\'\' \'\'in\'\' \'\'constructor+`*
+`+ public Employee() {+` `+ address = new ValueHolder();+`
+`+ }+`
+
+`+ +`*`+//\'\' \'\'getter\'\' \'\'and\'\' \'\'setter\'\' \'\'registered\'\' \'\'with\'\' \'\'the\'\' \'\'mapping\'\' \'\'and\'\' \'\'used\'\' \'\'only\'\' \'\'by\'\' \'\'EclipseLink+`*
+`+ public ValueHolderInterface getAddressHolder() {+`
+`+ return address;+` `+ }+`
+`+ public void setAddressHolder(ValueHolderInterface holder) {+`
+`+ address = holder;+` `+ }+`
+
+`+ +`*`+//\'\' \'\'getter\'\' \'\'and\'\' \'\'setter\'\' \'\'methods\'\' \'\'used\'\' \'\'by\'\' \'\'the\'\' \'\'application\'\' \'\'to\'\' \'\'access\'\' \'\'the\'\' \'\'attribute+`*
+`+ public Address getAddress() {+`
+`+ return (Address) address.getValue();+` `+ }+`
+
+`+ public void setAddress(Address theAddress) {+`
+`+ address.setValue(theAddress);+` `+ }+` `+}+`
+
+This example shows how to configure a one-to-one mapping to the
+`+address+` attribute.
+
+[#Example 117-5]## *_Mapping Using ValueHolder Indirection with Method
+Accessing_*
+
+`+OneToOneMapping mapping = new OneToOneMapping();+`
+`+mapping.useBasicIndirection();+`
+`+mapping.setReferenceClass(Employee.class);+`
+`+mapping.setAttributeName("address");+`
+`+mapping.setGetMethodName("getAddressHolder");+`
+`+mapping.setSetMethodName("setAddressHolder");+`
+
+The application uses `+Employee+` methods `+getAddress+` and
+`+setAddress+` to access the `+Address+` object. Because basic
+indirection is enabled, EclipseLink uses `+Employee+` methods
+`+getAddressHolder+` and `+setAddressHolder+` methods when performing
+persistence operations on instances of `+Employee+`.
+
+==== Configuring Value Holder Indirection with JPA
+
+When using indirection with JPA, if your application serializes any
+indirection-enabled (lazily loaded) entity (see
+link:Introduction%20to%20Mappings%20(ELUG)#Indirection,_Serialization,_and_Detachment[Indirection,
+Serialization, and Detachment]), then, to preserve untriggered
+indirection objects on deserialization, configure your client to use
+EclipseLink agent, as follows:
+
+[arabic]
+. Include the following JAR files (from
+`+<+`_`+ECLIPSELINK_HOME+`_`+>\jlib+`) in your client classpath:
+* `+eclipselink.jar+`
+* `+.jar+`
+. Add the following argument to the Java command line you use to start
+your client: `+-javaagent:eclipselink-agent.jar+`
+
+You can also use
+link:Using%20EclipseLink%20JPA%20Extensions%20(ELUG)#How_to_Configure_Static_Weaving_for_JPA_Entities[static
+weaving]. This will provide you with better error messages and will
+resolve merging issues.
+
+[width="100%",cols="<100%",]
+|===
+|*Note:* The use of static weaving will not affect serialization as it
+functions without static weaving enabled.
+|===
+
+==== Configuring IndirectContainer Indirection
+
+Instances of
+`+org.eclipse.persistence.mappings.ForeignReferenceMapping+` and
+`+org.eclipse.persistence.mappings.foundation.AbstractTransformationMapping+`
+provide the `+useContainerIndirection+` method to configure a mapping to
+an attribute that you code with an
+`+org.eclipse.persistence.indirection.IndirectContainer+` between it and
+the real object.
+
+Using an `+IndirectContainer+`, a `+java.util.Collection+` class can act
+as an EclipseLink indirection object: the `+Collection+` will only read
+its contents from the database when necessary (typically, when a
+`+Collection+` accessor is invoked). Without an `+IndirectContainer+`,
+all members of the `+Collection+` must be retrieved when the
+`+Collection+` attribute is accessed.
+
+The following example illustrates the `+Employee+` class using
+`+IndirectContainer+` indirection with method access. Note that the fact
+of using indirection is transparent.
+
+[#Example 117-6]## *_Class Using IndirectContainer Indirection_*
+
+`+public class Employee {+`
+
+`+ protected List addresses;+`
+
+`+ public Employee() {+`
+`+ this.addresses = new ArrayList();+` `+ }+` `+ +`
+`+ public List getAddresses() {+` `+ return this.addresses;+`
+`+ }+`
+
+`+ public void setAddresses(List addresses) {+`
+`+ this.addresses = addresses;+` `+ }+` `+}+`
+
+The following example shows how to configure a one-to-one mapping to the
+`+addresses+` attribute.
+
+[#Example 117-7]## *_Mapping Using IndirectContainer Indirection_*
+
+`+OneToOneMapping mapping = new OneToOneMapping();+`
+`+mapping.useBasicIndirection();+`
+`+mapping.setReferenceClass(Employee.class);+`
+`+mapping.setAttributeName("addresses");+`
+`+mapping.setGetMethodName("getAddresses");+`
+`+mapping.setSetMethodName("setAddresses");+`
+
+==== Configuring Proxy Indirection
+
+This example illustrates an `+Employee+` to `+Address+` one-to-one
+relationship.
+
+[#Example 117-8]## *_Classes Using Proxy Indirection_*
+
+`+public interface Employee {+`
+
+`+ public String getName();+` `+ public Address getAddress();+`
+`+ public void setName(String value);+`
+`+ public void setAddress(Address value);+` `+ . . .+` `+}+`
+
+`+public class EmployeeImpl implements Employee {+`
+
+`+ public String name;+` `+ public Address address;+`
+`+ . . .+` `+ public Address getAddress() {+`
+`+ return this.address;+` `+ }+`
+
+`+ public void setAddress(Address value) {+`
+`+ this.address = value;+` `+ }+` `+}+`
+
+`+public interface Address {+`
+
+`+ public String getStreet();+`
+`+ public void setStreet(String value);+` `+ . . .+` `+}+`
+
+`+public class AddressImpl implements Address {+`
+
+`+ public String street;+` `+ . . .+` `+}+`
+
+In the preceding example, both the `+EmployeeImpl+` and the
+`+AddressImpl+` classes implement public interfaces (`+Employee+` and
+`+Address+` respectively). Therefore, because the `+AddressImpl+` class
+is the target of the one-to-one relationship, it is the only class that
+must implement an interface. However, if the `+EmployeeImpl+` is ever to
+be the target of another one-to-one relationship using transparent
+indirection, it must also implement an interface, as the following
+example shows:
+
+`+Employee emp = (Employee) session.readObject(Employee.class);+`
+`+System.out.println(emp.toString());+`
+`+System.out.println(emp.getAddress().toString());+`
+*`+//\'\' \'\'Would\'\' \'\'print:+`* `+[Employee] John Smith+`
+`+{ IndirectProxy: not instantiated }+`
+`+String street = emp.getAddress().getStreet();+`
+*`+//\'\' \'\'Triggers\'\' \'\'database\'\' \'\'read\'\' \'\'to\'\' \'\'get\'\' \'\'Address\'\' \'\'information+`*
+`+System.out.println(emp.toString());+`
+`+System.out.println(emp.getAddress().toString());+`
+*`+//\'\' \'\'Would\'\' \'\'print:+`* `+[Employee] John Smith+`
+`+{ [Address] 123 Main St. }+`
+
+Using proxy indirection does not change how you instantiate your own
+domain objects for an insert operation. You still use the following
+code:
+
+`+Employee emp = new EmployeeImpl("John Smith");+`
+`+Address add = new AddressImpl("123 Main St.");+`
+`+emp.setAddress(add);+`
+
+The following example illustrates an `+Employee+` to `+Address+`
+one-to-one relationship mapping.
+
+[#Example 117-9]## *_Mapping Using Proxy Indirection_*
+
+....
+OneToOneMapping mapping = new OneToOneMapping();
+mapping.useProxyIndirection();
+mapping.setReferenceClass(Employee.class);
+mapping.setAttributeName("address");
+mapping.setGetMethodName("getAddress");
+mapping.setSetMethodName("setAddress");
+....
+
+== Configuring XPath
+
+EclipseLink uses XPath statements to map the attributes of a Java object
+to locations in an XML document. When you create an XML mapping or EIS
+mapping using XML records, you can specify the XPath based on any of the
+following:
+
+* Name
+* Position
+* Path and name
+
+This table summarizes which mappings support this option.
+
+[#Table 117-5]##
+
+Mapping
+
+Using the Workbench
+
+How to Use Java
+
+EIS Mappings 1
+
+EIS Direct Mapping
+
+EIS Composite Direct Collection Mapping
+
+EIS Composite Object Mapping2
+
+EIS Composite Collection Mapping
+
+XML Mappings
+
+XML Direct Mapping
+
+XML Composite Direct Collection Mapping
+
+XML Composite Object Mapping
+
+XML Composite Collection Mapping
+
+XML Any Object Mapping
+
+XML Any Collection Mapping
+
+XML Binary Data Mapping
+
+XML Binary Data Collection Mapping
+
+XML Fragment Mapping
+
+XML Fragment Collection Mapping
+
+XML Choice Collection Mapping
+
+XML Any Attribute Mapping
+
+1When used with
+link:Configuring%20an%20EIS%20Descriptor%20(ELUG)#Configuring_Record_Format[XML
+records only]. 2Supports the self XPath ("`.`") so that the EclipseLink
+runtime performs all read and write operations in the parent’s element
+and not an element nested within it (see
+Introduction%20to%20Mappings%20(ELUG)#Mappings_and_the_jaxb:class_Customization[Mappings
+and the jaxb:class Customization]). Before you can select an XPath for a
+mapping, you must associate the descriptor with a schema context (see
+link:Configuring%20an%20EIS%20Descriptor%20(ELUG)#Configuring_Schema_Context_for_an_EIS_Descriptor[Configuring
+Schema Context for an EIS Descriptoror]
+link:Configuring%20an%20XML%20Descriptor%20(ELUG)#Configuring_Schema_Context_for_an_XML_Descriptor[Configuring
+Schema Context for an XML Descriptor]).
+
+For more information, see
+link:Introduction%20to%20Mappings%20(ELUG)#Mappings_and_XPath[Mappings
+and XPath].
+
+=== How to Configure XPath Using Workbench
+
+Use this table to select the XPath for an XMl mapping or EIS mapping
+using XML records:
+
+[arabic]
+. Select the mapped attribute in the *Navigator*. Its properties appear
+in the Editor.
+. If necessary, click the *General* tab. The General tab appears.
+[#Figure 117-3]##*_General Tab, XPath Options_*
+image:dtxmlxpath.gif[General Tab, XPath
+Options,title="General Tab, XPath Options"]
++
+{empty}[#'Figure 117-4]##*** XPath Options for Composite Object
+Mappings*** image:coxxmlpath.gif[XPath Options for Composite Object
+Mappings,title="XPath Options for Composite Object Mappings"]
+. Click *Browse* and select the XPath to map to this attribute (see
+link:#Choosing_the_XPath[Choosing the XPath]).
+
+For an EIS composite object mapping using XML records or an XML
+composite object mapping, you can choose one of the following:
+
+* *Specify XPath*: select the XPath to map to this attribute (see
+link:#Choosing_the_XPath[Choosing the XPath]).
+* *Aggregate into parent element*: select the self XPath (`+"."+`) (see
+link:Introduction%20to%20Mappings%20(ELUG)#Self_XPath[Self XPath]) so
+that the EclipseLink runtime performs all read and write operations in
+the parent’s element, and not an element nested within it (see
+Introduction%20to%20Mappings%20(ELUG)#Mappings_and_the_jaxb:class_Customization[Mappings
+and the jaxb:class Customization]).
+
+==== Choosing the XPath
+
+From the Choose XPath dialog box, select the XPath and click *OK*.
+Workbench builds the complete XPath name.
+
+[#Figure 117-5 ]## *_Choose XPath Dialog Box_*
+
+.Choose XPath Dialog Box
+image::choosexpath.gif[Choose XPath Dialog
+Box,title="Choose XPath Dialog Box"]
+
+== Configuring a Default Null Value at the Mapping Level
+
+A default null value is the Java `+Object+` type and value that
+EclipseLink uses instead of `+null+` when EclipseLink reads a null value
+from a data source.
+
+When you configure a default null value at the mapping level,
+EclipseLink uses it to translate in the following two directions:
+
+* When EclipseLink reads `+null+` from the data source, it converts this
+`+null+` to the specified type and value.
+* When EclipseLink writes or queries to the data source, it converts the
+specified type and value back to `+null+`.
+
+This table summarizes which mappings support this option.
+
+[#Table 117-6]##
+
+Mapping
+
+Using Workbench
+
+Using Java
+
+Relational Mappings
+
+Direct-to-Field Mapping
+
+Direct-to-XMLType Mapping
+
+EIS Mappings
+
+EIS Direct Mapping
+
+XML Mappings
+
+XML Direct Mapping
+
+XML Composite Direct Collection Mapping
+
+XML Binary Data Mapping
+
+XML Binary Data Collection Mapping
+
+XML Fragment Mapping
+
+XML Fragment Collection Mapping
+
+[width="100%",cols="<100%",]
+|===
+|*Note*: A default null value must be an `+Object+`. To specify a
+primitive value (such as `+int+`), you must use the corresponding
+`+Object+` wrapper (such as `+Integer+`).
+|===
+
+You can also use EclipseLink to set a default null value for all
+mappings used in a session (see
+link:Configuring%20a%20Data%20Source%20Login%20(ELUG)#Configuring_a_Default_Null_Value_at_the_Login_Level[Configuring
+a Default Null Value at the Login Level]).
+
+=== How to Configure a Default Null Value at the Mapping Level Using Workbench
+
+To configure a default null value for a mapping, use this procedure.
+
+[arabic]
+. Select the mapped attribute in the *Navigator*. Its properties appear
+in the Editor.
+. Click the *General* tab. The General tab appears. *_General Tab,
+Default Null Value Options_* image:mpdbgen2.gif[General Tab, Default
+Null Value Options,title="General Tab, Default Null Value Options"]
+. Complete the *Default Null Value* fields on the tab.
+
+Use the following information to complete the *Default Null Value*
+fields on the tab:
+
+Field
+
+Description
+
+Default Null Value
+
+Specify if this mapping contains a default value in the event that the
+data source is null. If selected, you must enter both the Type and Value
+of the default.
+
+Type
+
+Select the Java type of the default value.
+
+Value
+
+Enter the default value.
+
+=== How to Configure a Default Null Value at the Mapping Level Using Java
+
+To configure a mapping null value using Java API, use the
+`+AbstractDirectMapping+` method `+setNullValue+`.
+
+For example:
+
+*`+//\'\' \'\'Defaults\'\' \'\'a\'\' \'\'null\'\' \'\'salary\'\' \'\'to\'\' \'\'0+`*
+`+salaryMapping.setNullValue(new Integer(0));+`
+
+== Configuring Method or Direct Field Accessing at the Mapping Level
+
+By default, EclipseLink uses direct access to access public attributes.
+Alternatively, you can use getter and setter methods to access object
+attributes when writing the attributes of the object to the database, or
+reading the attributes of the object from the database. This is known as
+method access.
+
+Using private, protected or package variable or method access requires
+you to enable the Java reflect security setting. This is enabled by
+default in most application servers (see
+link:Integrating%20EclipseLink%20with%20an%20Application%20Server%20(ELUG)#How_to_Set_Security_Permissions[How
+to Set Security Permissions]), but may need to be enabled explicitly in
+certain JVM configurations. If necessary, use the `+java.policy+` file
+to grant `+ReflectPermission+` to the entire application or the
+application’s code base. For example:
+
+`+grant{+` `+ permission java.lang.reflect.ReflectPermission;+`
+`+};+`
+
+We recommend using _direct access_ whenever possible to improve
+performance and avoid executing any application-specific behavior while
+building objects.
+
+This table summarizes which mappings support this option.
+
+[#Table 117-7]##
+
+Mapping
+
+Using Workbench
+
+Using Java
+
+Relational Mappings
+
+Object-Relational Data Type Mappings
+
+EIS Mappings
+
+XML Mappings
+
+For information on configuring method accessing at the project level,
+see
+link:Configuring%20a%20Project%20(ELUG)#Configuring_Method_or_Direct_Field_Access_at_the_Project_Level[Configuring
+Method or Direct Field Access at the Project Level].
+
+If you enable change tracking on a property (for example, you decorate
+method `+getPhone+` with `+@ChangeTracking+`) and you access the field
+(`+phone+`) directly, note that EclipseLink does not detect the change.
+For more information, see
+link:Introduction_to_EclipseLink%20Application%20Development%20(ELUG)#Using_Method_and_Direct_Field_Access[Using
+Method and Direct Field Access].
+
+=== How to Configure Method or Direct Field Accessing Using Workbench
+
+To complete the field access method for a mapping, use this procedure:
+
+[arabic]
+. Select the mapped attribute in the *Navigator*. Its properties appear
+in the Editor.
+. Click the *General* tab. The General tab appears.
+[#Figure 117-7]##*_General Tab, Method Accessing Options_*
+image:mpgen1.gif[General Tab, Method Accessing
+Options,title="General Tab, Method Accessing Options"]
+. Complete the *Method Accessing* fields on the tab.
+
+Use the following information to complete the *Method Accessing* fields
+on this tab:
+
+Field
+
+Description
+
+Method Accessing
+
+Specify if this mapping uses specific accessor methods instead directly
+accessing public attributes. By default, this option is not selected
+(that is, the mapping uses direct access).
+
+Get Method
+
+Select a specific get method.
+
+Set Method
+
+Select a specific set method.
+
+To change the default access type used by all new mappings, use the
+Defaults tab on the project Editor window. See
+link:Configuring%20a%20Project%20(ELUG)#Configuring_Method_or_Direct_Field_Access_at_the_Project_Level[Configuring
+Method or Direct Field Access at the Project Level] for more
+information.
+
+*See Also*
+
+link:#Configuring_Method_or_Direct_Field_Accessing_at_the_Mapping_Level[Configuring
+Method or Direct Field Accessing at the Mapping Level]
+
+link:Introduction_to_EclipseLink%20Application%20Development%20(ELUG)#Using_Method_and_Direct_Field_Access[Using
+Method and Direct Field Access]
+
+=== How to Configure Method or Direct Field Accessing Using Java
+
+Use the following `+DatabaseMapping+` methods to configure the
+user-defined getters and setters that EclipseLink will use to access the
+mapped attribute:
+
+For mappings not supported in Workbench, use the `+setGetMethodName+`
+and `+setSetMethodName+` methods to access the attribute through
+user-defined methods, rather than directly, as follows:
+
+* `+setGetMethodName+`–set the `+String+` name of the user-defined
+method to get the mapped attribute;
+* `+setSetMethodName+`–set the `+String+` name of the user-defined
+method to set the mapped attribute.
+
+This example shows how to use these methods with a class that has an
+attribute `+phones+` and accessor methods `+getPhones+` and
+`+setPhones+` in an object-relational data type mapping.
+
+[#Example 117-9]## *_Configuring Access Method in Java_*
+
+*`+//\'\' \'\'Map\'\' \'\'the\'\' \'\'phones\'\' \'\'attribute+`*
+`+phonesMapping.setAttributeName("phones");+` `+ +`
+*`+//\'\' \'\'Specify\'\' \'\'access\'\' \'\'method+`*
+`+phonesMapping.setGetMethodName("getPhones");+`
+`+phonesMapping.setSetMethodName("setPhones");+`
+
+== Configuring Private or Independent Relationships
+
+In EclipseLink, object relationships can be either private or
+independent:
+
+* In a private relationship, the target object is a private component of
+the source object. The target object cannot exist without the source and
+is accessible only through the source object. Destroying the source
+object will also destroy the target object.
+* In an independent relationship, the source and target objects are
+public ones that exist independently. Destroying one object does not
+necessarily imply the destruction of the other.
+
+[width="100%",cols="<100%",]
+|===
+|*Tip*: EclipseLink automatically manages private relationships.
+Whenever an object is written to the database, any private objects it
+owns are also written to the database. When an object is removed from
+the database, any private objects it owns are also removed. Be aware of
+this when creating new systems, since it may affect both the behavior
+and the performance of your application.
+|===
+
+This table summarizes which mappings support this option.
+
+[#Table 117-8]##
+
+Mapping
+
+Implicitly Private
+
+Private or Independent
+
+Using Workbench
+
+Using Java
+
+Relational Mappings
+
+One-to-One Mapping
+
+Variable One-to-One Mapping
+
+One-to-Many Mapping
+
+Many-to-Many Mapping
+
+Aggregate Collection Mapping
+
+Direct Collection Mapping
+
+Direct Map Mapping
+
+Aggregate Object Mapping
+
+Object-Relational Data Type Mappings
+
+Object-Relational Data Type Structure Mapping
+
+Object-Relational Data Type Reference Mapping
+
+Object-Relational Data Type Array Mapping
+
+Object-Relational Data Type Object Array Mapping
+
+Object-Relational Data Type Nested Table Mapping
+
+EIS Mappings
+
+EIS Composite Direct Collection Mapping
+
+EIS Composite Object Mapping
+
+EIS Composite Collection Mapping
+
+EIS One-to-One Mapping
+
+EIS One-to-Many Mapping
+
+XML Mappings
+
+XML Composite Direct Collection Mapping
+
+XML Composite Object Mapping
+
+XML Composite Collection Mapping
+
+=== How to Configure Private or Independent Relationships Using Workbench
+
+To create a privately owned mapping, use this procedure:
+
+[arabic]
+. Select the mapped attribute in the *Navigator*. Its properties appear
+in the Editor.
+. Click the *General* tab. The General tab appears.
+[#Figure 117-8]##*_General Tab, Private Owned option_*
+image:oogenpri.gif[General Tab, Private Owned
+option,title="General Tab, Private Owned option"]
+. To create private ownership, select the *Private Owned* option.
+
+=== How to Configure Private or Independent Relationships Using Java
+
+For mappings not supported in the Workbench, use the
+`+independentRelationship+` (default), `+privateOwnedRelationship+`, and
+`+setIsPrivateOwned+` methods.
+
+This exampple shows how to use these methods with a class that has a
+privately owned attribute, `+phones+`, in a mapping.
+
+[#Example 117-10]## *_Configuring Access Method in Java_*
+
+*`+//\'\' \'\'Map\'\' \'\'the\'\' \'\'phones\'\' \'\'attribute+`*
+`+phonesMapping.setAttributeName("phones");+` `+ +`
+*`+//\'\' \'\'Specify\'\' \'\'as\'\' \'\'privately\'\' \'\'owned+`*
+`+phonesMapping.privateOwnedRelationship();+`
+
+== Configuring Mapping Comments
+
+You can define a free-form textual comment for each mapping. You can use
+these comments however you wish: for example, to record important
+project implementation details such as the purpose or importance of a
+mapping.
+
+Comments are stored in the Workbench project, in the EclipseLink
+deployment XML file. There is no Java API for this feature.
+
+This table summarizes which mappings support this option.
+
+[#Table 117-9]##
+
+Mapping
+
+Using Workbench
+
+How to Use Java
+
+Relational Mappings
+
+EIS Mappings
+
+XML Mappings
+
+=== How to Configure Mapping Comments Using Workbench
+
+To add a comment for a mapping, use this procedure.
+
+[arabic]
+. Select the mapped attribute in the *Navigator*. Its properties appear
+in the Editor.
+. Click the *General* tab. The General tab appears.
+[#Figure 117-9]##*_General Tab, Comment_* image:mpcomment.gif[General
+Tab, Comment,title="General Tab, Comment"]
+. Enter a comment that describes this mapping.
+
+== Configuring a Serialized Object Converter
+
+A serialized object converter can be used to store an arbitrary object
+or set of objects into a data source binary large object (BLOB) field.
+It uses the Java serializer so the target must be serializable.
+
+For more information about the serialized object converter, see
+link:Introduction%20to%20Mappings%20(ELUG)#Serialized_Object_Converter[Serialized
+Object Converter].
+
+This table summarizes which mappings support this option.
+
+[#Table 117-10]##
+
+Mapping
+
+Using Workbench
+
+Using Java
+
+Relational Mappings
+
+Direct-to-Field Mapping
+
+Object-Relational Data Type Mappings
+
+Object-Relational Data Type Array Mapping
+
+EIS Mappings
+
+EIS Direct Mapping
+
+EIS Composite Direct Collection Mapping
+
+XML Mappings
+
+XML Direct Mapping
+
+XML Composite Direct Collection Mapping
+
+XML Binary Data Mapping
+
+XML Binary Data Collection Mapping
+
+XML Fragment Mapping
+
+XML Fragment Collection Mapping
+
+=== How to Configure a Serialized Object Converter Using Workbench
+
+To create an serialized object direct mapping, use this procedure:
+
+[arabic]
+. Select the mapped attribute in the *Navigator*. Its properties appear
+in the Editor.
+. Click the *Converter* tab. The Converter tab appears.
++
+{empty}[#Figure 117-10 ]##*_Converter Tab, Serialized Object Converter
+Option_* image:convr_so.gif[Converter Tab, Serialized Object Converter
+Option,title="Converter Tab, Serialized Object Converter Option"]
+. To specify a serialized object converter, select the *Serialized
+Object Converter* option.
+
+=== How to Configure a Serialized Object Converter Using Java
+
+You can set an
+`+org.eclipse.persistence.converters.SerializedObjectConverter+` on any
+instance of
+`+org.eclipse.persistence.mappings.foundation.AbstractCompositeDirectCollectionMapping+`
+or its subclasses using the `+AbstractCompositeDirectCollectionMapping+`
+method `+setValueConverter+`, as this example shows.
+
+[#Example 117-11]## *_Configuring a SerializedObjectConverter in Java_*
+
+*`+//\'\' \'\'Create\'\' \'\'SerializedObjectConverter\'\' \'\'instance+`*
+`+SerializedObjectConverter serializedObjectConvter = new SerializedObjectConverter();+`
+
+*`+//\'\' \'\'Set\'\' \'\'SerializedObjectConverter\'\' \'\'on\'\' \'\'ArrayMapping+`*
+`+ArrayMapping arrayMapping = new ArrayMapping();+`
+`+arrayMapping.setValueConverter(serializedObjectConvter);+`
+`+arrayMapping.setAttributeName("responsibilities");+`
+`+arrayMapping.setStructureName("Responsibilities_t");+`
+`+arrayMapping.setFieldName("RESPONSIBILITIES");+`
+`+orDescriptor.addMapping(arrayMapping);+`
+
+You can also set a `+SerializedObjectConverter+` on any instance of
+`+org.eclipse.persistence.mappings.foundation.AbstractDirectMapping+` or
+its subclasses using the `+AbstractDirectMapping+` method
+`+setConverter+`.
+
+== Configuring a Type Conversion Converter
+
+A type conversion converter is used to explicitly map a data source type
+to a Java type.
+
+For more information about the type conversion converter, see
+link:Introduction%20to%20Mappings%20(ELUG)#Type_Conversion_Converter[Type
+Conversion Converter].
+
+This table summarizes which mappings support this option.
+
+[#Table 117-11]##
+
+Mapping
+
+Using Workbench
+
+Using Java
+
+Relational Mappings
+
+Direct-to-Field Mapping
+
+Object-Relational Data Type Mappings
+
+Object-Relational Data Type Array Mapping
+
+EIS Mappings
+
+EIS Direct Mapping
+
+EIS Composite Direct Collection Mapping
+
+XML Mappings
+
+XML Direct Mapping
+
+XML Composite Direct Collection Mapping
+
+XML Binary Data Mapping
+
+XML Binary Data Collection Mapping
+
+XML Fragment Mapping
+
+XML Fragment Collection Mapping
+
+=== How to Configure a Type Conversion Converter Using Workbench
+
+To create an type conversion direct mapping, use this procedure:
+
+[arabic]
+. Select the mapped attribute in the *Navigator*. Its properties appear
+in the Editor.
+. Click the *Converter* tab. The Converter tab appears.
+. Select the *Type Conversion Converter* option.
+[#Figure 117-11]##*_Converter Tab, Type Conversion Converter Option_*
+image:convr_tc.gif[Converter Tab, Type Conversion Converter
+Option,title="Converter Tab, Type Conversion Converter Option"]
+. Complete Type Conversion Converter fields on the Converter tab.
+
+Use the following information to complete the Type Conversion Converter
+fields on the Converter tab:
+
+[width="100%",cols="<26%,<74%",options="header",]
+|===
+|*Field* |*Description*
+|*Data Type* |Select the Java type of the data in the data source.
+
+|*Attribute Type* |Select the Java type of the attribute in the Java
+class.
+|===
+
+=== How to Configure a Type Conversion Converter Using Java
+
+You can set an
+`+org.eclipse.persistence.converters.TypeConversionConverter+` on any
+instance of
+`+org.eclipse.persistence.mappings.foundation.AbstractCompositeDirectCollectionMapping+`
+or its subclasses using the `+AbstractCompositeDirectCollectionMapping+`
+method `+setValueConverter+`, as this exmaple shows.
+
+[#Example 117-12]## *_Configuring a TypeConversionConverter_*
+
+*`+//\'\' \'\'Create\'\' \'\'TypeConversionConverter\'\' \'\'instance+`*
+`+TypeConversionConverter typeConversionConverter = new TypeConversionConverter();+`
+`+typeConversionConverter.setDataClass(java.util.Calendar.class); +`
+`+typeConversionConverter.setObjectClass(java.sql.Date.class);+`
+
+*`+//\'\' \'\'Set\'\' \'\'TypeConversionConverter\'\' \'\'on\'\' \'\'ArrayMapping+`*
+`+ArrayMapping arrayMapping = new ArrayMapping();+`
+`+arrayMapping.setValueConverter(typeConversionConverter);+`
+`+arrayMapping.setAttributeName("date");+`
+`+arrayMapping.setStructureName("Date_t");+`
+`+arrayMapping.setFieldName("DATE");+`
+`+orDescriptor.addMapping(arrayMapping);+`
+
+You can also set a `+TypeConversionConverter+` on any instance of
+`+org.eclipse.persistence.mappings.foundation.AbstractDirectMapping+` or
+its subclasses using the `+AbstractDirectMapping+` method
+`+setConverter+`.
+
+Configure the `+TypeConversionConverter+` instance using the following
+API:
+
+* `+setDataClass(java.lang.Class dataClass)+`–to specify the data type
+class.
+* `+setObjectClass(java.lang.Class objectClass)+`–to specify the object
+type class.
+
+== Configuring an Object Type Converter
+
+An object type converter is used to match a fixed number of data source
+data values to Java object values. It can be used when the values in the
+data source and in Java differ.
+
+For more information about the object type converter, see
+link:Introduction%20to%20Mappings%20(ELUG)#Object_Type_Converter[Object
+Type Converter].
+
+This table summarizes which mappings support this option.
+
+[#Table 117-12]##
+
+Mapping
+
+Using Workbench
+
+Using Java
+
+Relational Mappings
+
+Object-Relational Data Type Mappings
+
+Object-Relational Data Type Array Mapping
+
+EIS Mappings
+
+EIS Direct Mapping
+
+EIS Composite Direct Collection Mapping
+
+XML Mappings
+
+XML Direct Mapping
+
+XML Composite Direct Collection Mapping
+
+XML Binary Data Mapping
+
+XML Binary Data Collection Mapping
+
+XML Fragment Mapping
+
+XML Fragment Collection Mapping
+
+=== How to Configure an Object Type Converter Using Workbench
+
+To add an object type converter to a direct mapping, use this procedure:
+
+[arabic]
+. Select the mapping in the *Navigator*. Its properties appear in the
+Editor.
+. Click the *Converter* tab. The Converter tab appears.
+[#Figure 117-12]##*_Converter Tab, Object Type Converter_*
+image:convr_ot.gif[Converter Tab, Object Type
+Converter,title="Converter Tab, Object Type Converter"]
+. Select the *Object Type Converter* option on the tab.
+
+Use the following fields on the mapping’s *Converter* tab to specify the
+object type converter options:
+
+Field
+
+Description
+
+Data Type
+
+Select the Java type of the data in the data source.
+
+Attribute Type
+
+Select the Java type of the attribute in the Java class.
+
+Conversion Values
+
+Click Add to add a new conversion value. Click Edit to modify an
+existing conversion value. Click Remove to delete an existing conversion
+value. Use to specify the selected value as the default value. If
+EclipseLink retrieves a value from the database that is not mapped as a
+valid Conversion Value, the default value will be used.
+
+Data Value
+
+Specify the value of the attribute in the data source.
+
+Attribute Value
+
+Specify the value of the attribute in the Java class
+
+Default Attribute Value
+
+Specify whether or not to use the selected value as the default value.
+If EclipseLink retrieves a value from the database that is not mapped as
+a valid Conversion Value, the default value will be used.
+
+=== How to Configure an Object Type Converter Using Java
+
+You can set an
+`+org.eclipse.persistence.converters.ObjectTypeConverter+` on any
+instance of
+`+org.eclipse.persistence.mappings.foundation.AbstractCompositeDirectCollectionMapping+`
+using `+AbstractCompositeDirectCollectionMapping+` method
+`+setValueConverter+`.
+
+You can also set an `+ObjectTypeConverter+` on any instance of
+`+org.eclipse.persistence.mappings.foundation.AbstractDirectMapping+` or
+its subclasses using the `+AbstractDirectMapping+` method
+`+setConverter+`, as the following example shows.
+
+[#Example 117-13]## *_Configuring an ObjectTypeConverter in Java_*
+
+*`+//\'\' \'\'Create\'\' \'\'ObjectTypeConverter\'\' \'\'instance+`*
+`+ObjectTypeConverter objectTypeConvter = new ObjectTypeConverter();+`
+`+objectTypeConverter.addConversionValue("F", "Female");+`
+
+*`+//\'\' \'\'Set\'\' \'\'ObjectTypeConverter\'\' \'\'on\'\' \'\'DirectToFieldMapping+`*
+`+DirectToFieldMapping genderMapping = new DirectToFieldMapping();+`
+`+genderMapping.setConverter(objectTypeConverter);+`
+`+genderMapping.setFieldName("F");+`
+`+genderMapping.setAttributeName("Female");+`
+`+descriptor.addMapping(genderMapping);+`
+
+Configure the `+ObjectTypeConverter+` instance using the following API:
+
+* `+addConversionValue(java.lang.Object fieldValue, java.lang.Object attributeValue)+`–to
+associate data-type values to object-type values.
+* `+addToAttributeOnlyConversionValue(java.lang.Object fieldValue, java.lang.Object attributeValue)+`–to
+add one-way conversion values.
+* `+setDefaultAttributeValue(java.lang.Object defaultAttributeValue)+`–to
+set the default value.
+
+== Configuring a Simple Type Translator
+
+The simple type translator allows you to automatically translate an XML
+element value to an appropriate Java type based on the element’s
+attribute, as defined in your XML schema. You can use a simple type
+translator only when the mapping’s XPath goes to an element. You cannot
+use a simple type translator if the mapping’s XPath goes to an
+attribute.
+
+For more information, see
+link:Introduction%20to%20Mappings%20(ELUG)#Simple_Type_Translator[Simple
+Type Translator].
+
+This table summarizes which mappings support this option.
+
+Mapping
+
+Using Workbench
+
+Using Java
+
+EIS Mappings
+
+EIS Direct Mapping
+
+EIS Composite Direct Collection Mapping
+
+XML Mappings
+
+XML Direct Mapping
+
+XML Composite Direct Collection Mapping
+
+XML Binary Data Mapping
+
+XML Binary Data Collection Mapping
+
+=== How to Configure a Simple Type Translator Using Workbench
+
+Use this table to qualify elements from the XML schema
+
+[arabic]
+. Select the mapped attribute in the *Navigator*. Its properties appear
+in the Editor.
+. Click the *General* tab. The General tab appears.
+[#Figure 117-13]##*_General Tab, Use XML Schema "`type`" Attribute
+Option_* image:xmlschtyp.gif[General Tab, Use XML Schema "`type`"
+Attribute
+Option,title="General Tab, Use XML Schema "type" Attribute Option"]
+. Select the *Field Uses XML Schema "`type`" attribute* field to qualify
+elements from the XML schema.
+
+=== How to Configure a Simple Type Translator Using Java
+
+To create an XML mapping with a simple type translator with Java code in
+your IDE, you need the following elements:
+
+* `+EISDirectMapping+` or `+EISCompositeDirectCollectionMapping+` or
+`+XMLDirectMapping+` or `+XMLCompositeDirectCollectionMapping+`
+* instance of `+Converter+`
+* instance of `+TypedElementField+`
+
+This example shows how to implement your own simple type translator with
+an `+XMLDirectMapping+` to override the built-in conversion for writing
+XML so that EclipseLink writes a `+Byte+` array
+(`+ClassConstants.ABYTE+`) as a `+Base64+`
+(`+XMLConstants.BASE64_BINARY+`) encoded string.
+
+[#Example 117-14]## *_Creating a Type Translation XML Mapping_*
+
+`+XMLDirectMapping mapping = new XMLDirectMapping();+`
+`+mapping.setConverter(new SerializedObjectConverter());+`
+`+TypedElementField field = new TypedElementField("element");+`
+`+field.getSimpleTypeTranslator().addJavaConversion(+`
+`+ ClassConstants.ABYTE,+`
+`+ new QName(XMLConstants.SCHEMA_URL, XMLConstants.BASE64_BINARY));+`
+`+mapping.setField(field);+`
+
+== Configuring a JAXB Typesafe Enumeration Converter
+
+The JAXB typesafe enumeration converter allows you to automatically
+translate an XML element value to an appropriate typesafe enumeration
+value as defined in your XML schema.
+
+For more information, see
+link:Introduction%20to%20Mappings%20(ELUG)#Mappings_and_JAXB_Typesafe_Enumerations[Mappings
+and JAXB Typesafe Enumerations].
+
+This table summarizes which mappings support this option.
+
+[#'Table 117-14]##
+
+Mapping
+
+How to Use Workbench
+
+Using Java
+
+EIS Mappings 1
+
+EIS Direct Mapping
+
+EIS Composite Direct Collection Mapping
+
+XML Mappings
+
+XML Direct Mapping
+
+XML Composite Direct Collection Mapping
+
+XML Binary Data Mapping
+
+XML Binary Data Collection Mapping
+
+XML Fragment Mapping
+
+XML Fragment Collection Mapping
+
+1When used with
+link:Configuring%20an%20EIS%20Descriptor%20(ELUG)#Configuring_Record_Format[XML
+records only]. The Workbench does not support the
+`+JAXBTypesafeEnumConverter+` directly: to configure a mapping with this
+converter, you must use Java to create an amendment method (see
+link:#How_to_Configure_a_JAXB_Typesafe_Enumeration_Converter_Using_Java[Using
+Java]).
+
+If you create a project and object model using the EclipseLink JAXB
+compiler (see
+link:Creating%20an%20XML%20Project%20(ELUG)#Creating_an_XML_Project_from_an_XML_Schema[Creating
+an XML Project from an XML Schema]), the compiler will create the type
+safe enumeration class and a class with descriptor amendment methods and
+register the required amendment methods automatically (see
+link:Introduction%20to%20XML%20Projects%20(ELUG)#Typesafe_Enumeration_Converter_Amendment_Method_DescriptorAfterLoads_Class[Typesafe
+Enumeration Converter Amendment Method DescriptorAfterLoads Class]).
+
+=== How to Configure a JAXB Typesafe Enumeration Converter Using Java
+
+To configure a mapping with a `+JAXBTypesafeEnumConverter+` in Java, use
+a descriptor amendment method (see
+link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_Amendment_Methods[Configuring
+Amendment Methods]). This example illustrates an amendment method that
+configures an `+XMLDirectMapping+` with a `+JAXBTypesafeEnumConverter+`.
+In this example, attribute `+_Val+` is mapped to a JAXB typesafe
+enumeration corresponding to typesafe enumeration class
+`+MyTypesafeEnum+`.
+
+[#Example 117-15]## *_Creating a JAXB Typesafe Enumeration XML Mapping_*
+
+`+public class DescriptorAfterLoads {+`
+
+`+ public static void amendRootImplDescriptor(ClassDescriptor descriptor) {+`
+`+ DatabaseMapping _ValMapping = descriptor.getMappingForAttributeName("_Val");+`
+`+ JAXBTypesafeEnumConverter _ValConverter = new JAXBTypesafeEnumConverter();+`
+`+ ValConverter.setEnumClassName("MyTypesafeEnum");+`
+`+ ((XMLDirectMapping) _ValMapping).setConverter(_ValConverter);+`
+`+ }+` `+}+`
+
+== Configuring Container Policy
+
+Collection mapping container policy specifies the concrete class
+EclipseLink should use when reading target objects from the database.
+
+Collection mappings can use any concrete class that implements the
+`+java.util.List+`, `+java.util.Set+`, `+java.util.Collection+`, or
+`+java.util.Map+` interface. You can map object attributes declared as
+`+List+`, `+Set+`, `+Collection+`, `+Map+`, or any subinterface of these
+interfaces, or as a class that implements one of these interfaces.
+
+By default, the EclipseLink runtime uses the following concrete classes
+from the `+org.eclipse.persistence.indirection+` package for each of
+these container types:
+
+* `+List+`–`+IndirectList+` or `+Vector+`
+* `+Set+`–`+IndirectSet+` or `+HashSet+`
+* `+Collection+`–`+IndirectList+` or `+Vector+`
+* `+Map+`–`+IndirectMap+` or `+HashSet+`
+
+Alternatively, you can specify in the mapping the concrete container
+class to be used. When EclipseLink reads objects from the database that
+contain an attribute mapped with a collection mapping, the attribute is
+set with an instance of the concrete class specified. For example,
+EclipseLink does not sort in memory. If you want to sort in memory,
+override the default `+Set+` type (`+IndirectList+`) with
+`+java.util.TreeSet+` as the concrete collection type. By default, a
+collection mapping’s container class is `+java.util.Vector+`.
+
+[width="100%",cols="<100%",]
+|===
+|*Note:* If you are using Workbench and you override the default
+`+Collection+` class with a custom `+Collection+` class of your own, you
+must put your custom `+Collection+` class on the Workbench classpath
+(see
+link:Using%20Workbench%20(ELUG)#Configuring_the_Workbench_Environment[Configuring
+the Workbench Environment]).
+|===
+
+This table summarizes which mappings support this option.
+
+[#Table 117-15]##
+
+Mapping
+
+List
+
+Set
+
+Collection
+
+Map
+
+Using Workbench
+
+Using Java
+
+Relational Mappings
+
+One-to-Many Mapping
+
+Many-to-Many Mapping
+
+Aggregate Collection Mapping
+
+Direct Collection Mapping
+
+Direct Map Mapping
+
+Object-Relational Data Type Mappings
+
+Object-Relational Data Type Array Mapping
+
+Object-Relational Data Type Object Array Mapping
+
+Object-Relational Data Type Nested Table Mapping
+
+EIS Mappings
+
+EIS Composite Direct Collection Mapping
+
+EIS Composite Collection Mapping
+
+EIS One-to-Many Mapping
+
+XML Mappings
+
+XML Composite Direct Collection Mapping
+
+XML Composite Collection Mapping
+
+XML Any Collection Mapping
+
+XML Choice Collection Mapping
+
+XML Any Attribute Mapping
+
+XML Binary Data Collection Mapping
+
+XML Collection Reference Mapping
+
+=== How to Configure Container Policy Using Workbench
+
+To specify a mapping’s container policy, use this procedure:
+
+[arabic]
+. Select the mapped attribute in the *Navigator*. Its properties appear
+in the Editor.
+. Click the *General* tab. The General tab appears.
+. Click the *Advanced* button. The Advanced Container Options appear on
+the General tab. [#Figure 117-14]##*_General Tab, Advanced Container
+Options_* image:onetomany_coll_cont.gif[General Tab, Advanced Container
+Options,title="General Tab, Advanced Container Options"]
+. Complete *Advanced Container Options* on the tab.
+
+Use the following Advanced Container Options fields on the *General* tab
+to specify the container options:
+
+Field 1
+
+Description
+
+Container Type
+
+Specify the type of Collection class to use:
+
+List–use a java.util.List
+
+Set–use a java.util.Set
+
+Collection–use a java.util.Collection
+
+Map–use a java.util.Map
+
+Override Default Class
+
+Specify to use a custom class as the mapping’s container policy. Click
+Browse to select a different class. The container class must implement
+(directly or indirectly) the java.util.Collection interface.
+
+Key Method
+
+If you configure Container Type as Map, use this option to specify the
+name of the zero argument method whose result, when called on the target
+object, is used as the key in the Hashtable or Map. This method must
+return an object that is a valid key in the Hashtable or Map.
+
+1Not all mappings support all options. For more information, see the
+link:#Table_117-15[Mapping Support for Container Policy] table.
+
+=== How to Configure Container Policy Using Java
+
+Classes that implement the
+`+org.eclipse.persistence.mappings.ContainerMapping+` interface provide
+the following methods to set the container policy:
+
+* `+useCollectionClass(java.lang.Class concreteClass)+`–Configure the
+mapping to use an instance of the specified `+java.util.Collection+`
+container class to hold the target objects.
+* `+useMapClass(java.lang.Class concreteClass, java.lang.String methodName)+`–Configure
+the mapping to use an instance of the specified `+java.util.Map+`
+container class to hold the target objects. The key used to index a
+value in the `+Map+` is the value returned by a call to the specified
+zero-argument method. The method must be implemented by the class (or a
+superclass) of any value to be inserted into the `+Map+`.
+
+Classes that extend
+`+org.eclipse.persistence.mappings.CollectionMapping+` (which implements
+the `+ContainerMapping+` interface) also provide the following methods
+to set the container policy:
+
+* `+useSortedSetClass(java.lang.Class concreteClass, java.util.Comparator comparator)+`–Configure
+the mapping to use an instance of the specified `+java.util.SortedSet+`
+container class. Specify the `+Comparator+` to use to sort the target
+objects.
+
+The following example shows how to configure a
+`+DirectCollectionMapping+` to use a `+java.util.ArrayList+` container
+class.
+
+[#'Example 117-16]## *_Direct Collection Mapping_*
+
+*`+//\'\' \'\'Create\'\' \'\'a\'\' \'\'new\'\' \'\'mapping\'\' \'\'and\'\' \'\'register\'\' \'\'it\'\' \'\'with\'\' \'\'the\'\' \'\'source\'\' \'\'descriptor+`*
+`+DirectCollectionMapping phonesMapping = new DirectCollectionMapping();+`
+`+phonesMapping.setAttributeName("phones");+`
+`+phonesMapping.setGetMethodName("getPhones");+`
+`+phonesMapping.setSetMethodName("setPhones");+`
+`+phonesMapping.setReferenceTableName("PHONES_TB");+`
+`+phonesMapping.setDirectFieldName("PHONES");+`
+`+phonesMapping.useCollectionClass(ArrayList.class); +`*`+//\'\' \'\'set\'\' \'\'container\'\' \'\'policy+`*
+`+descriptor.addMapping(phonesMapping);+`
+
+== Configuring Attribute Transformer
+
+A transformation mapping is made up of an attribute transformer for
+field-to-attribute transformation at read (unmarshall) time and one or
+more field transformers for attribute-to-field transformation at write
+(marshall) time (see
+link:#Configuring_Field_Transformer_Associations[Configuring Field
+Transformer Associations]).
+
+This section describes how to configure the attribute transformer that a
+transformation mapping uses to perform the field-to-attribute
+transformation at read (unmarshal) time.
+
+You can do this using either a method or class-based transformer.
+
+A method-based transformer must map to a method in the domain object.
+
+A class-based transformer allows you to place the transformation code in
+another class, making this approach non-intrusive: that is, your domain
+object does not need to implement an EclipseLink interface or provide a
+special transformation method
+
+This table summarizes which mappings support this option.
+
+[#Table 117-16]##
+
+Mapping
+
+Using Workbench
+
+Using Java
+
+Relational Mappings
+
+Transformation Mapping
+
+EIS Mappings
+
+EIS Transformation Mapping
+
+XML Mappings
+
+XML Transformation Mapping
+
+=== How to Configure Attribute Transformer Using Workbench
+
+To specify a mapping’s attribute transformer, use this procedure:
+
+[arabic]
+. Select the transformation mapping in the *Navigator*. Its properties
+appear in the Editor. [#Figure 117-15]##*_Transformation Mapping,
+Attribute Transformer Field_* image:trmapatt.gif[Transformation Mapping,
+Attribute Transformer
+Field,title="Transformation Mapping, Attribute Transformer Field"]
+. Click *Edit*. The Specify Transformer dialog box appears.
+[#'Figure 117-16]##*_Specify Transformer Dialog Box_*
+image:spstrans.gif[Specify Transformer Dialog
+Box,title="Specify Transformer Dialog Box"]
+. Complete each field on the Specify Transformer dialog box and click
+*OK*.
+
+Use the following information to enter data in each field of the dialog
+box and click *OK*:
+
+[width="100%",cols="<20%,<80%",options="header",]
+|===
+|*Field* |*Description*
+|*Use Transformation Method* |Select a specific method to control the
+transformation. A method based transformer must map to a method in the
+domain object.
+
+|*Use Transformer Class* |Select a specific class to control the
+transformation. The class must be available on the Workbench application
+classpath.
+|===
+
+=== How to Configure Attribute Transformer Using Java
+
+You can configure a method-based attribute transformer using
+`+AbstractTransformationMapping+` method `+setAttributeTransformation+`,
+passing in the name of the domain object method to use.
+
+You can configure a class-based attribute transformer using
+`+AbstractTransformationMapping+` method `+setAttributeTransformer+`,
+passing in an instance of
+`+org.eclipse.persistence.mappings.Transfomers.AttributeTransformer+`.
+
+A convenient way to create an `+AttributeTransformer+` is to extend
+`+AttributeTransformerAdapter+`.
+
+== Configuring Field Transformer Associations
+
+A transformation mapping is made up of an attribute transformer for
+field-to-attribute transformation at read (unmarshall) time (see
+link:#Configuring_Attribute_Transformer[Configuring Attribute
+Transformer]) and one or more field transformers for attribute-to-field
+transformation at write (marshall) time.
+
+This section describes how to configure the field transformers that a
+transformation mapping uses to perform the object attribute-to-field
+transformation at write (marshal) time.
+
+You can do this using either a method or class-based transformer.
+
+A method-based transformer must map to a method in the domain object.
+
+A class-based transformer allows you to place the transformation code in
+another class, making this approach non-intrusive: that is, your domain
+object does not need to implement an EclipseLink interface or provide a
+special transformation method.
+
+This table summarizes which mappings support this option.
+
+[#Table 117-17]##
+
+Mapping
+
+Using Workbench
+
+Using Java
+
+Relational Mappings
+
+Transformation Mapping
+
+EIS Mappings
+
+EIS Transformation Mapping
+
+XML Mappings
+
+XML Transformation Mapping
+
+=== How to Configure Field Transformer Associations Using Workbench
+
+Use this procedure to complete the *Object->Field Method* fields:
+
+[arabic]
+. Select the mapped attribute in the *Navigator*. Its properties appear
+in the Editor. [#Figure 117-17]##*_Transformation Mapping, Field
+Transformer Associations_* image:trmapfie.gif[Transformation Mapping,
+Field Transformer
+Associations,title="Transformation Mapping, Field Transformer Associations"]
+. Click *Add* to add the necessary Field Transformer Associations for
+the mapping.
+
+To add a new association, click *Add*. Continue with
+link:#Specifying_Field-to-Transformer_Associations[Specifying
+Field-to-Transformer Associations].
+
+To change an existing association, click *Edit*. Continue with
+link:#Specifying_Field-to-Transformer_Associations[Specifying
+Field-to-Transformer Associations].
+
+To delete an existing association, select the field transformation
+association and click *Delete*.
+
+==== Specifying Field-to-Transformer Associations
+
+To specify the actual transformation method or class used for the field
+of a transformation mapping, use this procedure.
+
+[arabic]
+. From the Transformation Mapping, Field Transformer Associations, click
+*Add* or Edit. The Specify Field-Transformer Association dialog box
+appears. [#Figure 117-18]##*_Specify Field-Transformer Association
+Dialog Box_* image:fldtramt.gif[Specify Field-Transformer Association
+Dialog Box,title="Specify Field-Transformer Association Dialog Box"]
+. Complete each field on the dialog box.
+
+Use the following information to complete each field on the dialog box:
+
+Field
+
+Description
+
+Field
+
+Select the database field (from the descriptor’s associated table) for
+this transformation.
+
+Transformer
+
+Select one of the following methods to control the transformation:
+
+Use Transformation Method
+
+Select a specific method to control the transformation. A method based
+transformer must map to a method in the domain object.
+
+Use Transformer Class
+
+Select a specific class to control the transformation. The class must be
+available on Workbench application classpath.
+
+=== How to Configure Field Transformer Associations Using Java
+
+You can specify a specific transformation method on your domain object
+or an instance of
+`+org.eclipse.persistence.mappings.Transfomers.FieldTransformer+` (you
+can also extend the `+FieldTransformerAdapter+`). Using a
+`+FieldTransformer+` is non-intrusive: that is, your domain object does
+not need to implement an EclipseLink interface or provide a special
+transformation method.
+
+You can configure a method-based field transformer using
+`+AbstractTransformationMapping+` method `+addFieldTransformation+`,
+passing in the name of the database field and the name of the domain
+object method to use.
+
+You can configure a class-based field transformer using
+`+AbstractTransformationMapping+` method `+addFieldTransformer+`,
+passing in the name of the database field and an instance of
+`+org.eclipse.persistence.mappings.Transfomers.FieldTransformer+`.
+
+A convenient way to create a `+FieldTransformer+` is to extend
+`+FieldTransformerAdapter+`.
+
+== Configuring Mutable Mappings
+
+Direct mappings typically map simple, nonmutable values such as
+`+String+` or `+Integer+`. Transformation mappings can potentially map
+complex mutable object values, such as mapping several database field
+values to an instance of a Java class.
+
+If a transformation mapping maps a mutable value, EclipseLink must clone
+and compare the value in a unit of work (see
+link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_Copy_Policy[Configuring
+Copy Policy]).
+
+By default, EclipseLink assumes that all transformation mappings are
+mutable. If the mapping maps a simple immutable value, you can improve
+the unit of work performance by configuring the *IsMutable* option to
+`+false+`.
+
+By default, EclipseLink also assumes that all direct mappings are
+mutable unless a serialized converter is used. These mappings can also
+set the *IsMutable* option. You should set it if you want to modify
+`+Date+` or `+Calendar+` fields.
+
+This table summarizes which mappings support this option.
+
+For more information, see
+link:Introduction_to_EclipseLink%20Application%20Development%20(ELUG)#Mutability[Mutability].
+
+[#Table 117-18]##
+
+Mapping
+
+Using Workbench
+
+How to Use Java
+
+Relational Mappings
+
+Transformation Mapping
+
+Direct-to-Field Mapping
+
+EIS Mappings
+
+EIS Transformation Mapping
+
+EIS Direct Mapping
+
+XML Mappings
+
+XML Transformation Mapping
+
+XML Direct Mapping
+
+=== How to Configure Mutable Mappings Using Workbench
+
+Use this table to complete the *Object->Field Method* fields:
+
+[arabic]
+. Select the mapped attribute in the *Navigator*. Its properties appear
+in the Editor. [#'Figure 117-19]##*_Transformation Mapping, Mutable
+Option_* image:trmute.gif[Transformation Mapping, Mutable
+Option,title="Transformation Mapping, Mutable Option"]
+. By default, the *IsMutable* option is selected in all transformation
+mappings. If the mapping maps to a simple atomic value, unselect this
+option.
+
+=== How to Configure Mutable Mappings Using Java
+
+You can specify whether or not a mapping is mutable using
+`+AbstractTransformationMapping+` method `+setIsMutable+` for
+transformation mappings, and `+AbstractDirectMapping+` method
+`+isMutable+` for direct mappings.
+
+== Configuring Bidirectional Relationship
+
+EclipseLink can automatically manage the bidirectional relationship: if
+one side of the relationship is set or modified, EclipseLink will
+automatically set the other side. To enable this functionality, use the
+value holder indirection (see
+link:Introduction%20to%20Mappings%20(ELUG)#Value_Holder_Indirection[Value
+Holder Indirection]) for one-to-one mappings, and transparent
+collections (see
+link:Introduction%20to%20Mappings%20(ELUG)#Transparent_Indirect_Container_Indirection[Transparent
+Indirect Container Indirection])–for one-to-many and many-to-many
+mappings.
+
+Note: We do not recommend using this EclipseLink feature: if the object
+model is used outside the persistence context it must be responsible for
+managing the bidirectional relationship.
+
+Instead, your application should maintain the bidirectional relationship
+in its getter and setter methods.
+
+This table summarizes which mappings support this option.
+
+[#Table 117-19]##
+
+Mapping
+
+Using Workbench
+
+Using Java
+
+Relational Mappings
+
+One-to-One Mapping
+
+One-to-Many Mapping
+
+Many-to-Many Mapping
+
+EIS Mappings
+
+EIS One-to-One Mapping
+
+EIS One-to-Many Mapping
+
+=== How to Configure Bidirectional Relationship Using Workbench
+
+To maintain a bidirectional relationship for a mapping, use this
+procedure:
+
+[arabic]
+. Select the mapped attribute in the *Navigator*. Its properties appear
+in the Editor.
+. Click the *General* tab. The General tab appears.
+[#'Figure 117-20]##*General tab, Maintains Bidirectional Relationship
+option*’’ image:oogenbid.gif[General tab, Maintains Bidirectional
+Relationship
+option,title="General tab, Maintains Bidirectional Relationship option"]
+. Complete the Bidirectional Relationship fields.
+
+Use this table to enter data in the following fields on the tab:
+
+[width="100%",cols="<24%,<76%",options="header",]
+|===
+|*Field* |*Description*
+|*Maintains Bidirectional Relationship* |Specify if EclipseLink should
+maintain the bidirectional link for this relational mapping.
+
+|*Relationship Partner* |Select the relationship partner (from the list
+of mapped attributes of the *Reference Descriptor*) for this
+bidirectional relationship.
+|===
+
+=== How to Configure Bidirectional Relationship Using Java
+
+If a mapping has a bidirectional relationship in which the two classes
+in the relationship reference each other with one-to-one mappings, then
+set up the foreign key information as follows:
+
+* One mapping must call the `+setForeignKeyFieldName+` method.
+* The other must call the `+setTargetForeignKeyFieldName+` method.
+
+You can also set up composite foreign key information by calling the
+`+addForeignKeyFieldName+` and `+addTargetForeignKeyFieldName+` methods.
+Because EclipseLink enables indirection (lazy loading) by default, the
+attribute must be a `+ValueHolderInterface+`.
+
+Note: When your application does not use a cache, enable indirection for
+at least one object in a bidirectional relationship. In rare cases,
+disabling indirection on both objects in the bidirectional relationship
+can lead to infinite loops. For more information, see the following:
+
+Directionality
+
+Indirection (Lazy Loading)
+
+The following example demonstrates setting of bidirectional relationship
+between the `+Policy+` and `+Carrier+` classes. The foreign key is
+stored in the `+Policy+`’s table referencing the composite primary key
+of the `+Carrier+`.
+
+[#Example 120–18]## *_Implementing a Bidirectional Mapping Between Two
+Classes that Reference Each Other_*
+
+`+public class Policy {+` `+ ...+`
+`+ +`*`+//\'\' \'\'create\'\' \'\'the\'\' \'\'mapping\'\' \'\'that\'\' \'\'references\'\' \'\'the\'\' \'\'Carrier\'\' \'\'class+`*
+`+ OneToOneMapping carrierMapping = new OneToOneMapping();+`
+`+ carrierMapping.setAttributeName("carrier");+`
+`+ carrierMapping.setReferenceClass(Carrier.class);+`
+`+ carrierMapping.addForeignKeyFieldName("INSURED_ID", "CARRIER_ID");+`
+`+ carrierMapping.addForeignKeyFieldName("INSURED_TYPE", "TYPE");+`
+`+ descriptor.addMapping(carrierMapping);+` `+ ...+` `+}+`
+
+`+public class Carrier {+` `+ ...+`
+`+ +`*`+//\'\' \'\'create\'\' \'\'the\'\' \'\'mapping\'\' \'\'that\'\' \'\'references\'\' \'\'the\'\' \'\'Policy\'\' \'\'class+`*
+`+ OneToOneMapping policyMapping = new OneToOneMapping();+`
+`+ policyMapping.setAttributeName("masterPolicy");+`
+`+ policyMapping.setReferenceClass(Policy.class);+`
+`+ policyMapping.addTargetForeignKeyFieldName("INSURED_ID", "CARRIER_ID");+`
+`+ policyMapping.addTargetForeignKeyFieldName("INSURED_TYPE", "TYPE");+`
+`+ descriptor.addMapping(policyMapping);+` `+ ...+` `+}+`
+
+== Configuring the Use of a Single Node
+
+For the XML-based mappings that the link:#Table_117-20[Mapping Support
+for Use Single Node] table summarizes, when you map a list value, you
+can configure whether or not the mapping unmarshalls (writes) the list
+to a single node, like `+aaa bbb ccc+`, or to multiple nodes, like the
+following:
+
+`+aaa+` `+bbb+` `+ccc+`
+
+This table summarizes which mappings support this option.
+
+[#Table 117-20]##
+
+Mapping
+
+Using Workbench
+
+Using Java
+
+EIS Mappings 1
+
+EIS Direct Mapping
+
+EIS Composite Direct Collection Mapping
+
+XML Mappings
+
+XML Direct Mapping
+
+XML Composite Direct Collection Mapping
+
+XML Binary Data Mapping
+
+XML Binary Data Collection Mapping
+
+1When used with
+link:Configuring%20an%20EIS%20Descriptor%20(ELUG)#Configuring_Record_Format[XML
+records only].
+
+=== How to Configure the Use of a Single Node Using Workbench
+
+o configure a mapping to use a single node, use this procedure.
+
+[arabic]
+. Select the mapped attribute in the *Navigator*. Its properties appear
+in the Editor.
+. Click the *General* tab. The General tab appears.
+[#Figure 117-21]##*_General Tab, Use Single Node Option_*
+image:usesingle.gif[General Tab, Use Single Node
+Option,title="General Tab, Use Single Node Option"]
+. Complete the *Use single node* field on the tab.
+
+To configure the mapping to unmarshall (write) a list value to a single
+node (like `+aaa bbb ccc+`), click *Use single node*.
+
+By default, the mapping unmarshalls a list value to separate nodes.
+
+=== How to Configure the Use of a Single Node Using Java
+
+Use `+AbstractCompositeDirectCollectionMapping+` method
+`+setUsesSingleNode+` to configure the mapping to write a list value to
+a single node by passing in a value of `+true+`. To configure the
+mapping to write a list value to multiple nodes, pass in a value of
+`+false+`.
+
+For any mapping that takes an `+XMLField+`, use `+XMLField+` method
+`+setUsesSingleNode+` to configure the mapping to write a list value to
+a single node by passing in a value of `+true+`. To configure the
+mapping to write a list value to multiple nodes, pass in a value of
+`+false+`. This example shows how to use this method with an
+`+XMLDirectMapping+`:
+
+[#Example 117-17]## *_Using XMLField Method setUsesSingleNode_*
+
+`+XMLDirectMapping tasksMapping = new XMLDirectMapping();+`
+`+tasksMapping.setAttributeName("tasks");+`
+`+XMLField myField = new XMLField("tasks/text()"); +`*`+//\'\' \'\'pass\'\' \'\'in\'\' \'\'the\'\' \'\'XPath+`*
+`+myField.setUsesSingleNode(true);+` `+tasksMapping.setField(myField);+`
+
+== Configuring the Use of CDATA
+
+For the XML-based mappings that the link:#Table_117-6[Mapping Support
+for Default Null Values] table summarizes, when you create a mapping,
+you can configure whether or not the mapping’s text is wrapped in a
+statement.
+
+This table summarizes which mappings support this option.
+
+[#Table 117-21]##
+
+Mapping
+
+Using Workbench
+
+Using Java
+
+XML Mappings
+
+XML Direct Mapping
+
+XML Composite Direct Collection Mapping
+
+XML Binary Data Mapping
+
+XML Binary Data Collection Mapping
+
+=== How to Configure the Use of CDATA Using Java
+
+Use the `+isCDATA()+` method on an `+XMLDirectMapping+` or
+`+XMLCompositeDirectCollectionMapping+` to specify if the mapping’s text
+is wrapped in a statement. The following example shows the results of
+using this method:
+
+[#Example 117-18]## *_Using CDATA_*
+
+When `+isCDATA = false+` on the name mapping, EclipseLink writes the
+text as a regular text node:
+
+`+ +``+Jane Doe+`
+
+When `+isCDATA = true+` on the name mapping, EclipseLink wraps the text
+in a statement:
+
+`+ +` `+ +` `+ +`
+
+'''''
+
+_link:EclipseLink_User's_Guide_Copyright_Statement[Copyright Statement]_
+
+Category:_EclipseLink_User's_Guide[Category: EclipseLink User’s Guide]
+Category:_Task[Category: Task] Category:_Release_1[Category: Release 1]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Project_(ELUG).adoc b/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Project_(ELUG).adoc
new file mode 100644
index 00000000000..93387e980c6
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Project_(ELUG).adoc
@@ -0,0 +1,915 @@
+*TOC* Special:Whatlinkshere_Configuring_a_Project_(ELUG)[Related Topics]
+
+This section describes how to configure EclipseLink project options
+common to two or more project types.
+
+This table lists the types of EclipseLink projects that you can
+configure and provides a cross-reference to the type-specific chapter
+that lists the configurable options supported by that type.
+
+[#Table 113-1]##
+
+If you are creating…
+
+See also…
+
+Relational Projects
+
+Configuring a Relational Project
+
+EIS Projects
+
+Configuring an EIS Project
+
+XML Projects
+
+Configuring an XML Project
+
+The link:#Table_113-2[Common Project Options] table lists the
+configurable options shared by two or more EclipseLink project types.
+
+For more information, see the following:
+
+* link:Creating%20a%20Project%20(ELUG)#Introduction_to_the_Project_Creation[Introduction
+to the Project Creation]
+* link:Introduction%20to%20Projects_(ELUG)[Introduction to Projects]
+
+== Configuring Common Project Options
+
+This table lists the configurable options shared by two or more
+EclipseLink project types. In addition to the configurable options
+described here, you must also configure the options described for the
+specific EclipseLink project types (see
+link:Introduction%20to%20Projects_(ELUG)#EclipseLink_Project_Types[EclipseLink
+Project Types]), as shown in the link:#Table_113-1[Configuring
+EclipseLink Projects] table.
+
+[#Table 113-2]##
+
+Option to Configure
+
+EclipseLink Workbench
+
+Java
+
+Project save location
+
+Classpath
+
+Method or direct field access
+
+Default descriptor advanced properties
+
+Existence checking
+
+Deployment XML options
+
+Model Java source code options
+
+Cache type and size
+
+Cache isolation
+
+Cache coordination change propagation
+
+Cache expiration
+
+Comments
+
+== Configuring Project Save Location
+
+You can configure a project save location only when using Workbench.
+
+This table summarizes which projects support a project save location.
+
+[#Table 113-3]##
+
+Descriptor
+
+Using the Workbench
+
+Using Java
+
+Relational Projects
+
+EIS Projects
+
+XML Projects
+
+=== How to Configure Project Save Location Using Workbench
+
+The Project Save Location field on the project’s General tab is for
+display only. This field shows the full directory path for the project.
+All relative locations used in the project are based on this location.
+
+{empty}[#Figure 113-1]## *’’ General Tab, Project Save Location*’’
+image:saveloc.gif[General Tab, Project Save
+Location,title="General Tab, Project Save Location"]
+
+To select a new location, right-click on the project in the *Navigator*
+and select *Save As* from the context menu. See
+link:Creating%20a%20Project%20(ELUG)#How_to_Save_Projects[How to Save
+Projects] for more information.
+
+== Configuring Project Classpath
+
+The EclipseLink project uses a classpath – a set of directories, JAR
+files, and ZIP files – when importing Java classes and defining object
+types.
+
+This table summarizes which projects support project classpath
+configuration.
+
+[#Table 113-4]##
+
+Descriptor
+
+Using the Workbench
+
+Using Java
+
+Relational Projects
+
+EIS Projects
+
+XML Projects
+
+Do not include JDBC drivers or other elements required to access the
+data source in the project classpath. Use the `+setenv+` file to specify
+these application-level settings (see
+link:Using%20Workbench%20(ELUG)#Configuring_the_Workbench_Environment[Configuring
+the Workbench Environment]).
+
+After you configure the project classpath, you can use Workbench to
+import classes into your project (see
+link:Using%20Workbench%20(ELUG)#How_to_Import_and_Update_Classes[How to
+Import and Update Classes]).
+
+=== How to Configure Project Classpath Using Workbench
+
+To specify the project classpath information, use this procedure:
+
+[arabic]
+. Select the project object in the *Navigator*.
+. Click the *General* tab in the *Editor*. The General tab appears.
+[#Figure 113-2]##*_General Tab, Classpath Options_*
+image:genclassp.gif[General Tab, Classpath
+Options,title="General Tab, Classpath Options"]
+
+To add a new classpath entry, click *Add Entry* or *Browse* and select
+the directory, `+.jar+` file, or `+.zip+` file for this project. To
+create a relative classpath, select an entry and edit the path, as
+necessary. The path will be relative to the *Project Save Location*.
+
+To remove a classpath entry, select the entry and click *Remove*.
+
+To change the order of the entries, select the entry and click *Up* or
+*Down*.
+
+== Configuring Method or Direct Field Access at the Project Level
+
+By default, when EclipseLink performs a persistence operation, it
+accesses the persistent attributes of an object directly: this is known
+as direct field access. Alternatively, you can configure EclipseLink to
+access persistent attributes using accessor methods of the object: this
+is known as method access.
+
+We recommend using field access for mappings. Not only is it more
+efficient, but using method access may cause issues if the method
+produces unexpected side-effects.
+
+This table summarizes which projects support mapped field access
+configuration.
+
+[#Table 113-5]##
+
+Descriptor
+
+Using the Workbench
+
+Using Java
+
+Relational Projects
+
+EIS Projects
+
+XML Projects
+
+This section describes configuring mapped field access at the project
+level: by default, this configuration applies to all descriptors and
+their mappings.
+
+[width="100%",cols="<100%",]
+|===
+|*Note*: If you change the access default, existing mappings retain
+their current access settings, but new mappings will be created with the
+new default.
+|===
+
+You can also configure mapped field access at the mapping level to
+override this project-level configuration on a mapping-by-mapping basis.
+For more information, see
+link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Method_or_Direct_Field_Accessing_at_the_Mapping_Level[Configuring
+Method or Direct Field Accessing at the Mapping Level].
+
+If you enable change tracking on a property (for example, you decorate
+method `+getPhone+` with `+@ChangeTracking+`) and you access the field
+(`+phone+`) directly, note that EclipseLink does not detect the change.
+For more information, see
+link:Introduction_to_EclipseLink%20Application%20Development%20(ELUG)#Using_Method_and_Direct_Field_Access[Using
+Method and Direct Field Access].
+
+=== How to Configure Method or Direct Field Access at the Project Level Using Workbench
+
+To specify the field access method information, use this procedure:
+
+[arabic]
+. Select the project object in the *Navigator*.
+. Select the *Defaults* tab in the *Editor*. The Defaults tab appears.
+[#Figure 113-3]##*_Defaults Tab, Field Accessing Options_*
+image:genfield.gif[Defaults Tab, Field Accessing
+Options,title="Defaults Tab, Field Accessing Options"]
+. Complete the Mapped Field Accessing options.
+
+== Configuring Default Descriptor Advanced Properties
+
+You can configure default descriptor advanced properties when using the
+Workbench.
+
+By default, Workbench displays a subset of features for each descriptor
+type. You can modify this subset so that descriptors include additional
+advanced properties by default.
+
+You can also select specific advanced properties for individual
+descriptors (see link:Configuring%20a%20Descriptor%20(ELUG)[Configuring
+a Descriptor]).
+
+This table summarizes which projects support default descriptor advanced
+property configuration.
+
+[#Table 113-6]##
+
+Descriptor
+
+Using the Workbench
+
+Using Java
+
+Relational Projects
+
+EIS Projects
+
+XML Projects
+
+=== How to Configure Default Descriptor Advanced Properties Using Workbench
+
+To specify the default advanced properties for newly created descriptors
+in your project, use this procedure:
+
+[arabic]
+. Select the project object in the *Navigator*.
+. Select the *Defaults* tab in the *Editor*. The Defaults tab appears.
+[#Figure 113-4]##*_Defaults Tab, Descriptor Advanced Properties_*
+image:desadv.gif[Defaults Tab, Descriptor Advanced
+Properties,title="Defaults Tab, Descriptor Advanced Properties"]
+
+Select which *Descriptor Advanced Properties* to add to newly created
+descriptors. The list of advanced properties will vary, depending on the
+project type.
+
+*See Also*
+
+link:#Configuring_Default_Descriptor_Advanced_Properties[Configuring
+Default Descriptor Advanced Properties]
+
+link:Configuring%20a%20Descriptor%20(ELUG)[Configuring a Descriptor]
+
+link:#Configuring_a_Project[Configuring a Project]
+
+== Configuring Existence Checking at the Project Level
+
+When EclipseLink writes an object to the database, it runs an existence
+check to determine whether to perform an insert or an update operation.
+
+By default, EclipseLink checks against the cache. We recommend that you
+use this default existence check option for most applications. Checking
+the database for existence can cause a performance bottleneck in your
+application.
+
+This table summarizes which projects support existence checking
+configuration.
+
+[#Table 113-7]##
+
+Descriptor
+
+Using the Workbench
+
+Using Java
+
+Relational Projects
+
+EIS Projects
+
+XML Projects
+
+By default, this configuration applies to all descriptors in a project.
+You can also configure existence checking at the descriptor level to
+override this project-level configuration on a descriptor-by-descriptor
+basis. For more information, see
+link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_Cache_Existence_Checking_at_the_Descriptor_Level[Configuring
+Cache Existence Checking at the Descriptor Level].
+
+For more information see the following:
+
+* link:Introduction%20to%20Cache%20(ELUG)#Cache_Type_and_Object_Identity[Cache
+Type and Object Identity]
+* link:Introduction%20to%20EclipseLink%20Queries%20(ELUG)#Queries_and_the_Cache[Queries
+and the Cache]
+* link:Using%20Advanced%20Unit%20of%20Work%20API%20(ELUG)#How_to_Use_Registration_and_Existence_Checking[How
+to Use Registration and Existence Checking]
+
+=== How to Configure Existence Checking at the Project Level Using Workbench
+
+To specify the existence checking information, use this procedure:
+
+[arabic]
+. Select the project object in the *Navigator*.
+. Select the *Defaults* tab in the *Editor*. The Defaults tab appears.
+[#Figure 113-5]##*_Defaults Tab, Existence Checking Options_*
+image:existnc.gif[Defaults Tab, Existence Checking
+Options,title="Defaults Tab, Existence Checking Options"]
+. Complete the Existence Checking options on the tab.
+
+Use this table to enter data in following fields to specify the
+existence checking options for newly created descriptors:
+
+[width="100%",cols="<7%,<93%",options="header",]
+|===
+|*Field* |*Description*
+|*Check Cache* |Check the session cache. If the object is not in the
+cache, assume that the object does not exist (do an insert). If the
+object is in the cache, assume that the object exists (do an update). We
+recommend using this option for most applications.
+
+|*Check Database* |If an object is not in the cache, query the database
+to determine if the object exists. If the object exists, do an update.
+Otherwise, do an insert. Selecting this option may negatively impact
+performance. For more information, see
+link:Using%20Advanced%20Unit%20of%20Work%20API%20(ELUG)#Using_Check_Database[Using
+Check Database].
+
+|*Assume Existence* |Always assume objects exist: always do an update
+(never do an insert). For more information, see
+link:Using%20Advanced%20Unit%20of%20Work%20API%20(ELUG)#Using_Assume_Existence[Using
+Assume Existence].
+
+|*Assume Nonexistence* |Always assume objects do not exist: always do an
+insert (never do an update). For more information, see
+link:Using%20Advanced%20Unit%20of%20Work%20API%20(ELUG)#Using_Assume_Nonexistence[Using
+Assume Nonexistence].
+|===
+
+== Configuring Project Deployment XML Options
+
+You can configure project deployment XML options when using Workbench.
+
+Using Workbench, you can specify the default file names, class names,
+and directories, when exporting or generating deployment XML.
+Directories are relative to the project save location (see
+link:#Configuring_Project_Save_Location[Configuring Project Save
+Location]), and will contain folders for each generated package.
+
+This table summarizes which projects support deployment XML options.
+
+[#Table 113-8]##
+
+Descriptor
+
+Using the Workbench
+
+Using Java
+
+Relational Projects
+
+EIS Projects
+
+XML Projects
+
+=== How to Configure Project Deployment XML Options Using Workbench
+
+To specify the default export options, use this procedure:
+
+[arabic]
+. Select the project object in the *Navigator*.
+. Select the *Options* tab in the *Editor*. The Options tab appears.
+[#Figure 113-6]##*_Options Tab, Project Deployment XML Options_*
+image:prjoptxml.gif[Options Tab, Project Deployment XML
+Options,title="Options Tab, Project Deployment XML Options"]
+. Complete the fields on the [topicid:project.options.deployment Project
+Deployment XML options] on the tab.
+
+Use this table to enter data in following fields to specify the default
+Project Deployment XML options:
+
+[width="100%",cols="<16%,<84%",options="header",]
+|===
+|*Field* |*Description*
+|*File Name* |File name (such as `+project.xml+`) to use when generating
+project deployment XML.
+
+|*Directory* |Directory in which to save the generated deployment XML
+file.
+|===
+
+*See Also*
+
+link:#Configuring_Project_Deployment_XML_Options[Configuring Project
+Deployment XML Options]
+
+link:#Configuring_a_Project[Configuring a Project]
+
+link:Creating%20a%20Project%20(ELUG)#Exporting_Project_Information[Exporting
+Project Information]
+
+== Configuring Model Java Source Code Options
+
+You can configure model java source code options when using the
+Workbench.
+
+Using Workbench, you can specify the default file names, class names,
+and directories, when exporting or generating Java source code for your
+domain objects. Directories are relative to the project save location
+(see link:#Configuring_Project_Save_Location[Configuring Project Save
+Location]), and will contain folders for each generated package.
+
+This table summarizes which projects support model Java source code
+options.
+
+[#Table 113-9]## *_Project Support for Model Java Source Options_*
+
+Descriptor
+
+Using the Workbench
+
+Using Java
+
+Relational Projects
+
+EIS Projects
+
+XML Projects
+
+=== How to Configure Model Java Source Code Options Using Workbench
+
+To specify the default export options, use this procedure:
+
+[arabic]
+. Select the project object in the *Navigator*.
+. Select the *Options* tab in the *Editor*. The Options tab appears.
+[#Figure 113-7]##*_Options Tab, Model Java Source options_*
+image:prjoptmd.gif[Options Tab, Model Java Source
+options,title="Options Tab, Model Java Source options"]
+. Complete the fields on the Model Java Source options on the tab.
+. Specify the project root directory to which Workbench generates model
+Java source files. For more information, see
+link:Creating%20a%20Descriptor%20(ELUG)#Generating_Java_Code_for_Descriptors[Generating
+Java Code for Descriptors].
+
+*See Also*
+
+link:#Configuring_a_Project[Configuring a Project]
+
+link:Creating%20a%20Project%20(ELUG)#Exporting_Project_Information[Exporting
+Project Information]
+
+== Configuring Cache Type and Size at the Project Level
+
+The EclipseLink cache is an in-memory repository that stores recently
+read or written objects based on class and primary key values.
+EclipseLink uses the cache to achieve the following:
+
+* improve performance by holding recently read or written objects and
+accessing them in-memory to minimize database access;
+* manage locking and isolation level;
+* manage object identity.
+
+This table summarizes which projects support identity map configuration.
+
+[#'Table 113-10]## *_Project Support for Identity Map Configuration_*
+
+Descriptor
+
+Using the Workbench
+
+Using Java
+
+Relational Projects
+
+EIS Projects
+
+XML Projects
+
+The cache options you configure at the project level apply globally to
+all descriptors. Use this section to define global cache options for an
+EclipseLink project.
+
+You can override the project-level identity map configuration by
+defining identity map configuration at the descriptor level. For
+information on caching and defining identity map configuration for a
+specific descriptor, see
+link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_Cache_Type_and_Size_at_the_Descriptor_Level[Configuring
+Cache Type and Size at the Descriptor Level].
+
+[width="100%",cols="<100%",]
+|===
+|*Note*: When using Workbench, changing the project’s default identity
+map does not affect descriptors that already exist in the project; only
+newly added descriptors ar affected.
+|===
+
+For detailed information on caching and object identity, and the
+recommended settings to maximize EclipseLink performance, see to
+link:Introduction%20to%20Cache%20(ELUG)#Cache_Type_and_Object_Identity[Cache
+Type and Object Identity].
+
+For more information about the cache, see
+link:Introduction%20to%20Cache%20(ELUG)[Introduction to Cache].
+
+=== How to Configure Cache Type and Size at the Project Level Using Workbench
+
+To specify the cache identity map, use this procedure:
+
+[arabic]
+. Select the project object in the *Navigator*.
+. Select the *Defaults* tab in the *Editor*. The Defaults tab appears.
+[#Figure 113-8]##*_Defaults Tab, Cache Identity Map Options_*
+image:projident.gif[Defaults Tab, Cache Identity Map
+Options,title="Defaults Tab, Cache Identity Map Options"]
+. Complete the *Caching* options on the tab.
+
+Use this table to enter data in each of the following fields to specify
+the caching options:
+
+Field
+
+Description
+
+Type
+
+Use the Type list to choose the identity map as follows:
+
+Weak with Soft Subcache – cache first n elements in soft space, anything
+after that in weak space (see SoftCacheWeakIdentityMap).
+
+Weak with Hard Subcache – cache first n elements in soft space, anything
+after that in hard space (see HardCacheWeakIdentityMap).
+
+Weak – cache everything in weak space (see WeakIdentityMap).
+
+Soft – cache everything in soft space (see SoftIdentityMap).
+
+Full – cache everything permanently (see FullIdentityMap).
+
+None – cache nothing (see No Identity Map|NoIdentityMap).
+
+For more information, see Cache Type and Object Identity.
+
+Changing the project’s default identity map does not affect descriptors
+that already exist in the project.
+
+Size
+
+Specify the size of the cache as follows:
+
+When using Weak with Soft Subcache or Weak with Hard Subcache, the size
+is the maximum number of objects stored in the identity map.
+
+When using Full or Weak, the size indicates the starting size of the
+identity map.
+
+=== How to Configure Cache Type and Size at the Project Level Using Java
+
+Use one of the following `+ClassDescriptor+` methods to configure the
+descriptor to use the appropriate type of identity map:
+
+* `+useFullIdentitMap+`
+* `+useWeakIdentitMap+`
+* `+useSoftIdentitMap+`
+* `+useSoftCacheWeakIdentitMap+`
+* `+useHardCacheWeakIdentityMap+`
+* `+useNoIdentityMap+`
+
+Use the `+ClassDescriptor+` method `+setIdentityMapSize+` to configure
+the size of the identity map.
+
+== Configuring Cache Isolation at the Project Level
+
+If you plan to use isolated sessions (see
+link:Introduction%20to%20Cache%20(ELUG)#Cache_Isolation[Cache
+Isolation]), you must configure descriptors as isolated for any object
+that you want confined to an isolated session cache.
+
+Configuring a descriptor to be isolated means that EclipseLink will not
+store the object in the shared session cache and the object will not be
+shared across client sessions. This means that each client will have
+their own object read directly from the database. Objects in an isolated
+client session cache can reference objects in their parent server
+session’s shared session cache, but no objects in the shared session
+cache can reference objects in an isolated client session cache.
+Isolation is required when using Oracle Database Virtual Private
+Database (VPD) support or database user-based read security. Isolation
+can also be used if caching is not desired across client sessions.
+
+This table summarizes which projects support cache isolation
+configuration.
+
+Descriptor
+
+Using the Workbench
+
+Using Java
+
+Relational Projects
+
+EIS Projects
+
+XML Projects
+
+The cache isolation options you configure at the project level apply
+globally to all descriptors. Use this section to define global options
+for an EclipseLink project.
+
+You can override the project-level configuration by defining cache
+isolation options at the descriptor level. For information, see
+link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_Cache_Isolation_at_the_Descriptor_Level[Configuring
+Cache Isolation at the Descriptor Level].
+
+[width="100%",cols="<100%",]
+|===
+|*Note*: When using Workbench, changing the project’s default cache
+isolation option does not affect descriptors that already exist in the
+project; only newly added descriptors ar affected.
+|===
+
+=== How to Configure Cache Isolation at the Project Level Using Workbench
+
+To specify the cache isolation options, use this procedure:
+
+[arabic]
+. Select the project object in the *Navigator*.
+. Select the *Defaults* tab in the *Editor*. The Defaults tab appears.
+[#Figure 113-9]##*_Defaults Tab, Cache Isolation Options_*
+image:projisol.gif[Defaults Tab, Cache Isolation
+Options,title="Defaults Tab, Cache Isolation Options"]
+. Complete the Isolation option on the tab. Use the *Isolation* list to
+choose one of the following:
+* *Isolated* – if you want all objects confined to an isolated client
+session cache. For more information, see
+link:Introduction%20to%20Cache%20(ELUG)#Cache_Isolation[Cache
+Isolation].
+* *Shared* – if you want all objects visible in the shared session cache
+(default).
+
+== Configuring Cache Coordination Change Propagation at the Project Level
+
+If you plan to use a coordinated cache (see
+link:Introduction%20to%20Cache%20(ELUG)#Cache_Coordination[Cache
+Coordination]), you can configure how and under what conditions a
+coordinated cache propagates changes.
+
+This table summarizes which projects support cache coordination change
+propagation configuration.
+
+[#Table 113-12]## *_Project Support for Cache Coordination Change
+Propagation Configuration_*
+
+Descriptor
+
+Using the Workbench
+
+Using Java
+
+Relational Projects
+
+EIS Projects
+
+XML Projects
+
+The cache coordination change propagation options you configure at the
+project level apply globally to all descriptors. Use this section to
+define global options for an EclipseLink project.
+
+You can override the project-level configuration by defining cache
+coordination change propagation options at the descriptor level. For
+information, see
+link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_Cache_Coordination_Change_Propagation_at_the_Descriptor_Level[Configuring
+Cache Coordination Change Propagation at the Descriptor Level].
+
+To complete your coordinated cache configuration, see
+link:Configuring%20a%20Coordinated%20Cache%20(ELUG)#Configuring_a_Coordinated_Cache[Configuring
+a Coordinated Cache].
+
+[width="100%",cols="<100%",]
+|===
+|*Note*: When using Workbench, changing the project’s default cache
+coordination change propagation option does not affect descriptors that
+already exist in the project; only newly added descriptors ar affected.
+|===
+
+=== How to Configure Cache Coordination Change Propagation at the Project Level Using Workbench
+
+To specify the coordinated cache change propagation options, use this
+procedure:
+
+[arabic]
+. Select the project object in the *Navigator*.
+. Select the *Defaults* tab in the *Editor*. The Defaults tab appears.
+[#Figure 113-10]##*_Defaults Tab, Coordination Options_*
+image:projcord.gif[Defaults Tab, Coordination
+Options,title="Defaults Tab, Coordination Options"]
+. Complete the *Coordination* option] on the tab.
+
+Use the following information to enter data in the Coordination field:
+
+[width="100%",cols="<8%,<59%,<33%",options="header",]
+|===
+|*Coordination Option* |*Description* |*When to Use*
+|*None* |For both existing and new instances, do not propagate a change
+notification. |Infrequently read or changed objects.
+
+|*Synchronize Changes* |For an existing instance, propagate a change
+notification that contains each changed attribute. For a new instance,
+propagate an object creation (along with all the new instance’s
+attributes) only if the new instance is related to other existing
+objects that are also configured with this change propagation option.
+|Frequently read or changed objects that contain few attributes or in
+cases where only a few attributes are frequently changed. Objects that
+have many or complex relationships.
+
+|*Synchronize Changes and New Objects* |For an existing instance,
+propagate a change notification that contains each changed attribute.
+For a new instance, propagate an object creation (along with all the new
+instance’s attributes). |Frequently read or changed objects that contain
+few attributes or in cases where only a few attributes are frequently
+changed. Objects that have few or simple relationships.
+
+|*Invalidate Changed Objects* |For an existing instance, propagate an
+object invalidation that marks the object as invalid in all other
+sessions. This tells other sessions that they must update their cache
+from the data source the next time this object is read. For a new
+instance, no change notification is propagated. |Frequently read or
+changed objects that contain many attributes in cases where many of the
+attributes are frequently changed.
+|===
+
+== Configuring Cache Expiration at the Project Level
+
+By default, objects remain in the cache until they are explicitly
+deleted (see
+link:Using%20Basic%20Unit%20of%20Work%20API%20(ELUG)#Deleting_Objects[Deleting
+Objects]) or garbage-collected when using a weak identity map (see
+link:#Configuring_Cache_Type_and_Size_at_the_Project_Level[Configuring
+Cache Type and Size at the Project Level]). Alternatively, you can
+configure an object with a `+CacheInvalidationPolicy+` that lets you
+specify, either automatically or manually, that an object is invalid:
+when any query attempts to read an invalid object, EclipseLink will go
+to the data source for the most up-to-date version of that object and
+update the cache with this information.
+
+Using cache invalidation ensures that your application does not use
+stale data. It provides a better performing alternative to refreshing
+(see
+link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_Cache_Refreshing[Configuring
+Cache Refreshing]).
+
+This table summarizes which projects support cache invalidation
+configuration.
+
+[#Table 113-13]##
+
+Descriptor
+
+Using the Workbench
+
+Using Java
+
+Relational Projects
+
+EIS Projects
+
+XML Projects
+
+The cache invalidation options you configure at the project level apply
+globally to all descriptors. Use this section to define global cache
+invalidation options for an EclipseLink project.
+
+You can override the project-level cache invalidation configuration by
+defining cache invalidation at the descriptor (see
+link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_Cache_Expiration_at_the_Descriptor_Level[Configuring
+Cache Expiration at the Descriptor Level]) or query level (see
+link:Using%20Advanced%20Query%20API%20(ELUG)#How_to_Configure_Cache_Expiration_at_the_Query_Level[How
+to Configure Cache Expiration at the Query Level]).
+
+You can customize how EclipseLink communicates the fact that an object
+has been declared invalid to improve efficiency if you are using a
+coordinated cache. For more information, see
+link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_Cache_Coordination_Change_Propagation_at_the_Descriptor_Level[Configuring
+Cache Coordination Change Propagation at the Descriptor Level].
+
+[width="100%",cols="<100%",]
+|===
+|*Note*: When using Workbench, changing the project’s default cache
+invalidation does not affect descriptors that already exist in the
+project; only newly added descriptors are affected.
+|===
+
+For more information, see
+link:Introduction%20to%20Cache%20(ELUG)#Cache_Invalidation[Cache
+Invalidation].
+
+=== How to Configure Cache Expiration at the Project Level Using Workbench
+
+To specify the cache expiration options for the project, use this
+procedure:
+
+[arabic]
+. Select the project object in the *Navigator*.
+. Select the *Defaults* tab in the *Editor*. The Defaults tab appears.
+[#Figure 113-11]##*_Defaults Tab, Cache Expiry Options_*
+image:cachexp.gif[Defaults Tab, Cache Expiry
+Options,title="Defaults Tab, Cache Expiry Options"]
+. Complete the Cache Expiry options on the tab.
+
+Use this table to enter data in the following fields on this tab:
+
+[width="100%",cols="<14%,<86%",options="header",]
+|===
+|*Field* |*Description*
+|*No Expiry* |Specify that objects in the cache do not expire.
+
+|*Time to Live Expiry* |Specify that objects in the cache will expire
+after a specified amount of time. Use the *Expire After* field to
+indicate the time (in milliseconds) after which the objects will expire.
+
+|*Daily Expiry* |Specify that objects in the cache will expire at a
+specific time each day. Use the *Expire At* field to indicate the exact
+time to the second (using a 24-hour clock) at which the objects will
+expire.
+
+|*Update Read Time on Update* |Specify if the expiry time should be
+reset after updating an object.
+|===
+
+[width="100%",cols="<100%",]
+|===
+|*Note:* These options apply to all descriptors in a project. See
+link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_Cache_Expiration_at_the_Descriptor_Level[Configuring
+Cache Expiration at the Descriptor Level] for information on configuring
+descriptor-specific options.
+|===
+
+== Configuring Project Comments
+
+You can define a free-form textual comment for each project. You can use
+these comments however you whish: for example, to record important
+project implementation details such as the purpose or importance of a
+project.
+
+In a Workbench project, the comments are stored in the EclipseLink
+deployment XML file. There is no Java API for this feature.
+
+This table summarizes which projects support this option.
+
+[#Table 113-14]##
+
+Project Type
+
+Using the Workbench
+
+Using Java
+
+Relational Projects
+
+EIS Projects
+
+XML Projects
+
+=== How to Configure Project Comments Using Workbench
+
+To specify a comment for the project, use this procedure:
+
+[arabic]
+. Select the project object in the *Navigator*.
+. Select the *General* tab in the *Editor*. The General tab appears.
+[#Figure 113-12]##*_General Tab, Comments Options_*
+image:gencomment.gif[General Tab, Comments
+Options,title="General Tab, Comments Options"]
+. Enter descriptive text information in the *Comment* field.
+
+'''''
+
+_link:EclipseLink_User's_Guide_Copyright_Statement[Copyright Statement]_
+
+Category:_EclipseLink_User's_Guide[Category: EclipseLink User’s Guide]
+Category:_Release_1[Category: Release 1] Category:_Task[Category: Task]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Relational_Aggregate_Collection_Mapping_(ELUG).adoc b/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Relational_Aggregate_Collection_Mapping_(ELUG).adoc
new file mode 100644
index 00000000000..445eacc1f98
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Relational_Aggregate_Collection_Mapping_(ELUG).adoc
@@ -0,0 +1,94 @@
+*TOC*
+Special:Whatlinkshere_Configuring_a_Relational_Aggregate_Collection_Mapping_(ELUG)[Related
+Topics]
+
+For information on how to create EclipseLink mappings, see
+link:Creating%20a%20Mapping%20(ELUG)[Creating a Mapping].
+
+[width="100%",cols="<100%",]
+|===
+|*Note*: To use a relational aggregate collection mapping with
+Workbench, you must use
+link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_Amendment_Methods[an
+amendment method].
+|===
+
+This table lists the configurable options for a relational aggregate
+collection mapping.
+
+[#Table 40-1]##
+
+[width="100%",cols="<70%,<16%,<14%",options="header",]
+|===
+|*Option* |*Workbench* |*Java*
+|link:Configuring%20a%20Relational%20Mapping%20(ELUG)#Configuring_a_Database_Field[Database
+field] |image:unsupport.gif[Unsupported,title="Unsupported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Relational%20Mapping%20(ELUG)#Configuring_Reference_Descriptor[Reference
+descriptor] |image:unsupport.gif[Unsupported,title="Unsupported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Container_Policy[Container
+policy] |image:unsupport.gif[Unsupported,title="Unsupported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Method_or_Direct_Field_Accessing_at_the_Mapping_Level[Method
+or direct field access]
+|image:unsupport.gif[Unsupported,title="Unsupported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Read-Only_Mappings[Read-only
+mapping] |image:unsupport.gif[Unsupported,title="Unsupported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Relational%20Mapping%20(ELUG)#Configuring_Batch_Reading[Batch
+reading] |image:unsupport.gif[Unsupported,title="Unsupported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Bidirectional_Relationship[Bidirectional
+relationship] |image:unsupport.gif[Unsupported,title="Unsupported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Relational%20Mapping%20(ELUG)#Configuring_Query_Key_Order[Query
+key order] |image:unsupport.gif[Unsupported,title="Unsupported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Relational%20Mapping%20(ELUG)#Configuring_Table_and_Field_References_(Foreign_and_Target_Foreign_Keys)[Configuring
+Configuring Table and Field References]
+|image:unsupport.gif[Unsupported,title="Unsupported"]
+|image:support.gif[Supported,title="Supported"]
+|===
+
+This example shows how to create a aggregate collection mapping and add
+it to a descriptor using Java code.
+
+[#Example 42-1]## *_Aggregate Collection Mapping_*
+
+....
+public void customize(ClassDescriptor descriptor) {
+ AggregateCollectionMapping mapping = new AggregateCollectionMapping();
+
+ // configure mapping
+ ...
+
+ // add mapping to descriptor
+ descriptor.addMapping(mapping);
+}
+....
+
+For more information, see the following:
+
+* link:Introduction%20to%20Relational%20Mappings%20(ELUG)#Aggregate_Collection_Mapping[Aggregate
+Collection Mapping]
+* link:Configuring%20a%20Relational%20Mapping%20(ELUG)[Configuring a
+Relational Mapping]
+* link:Configuring%20a%20Mapping%20(ELUG)[Configuring a Mapping].
+
+'''''
+
+_link:EclipseLink_User's_Guide_Copyright_Statement[Copyright Statement]_
+
+Category:_EclipseLink_User's_Guide[Category: EclipseLink User’s Guide]
+Category:_Release_1[Category: Release 1] Category:_Task[Category: Task]
+Category:_ORM[Category: ORM]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Relational_Aggregate_Object_Mapping_(ELUG).adoc b/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Relational_Aggregate_Object_Mapping_(ELUG).adoc
new file mode 100644
index 00000000000..7a8487fc87e
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Relational_Aggregate_Object_Mapping_(ELUG).adoc
@@ -0,0 +1,165 @@
+*TOC*
+Special:Whatlinkshere_Configuring_a_Relational_Aggregate_Object_Mapping_(ELUG)[Related
+Topics]
+
+For information on how to create EclipseLink mappings, see
+link:Creating%20a%20Mapping%20(ELUG)[Creating a Mapping].
+
+[width="100%",cols="<100%",]
+|===
+|*Note:* You configure the relational aggregate object mapping in the
+source object’s descriptor. However, before doing so, you must designate
+the target object’s descriptor as an aggregate (see
+link:Configuring%20a%20Relational%20Descriptor%20(ELUG)#Configuring_a_Relational_Descriptor_as_a_Class_or_Aggregate_Type[Configuring
+a Relational Descriptor as a Class or Aggregate Type]).
+|===
+
+This table lists the configurable options for a relational aggregate
+object mapping.
+
+[#Table 42-1]##
+
+[width="100%",cols="<64%,<16%,<20%",options="header",]
+|===
+|*Option* |*Workbench* |*Java*
+|link:Configuring%20a%20Relational%20Mapping%20(ELUG)#Configuring_Reference_Descriptor[Reference
+descriptor] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Method_or_Direct_Field_Accessing_at_the_Mapping_Level[Method
+or direct field access] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Read-Only_Mappings[Read-only
+mapping] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:#Configuring_Allowing_Null_Values[Allowing null values]
+|image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Mapping_Comments[Mapping
+comments] |image:support.gif[Supported,title="Supported"]
+|image:unsupport.gif[Unsupported.,title="Unsupported."]
+
+|link:#Configuring_Aggregate_Fields[Aggregate fields]
+|image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+|===
+
+This example shows how to create a aggregate object mapping and add it
+to a descriptor using Java code.
+
+[#Example 44-1]## *_Aggregate Object Mapping_*
+
+....
+public void customize(ClassDescriptor descriptor) {
+ AggregateObjectMapping mapping = new AggregateObjectMapping();
+
+ // configure mapping
+ ...
+
+ // add mapping to descriptor
+ descriptor.addMapping(mapping);
+}
+....
+
+For more information, see the following:
+
+* link:Introduction%20to%20Relational%20Mappings%20(ELUG)#Aggregate_Object_Mapping[Aggregate
+Object Mapping]
+* link:Configuring%20a%20Relational%20Mapping%20(ELUG)[Configuring a
+Relational Mapping]
+* link:Configuring%20a%20Mapping%20(ELUG)[Configuring a Mapping].
+
+== Configuring Aggregate Fields
+
+When you designate a descriptor as an aggregate, EclipseLink allows you
+to specify a mapping type for each field in the target class, but defers
+associating the field with a database table until you configure the
+aggregate object mapping in the source class descriptor. In other words,
+the target class descriptor defines how each target class field is
+mapped but the source class descriptor defines where each target class
+field is mapped.
+
+This section explains how to configure the source class descriptor to
+define where each target class field is mapped.
+
+For more information on how to configure the target class descriptor to
+define how each target class field is mapped, see
+link:Configuring%20a%20Relational%20Descriptor%20(ELUG)#Configuring_a_Relational_Descriptor_as_a_Class_or_Aggregate_Type[Configuring
+a Relational Descriptor as a Class or Aggregate Type].
+
+=== How to Configure Aggregate Fields Using Workbench
+
+To specify the mapped fields of an aggregate mapping, use this
+procedure.
+
+[arabic]
+. Select the mapped attribute in the *Navigator*. Its properties appear
+in the Editor.
+. Click the *Fields* tab. The Fields tab appears.
+[#Figure 42-1]##*_Fields Tab_* image:agmapfie.gif[Fields
+Tab,title="Fields Tab"]
+. Complete the fields on the *Fields* tab.
+
+Use the following information to complete each field on the tab:
+
+[width="100%",cols="<8%,<92%",options="header",]
+|===
+|*Field* |*Description*
+|*Field Description* |This column shows the name of the fields from the
+target object, whose descriptor is designated
+link:Configuring%20a%20Relational%20Descriptor%20(ELUG)#Configuring_a_Relational_Descriptor_as_a_Class_or_Aggregate_Type[as
+an aggregate]. These are for display only and cannot be changed.
+
+|*Fields* |Use this column to select the source object database table
+field that EclipseLink will map to the corresponding target object
+field.
+|===
+
+=== How to Configure Aggregate Fields Using Java
+
+Using the `+AggregateObjectMapping+` method `+addFieldNameTranslation+`
+you can set a field name translation that maps from a field name in the
+source table to a field name in the aggregate descriptor
+
+For more information about the available methods for
+`+AggregateObjectMapping+`, see the _EclipseLink API Reference_.
+
+== Configuring Allowing Null Values
+
+If all the fields in the database row for the aggregate object are
+`+null+`, then, by default, EclipseLink places `+null+` in the
+appropriate source object, as opposed to filling an aggregate object
+with `+null+` values.
+
+=== How to Configure Allowing Null Values Using Workbench
+
+To allow a mapping to contain a null value, use this procedure.
+
+[arabic]
+. Select the mapped attribute in the *Navigator*. Its properties appear
+in the Editor.
+. Click the *General* tab. The General tab appears.
+[#Figure 42-2]##*_General Tab, Allow Null Option_*
+image:agmapnul.gif[General Tab, Allow Null
+Option,title="General Tab, Allow Null Option"]
+. Select the *Allows Null* option to allow this mapping to contain a
+null value.
+
+=== How to Configure Allowing Null Values Using Java
+
+You can configure whether or not to allow null values using the
+`+AggregateObjectMapping+` methods `+allowNull+` and `+dontAllowNull+`.
+
+For more information about the available methods for
+`+AggregateObjectMapping+`, see the _EclipseLink API Reference_.
+
+'''''
+
+_link:EclipseLink_User's_Guide_Copyright_Statement[Copyright Statement]_
+
+Category:_EclipseLink_User's_Guide[Category: EclipseLink User’s Guide]
+Category:_Release_1[Category: Release 1] Category:_Task[Category: Task]
+Category:_ORM[Category: ORM]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Relational_Descriptor_(ELUG).adoc b/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Relational_Descriptor_(ELUG).adoc
new file mode 100644
index 00000000000..a15c38b7df2
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Relational_Descriptor_(ELUG).adoc
@@ -0,0 +1,960 @@
+*TOC*
+Special:Whatlinkshere_Creating_a_Relational_Descriptor_(ELUG)[Related
+Topics]
+
+For information on how to create relational descriptors, see
+link:Creating%20a%20Relational%20Descriptor%20(ELUG)[Creating a
+Relational Descriptor].
+
+This table lists the default configurable options for a relational
+descriptor.
+
+[width="100%",cols="<66%,<17%,<17%",options="header",]
+|===
+|*Option to Configure* |*Workbench* |*Java*
+|link:#Configuring_Associated_Tables[Associated tables]
+|image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_Primary_Keys[Primary
+keys] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:#Configuring_Sequencing_at_the_Descriptor_Level[Sequencing]
+|image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_Read-Only_Descriptors[Read-only
+descriptors] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_Unit_of_Work_Conforming_at_the_Descriptor_Level[Unit
+of work conforming] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_Descriptor_Alias[Descriptor
+alias] |image:support.gif[Supported,title="Supported"]
+|image:unsupport.gif[Unsupported.,title="Unsupported."]
+
+|link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_Descriptor_Comments[Descriptor
+comments] |image:support.gif[Supported,title="Supported"]
+|image:unsupport.gif[Unsupported.,title="Unsupported."]
+
+|link:Using%20Workbench%20(ELUG)#How_to_Configure_Classes[Classes]
+|image:support.gif[Supported,title="Supported"]
+|image:unsupport.gif[Unsupported.,title="Unsupported."]
+
+|link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_Named_Queries_at_the_Descriptor_Level[Named
+queries] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:#Configuring_Custom_SQL_Queries_for_Basic_Persistence_Operations[Custom
+SQL queries for basic persistence operations]
+|image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_Query_Timeout_at_the_Descriptor_Level[Query
+timeout] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_Cache_Refreshing[Cache
+refreshing] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_Query_Keys[Query
+keys] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_Interface_Query_Keys[Interface
+query keys] |image:support.gif[Supported.,title="Supported."]
+|image:support.gif[Supported.,title="Supported."]
+
+|link:#Configuring_Interface_Alias[Interface alias]
+|image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_Cache_Type_and_Size_at_the_Descriptor_Level[Cache
+type and size] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_Cache_Isolation_at_the_Descriptor_Level[Cache
+isolation] |image:support.gif[Supported.,title="Supported."]
+|image:support.gif[Supported.,title="Supported."]
+
+|link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_Cache_Coordination_Change_Propagation_at_the_Descriptor_Level[Cache
+coordination change propagation]
+|image:support.gif[Supported.,title="Supported."]
+|image:support.gif[Supported.,title="Supported."]
+
+|link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_Cache_Expiration_at_the_Descriptor_Level[Cache
+expiration] |image:support.gif[Supported.,title="Supported."]
+|image:support.gif[Supported.,title="Supported."]
+
+|link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_Cache_Existence_Checking_at_the_Descriptor_Level[Cache
+existence Checking] |image:support.gif[Supported.,title="Supported."]
+|image:support.gif[Supported.,title="Supported."]
+
+|link:#Configuring_a_Relational_Descriptor_as_a_Class_or_Aggregate_Type[Relational
+descriptor as a class or aggregate type]
+|image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_Reading_Subclasses_on_Queries[Reading
+subclasses on queries] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_Inheritance_for_a_Child_(Branch_or_Leaf)_Class_Descriptor[Inheritance
+for a child class descriptor]
+|image:support.gif[Supported.,title="Supported."]
+|image:support.gif[Supported.,title="Supported."]
+
+|link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_Inheritance_for_a_Parent_(Root)_Descriptor[Inheritance
+for a parent class descriptor]
+|image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_Inheritance_Expressions_for_a_Parent_(Root)_Class_Descriptor[Inheritance
+expressions for a parent class descriptor]
+|image:unsupport.gif[Unsupported.,title="Unsupported."]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_Inherited_Attribute_Mapping_in_a_Subclass[Inherited
+attribute mapping in a subclass]
+|image:support.gif[Supported.,title="Supported."]
+|image:support.gif[Supported.,title="Supported."]
+
+|link:#Configuring_Multitable_Information[(see]
+|image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_a_Domain_Object_Method_as_an_Event_Handler[Domain
+object method as an event handler]
+|image:support.gif[Supported.,title="Supported."]
+|image:support.gif[Supported.,title="Supported."]
+
+|link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_a_Descriptor_Event_Listener_as_an_Event_Handler[Descriptor
+event listener as an event handler]
+|image:support.gif[Supported.,title="Supported."]
+|image:support.gif[Supported.,title="Supported."]
+
+|link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_Locking_Policy[Locking
+policy] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_Returning_Policy[Returning
+policy] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_Instantiation_Policy[Instantiation
+policy] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_Copy_Policy[Copy
+policy] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_Change_Policy[Change
+policy] |image:unsupport.gif[Unsupported.,title="Unsupported."]
+|image:support.gif[Supported.,title="Supported."]
+
+|link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_a_History_Policy[History
+policy] |image:unsupport.gif[Unsupported.,title="Unsupported."]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_Wrapper_Policy[Wrapper
+policy] |image:unsupport.gif[Unsupported.,title="Unsupported."]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_Fetch_Groups[Fetch
+groups] |image:unsupport.gif[Unsupported.,title="Unsupported."]
+|image:support.gif[Supported.,title="Supported."]
+
+|link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_Amendment_Methods#Configuring_Amendment_Methods[Amendment
+methods] |image:support.gif[Supported,title="Supported"]
+|image:unsupport.gif[Unsupported.,title="Unsupported."]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_a_Mapping[Mappings]
+|image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+|===
+
+For more information, see
+link:Introduction%20to%20Relational%20Descriptors%20(ELUG)[Introduction
+to Relational Descriptors].
+
+== Configuring Associated Tables
+
+Each relational class descriptor (see
+link:Creating%20a%20Relational%20Descriptor%20(ELUG)[Creating Relational
+Class Descriptors]) must be associated with a database table for storing
+instances of that class. This does not apply to relational aggregate
+descriptors (see
+link:Creating%20a%20Relational%20Descriptor%20(ELUG)[Creating Relational
+Aggregate Descriptors]).
+
+=== How to Configure Associated Tables Using Workbench
+
+To associate a descriptor with a database table, use this procedure:
+
+[arabic]
+. Select a descriptor in the *Navigator*. Its properties appear in the
+Editor.
+. Click the *Descriptor Info* tab. The Descriptor Info tab appears.
+*_Descriptor Info Tab, Associated Table Options
+_*image:desasstbl.gif[Descriptor Info Tab, Associated Table
+Options,title="Descriptor Info Tab, Associated Table Options"]
+. Use the *Associated Table* list to select a database table for the
+descriptor. You must associate a descriptor with a database table
+_before_ specifying primary keys.
+
+See Also:
+
+link:#Configuring_Associated_Tables[Configuring Associated Tables]
+
+link:Configuring%20a%20Descriptor%20(ELUG)[Configuring a Descriptor]
+
+=== How to Configure Associated Tables Using Java
+
+To configure a descriptor’s associated table(s) using Java, use
+`+RelationalDescriptor+` methods `+setTableName+` or `+addTableName+`.
+
+== Configuring Sequencing at the Descriptor Level
+
+Sequencing allows EclipseLink to automatically assign the primary key or
+ID of an object when the object is inserted.
+
+You configure EclipseLink sequencing at the
+link:Configuring%20a%20Relational%20Project%20(ELUG)#Configuring_Sequencing_at_the_Project_Level[project
+level] or
+link:Configuring%20a%20Database%20Login%20(ELUG)#Configuring_Sequencing_at_the_Session_Level[session
+level] to tell EclipseLink how to obtain sequence values: that is, what
+type of sequences to use.
+
+To enable sequencing, you must then configure EclipseLink sequencing at
+the descriptor level to tell EclipseLink into which table and column to
+write the sequence value when an instance of a descriptor’s reference
+class is created.
+
+Only descriptors that have been configured with a sequence field and a
+sequence name will be assigned sequence numbers.
+
+The sequence field is the database field that the sequence number will
+be assigned to: this is almost always the
+link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_Primary_Keys[primary
+key field]. The sequence name is the name of the sequence to be used for
+this descriptor. The purpose of the sequence name depends on the type of
+sequencing you are using:
+
+When using table sequencing, the sequence name refers to the row’s
+SEQ_NAME value used to store this sequence.
+
+When using Oracle native sequencing, the sequence name refers to the
+Oracle sequence object that has been created in the database. When using
+native sequencing on other databases, the sequence name does not have
+any direct meaning, but should still be set for compatibility.
+
+The sequence name can also refer to a custom sequence defined in the
+project.
+
+For more information, see
+link:Introduction%20to%20Relational%20Projects%20(ELUG)#Sequencing_in_Relational_Projects[Sequencing
+in Relational Projects].
+
+=== How to Configure Sequencing at the Descriptor Level Using Workbench
+
+To configure sequencing for a descriptor, use this procedure:
+
+[arabic]
+. Select a descriptor in the *Navigator*. Its properties appear in the
+Editor.
+. Click the *Descriptor Info* tab. The Descriptor Info tab appears.
+*_Descriptor Info Tab, Sequencing Options_* image:desseq.gif[Descriptor
+Info Tab, Sequencing
+Options,title="Descriptor Info Tab, Sequencing Options"]
+. Complete the Sequencing options on the tab.
+
+Use the following information to specify sequencing options:
+
+Field
+
+Description
+
+Use Sequencing
+
+Specify if this descriptor uses sequencing. If selected, specify the
+Name, Table, and Field for sequencing.
+
+Name
+
+Enter the name of the sequence.
+
+For table sequencing: Enter the name of the value in the sequence name
+column (for default table sequencing, the column named SEQ_NAME) of the
+sequence table (for default table sequencing, the table named SEQUENCE)
+that EclipseLink uses to look up the corresponding sequence count value
+(for default table sequencing, the corresponding value in the SEQ_COUNT
+column) for this descriptor’s reference class. For more information, see
+Table Sequencing.
+
+For native sequencing (Oracle platform): Enter the name of the sequence
+object that Oracle Database creates to manage sequencing for this
+descriptor’s reference class. For more information, see Native
+Sequencing with an Oracle Database Platform
+
+For native sequencing (non-Oracle platform): For database compatibility,
+enter a generic name for the sequence, such as SEQ. For more
+information, see Native Sequencing with a Non-Oracle Database Platform.
+
+Table
+
+Specify the name of the database table that contains the field (see
+Field) into which EclipseLink is to write the sequence value when a new
+instance of this descriptor’s reference class is created. This is almost
+always this descriptor’s primary table.
+
+Field
+
+Specify the name of the field in the specified table (see Table) into
+which EclipseLink is to write the sequence value when a new instance of
+this descriptor’s reference class is created. This field is almost
+always the class’s primary key (see Configuring Primary Keys).
+
+For native sequencing (non-Oracle platform): Ensure that your database
+schema specifies the correct type for this field (see Native Sequencing
+with a Non-Oracle Database Platform).
+
+See Also:
+
+link:Configuring%20a%20Descriptor%20(ELUG)[Configuring a Descriptor]
+
+link:Configuring%20a%20Relational%20Project%20(ELUG)[Configuring
+Sequencing at the Project Level]
+
+link:Configuring%20a%20Database%20Login%20(ELUG)[Configuring Sequencing
+at the Session Level]
+
+=== How to Configure Sequencing at the Descriptor Level Using Java
+
+Using Java, you can configure sequencing to use multiple different types
+of sequence for different descriptors. You configure the sequence
+objects on the session’s login and reference them from the descriptor by
+their name. The descriptor’s sequence name refers to the sequence
+object’s name you register in the session’s login.
+
+The following examples assume the session sequence configuration shown
+in this example:
+
+[#Example 28-1]## *_Example Sequences_*
+
+[source,java]
+----
+ dbLogin.addSequence(new TableSequence("EMP_SEQ", 25));
+ dbLogin.addSequence(new DefaultSequence("PHONE_SEQ", 30));
+ dbLogin.addSequence(new UnaryTableSequence("ADD_SEQ", 55));
+ dbLogin.addSequence(new NativeSequence("NAT_SEQ", 10));
+----
+
+Using Java code, you can perform the following sequence configurations:
+
+* link:#Configuring_a_Sequence_by_Name[Configuring a Sequence by Name]
+* link:#Configuring_the_Same_Sequence_for_Multiple_Descriptors[Configuring
+the Same Sequence for Multiple Descriptors]
+* link:#Configuring_the_Platform_Default_Sequence[Configuring the
+Platform Default Sequence]
+
+==== Configuring a Sequence by Name
+
+As the link:#Example_28-2[Associating a Sequence with a Descriptor]
+example shows, you associate a sequence with a descriptor by sequence
+name. The sequence `+EMP_SEQ+` was added to the login for this project
+in the link:#Example_28-1[Example Sequences] example. When a new
+instance of the `+Employee+` class is created, the EclipseLink runtime
+will use the sequence named `+EMP_SEQ+` (in this example, a
+`+TableSequence+`) to obtain a value for the `+EMP_ID+` field.
+
+[#Example 28-2]## *_Associating a Sequence with a Descriptor_*
+
+[source,java]
+----
+ empDescriptor.setSequenceNumberFieldName("EMP_ID"); // primary key field
+ empDescriptor.setSequenceNumberName("EMP_SEQ");
+----
+
+==== Configuring the Same Sequence for Multiple Descriptors
+
+As the link:#Example_28-3[Configuring a Sequence for Multiple
+Descriptors] example shows, you can associate the same sequence with
+more than one descriptor. In this example, both the `+Employee+`
+descriptor and `+Phone+` descriptor use the same `+NativeSequence+`.
+Having descriptors share the same sequence can improve pre-allocation
+performance. For more information on pre-allocation, see
+link:Introduction%20to%20Relational%20Projects%20(ELUG)#Sequencing_and_Preallocation_Size[Sequencing
+and Preallocation Size].
+
+[#Example 28-3]## *_Configuring a Sequence for Multiple Descriptors_*
+
+[source,java]
+----
+ empDescriptor.setSequenceNumberFieldName("EMP_ID"); // primary key field
+ empDescriptor.setSequenceNumberName("NAT_SEQ");
+ phoneDescriptor.setSequenceNumberFieldName("PHONE_ID"); // primary key field
+ phoneDescriptor.setSequenceNumberName("NAT_SEQ");
+----
+
+==== Configuring the Platform Default Sequence
+
+In the link:#Example_28-4[Configuring a Default Sequence] exmple, you
+associate a nonexistent sequence (`+NEW_SEQ+`) with a descriptor.
+Because you did not add a sequence named `+NEW_SEQ+` to the login for
+this project in the link:#Example_28-1[Example Sequences] example, the
+EclipseLink runtime will create a `+DefaultSequence+` named `+NEW_SEQ+`
+for this descriptor. For more information about `+DefaultSequence+`, see
+link:Introduction%20to%20Relational%20Projects%20(ELUG)#Default_Sequencing[Default
+Sequencing].
+
+[#Example 28-4]## *_Configuring a Default Sequence_*
+
+[source,java]
+----
+ descriptor.setSequenceNumberFieldName("EMP_ID"); // primary key field
+ descriptor.setSequenceNumberName("NEW_SEQ");
+----
+
+== Configuring Custom SQL Queries for Basic Persistence Operations
+
+You can use EclipseLink to define an SQL query for each basic
+persistence operation (insert, update, delete, read-object, read-all, or
+does-exist) so that when you query and modify your relational-mapped
+objects, the EclipseLink runtime will use the appropriate SQL query
+instead of the default SQL query.
+
+SQL strings can include any fields that the descriptor maps, as well as
+arguments. You specify arguments in the SQL string using
+`+#+`, such as:
+
+`+select * from EMP where EMP_ID = #EMP_ID+`
+
+The insert and update SQL strings can take any field that the descriptor
+maps as an argument.
+
+The read-object, delete and does-exist SQL strings can only take the
+primary key fields as arguments.
+
+The read-all SQL string must return all instances of the class and thus
+can take no arguments.
+
+You can define a custom SQL string for insert, update, delete,
+read-object, and read-all
+link:#How_to_Configure_Custom_SQL_Queries_for_Basic_Persistence_Operations_Using_Workbench[using
+the Workbench].
+
+You can define a custom SQL string or `+Call+` object for insert,
+update, delete, read-object, read-all, and does-exist
+link:#How_to_Configure_Custom_SQL_Queries_for_Basic_Persistence_Operations_Using_Java[using
+Java]. Using a `+Call+`, you can define more complex SQL strings and
+invoke custom stored procedures.
+
+Note: When you customize the update persistence operation for an
+application that uses optimistic locking (see Configuring Locking
+Policy), the custom update string must not write the object if the row
+version field has changed since the initial object was read. In
+addition, it must increment the version field if it writes the object
+successfully. For example:
+
+update Employee set F_NAME = #F_NAME, VERSION = VERSION + 1 where (EMP_ID = #EMP_ID) AND (VERSION = #VERSION)
+
+The update string must also maintain the row count of the database.
+
+[width="100%",cols="<100%",]
+|===
+|*_’Note_*: EclipseLink does not validate the SQL code that you enter.
+Enter the SQL code appropriate for your database platform (see
+link:Introduction%20to%20Data%20Access%20(ELUG)[Data Source Platform
+Types]).
+|===
+
+=== How to Configure Custom SQL Queries for Basic Persistence Operations Using Workbench
+
+To configure custom SQL queries for basic persistence operations:
+
+[arabic]
+. In the *Navigator*, select a descriptor in a relational database
+project.
+. Click the *Queries* tab in the *Editor*.
+. Click the *Custom SQL* tab. *_Queries, Custom SQL Tab_*
+image:qrsqltab.gif[Queries, Custom SQL
+Tab,title="Queries, Custom SQL Tab"]
+. Enter data on each tab on the Custom SQL tab.
+
+Click the appropriate SQL function tab and type your own SQL string to
+control these actions for a descriptor. Use the following information to
+complete the tab:
+
+Tab
+
+Description
+
+Insert
+
+Defines the insert SQL that EclipseLink uses to insert a new object’s
+data into the database.
+
+Update
+
+Defines the update SQL that EclipseLink uses to update any changed
+existing object’s data in the database. When you define a descriptor’s
+update query, you must conform to the following:
+
+If the application uses optimistic locking, you must ensure that the row
+is not written if the version field has changed since the object was
+read.
+
+The update query must increment the version field if the row is written.
+
+The update string must maintain the row count of the database.
+
+Delete
+
+Defines the delete SQL that EclipseLink uses to delete an object.
+
+Read Object
+
+Defines the read SQL that EclipseLink uses in any ReadObjectQuery, whose
+selection criteria is based on the object’s primary key. When you define
+a descriptor’s read-object query, your implementation overrides any
+ReadObjectQuery, whose selection criteria is based on the object’s
+primary key. EclipseLink generates dynamic SQL for all other Session
+readObject method signatures.
+
+To customize other Session readObject method signatures, define
+additional named queries and use them in your application instead of the
+Session methods.
+
+Read All
+
+Defines the read-all SQL that EclipseLink uses when you call Session
+method readAllObjects(java.lang.Class) passing in the java.lang.Class
+that this descriptor represents. When you define a descriptor’s read-all
+query, your implementation overrides only the Session method
+readAll(java.lang.Class), not the version that takes a Class and
+Expression. As a result, this query reads every single instance.
+EclipseLink generates dynamic SQL for all other Session readAll method
+signatures.
+
+To customize other Session readAll method signatures, define additional
+named queries and use them in your application instead of the Session
+methods.
+
+=== How to Configure Custom SQL Queries for Basic Persistence Operations Using Java
+
+The `+DescriptorQueryManager+` generates default SQL for the following
+persistence operations:
+
+* Insert
+* Update
+* Delete
+* Read-object
+* Read-all
+* Does-exist
+
+Using Java code, you can use the descriptor query manager to provide
+custom SQL strings to perform these functions on a class-by-class basis.
+
+Use `+ClassDescriptor+` method `+getQueryManager+` to acquire the
+`+DescriptorQueryManager+`, and then use the `+DescriptorQueryManager+`
+methods that this table lists.
+
+[#Table 28-2]## *_Descriptor Query Manager Methods for Configuring
+Custom SQL_*
+
+[width="100%",cols="<46%,<54%",options="header",]
+|===
+|*To Change the Default SQL for…* |*Use Descriptor Query Manager
+Method…*
+|Insert |`+setInsertQuery (InsertObjectQuery query)+`
+
+| |`+setInsertSQLString (String sqlString)+`
+
+| |`+setInsertCall(Call call)+`
+
+|Update |`+setUpdateQuery (UpdateObjectQuery query)+`
+
+| |`+setUpdateSQLString (String sqlString)+`
+
+| |`+setUpdateCall(Call call)+`
+
+|Delete |`+setDeleteQuery (DeleteObjectQuery query)+`
+
+| |`+setDeleteSQLString (String sqlString)+`
+
+| |`+setDeleteCall(Call call)+`
+
+|Read |`+setReadObjectQuery (ReadObjectQuery query)+`
+
+| |`+setReadObjectSQLString (String sqlString)+`
+
+| |`+setReadObjectCall(Call call)+`
+
+|Read all |`+setReadAllQuery (ReadAllQuery query)+`
+
+| |`+setReadAllSQLString (String sqlString)+`
+
+| |`+setReadAllCall(Call call)+`
+
+|Does exist |`+setDoesExistQuery(DoesExistQuery query)+`
+
+| |`+setDoesExistSQLString(String sqlString)+`
+
+| |`+setDoesExistCall(Call call)+`
+|===
+
+The link:#Example_28-5[Configuring a Descriptor Query Manager with
+Custom SQL Strings] example shows how to implement an amendment method
+to configure a descriptor query manager to use custom SQL strings.
+Alternatively, using an `+SQLCall+`, you can specify more complex SQL
+strings using features such as in, out, and in-out parameters and
+parameter types (see
+link:Using%20Basic%20Query%20API%20(ELUG)#Using_a_SQLCall[Using a
+SQLCall]).
+
+[#Example 28-5]## *_Configuring a Descriptor Query Manager with Custom
+SQL Strings_*
+
+[source,java]
+----
+ public static void addToDescriptor(ClassDescriptor descriptor) {
+
+ // Read-object by primary key procedure
+ descriptor.getQueryManager().setReadObjectSQLString(
+ "select * from EMP where EMP_ID = #EMP_ID");
+
+ // Read-all instances procedure
+ descriptor.getQueryManager().setReadAllSQLString("select * from EMP");
+
+ // Insert procedure
+ descriptor.getQueryManager().setInsertSQLString(
+ "insert into EMP (EMP_ID, F_NAME, L_NAME, MGR_ID) values
+ (#EMP_ID, #F_NAME, #L_NAME, #MGR_ID)");
+
+ // Update procedure
+ descriptor.getQueryManager().setUpdateSQLString(
+ "update EMP set (F_NAME, L_NAME, MGR_ID) values
+ (#F_NAME, #L_NAME, #MGR_ID) where EMP_ID = #EMP_ID");
+ }
+----
+
+The link:#Example_28-6[Configuring a Descriptor Query Manager with
+Custom Stored Procedure Calls] example shows how to implement an
+amendment method to configure a descriptor query manager to use Oracle
+stored procedures using a `+StoredProcedureCall+` (see
+link:Using%20Basic%20Query%20API%20(ELUG)#Using_a_StoredProcedureCall[Using
+a StoredProcedureCall]). This example uses output cursors to return the
+result set (see
+link:Using%20Advanced%20Query%20API%20(ELUG)#Handling_Cursor_and_Stream_Query_Results[Handling
+Cursor and Stream Query Results]).
+
+[#Example 28-6]## *_Configuring a Descriptor Query Manager with Custom
+Stored Procedure Calls_*
+
+[source,java]
+----
+ public static void addToDescriptor(ClassDescriptor descriptor) {
+
+ // Read-object by primary key procedure
+ StoredProcedureCall readCall = new StoredProcedureCall();
+ readCall.setProcedureName("READ_EMP");
+ readCall.addNamedArgument("P_EMP_ID", "EMP_ID");
+ readCall.useNamedCursorOutputAsResultSet("RESULT_CURSOR");
+ descriptor.getQueryManager().setReadObjectCall(readCall);
+
+ // Read-all instances procedure
+ StoredProcedureCall readAllCall = new StoredProcedureCall();
+ readAllCall.setProcedureName("READ_ALL_EMP");
+ readAllCall.useNamedCursorOutputAsResultSet("RESULT_CURSOR");
+ descriptor.getQueryManager().setReadAllCall(readAllCall );
+
+ // Insert procedure
+ StoredProcedureCall insertCall = new StoredProcedureCall();
+ insertCall.setProcedureName("INSERT_EMP");
+ insertCall.addNamedArgument("P_EMP_ID", "EMP_ID");
+ insertCall.addNamedArgument("P_F_NAME", "F_NAME");
+ insertCall.addNamedArgument("P_L_NAME", "L_NAME");
+ insertCall.addNamedArgument("P_MGR_ID", "MGR_ID");
+ descriptor.getQueryManager().setInsertCall(insertCall);
+
+ // Update procedure
+ StoredProcedureCall updateCall = new StoredProcedureCall();
+ updateCall.setProcedureName("UPDATE_EMP");
+ updateCall.addNamedArgument("P_EMP_ID", "EMP_ID");
+ updateCall.addNamedArgument("P_F_NAME", "F_NAME");
+ updateCall.addNamedArgument("P_L_NAME", "L_NAME");
+ updateCall.addNamedArgument("P_MGR_ID", "MGR_ID");
+ descriptor.getQueryManager().setUpdateCall(updateCall);
+ }
+----
+
+== Configuring Interface Alias
+
+An interface alias allows an interface to be used to refer to a
+descriptor instead of the implementation class. This can be useful for
+classes that have public interface and the applications desire to refer
+to the class using the public interface. Specifying the interface alias
+allows any queries executed on an EclipseLink session to use the
+interface as the reference class instead of the implementation class.
+
+Each descriptor can have one interface alias. Use the interface in
+queries and relationship mappings.
+
+[width="100%",cols="<100%",]
+|===
+|*_Note_*: If you use an interface alias, do not associate an interface
+descriptor with the interface.
+|===
+
+This section includes information on configuring an interface alias.
+Interfaces cannot be _created_ in the Workbench; you must add the Java
+package or class to your Workbench project before configuring it.
+
+=== How to Configure Interface Alias Using Workbench
+
+To specify an interface alias, use this procedure:
+
+[arabic]
+. In the *Navigator*, select a descriptor.If the *Interface Alias*
+advanced property is not visible for the descriptor, right-click the
+descriptor and choose *Select Advanced Properties* > *Interface Alias*
+from context menu or from the Selected menu.
+. Click the *Interface Alias* tab.*_ Interface Alias Tab_*
+image:intralis.gif[Interface Alias Tab,title="Interface Alias Tab"]
+. In the *Interface Alias* field, click *Browse* and select an
+interface.
+
+See Also:
+
+link:Configuring%20a%20Descriptor%20(ELUG)[Configuring a Descriptor]
+
+link:Creating%20a%20Descriptor%20(ELUG)[Creating a Descriptor]
+
+link:Introduction%20to%20Descriptors%20(ELUG)[Introduction to
+Descriptors]
+
+=== How to Configure Interface Alias Using Java
+
+To configure a descriptor with an interface alias using Java, create an
+amendment method (see
+link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_Amendment_Methods[Configuring
+Amendment Methods]) and use `+InterfacePolicy+` method
+`+addParentInterface+` as this example shows.
+
+[#Example 28-7]## *_Configuring an Interface Alias_*
+
+[source,java]
+----
+ public static void addToDescriptor(Descriptor descriptor) {
+ descriptor.getInterfacePolicy().addParentInterface(MyInterface.class);
+ }
+----
+
+== Configuring a Relational Descriptor as a Class or Aggregate Type
+
+By default, when you add a Java class to a relational project (see
+link:Configuring%20a%20Project%20(ELUG)#Configuring_Project_Classpath[Configuring
+Project Classpath]), Workbench create a relational class descriptor for
+it. A class descriptor is applicable to any persistent object except an
+object that is owned by another in an aggregate relationship. In this
+case, you must describe the owned object with an aggregate descriptor.
+Using a class descriptor, you can configure any relational mapping
+except aggregate collection and aggregate object mappings.
+
+An aggregate object is an object that is strictly dependent on its
+owning object. Aggregate descriptors do not define a table, primary key,
+or many of the standard descriptor options as they obtain these from
+their owning descriptor. If you want to configure an aggregate mapping
+to associate data members in a target object with fields in a source
+object’s underlying database tables (see
+link:Configuring%20a%20Relational%20Aggregate%20Collection%20Mapping%20(ELUG)[Configuring
+a Relational Aggregate Collection Mapping] and
+link:Configuring%20a%20Relational%20Aggregate%20Object%20Mapping_(ELUG)[Configuring
+a Relational Aggregate Object Mapping]), you must designate the target
+object’s descriptor as an aggregate.
+
+Alternatively, you can remove the aggregate designation from a
+relational descriptor and return it to its default type.
+
+You can configure inheritance for a descriptor designated as an
+aggregate (see
+link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_Inheritance_for_a_Child_(Branch_or_Leaf)_Class_Descriptor[Configuring
+Inheritance for a Child (Branch or Leaf) Class Descriptor]), however, in
+this case, _all_ the descriptors in the inheritance tree must be
+aggregates. Aggregate and class descriptors cannot exist in the same
+inheritance tree. For more information, see
+link:Introduction%20to%20Descriptors%20(ELUG)#Aggregate_and_Composite_Descriptors_and_Inheritance[Aggregate
+and Composite Descriptors and Inheritance].
+
+For more information, see
+link:Introduction%20to%20XML%20Descriptors%20(ELUG)#XML_Descriptors_and_Aggregation[XML
+Descriptors and Aggregation].
+
+=== How to Configure a Relational Descriptor as a Class or Aggregate Type Using Workbench
+
+To configure a relational descriptor as class or aggregate, use this
+procedure.
+
+[arabic]
+. In the *Navigator*, select a relational descriptor.
+. Click the *Class* or *Aggregate* descriptor button on the mapping
+toolbar. You can also select the descriptor and choose *Selected* >
+*Descriptor Type* > *Class* or *Aggregate* from the menu or by
+right-clicking on the descriptor in the *Navigator* window and selecting
+*Descriptor Type* > *Class* or *Aggregate* from the context menu.
+. image:dtfmpbtn.gif[Direct to Field Mapping
+button,title="Direct to Field Mapping button"] If you select
+*Aggregate*, specify each of the aggregate descriptor’s attributes as a
+direct to field mapping. See
+link:Configuring%20a%20Relational%20Direct-to-Field%20Mapping_(ELUG)[Configuring
+a Relational Direct-to-Field Mapping] for more information.
+
+image:dtfmpbtn.gif[Direct to Field Mapping
+button,title="Direct to Field Mapping button"] Specify each of the
+aggregate descriptor’s attributes as a direct to field mapping. See
+link:Configuring%20a%20Relational%20Direct-to-Field%20Mapping_(ELUG)[Configuring
+a Relational Direct-to-Field Mapping] for more information.
+
+Although the attributes of a target class are not mapped directly to a
+data source until you configure an aggregate object mapping, you must
+still specify their mapping type in the target class’s descriptor. This
+tells EclipseLink what type of mapping to use when you do configure the
+aggregate mapping in the source object’s descriptor. For more
+information, see
+link:Introduction%20to%20Relational%20Descriptors%20(ELUG)#Aggregate_and_Composite_Descriptors_in_Relational_Projects[Aggregate
+and Composite Descriptors in Relational Projects].
+
+See Also:
+
+link:Configuring%20a%20Descriptor%20(ELUG)[Configuring a Descriptor]
+
+link:#Configuring_a_Relational_Descriptor_as_a_Class_or_Aggregate_Type[Configuring
+a Relational Descriptor as a Class or Aggregate Type]
+
+=== How to Configure a Relational Descriptor as a Class or Aggregate Type Using Java
+
+Using Java, to configure a relational descriptor as an aggregate, use
+`+ClassDescriptor+` method `+descriptorIsAggregate+`.
+
+To configure a relational descriptor for use in an aggregate collection
+mapping, use `+ClassDescriptor+` method
+`+descriptorIsAggregateCollection+`.
+
+To configure a relational descriptor as a nonaggregate, use
+`+ClassDescriptor+` method `+descriptorIsNormal+`.
+
+== Configuring Multitable Information
+
+Descriptors can use multiple tables in mappings. Use multiple tables
+when either of the following occurs:
+
+* A subclass is involved in inheritance, and its superclass is mapped to
+one table, while the subclass has additional attributes that are mapped
+to a second table.
+* A class is not involved in inheritance and its data is spread out
+across multiple tables.
+
+When a descriptor has multiple tables, you must be able to join a row
+from the primary table to all the additional tables. By default,
+EclipseLink assumes that the primary key of the first, or primary, table
+is included in the additional tables, thereby joining the tables.
+EclipseLink also supports custom methods for joining tables. If the
+primary key field names of the multiple tables do not match, a foreign
+key can be used to join the tables. The foreign key can either be from
+the primary table to the secondary table, or from the secondary table to
+the primary table, or between two of the secondary tables (see
+link:#How_to_Configure_Multitable_Information_Using_Workbench[How to
+Configure Multitable Information Using Workbench]).
+
+For complex multitable situations, a more complex join expression may be
+required. These include requiring the join to also check a type code, or
+using an outer-join. EclipseLink provides support for a
+multiple-table-join-expression for these cases (see
+link:#How_to_Configure_Multitable_Information_Using_Java[How to
+Configure Multitable Information Using Java]).
+
+=== How to Configure Multitable Information Using Workbench
+
+To associate multiple tables with a descriptor, use this procedure.
+
+[arabic]
+. In the *Navigator*, select a descriptor.If the *Multitable Info*
+advanced property is not visible for the descriptor, right-click the
+descriptor and choose *Select Advanced Properties* > *Multitable Info*
+from the context menu or from the *Selected* menu.
+. Click the *Multitable Info* tab. *_Multitable Info Tab_*
+image:multiinf.gif[Multitable Info Tab,title="Multitable Info Tab"]
+. Complete each field on the *Multitable Info* tab.
+
+Use the following information to enter data in each field of the tab:
+
+Field
+
+Description
+
+Primary Table
+
+The primary table for this descriptor. This field is for display only.
+
+Additional Tables
+
+Use Add and Remove to add or remove additional tables.
+
+Association to Primary Table
+
+Specify how each Additional Table is associated to the Primary Table:
+
+Primary Keys Have Same Names–when associating tables by identically
+named primary keys, EclipseLink requires no additional configuration.
+
+Reference–when associating an additional table to the primary table with
+a Reference (that is, a foreign key), you can specify the Table
+Reference, as well as the Source and Target fields. Continue with
+Associating Tables with References.
+
+*Associating Tables with References*
+
+When associating a table using *Reference*, additional options appear.
+You must choose a reference that relates the correct fields in the
+primary table to the primary keys in the selected table.
+
+[#Figure 28-6]## *_Multitable Info Tab, Associated by Reference_*
+
+.Multitable Info Tab, Associated by Reference
+image::multiref.gif[Multitable Info Tab, Associated by
+Reference,title="Multitable Info Tab, Associated by Reference"]
+
+Choose a *Table Reference* that defines how the primary keys of the
+primary table relate to the primary keys of the selected table. Click
+*Add* to add a primary key association.
+
+=== How to Configure Multitable Information Using Java
+
+Using Java, configure a descriptor with multitable information using the
+following `+org.eclipse.persistence.descriptors.ClassDescriptor+`
+methods:
+
+* `+addTableName(java.lang.String tableName)+`
+* `+addForeignKeyFieldNameForMultipleTable(java.lang.String sourceForeignKeyFieldName, java.lang.String targetPrimaryKeyFieldName)+`
+
+To specify a complex multiple-table-join-expression, create a descriptor
+amendment method (see
+link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_Amendment_Methods[Configuring
+Amendment Methods]) and add the join expression using
+`+org.eclipse.persistence.descriptors.DescriptorQueryManager+` method
+`+setMultipleTableJoinExpression+`. For more information, see
+link:Using%20Advanced%20Query%20API%20(ELUG)#Appending_Additional_Join_Expressions[Appending
+Additional Join Expressions].
+
+'''''
+
+_link:EclipseLink_User's_Guide_Copyright_Statement[Copyright Statement]_
+
+Category:_EclipseLink_User's_Guide[Category: EclipseLink User’s Guide]
+Category:_Task[Category: Task] Category:_Concept[Category: Concept]
+Category:_ORM[Category: ORM]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Relational_Direct-to-Field_Mapping_(ELUG).adoc b/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Relational_Direct-to-Field_Mapping_(ELUG).adoc
new file mode 100644
index 00000000000..3439677d2a5
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Relational_Direct-to-Field_Mapping_(ELUG).adoc
@@ -0,0 +1,66 @@
+*TOC*
+Special:Whatlinkshere_Configuring_a_Relational_Direct-to-Field_Mapping_(ELUG)[Related
+Topics] "`wikilink`")
+
+For information on how to create EclipseLink mappings, see
+link:Creating%20a%20Mapping%20(ELUG)[Creating a Mapping].
+
+This table lists the configurable options for a relational
+direct-to-field mapping.
+
+[#Table 34-1]##
+
+Option to Configure
+
+Workbench
+
+Java
+
+Database field
+
+Method or direct field access
+
+Default null value
+
+Read-only
+
+Mapping comments
+
+Serialized object converter
+
+Type conversion converter
+
+Object type converter
+
+This example shows how to create a direct-to-field mapping and add it to
+a descriptor using Java code.
+
+[#Example 36-1]## *_Direct-to-Field Mapping_*
+
+....
+public void customize(ClassDescriptor descriptor) {
+ DirectToFieldMapping mapping = new DirectToFieldMapping();
+
+ // configure mapping
+ ...
+
+ // add mapping to descriptor
+ descriptor.addMapping(mapping);
+}
+....
+
+For more information, see the following:
+
+* link:Introduction%20to%20Relational%20Mappings%20(ELUG)#Direct-to-Field_Mapping[Direct-to-Field
+Mapping]
+* link:Configuring%20a%20Relational%20Mapping%20(ELUG)[Configuring a
+Relational Mapping]
+* link:Configuring%20a%20Mapping%20(ELUG)[Configuring a Mapping].
+
+'''''
+
+_link:EclipseLink_User's_Guide_Copyright_Statement[Copyright Statement]_
+
+Category:_EclipseLink_User's_Guide[Category: EclipseLink User’s Guide]
+Category:_Release_1[Category: Release 1] Category:_Concept[Category:
+Concept] Category:_ORM[Category: ORM]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Relational_Direct-to-XMLType_Mapping_(ELUG).adoc b/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Relational_Direct-to-XMLType_Mapping_(ELUG).adoc
new file mode 100644
index 00000000000..0497f18bf57
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Relational_Direct-to-XMLType_Mapping_(ELUG).adoc
@@ -0,0 +1,101 @@
+*TOC*
+Special:Whatlinkshere_Introduction_to_Relational_Mappings_(ELUG)[Related
+Topics]
+
+For information on how to create EclipseLink mappings, see
+link:Creating%20a%20Mapping%20(ELUG)[Creating a Mapping].
+
+This table lists the configurable options for a relational
+direct-to-`+XMLType+` mapping.
+
+[#Table 35-1]##
+
+[width="100%",cols="<61%,<19%,<20%",options="header",]
+|===
+|*Option to Configure* |*Workbench* |*Java*
+|link:Configuring%20a%20Relational%20Mapping%20(ELUG)#Configuring_a_Database_Field[Database
+field] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Cofiguring_Method_or_direct_field_access[Method
+or direct field access] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Read-Only_Mappings[Read-only]
+|image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:#Configuring_Read_Whole_Document[Configuring Read Whole Document]
+|image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Mapping_Comments[Mapping
+comments] |image:support.gif[Supported,title="Supported"]
+|image:unsupport.gif[Supported,title="Supported"]
+|===
+
+This example shows how to create a direct-to-XMLType mapping and add it
+to a descriptor using Java code.
+
+[#Example 37-1]## *_Direct-to-XMLType Mapping_*
+
+`+public void customize(ClassDescriptor descriptor) { +`
+`+ DirectToXMLTypeMapping mapping = new DirectToXMLTypeMapping(); +`
+
+`+ // configure mapping+` `+ mapping.setAttributeName("document");+`
+
+`+ // add mapping to descriptor+`
+`+ descriptor.addMapping(mapping);+` `+}+`
+
+For more information, see the following:
+
+* link:Introduction%20to%20Relational%20Mappings%20(ELUG)#Direct-to-XMLType_Mapping[Direct-to-XMLType
+Mapping]
+* link:Configuring%20a%20Relational%20Mapping%20(ELUG)[Configuring a
+Relational Mapping]
+* link:Configuring%20a%20Mapping%20(ELUG)[Configuring a Mapping].
+
+== Configuring Read Whole Document
+
+When mapping an XML Type to a Document Object Model (DOM), by default
+EclipseLink uses the database representation of the DOM. This allows for
+lazy loading of the XML data from the database.
+
+However, if you require the entire DOM, (or if you require the DOM to be
+available in a disconnected fashion from the database connection) use
+the *Read Whole* option to retrieve the entire DOM from the database.
+
+=== How to Configure Read Whole Document Using Workbench
+
+To specify that this mapping reads the whole XML document, use this
+procedure:
+
+[arabic]
+. Select the mapping in the *Navigator*. Its properties appear in the
+Editor.
+. Click *General*. The General tab appears. [#Figure 35-1]##*_Direct to
+XML Mapping Property Sheet, Read Whole Document Option_*
+image:readwhl.gif[Direct to XML Mapping Property Sheet, Read Whole
+Document
+Option,title="Direct to XML Mapping Property Sheet, Read Whole Document Option"]
+. Choose the *Read Whole Document* option to read the whole XML
+document. If you do not select this option, the connection must remain
+open for EclipseLink to read the database values.
+
+=== How to Configure Read Whole Document Using Java
+
+Use the following `+DirectToXMLTypeMapping+` methods:
+
+* `+setShouldReadWholeDocument+`
+* `+shouldReadWholeDocument+`
+
+For more information about the available methods for
+`+DirectToXMLTypeMapping+`, see the _EclipseLink API Reference_.
+
+'''''
+
+_link:EclipseLink_User's_Guide_Copyright_Statement[Copyright Statement]_
+
+Category:_EclipseLink_User's_Guide[Category: EclipseLink User’s Guide]
+Category:_Release_1[Category: Release 1] Category:_Task[Category: Task]
+Category:_ORM[Category: ORM]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Relational_Direct_Collection_Mapping_(ELUG).adoc b/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Relational_Direct_Collection_Mapping_(ELUG).adoc
new file mode 100644
index 00000000000..0f273f93187
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Relational_Direct_Collection_Mapping_(ELUG).adoc
@@ -0,0 +1,207 @@
+*TOC*
+Special:Whatlinkshere_Configuring_a_Relational_Direct_Collection_Mapping_(ELUG)[Related
+Topics]
+
+For information on how to create EclipseLink mappings, see
+link:Creating%20a%20Mapping%20(ELUG)[Creating a Mapping].
+
+This table lists the configurable options for a relational direct
+collection mapping.
+
+[#Table 41-1]##
+
+[width="100%",cols="<68%,<16%,<16%",options="header",]
+|===
+|*Option* |*Workbench* |*Java*
+|link:#Configuring_Target_Table[Target table]
+|image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:#Configuring_Direct_Value_Field[Direct value field]
+|image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Method_or_Direct_Field_Accessing_at_the_Mapping_Level[Method
+or direct field access] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Read-Only_Mappings[Read-only
+mapping] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Relational%20Mapping%20(ELUG)#Configuring_Batch_Reading[Batch
+reading] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Indirection_(Lazy_Loading)[Indirection
+(lazy loading)] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Container_Policy[Container
+policy] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Mapping_Comments[Mapping
+comments] |image:support.gif[Supported,title="Supported"]
+|image:unsupport.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_a_Serialized_Object_Converter[Configuring
+a Serialized Object Converter]
+|image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_a_Type_Conversion_Converter[Type
+conversion converter] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_an_Object_Type_Converter[Object
+type converter] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Relational%20Mapping%20(ELUG)#Configuring_Table_and_Field_References_(Foreign_and_Target_Foreign_Keys)[Table
+and field references] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+|===
+
+This example shows how to create a direct collection mapping and add it
+to a descriptor using Java code.
+
+[#Example 43-1]## *_Direct Collection Mapping_*
+
+....
+public void customize(ClassDescriptor descriptor) {
+ DirectCollectionMapping mapping = new DirectCollectionMapping();
+
+ // configure mapping
+ ...
+
+ // add mapping to descriptor
+ descriptor.addMapping(mapping);
+}
+....
+
+For more information, see the following:
+
+* link:Introduction%20to%20Relational%20Mappings%20(ELUG)#Direct_Collection_Mapping[Direct
+Collection Mapping]
+* link:Configuring%20a%20Relational%20Mapping%20(ELUG)[Configuring a
+Relational Mapping]
+* link:Configuring%20a%20Mapping%20(ELUG)[Configuring a Mapping].
+
+For information on using JPA to configure direct collection mappings,
+see
+link:Using%20EclipseLink%20JPA%20Extensions%20(ELUG)#How_to_Use_the_@BasicCollection_Annotation[How
+to Use the @BasicCollection Annotation].
+
+== Configuring Target Table
+
+Each direct collection stores reference information in a target table.
+In the
+link:Introduction%20to%20Relational%20Mappings%20(ELUG)#Figure_32-6[Direct
+Collection Mappings] figure, the `+RESPONS+` table contains the primary
+key and object of the instance owning the collection. You must create
+this table in your database.
+
+=== How to Configure a Target Table Using Workbench
+
+To specify the direct collection specifics, use this procedure:
+
+[arabic]
+. Select the mapped attribute in the *Navigator*. Its properties appear
+in the Editor.
+. Click the *General* tab. The General tab appears.
+[#Figure 41-1]##*_General Tab, Target Table Options_*
+image:dcmaptar.gif[General Tab, Target Table
+Options,title="General Tab, Target Table Options"]
+
+Use the *Target Table* list to select the table that contains the
+reference fields for the direct collection mapping.
+
+=== How to Configure a Target Table Using Java
+
+Direct collection mappings store collections of Java objects that are
+not EclipseLink-enabled. Direct collections usually store Java types,
+such as `+String+`.
+
+Direct collection mappings are instances of the
+`+DirectCollectionMapping+` class and require the following elements:
+
+* The attribute mapped, set by using the `+setAttributeName+` method.
+* The database table that holds the values to be stored in the
+collection, set by using the `+setReferenceTableName+` method.
+* The field in the reference table from which the values are read and
+placed into the collection; this is called the direct field. Set it
+using the `+setDirectFieldName+` method.
+* The foreign key information, which you specify using the
+`+setReferenceKeyFieldName+` method and passing the name of the field
+that is a foreign reference to the primary key of the source object.
+
+[width="100%",cols="<100%",]
+|===
+|*Note:* If the target primary key is composite, call the
+`+addReferenceKeyFieldName+` method for each of the fields that make up
+the key.
+|===
+
+[#Example 41-1]## *_Configuring a Simple Direct Collection Mapping_*
+
+`+public void customize(ClassDescriptor descriptor) { +`
+`+ DirectCollectionMapping directCollectionMapping = new DirectCollectionMapping();+`
+`+ directCollectionMapping.setAttributeName ("responsibilitiesList");+`
+`+ directCollectionMapping.setReferenceTableName ("RESPONS"); +`*`+//\'\' \'\'target\'\' \'\'table+`*
+`+ directCollectionMapping.setDirectFieldName ("DESCRIP");+`
+`+ directCollectionMapping.setReferenceKeyFieldName ("EMP_ID");+`
+`+ directCollectionMapping.useCollectionClass (Collection.class); +`*`+//\'\' \'\'default+`*
+
+`+ +`*`+//\'\' \'\'add\'\' \'\'this\'\' \'\'mapping\'\' \'\'to\'\' \'\'descriptor+`*
+`+ descriptor.addMapping (directCollectionMapping);+` `+}+`
+
+In addition to the API that the link:#Example_41-1[Configuring a Simple
+Direct Collection Mapping] example illustrates, other common API for use
+with direct collection mappings include the following:
+
+* `+useBasicIndirection+`: implements EclipseLink value holder
+indirection.
+* `+useTransparentCollection+`: if you use transparent indirection, this
+element places a special collection in the source object’s attribute.
+* `+dontUseIndirection+`: implements no indirection.
+
+For more information about the available methods for
+`+DirectCollectionMapping+`, see the _EclipseLink API Reference_.
+
+== Configuring Direct Value Field
+
+The direct value field, located in the reference table, stores the
+primitive data value. In the
+link:Introduction%20to%20Relational%20Mappings%20(ELUG)#Figure_32-6[Direct
+Collection Mappings] figure, the `+DESCRIP+` field stores the
+collection.
+
+=== How to Configure a Direct Value Field Using Workbench
+
+To specify the direct collection specifics, use this procedure:
+
+[arabic]
+. Select the mapped attribute in the *Navigator*. Its properties appear
+in the Editor.
+. Click the *General* tab. The General tab appears.
+[#Figure 41-2]##*_General Tab, Direct Value Field_*
+image:dcmapdir.gif[General Tab, Direct Value
+Field,title="General Tab, Direct Value Field"]
+. Use the *Direct Value Field* list to select the field from the *Target
+Table* table that contains the object of the collection.
+
+=== How to Configure Direct Value Field Using Java
+
+The link:#Example_41-1[Configuring a Simple Direct Collection Mapping]
+example demonstrates how to create and configure a direct collection
+mapping, including the setting of a direct field. The example also shows
+how to add this mapping to the descriptor.
+
+'''''
+
+_link:EclipseLink_User's_Guide_Copyright_Statement[Copyright Statement]_
+
+Category:_EclipseLink_User's_Guide[Category: EclipseLink User’s Guide]
+Category:_Release_1[Category: Release 1] Category:_Task[Category: Task]
+Category:_ORM[Category: ORM]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Relational_Direct_Map_Mapping_(ELUG).adoc b/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Relational_Direct_Map_Mapping_(ELUG).adoc
new file mode 100644
index 00000000000..b484fd1184e
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Relational_Direct_Map_Mapping_(ELUG).adoc
@@ -0,0 +1,245 @@
+*TOC*
+Special:Whatlinkshere_Configuring_a_Relational_Direct_Map_Mapping_(ELUG)[Related
+Topics]
+
+For information on how to create EclipseLink mappings, see
+link:Creating%20a%20Mapping%20(ELUG)[Creating a Mapping].
+
+This table lists the configurable options for a relational direct map
+mapping.
+
+[#Table 43-1]##
+
+[width="100%",cols="<63%,<18%,<19%",options="header",]
+|===
+|*Option* |*Workbench* |*Java*
+|link:Configuring%20a%20Relational%20Direct%20Collection%20Mapping_(ELUG)#Configuring_Target_Table[Configuring
+Target Table] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:#Configuring_Direct_Value_Field[Direct value field]
+|image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:#Configuring_Direct_Key_Field[Direct key field]
+|image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_a_Type_Conversion_Converter[Method
+or direct field access] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Read-Only_Mappings[Read-only
+mapping] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Relational%20Mapping%20(ELUG)#Configuring_Batch_Reading[Batch
+reading] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)[Indirection (lazy loading)]
+|image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Container_Policy[Container
+policy] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Mapping_Comments[Mapping
+comments] |image:support.gif[Supported,title="Supported"]
+|image:unsupport.gif[Supported,title="Supported"]
+
+|link:#Configuring_Key_Converters[Key converters]
+|image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:#Configuring_Value_Converters[Value converters]
+|image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Relational%20Mapping%20(ELUG)#Configuring_Joining_at_the_Mapping_Level[Table
+and field references] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+|===
+
+This example shows how to create a direct map mapping and add it to a
+descriptor using Java code.
+
+[#Example 36-1]## *_Direct Map Mapping_*
+
+`+public void customize(ClassDescriptor descriptor) { +`
+`+ DirectMapMapping mapping = new DirectMapMapping(); +`
+
+`+ // configure mapping+` `+ ... +`
+
+`+ // add mapping to descriptor+`
+`+ descriptor.addMapping(mapping);+` `+}+`
+
+For more information, see the following:
+
+* link:Introduction%20to%20Relational%20Mappings%20(ELUG)#Direct_Map_Mapping[Direct
+Map Mapping]
+* link:Configuring%20a%20Relational%20Mapping%20(ELUG)[Configuring a
+Relational Mapping]
+* link:Configuring%20a%20Mapping%20(ELUG)[Configuring a Mapping].
+
+For information on using JPA to configure direct map mappings, see
+link:Using%20EclipseLink%20JPA%20Extensions%20(ELUG)#How_to_Use_the_@BasicMap_Annotation[How
+to Use the @BasicMap Annotation].
+
+== Configuring Direct Value Field
+
+The direct value field in the reference table stores the primitive data
+value of the map value. If the value’s object value and database value
+are different types, use a converter (see
+link:#Configuring_Value_Converters[Configuring Value Converters]).
+
+=== How to Configure Direct Value Fields Using Workbench
+
+[arabic]
+. Select the mapped attribute in the *Navigator*. Its properties appear
+in the Editor.
+. Click the *General* tab. The General tab appears. *_General Tab,
+Direct Value Field_* image:dmdirval.gif[General Tab, Direct Value
+Field,title="General Tab, Direct Value Field"]
+. Use the *Direct Value Field* list to select the field from the *Target
+Table* table that contains the object of the direct map mapping.
+
+=== How to Configure Direct Value Fields Using Java
+
+Use the `+DirectMapMapping+` method `+setDirectFieldName+` to set the
+direct fields for your mapping.
+
+For more information about the available methods for
+`+DirectMapMapping+`, see the _EclipseLink API Reference_.
+
+== Configuring Direct Key Field
+
+The direct key field in the reference table stores the primitive data
+value of the map key. If the key’s object value and database value are
+different types, use a converter (see
+link:#Configuring_Key_Converters[Configuring Key Converters]).
+
+=== How to Configure Direct Key Field Using Workbench
+
+To specify the direct key field in the reference table, use this
+procedure.
+
+[arabic]
+. Select the mapped attribute in the *Navigator*. Its properties appear
+in the Editor.
+. Click the *General* tab. The General tab appears. *_General Tab,
+Direct Key Field_* image:dmdirkey.gif[General Tab, Direct Key
+Field,title="General Tab, Direct Key Field"]
+. Use the *Direct Key Field* list to select the key from the *Target
+Table* table that contains the object of the direct map mapping.
+
+=== How to Configure Direct Key Field Using Java
+
+Use the `+DirectMapMapping+` method `+setDirectKeyFieldName+` to set the
+direct key field for your mapping.
+
+For more information about the available methods for
+`+DirectMapMapping+`, see the _EclipseLink API Reference_.
+
+== Configuring Key Converters
+
+If the key’s object value and database value are different types, use a
+converter. EclipseLink supports the following key converters:
+
+* link:Introduction%20to%20Mappings%20(ELUG)#Serialized_Object_Converter[Serialized
+Object Converter]
+* link:Introduction%20to%20Mappings%20(ELUG)#Type_Conversion_Converter[Type
+Conversion Converter]
+* link:Introduction%20to%20Mappings%20(ELUG)#Object_Type_Converter[Object
+Type Converter]
+
+=== How to Configure Key Converters Using Workbench
+
+Use this procedure to specify the converter for a direct map mapping
+key:
+
+[arabic]
+. Select the mapped attribute in the *Navigator*. Its properties appear
+in the Editor.
+. Click the *Converter* tab. The Converter tab appears.
+. Click the *Key Converter* tab. The Key Converter tab appears.
+*_Converter Tab, Key Converter Subtab_* image:keyconv.gif[Converter Tab,
+Key Converter Subtab,title="Converter Tab, Key Converter Subtab"]
+. Select the appropriate Key Converter.
+
+[width="100%",cols="<22%,<78%",options="header",]
+|===
+|*Converter* |*Description*
+|*No Converter* |Do not use a Key Converter for this mapping.
+
+|*Serialized Object* *Converter* |See
+link:Configuring%20a%20Mapping%20(ELUG)#Configuring_a_Serialized_Object_Converter[Configuring
+a Serialized Object Converter].
+
+|*Type Conversion Converter* |See
+link:Configuring%20a%20Mapping%20(ELUG)#Configuring_a_Type_Conversion_Converter[Configuring
+a Type Conversion Converter].
+
+|*Object Type* *Converter* |See
+link:Configuring%20a%20Mapping%20(ELUG)#Configuring_an_Object_Type_Converter[Configuring
+an Object Type Converter].
+|===
+
+=== How to Configure Key Converters Using Java
+
+You can configure whether or not to allow null values using the
+`+DirectMapMapping+` method `+setKeyConverter+`.
+
+For more information about the available methods for
+`+DirectMapMapping+`, see the _EclipseLink API Reference_.
+
+== Configuring Value Converters
+
+If the value’s object value and database value are different types, use
+a converter. EclipseLink supports the following value converters:
+
+* link:Introduction%20to%20Mappings%20(ELUG)#Serialized_Object_Converter[Serialized
+Object Converter]
+* link:Introduction%20to%20Mappings%20(ELUG)#Type_Conversion_Converter[Type
+Conversion Converter]
+* link:Introduction%20to%20Mappings%20(ELUG)#Object_Type_Converter[Object
+Type Converter]
+
+=== How to Configure Value Converters Using Workbench
+
+[arabic]
+. Select the mapped attribute in the *Navigator*. Its properties appear
+in the Editor.
+. Click the *Converter* tab. The Converter tab appears.
+. Click the *Value Converter* tab. The Value Converter tab appears.
+*_Converter Tab, Value Converter Subtab_* image:valconv.gif[Converter
+Tab, Value Converter
+Subtab,title="Converter Tab, Value Converter Subtab"]
+. Select the appropriate Value Converter.
+
+[width="100%",cols="<22%,<78%",options="header",]
+|===
+|*Converter* |*Description*
+|*No Converter* |Do not use a Value Converter for this mapping.
+
+|*Serialized Object* *Converter* |See
+link:Configuring%20a%20Mapping%20(ELUG)#Configuring_a_Serialized_Object_Converter[Configuring
+a Serialized Object Converter]
+
+|*Type Conversion Converter* |See
+link:Configuring%20a%20Mapping%20(ELUG)#Configuring_a_Type_Conversion_Converter[Configuring
+a Type Conversion Converter]
+
+|*Object Type Converter* |See
+link:Configuring%20a%20Mapping%20(ELUG)#Configuring_an_Object_Type_Converter[Configuring
+an Object Type Converter]
+|===
+
+'''''
+
+_link:EclipseLink_User's_Guide_Copyright_Statement[Copyright Statement]_
+
+Category:_EclipseLink_User's_Guide[Category: EclipseLink User’s Guide]
+Category:_Task[Category: Task] Category:_Release_1[Category: Release 1]
+Category:_ORM[Category: ORM]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Relational_Many-to-Many_Mapping_(ELUG).adoc b/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Relational_Many-to-Many_Mapping_(ELUG).adoc
new file mode 100644
index 00000000000..abcc7785a1d
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Relational_Many-to-Many_Mapping_(ELUG).adoc
@@ -0,0 +1,183 @@
+*TOC*
+Special:Whatlinkshere_Configuring_a_Relational_Many-to-Many_Mapping_(ELUG)[Related
+Topics]
+
+For information on how to create EclipseLink mappings, see
+link:Creating%20a%20Mapping%20(ELUG)[Creating a Mapping].
+
+This table lists the configurable options for a relational many-to-many
+mapping.
+
+[width="100%",cols="<69%,<15%,<16%",options="header",]
+|===
+|*Option to Configure* |*Workbench* |*Java*
+|link:Configuring%20a%20Relational%20Mapping%20(ELUG)#Configuring_Reference_Descriptor[Configuring
+Reference Descriptor] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Method_or_Direct_Field_Accessing_at_the_Mapping_Level[Method
+or direct field access] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Read-Only_Mappings[Read-only
+mapping] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Private_or_Independent_relationships[Private
+or Independent relationships]
+|image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Relational%20Mapping%20(ELUG)#Configuring_Batch_Reading[Batch
+reading] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Indirection_(lazy_loading)[Indirection
+(lazy loading)] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Bidirectional_Relationship[Bidirectional
+relationship] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Mapping_Comments[Container
+policy] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Mapping_Comments[Mapping
+comments] |image:support.gif[Supported,title="Supported"]
+|image:unsupport.gif[Supported,title="Supported"]
+
+|link:#Configuring_a_Relation_Table[Relational table]
+|image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Relational%20Mapping%20(ELUG)#Configuring_Table_and_Field_References_(Foreign_and_Target_Foreign_Keys)[Table
+and field references] (Source)
+|image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Relational%20Mapping%20(ELUG)#Configuring_Table_and_Field_References_(Foreign_and_Target_Foreign_Keys)[Table
+and field references] (Target)
+|image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Relational%20Mapping%20(ELUG)#Configuring_Query_Key_Order[Query
+key order] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+|===
+
+This example shows how to create a many-to-many mapping and add it to a
+descriptor using Java code.
+
+[#Example 41-1]## *_Many-to-Many Mapping_*
+
+....
+public void customize(ClassDescriptor descriptor) {
+ ManyToManyMapping mapping = new ManyToManyMapping();
+
+ // configure mapping
+ ...
+
+ // add mapping to descriptor
+ descriptor.addMapping(mapping);
+}
+....
+
+For more information, see the following:
+
+* link:Introduction%20to%20Relational%20Mappings%20(ELUG)#Many-to-Many_Mapping[Many-to-Many
+Mapping]
+* link:Configuring%20a%20Relational%20Mapping%20(ELUG)[Configuring a
+Relational Mapping]
+* link:Configuring%20a%20Mapping%20(ELUG)[Configuring a Mapping].
+
+For information on using JPA to configure many-to-many mappings, see
+link:Introduction%20to%20EclipseLink%20JPA%20(ELUG)#@ManyToMany[@ManyToMany].
+
+== Configuring a Relation Table
+
+The relation table contains the columns for the primary keys of the
+source table and target table involved in the many-to-many mapping. You
+must create this table in the database before completing the mapping.
+See link:Using%20Workbench%20(ELUG)#Using_Databases[Using Databases] for
+information on creating database tables.
+
+In the
+link:Introduction%20to%20Relational%20Mappings%20(ELUG)#Figure_32-5[Many-to-Many
+Relationships] figure, the `+PROJ_EMP+` table serves as the relation
+table between the `+PROJECT+` and `+EMPLOYEE+` tables.
+
+=== How to Configure a Relation Table Using Workbench
+
+To select a relation table for a mapping, use this procedure:
+
+[arabic]
+. Select the mapped attribute in the *Navigator*. Its properties appear
+in the Editor.
+. Click the *General* tab. The General tab appears.
+[#Figure 39-1]##*_Table Reference Tab, Relation Table Option_*
+image:mmreltabl.gif[Table Reference Tab, Relation Table
+Option,title="Table Reference Tab, Relation Table Option"]
+. Use the *Relation Table* field to select a database table to define
+this mapping.
+
+=== How to Configure a Relation Table Using Java
+
+Many-to-many mappings represent the relationships between a collection
+of source objects and a collection of target objects. This requires an
+intermediate table that manages the associations between the source and
+target records.
+
+Many-to-many mappings are instances of the `+ManyToManyMapping+` class
+and requires the following elements:
+
+* The attribute mapped, set by using the `+setAttributeName+` method.
+* The reference class, set by using the `+setReferenceClass+` method.
+* The relation table, set by using the `+setRelationTableName\'\'()+`
+method.
+* The foreign key information (for noncomposite target primary keys),
+which you specify by calling the `+setSourceRelationKeyFieldName+` and
+`+setTargetRelationKeyFieldName+` methods.
+* The foreign key information if the source or target primary keys are
+composite, which you specify by sending the
+`+addSourceRelationKeyFieldName+` or `+addTargetRelationKeyFieldName+`
+methods.
+
+[#Example 39-1]## *_Configuring a Relational Table_*
+
+`+public void customize(ClassDescriptor descriptor) { +`
+*`+//\'\' \'\'In\'\' \'\'the\'\' \'\'Employee\'\' \'\'class,\'\' \'\'create\'\' \'\'the\'\' \'\'mapping\'\' \'\'that\'\' \'\'references\'\' \'\'Project\'\' \'\'class+`*
+`+ ManyToManyMapping manyToManyMapping = new ManyToManyMapping();+`
+`+ manyToManyMapping.setAttributeName("projects");+`
+`+ manyToManyMapping.setReferenceClass(Project.class);+`
+
+`+ +`*`+//\'\' \'\'Configure\'\' \'\'the\'\' \'\'relational\'\' \'\'table+`*
+`+ manyToManyMapping.setRelationTableName("PROJ_EMP");+`
+`+ manyToManyMapping.setSourceRelationKeyFieldName ("EMPID");+`
+`+ manyToManyMapping.setTargetRelationKeyFieldName ("PROJID");+`
+
+`+ +`*`+//\'\' \'\'Add\'\' \'\'mapping\'\' \'\'to\'\' \'\'descriptor+`*
+
+`+ descriptor.addMapping(manyToManyMapping);+` `+}+`
+
+In addition to the API that link:#Example_39-1[Configuring a Relational
+Table] illustrates, other common API for use with many-to-many mappings
+include the following:
+
+* `+useBasicIndirection+`: implements EclipseLink value holder
+indirection.
+* `+useTransparentCollection+`: if you use transparent indirection, this
+element places a special collection in the source object’s attribute.
+* `+dontUseIndirection+`: implements no indirection.
+
+For more information about the available methods for
+`+ManyToManyMapping+`, see the _EclipseLink API Reference_.
+
+'''''
+
+_link:EclipseLink_User's_Guide_Copyright_Statement[Copyright Statement]_
+
+Category:_EclipseLink_User's_Guide[Category: EclipseLink User’s Guide]
+Category:_Release_1[Category: Release 1] Category:_Task[Category: Task]
+Category:_ORM[Category: ORM]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Relational_Mapping_(ELUG).adoc b/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Relational_Mapping_(ELUG).adoc
new file mode 100644
index 00000000000..a6e76421d29
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Relational_Mapping_(ELUG).adoc
@@ -0,0 +1,838 @@
+*TOC*
+Special:Whatlinkshere_Configuring_a_Relational_Mapping_(ELUG)[Related
+Topics]
+
+For information on how to create EclipseLink mappings, see
+link:Creating%20a%20Mapping%20(ELUG)[Creating a Mapping].
+
+This table lists the types of relational mappings that you can configure
+and provides a cross-reference to the type-specific chapter that lists
+the configurable options supported by that type.
+
+[#Table 33-1]##
+
+[width="100%",cols="<47%,<53%",options="header",]
+|===
+|*If you are creating…* |*See…*
+|link:Introduction%20to%20Relational%20Mappings%20(ELUG)#Direct-to-Field_Mapping[Direct-to-Field
+Mapping]
+|link:Configuring_a_Relational_Direct-to-Field_Mapping_(ELUG)[Configuring
+a Relational Direct-to-Field Mapping]
+
+|link:Introduction%20to%20Relational%20Mappings%20(ELUG)#Transformation_Mapping[Transformation
+Mapping]
+|link:Configuring%20a%20Relational%20Transformation%20Mapping%20(ELUG)[Configuring
+a Relational Transformation Mapping]
+
+|link:Introduction%20to%20Relational%20Mappings%20(ELUG)#Direct-to-XMLType_Mapping[Direct-to-XMLType
+Mapping]
+|link:Configuring_a_Relational_Direct-to-XMLType_Mapping_(ELUG)[Configuring
+a Relational Direct-to-XMLType Mapping]
+
+|link:Introduction%20to%20Relational%20Mappings%20(ELUG)#One-to-One_Mapping[One-to-One
+Mapping]
+|link:Configuring%20a%20Relational%20One-to-One%20Mapping%20(ELUG)[Configuring
+a Relational One-to-One Mapping]
+
+|link:Introduction%20to%20Relational%20Mappings%20(ELUG)#Variable_One-to-One_Mapping[Variable
+One-to-One Mapping]
+|link:Configuring%20a%20Relational%20Variable%20One-to-One%20Mapping%20(ELUG)[Configuring
+a Relational Variable One-to-One Mapping]
+
+|link:Introduction%20to%20Relational%20Mappings%20(ELUG)#One-to-Many_Mapping[One-to-Many
+Mapping]
+|link:Configuring_a_Relational_One-to-Many_Mapping_(ELUG)[Configuring a
+Relational One-to-Many Mapping]
+
+|link:Introduction%20to%20Relational%20Mappings%20(ELUG)#Many-to-Many_Mapping[Many-to-Many
+Mapping]
+|link:Configuring_a_Relational_Many-to-Many_Mapping_(ELUG)[Configuring a
+Relational Many-to-Many Mapping]
+
+|link:Introduction%20to%20Relational%20Mappings%20(ELUG)#Aggregate_Collection_Mapping[Aggregate
+Collection Mapping]
+|link:Configuring%20a%20Relational%20Aggregate%20Collection%20Mapping%20(ELUG)[Configuring
+a Relational Aggregate Collection Mapping]
+
+|link:Introduction%20to%20Relational%20Mappings%20(ELUG)#Direct_Collection_Mapping[Direct
+Collection Mapping]
+|link:Configuring_a_Relational_Direct_Collection_Mapping_(ELUG)[Configuring
+a Relational Direct Collection Mapping]
+
+|link:Introduction%20to%20Relational%20Mappings%20(ELUG)#Direct_Map_Mapping[Direct
+Map Mapping]
+|link:Configuring%20a%20Relational%20Direct%20Map%20Mapping%20(ELUG)[Configuring
+a Relational Direct Map Mapping]
+
+|link:Introduction%20to%20Relational%20Mappings%20(ELUG)#Aggregate_Object_Mapping[Aggregate
+Object Mapping]
+|link:Configuring_a_Relational_Aggregate_Object_Mapping_(ELUG)[Configuring
+a Relational Aggregate Object Mapping]
+|===
+
+For more information, see the following:
+
+* link:Introduction%20to%20Mappings%20(ELUG)[Introduction to Mappings]
+* link:Introduction%20to%20Relational%20Mappings%20(ELUG)[Introduction
+to Relational Mappings]
+
+== Configuring Common Relational Mapping Options
+
+This table lists the configurable options shared by two or more
+relational mapping types.
+
+[#Table 33-2]##
+
+[width="100%",cols="<65%,<17%,<18%",options="header",]
+|===
+|*Option to Configure* |*Workbench* |*Java*
+|link:#Configuring_a_Database_Field[Database field]
+|image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:#Configuring_Reference_Descriptor[Reference descriptor]
+|image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Container_Policy[Container
+policy] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Method_or_Direct_Field_Accessing_at_the_Mapping_Level[Method
+or direct field access] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_a_Default_Null_Value_at_the_Mapping_Level[Default
+null value] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Read-Only_Mappings[Read-only
+mapping] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Indirection_(Lazy_Loading)[Indirection
+(lazy loading)] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Private_or_Independent_Relationships[Private
+or Independent relationships]
+|image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Mapping_Comments[Mapping
+comments] |image:support.gif[Supported,title="Supported"]
+|image:unsupport.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_a_Serialized_Object_Converter[Serialized
+object converter] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_a_Type_Conversion_Converter[Type
+conversion converter] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_an_Object_Type_Converter[Object
+type conversion] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Bidirectional_Relationship[Bidirectional
+relationship] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:#Configuring_Batch_Reading[Batch reading]
+|image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:#Configuring_Query_Key_Order[Query key order]
+|image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:#Configuring_Table_and_Field_References_(Foreign_and_Target_Foreign_Keys)[Table
+and field references] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:#Configuring_Joining_at_the_Mapping_Level[Joining]
+|image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+|===
+
+== Configuring a Database Field
+
+You can associate an object attribute with a database field.
+
+This table summarizes which relational mappings support this option.
+
+[#Table 33-3]##
+
+[width="100%",cols="<48%,<36%,<16%",options="header",]
+|===
+|*Mapping*
+|*link:#How_to_Configure_a_Database_Field_Using_Workbench[Using the
+Workbench]* |*How to Use Java*
+|link:Introduction%20to%20Relational%20Mappings%20(ELUG)#Direct-to-Field_Mapping[Direct-to-Field
+Mapping] |image:support.gif[Supported.,title="Supported."]
+|image:support.gif[Supported.,title="Supported."]
+
+|link:Introduction%20to%20Relational%20Mappings%20(ELUG)#Direct-to-XMLType_Mapping[Direct-to-XMLType
+Mapping] |image:support.gif[Supported.,title="Supported."]
+|image:support.gif[Supported.,title="Supported."]
+|===
+
+When choosing the database field, you must consider Java and database
+field type compatibility.
+
+EclipseLink supports the following Java types:
+
+* `+java.lang+`: `+Boolean+`, `+Float+`, `+Integer+`, `+String+`,
+`+Double+`, `+Long+`, `+Short+`, `+Byte+`, `+Byte[ ]+`, `+Character+`,
+`+Character[ ]+`; all the primitives associated with these classes
+* `+java.math+`: `+BigInteger+`, `+BigDecimal+`
+* `+java.sql+`: `+Date+`, `+Time+`, `+Timestamp+`
+* `+java.util+`: `+Date+`, `+Calendar+`
+
+While executing reads, the mappings in the link:#Table_33-6[Relational
+Mapping Support for Reference Descriptor] table perform the simple
+one-way data conversions that the link:#Table_33-4[Type Conversions
+Provided by Direct-to-Field Mappings] table describes. For two-way or
+more complex conversions, You must
+link:Introduction%20to%20Relational%20Mappings%20(ELUG)#Converters_and_Transformers[use
+converters]).
+
+The mappings in this table also allow you to specify a null value. This
+may be required if primitive types are used in the object, and the
+database field allows `+null+` values. For more information, see
+link:Configuring%20a%20Mapping%20(ELUG)#Configuring_a_Default_Null_Value_at_the_Mapping_Level[Configuring
+a Default Null Value at the Mapping Level].
+
+[#Table 33-4]## *_Type Conversions Provided by Direct-to-Field
+Mappings_*
+
+[width="100%",cols="<48%,<52%",options="header",]
+|===
+|*Java type* |*Database type*
+|`+Integer+`, `+Float+`, `+Double+`, `+Byte+`, `+Short+`,
+`+BigDecimal+`, `+BigInteger+`, `+int+`, `+float+`, `+double+`,
+`+byte+`, `+short+` |NUMBER, NUMERIC, DECIMAL, FLOAT, DOUBLE, INT,
+SMALLINT, BIT, BOOLEAN
+
+|`+Boolean+`, `+boolean+` |BOOLEAN, BIT, SMALLINT, NUMBER, NUMERIC,
+DECIMAL, FLOAT, DOUBLE, INT
+
+|`+String+` |VARCHAR, CHAR, VARCHAR2, CLOB, TEXT, LONG, LONG VARCHAR,
+MEMOThe following types apply only to Oracle9: NVARCHAR2, NCLOB, NCHAR
+
+|`+byte[ ]+` |BLOB, LONG RAW, IMAGE, RAW, VARBINARY, BINARY, LONG
+VARBINARY
+
+|`+Time+` |TIME
+
+|`+java.sql.Date+` |DATE
+
+|`+Timestamp+`, `+java.util.Date+`, `+Calendar+` |TIMESTAMP
+|===
+
+*Support for oracle.sql.TimeStamp*
+
+EclipseLink provides additional support for mapping Java date and time
+data types to Oracle Database `+DATE+`, `+TIMESTAMP+`, and
+`+TIMESTAMPTZ+` data types when you use the Oracle JDBC driver with
+Oracle9__i__ Database Server or later and the `+Oracle9Platform+` in
+EclipseLink.
+
+In a direct-to-field mapping, you are not required to specify the
+database type of the field value; EclipseLink determines the appropriate
+data type conversion.
+
+This table lists the supported direct-to-field mapping combinations.
+
+*_Supported Oracle Database Date and Time Direct-to-Field Mappings_*
+
+Java Type
+
+Database Type
+
+Description
+
+java.sql.Time
+
+TIMESTAMP
+
+Full bidirectional support.
+
+TIMESTAMPTZ
+
+Full bidirectional support.
+
+DATE
+
+Full bidirectional support.
+
+java.sql.Date
+
+TIMESTAMP
+
+Full bidirectional support.
+
+TIMESTAMPTZ
+
+Full bidirectional support.
+
+DATE
+
+Full bidirectional support.
+
+java.sql.Timestamp
+
+TIMESTAMP
+
+Full bidirectional support.
+
+TIMESTAMPTZ
+
+Full bidirectional support.
+
+DATE
+
+Nanoseconds are not stored in the database.
+
+java.util.Date
+
+TIMESTAMP
+
+Full bidirectional support.
+
+TIMESTAMPTZ
+
+Full bidirectional support.
+
+DATE
+
+Milliseconds are not stored in the database.
+
+java.util.Calendar
+
+TIMESTAMP
+
+Native SQL or binding gives Calendar timezone.
+
+Note: The TIMESTAMP database value has no timezone – the Calendar object
+provides the local timezone by default. If the database is not in this
+timezone, you must obtain the database timezone by some other means and
+update the Calendarobject accordingly. For this reason, TIMESTAMPTZ may
+be a better choice.
+
+TIMESTAMPTZ
+
+Native SQL or binding stores timezone; standard SQL is based on the
+local timezone.
+
+DATE
+
+Neither timezone nor milliseconds are stored in the database.
+
+Note that some of these mappings result in a loss of precision: avoid
+these combinations if you require this level of precision. For example,
+if you create a direct-to-field mapping between a `+java.sql.Date+`
+attribute and a `+TIMESTAMPTZ+` database field, there is no loss of
+precision. However, if you create a direct-to-field mapping between a
+`+java.sql.Timestamp+` attribute and a `+DATE+` database field, the
+nanoseconds or milliseconds of the attribute are not stored in the
+database.
+
+=== How to Configure a Database Field Using Workbench
+
+Use this procedure to select a specific database field for a direct
+mapping.
+
+[arabic]
+. Select the direct mapping attribute in the *Navigator*. Its properties
+appear in the Editor.
+. Click the *General* tab. The General tab appears. *_Direct Mapping
+General Tab, Database Field Option_* image:mpdtfdfd.gif[Direct Mapping
+General Tab, Database Field
+Option,title="Direct Mapping General Tab, Database Field Option"]
+. Use the *Database Field* field to select a field for this direct
+mapping. You must have previously associated the descriptor with a
+database table as described in
+link:Configuring%20a%20Relational%20Descriptor%20(ELUG)#Configuring_Associated_Tables[Configuring
+Associated Tables].
+
+[width="100%",cols="<100%",]
+|===
+|*Note*: For direct-to-field mappings of an aggregate descriptor (see
+link:Configuring%20a%20Relational%20Descriptor%20(ELUG)[Configuring a
+Relational Descriptor as a Class or Aggregate Type]), this field is for
+display only and cannot be changed.
+|===
+
+== Configuring Reference Descriptor
+
+In relational mappings that extend
+`+org.eclipse.persistence.mappings.ForeignReferenceMapping+`, attributes
+reference other EclipseLink descriptors–not the data source. You can
+select any descriptor in the project.
+
+This table summarizes which relational mappings support this option.
+
+[#Table 33-6]##
+
+[width="100%",cols="<47%,<37%,<16%",options="header",]
+|===
+|*Mapping*
+|*link:#How_to_Configure_a_Reference_Descriptor_Using_Workbench[Using
+the Workbench]* |*How to Use Java*
+|link:Introduction%20to%20Relational%20Mappings%20(ELUG)#One-to-One_Mapping[One-to-one]
+|image:support.gif[Supported.,title="Supported."]
+|image:support.gif[Supported.,title="Supported."]
+
+|link:Introduction%20to%20Relational%20Mappings%20(ELUG)#Variable_One-to-One_Mapping[Variable
+one-to-one] |image:support.gif[Supported.,title="Supported."]
+|image:support.gif[Supported.,title="Supported."]
+
+|link:Introduction%20to%20Relational%20Mappings%20(ELUG)#One-to-Many_Mapping[One-to-many]
+|image:support.gif[Supported.,title="Supported."]
+|image:support.gif[Supported.,title="Supported."]
+
+|link:Introduction%20to%20Relational%20Mappings%20(ELUG)#Many-to-Many_Mapping[Many-to-many]
+|image:support.gif[Supported.,title="Supported."]
+|image:support.gif[Supported.,title="Supported."]
+
+|link:Introduction%20to%20Relational%20Mappings%20(ELUG)#Aggregate_Collection_Mapping[Aggregate
+collection] |image:unsupport.gif[Unsupported.,title="Unsupported."]
+|image:support.gif[Supported.,title="Supported."]
+
+|link:Introduction%20to%20Relational%20Mappings%20(ELUG)#Aggregate_Object_Mapping[Aggregate
+object] |image:support.gif[Supported.,title="Supported."]
+|image:support.gif[Supported.,title="Supported."]
+|===
+
+=== How to Configure a Reference Descriptor Using Workbench
+
+To specify a reference descriptor for a relational mapping, use this
+procedure.
+
+[arabic]
+. Select the mapped attribute in the *Navigator*. Its properties appear
+in the Editor.
+. Click the *General* tab. The General tab appears. *_General Tab,
+Reference Descriptor Field_* image:mpgenref.gif[General Tab, Reference
+Descriptor Field,title="General Tab, Reference Descriptor Field"]
+. Use the *Reference Descriptor* field to select the descriptor
+referenced by this relationship mapping.
+
+Note: For aggregate mappings the Reference Descriptor must be an
+aggregate. See Configuring a Relational Descriptor as a Class or
+Aggregate Type for more information.
+
+For variable one-to-one mappings, the Reference Descriptor must be an
+interface. See Configuring a Relational Variable One-to-One Mapping for
+more information.
+
+You can specify a reference descriptor that is not in the current
+Workbench project. For example, to create a mapping to an `+Employee+`
+class that does not exist in the current project, do the following:
+
+[arabic]
+. Add the `+Employee+` class to your current project. See
+link:Creating%20a%20Project%20(ELUG)[Working with Projects].
+. Create the relationship mapping to the `+Employee+` descriptor.
+. Deactivate the `+Employee+` descriptor. See
+link:Using%20Workbench%20(ELUG)[Active and Inactive Descriptors].
+
+When you generate the deployment XML for your project, the _mapping_ to
+the `+Employee+` class will be included, but not the `+Employee+` class.
+
+See Also:
+
+link:#Configuring_Reference_Descriptor[Configuring Reference Descriptor]
+
+== Configuring Batch Reading
+
+Batch reading can be used in most of the relational mappings. This
+feature should be used only if it is known that the related objects are
+always required with the source object.
+
+This table summarizes which relational mappings support this option.
+
+[#Table 33-7]##
+
+[width="100%",cols="<41%,<32%,<27%",options="header",]
+|===
+|*Mapping* |*link:#How_to_Configure_Batch_Reading_Using_Workbench[Using
+the Workbench]* |*link:#How_to_Configure_Batch_Reading_Using_Java[Using
+Java]*
+|link:Introduction%20to%20Relational%20Mappings%20(ELUG)#One-to-One_Mapping[One-to-one]
+|image:support.gif[Supported.,title="Supported."]
+|image:support.gif[Supported.,title="Supported."]
+
+|link:Introduction%20to%20Relational%20Mappings%20(ELUG)#One-to-Many_Mapping[One-to-many]
+|image:support.gif[Supported.,title="Supported."]
+|image:support.gif[Supported.,title="Supported."]
+
+|link:Introduction%20to%20Relational%20Mappings%20(ELUG)#Many-to-Many_Mapping[Many-to-many]
+|image:support.gif[Supported.,title="Supported."]
+|image:support.gif[Supported.,title="Supported."]
+
+|link:Introduction%20to%20Relational%20Mappings%20(ELUG)#Direct_Collection_Mapping[Direct
+collection] |image:support.gif[Supported.,title="Supported."]
+|image:support.gif[Supported.,title="Supported."]
+
+|link:Introduction%20to%20Relational%20Mappings%20(ELUG)#Direct_Map_Mapping[Direct
+map] |image:support.gif[Supported.,title="Supported."]
+|image:support.gif[Supported.,title="Supported."]
+
+|link:Introduction%20to%20Relational%20Mappings%20(ELUG)#Aggregate_Object_Mapping[Aggregate
+object] |image:unsupport.gif[Unsupported.,title="Unsupported."]
+|image:support.gif[Supported.,title="Supported."]
+|===
+
+=== How to Configure Batch Reading Using Workbench
+
+To use batch reading in a relationship mapping, use this procedure:
+
+[arabic]
+. Select the mapped attribute in the *Navigator*. Its properties appear
+in the Editor.
+. Click the *General* tab. The General tab appears. *_General Tab, Batch
+Reading Option_* image:oogenbat.gif[General Tab, Batch Reading
+Option,title="General Tab, Batch Reading Option"]
+. To specify that this mapping using batch reading, select the *Batch
+Reading* option.
+
+=== How to Configure Batch Reading Using Java
+
+This example shows how to use a `+DescriptorCustomizer+` class to add
+batch reading to a mapping.
+
+[#Example 33-1]## *_Query Optimization Using Batching_*
+
+[source,java]
+----
+ public void customize(ClassDescriptor descriptor) {
+ OneToManyMapping phoneNumbersMapping = new OneToManyMapping();
+ phoneNumbersMapping = (OneToManyMapping)descriptor.getMappingForAttributeName("phones");
+ phoneNumbersMapping.useBatchReading();
+ }
+----
+
+== Configuring Query Key Order
+
+You can configure EclipseLink to maintain collections in order by query
+key.
+
+This table summarizes which relational mappings support this option.
+
+[#Table 33-8]##
+
+[width="100%",cols="<43%,<31%,<26%",options="header",]
+|===
+|*Mapping*
+|*link:#How_to_Configure_Query_Key_Order_Using_Workbench[Using the
+Workbench]* |*link:#How_to_Configure_Query_Key_Order_Using_Java[Using
+Java]*
+|link:Introduction%20to%20Relational%20Mappings%20(ELUG)#Many-to-Many_Mapping[Many-to-many]
+|image:support.gif[Supported.,title="Supported."]
+|image:support.gif[Supported.,title="Supported."]
+
+|link:Introduction%20to%20Relational%20Mappings%20(ELUG)#One-to-Many_Mapping[One-to-many]
+|image:support.gif[Supported.,title="Supported."]
+|image:support.gif[Supported.,title="Supported."]
+
+|link:Introduction%20to%20Relational%20Mappings%20(ELUG)#Aggregate_Collection_Mapping[Aggregate
+collection] |image:unsupport.gif[Unsupported.,title="Unsupported."]
+|image:support.gif[Supported.,title="Supported."]
+|===
+
+=== How to Configure Query Key Order Using Workbench
+
+To specify the order of a mapping’s query keys, use this procedure:
+
+[arabic]
+. Select the mapped attribute in the *Navigator*. Its properties appear
+in the Editor.
+. Click the *Ordering* tab. The Ordering tab appears. *_Ordering Tab_*
+image:onetomany_coll_ord.gif[Ordering Tab,title="Ordering Tab"]
+. Complete the *Ordering* options on the tab.
+
+Field
+
+Description
+
+Query Key
+
+Specify the query key to order by.
+
+Click Add to add query keys to, or Remove to remove query keys from the
+ordering operation.
+
+Click Up or Down to change the sort order of selected query keys.
+
+Order
+
+Specify if EclipseLink orders the selected query key in Ascending or
+Descending (alphabetical) order.
+
+=== How to Configure Query Key Order Using Java
+
+This example shows how to use the `+DescriptorCustomizer+` class to add
+complex ordering to a mapping.
+
+[#'Example 33-2]## *_Configuring Query Key Order_*
+
+[source,java]
+----
+ public void customize(ClassDescriptor descriptor) {
+
+ OneToManyMapping phoneNumbersMapping = new OneToManyMapping();
+
+ phoneNumbersMapping = (OneToManyMapping)descriptor.getMappingForAttributeName("phones");
+
+ phoneNumbersMapping.addAscendingOrdering("areaCode");
+
+ ExpressionBuilder phone = phoneNumbersMapping.getSelectionQuery().getExpressionBuilder();
+
+ phoneNumbersMapping.getSelectionQuery().addOrdering(
+ phone.get("type").toUpperCase().ascending());
+ }
+----
+
+[width="100%",cols="<100%",]
+|===
+|*Note:* You can provide the same functionality by using a descriptor
+amendment method (see
+link:Customizing%20the%20EclipseLink%20Application%20(ELUG)#Using_the_Descriptor_Amendment_Methods[Using
+the Descriptor Amendment Methods]).
+|===
+
+== Configuring Table and Field References (Foreign and Target Foreign Keys)
+
+A foreign key is a combination of one or more database columns that
+reference a unique key, usually the primary key, in another table.
+Foreign keys can be any number of fields (similar to a primary key), all
+of which are treated as a unit. A foreign key and the parent key it
+references must have the same number and type of fields.
+
+Mappings that extend
+`+org.eclipse.persistence.mappings.ForeignReferenceMapping+` use foreign
+keys to find information in the database so that the target object(s)
+can be instantiated. For example, if every `+Employee+` has an attribute
+`+address+` that contains an instance of `+Address+` (which has its own
+descriptor and table) then, the one-to-one mapping for the `+address+`
+attribute would specify foreign key information to find an `+Address+`
+for a particular `+Employee+`.
+
+EclipseLink classifies foreign keys into two categories in
+mappings–*foreign keys* and *target foreign keys*:
+
+* In a _foreign key,_ the key is found in the table associated with the
+mapping’s own descriptor. For example, an `+Employee+` foreign key to
+`+ADDRESS+` would be in the `+EMPLOYEE+` table.
+* In a _target foreign key_, the reference is from the target object’s
+table back to the key from the mapping’s descriptor’s table. For
+example, the `+ADDRESS+` table would have a foreign key to `+EMPLOYEE+`.
+
+[width="100%",cols="<100%",]
+|===
+|*Caution*: Make sure you fully understand the distinction between
+_foreign key_ and _target foreign key_ before defining a mapping.
+|===
+
+The table reference is the database table that contains the foreign key
+references.
+
+This table summarizes which relational mappings support this option.
+
+[width="100%",cols="<32%,<36%,<32%",options="header",]
+|===
+|*Mapping*
+|*link:#How_to_Configure_Table_and_Field_References_(Foreign_and_Target_Foreign_Keys)_Using_Workbench[Using
+the Workbench]*
+|*link:#How_to_Configure_Table_and_Field_References_(Foreign_and_Target_Foreign_Keys)_Using_Java[Using
+Java]*
+|link:Introduction%20to%20Relational%20Mappings%20(ELUG)#One-to-One_Mapping[One-to-one]
+|image:support.gif[Supported.,title="Supported."]
+|image:support.gif[Supported.,title="Supported."]
+
+|link:Introduction%20to%20Relational%20Mappings%20(ELUG)#One-to-Many_Mapping[One-to-many]
+|image:support.gif[Supported.,title="Supported."]
+|image:support.gif[Supported.,title="Supported."]
+
+|link:Introduction%20to%20Relational%20Mappings%20(ELUG)#Many-to-Many_Mapping[Many-to-many]
+|image:support.gif[Supported.,title="Supported."]
+|image:support.gif[Supported.,title="Supported."]
+
+|link:Introduction%20to%20Relational%20Mappings%20(ELUG)#Aggregate_Collection_Mapping[Aggregate
+collection] |image:unsupport.gif[Unsupported.,title="Unsupported."]
+|image:support.gif[Supported.,title="Supported."]
+
+|link:Introduction%20to%20Relational%20Mappings%20(ELUG)#Direct_Collection_Mapping[Direct
+collection] |image:support.gif[Supported.,title="Supported."]
+|image:support.gif[Supported.,title="Supported."]
+
+|link:Introduction%20to%20Relational%20Mappings%20(ELUG)#Direct_Map_Mapping[Direct
+map] |image:support.gif[Supported.,title="Supported."]
+|image:support.gif[Supported.,title="Supported."]
+|===
+
+Using Workbench, you can either import this table from your database or
+create it. If you import tables from the database (see
+link:Using%20Workbench%20(ELUG)[Importing Tables from a Database]),
+EclipseLink creates references that correspond to existing database
+constraints (if supported by the driver). You can also define references
+in EclipseLink without creating similar constraints on the database.
+
+=== How to Configure Table and Field References (Foreign and Target Foreign Keys) Using Workbench
+
+To specify a table for a mapping reference, use this procedure:
+
+[arabic]
+. Select the mapped attribute in the *Navigator*. Its properties appear
+in the Editor.
+. Click the *Table Reference* tab. The Reference tab appears. *_Table
+Reference Tab, Table Reference Field_* image:onetomany_tab_ref.gif[Table
+Reference Tab, Table Reference
+Field,title="Table Reference Tab, Table Reference Field"]
+. Complete the fields on the Table Reference tab.
+
+Use the following information to select the field references on the tab:
+
+[width="100%",cols="<16%,<84%",options="header",]
+|===
+|*Field* |*Description*
+|*Table Reference* |Select an existing table, or click *New* to create a
+new table reference.
+
+|*Source and Target Field* |Click *Add* to create new foreign key
+reference. To delete an existing key pair reference, select the *Source*
+and *Target* fields and click *Remove*.
+
+|*Source Field* |Select the database field from the _source_ table for
+this foreign key reference.
+
+|*Target Field* |Select the database field from the _target_ table for
+this foreign key reference.
+
+|*Target Foreign Key* |Specify whether or not the reference is from the
+target object’s table back to the key from the mapping’s descriptor’s
+table.
+|===
+
+See Also:
+
+link:#Configuring_Table_and_Field_References_(Foreign_and_Target_Foreign_Keys)[Configuring
+Table and Field References (Foreign and Target Foreign Keys)]
+
+=== How to Configure Table and Field References (Foreign and Target Foreign Keys) Using Java
+
+Use the `+addTargetForeignKeyFieldName+` method (and pass the name of
+the field name of the target foreign key and the source of the primary
+key in the source table) to specify foreign key information.
+
+For composite source primary keys, use the
+`+addTargetForeignKeyFieldName+` method for each of the fields that
+comprise the primary key.
+
+This esxample shows how to use the `+DescriptorCustomizer+` class to add
+complex join to a mapping.
+
+[#Example 33-3]## *_Adding Complex Join to a Mapping_*
+
+[source,java]
+----
+ public void customize(ClassDescriptor descriptor) {
+
+ OneToManyMapping phoneNumbersMapping = new OneToManyMapping();
+ phoneNumbersMapping = (OneToManyMapping)descriptor.getMappingForAttributeName("cellPhones");
+
+ ExpressionBuilder phone = phoneNumbersMapping.getSelectionQuery().getExpressionBuilder();
+
+ phoneNumbersMapping.addTargetForeignKeyFieldName("PHONE.EMP_ID", "EMP.ID");
+
+ phoneNumbersMapping.getSelectionQuery(
+ phone.getField("PHONE.EMP_ID").equal(phone.getParameter("EMP.ID").
+ and(phone.getField("PHONE.TYPE').equal("CELL")));
+ }
+----
+
+[width="100%",cols="<100%",]
+|===
+|*Note:* You can provide the same functionality by using a descriptor
+amendment method (see
+link:Customizing%20the%20EclipseLink%20Application%20(ELUG)#Using_the_Descriptor_Amendment_Methods[Using
+the Descriptor Amendment Methods]).
+|===
+
+== Configuring Joining at the Mapping Level
+
+EclipseLink supports configuring an inner or outer join at the mapping
+level for a `+ForeignReferenceMapping+`. When a class that owns the
+mapping is read, the EclipseLink runtime will always get the class and
+the target of the reference mapping with one database hit.
+
+Use this feature only if the target object is _always_ required with the
+source object, or when indirection (lazy loading) is _not_ used. For
+more information, see
+link:Introduction%20to%20Mappings%20(ELUG)#Indirection_(Lazy_Loading)[Indirection
+(Lazy Loading)].
+
+You can also configure join reading at the query level. For more
+information, see
+link:Introduction%20to%20EclipseLink%20Queries%20(ELUG)#Join_Reading_and_Object-Level_Read_Queries[Join
+Reading and Object-Level Read Queries].
+
+For more information about joins, see
+link:Introduction%20to%20EclipseLink%20Expressions%20(ELUG)[Expressions
+for Joining and Complex Relationships].
+
+=== How to Configure Joining at the Mapping Level Using Workbench
+
+To use joining in a relationship mapping, use this procedure:
+
+[arabic]
+. Select the mapped attribute in the *Navigator*. Its properties appear
+in the Editor.
+. Click the *General* tab. The General tab appears.
+[#'Figure 33-6]##*_General Tab, Use Joining Option_*
+image:oogenjoi.gif[General Tab, Use Joining
+Option,title="General Tab, Use Joining Option"]
+. To use joining with this relationship, select the *Use Joining*
+option.
+
+See Also:
+
+link:#Configuring_Joining_at_the_Mapping_Level[Configuring Joining at
+the Mapping Level]
+
+=== How to Configure Joining at the Mapping Level Using Java
+
+This example shows how to use the `+DescriptorCustomizer+` class to add
+complex join at the mapping level.
+
+[#Example 33-4]## *_Adding Join at the Mapping Level_*
+
+[source,java]
+----
+ public void customize(ClassDescriptor descriptor) {
+
+ OneToManyMapping addressMapping = new OneToManyMapping();
+ addressMapping = (OneToManyMapping)descriptor.getMappingForAttributeName("address");
+ addressMapping.useJoining();
+ ...
+ }
+----
+
+[width="100%",cols="<100%",]
+|===
+|*Note:* You can provide the same functionality by using a descriptor
+amendment method (see
+link:Customizing%20the%20EclipseLink%20Application%20(ELUG)#Using_the_Descriptor_Amendment_Methods[Using
+the Descriptor Amendment Methods]).
+|===
+
+'''''
+
+_link:EclipseLink_User's_Guide_Copyright_Statement[Copyright Statement]_
+
+Category:_EclipseLink_User's_Guide[Category: EclipseLink User’s Guide]
+Category:_Release_1[Category: Release 1] Category:_Task[Category: Task]
+Category:_ORM[Category: ORM]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Relational_One-to-Many_Mapping_(ELUG).adoc b/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Relational_One-to-Many_Mapping_(ELUG).adoc
new file mode 100644
index 00000000000..49a35adaf52
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Relational_One-to-Many_Mapping_(ELUG).adoc
@@ -0,0 +1,99 @@
+*TOC*
+Special:Whatlinkshere_Configuring_a_Relational_One-to-Many_Mapping_(ELUG)[Related
+Topics]
+
+For information on how to create EclipseLink mappings, see
+link:Creating%20a%20Mapping%20(ELUG)[Creating a Mapping].
+
+This table lists the configurable options for a relational one-to-many
+mapping.
+
+[#Table 38-1]## *_Configurable Options for Relational One-to-Many
+Mapping_*
+
+[width="100%",cols="<65%,<17%,<18%",options="header",]
+|===
+|*Option* |*Workbench* |*Java*
+|link:Configuring%20a%20Relational%20Mapping%20(ELUG)#Configuring_Reference_Descriptor[Configuring
+Reference Descriptor] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_a_Type_Conversion_Converter[Configuring
+a Type Conversion Converter]
+|image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Read-Only_Mappings[Configuring
+Read-Only Mappings] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Mapping_Comments[Configuring
+Mapping Comments] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Relational%20Mapping%20(ELUG)#Configuring_Batch_Reading[Configuring
+Batch Reading] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Mapping_Comments[Configuring
+Mapping Comments] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Bidirectional_Relationship[Configuring
+Bidirectional Relationship]
+|image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Container_Policy[Configuring
+Container Policy] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Mapping_Comments[Configuring
+Mapping Comments] |image:support.gif[Supported,title="Supported"]
+|image:unsupport.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Relational%20Mapping%20(ELUG)#Configuring_Joining_at_the_Mapping_Level[Configuring
+Joining at the Mapping Level]
+|image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Relational%20Mapping%20(ELUG)#Configuring_Query_Key_Order[Configuring
+Query Key Order] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+|===
+
+This example shows how to create a one-to-many mapping and add it to a
+descriptor using Java code.
+
+[#Example 40-1]## *_One-to-Many Mapping_*
+
+....
+public void customize(ClassDescriptor descriptor) {
+ OneToManyMapping mapping = new OneToManyMapping();
+
+ // configure mapping
+ ...
+
+ // add mapping to descriptor
+ descriptor.addMapping(mapping);
+}
+....
+
+For more information, see the following:
+
+* link:Introduction%20to%20Relational%20Mappings%20(ELUG)#One-to-Many_Mapping[One-to-Many
+Mapping]
+* link:Configuring%20a%20Relational%20Mapping%20(ELUG)[Configuring a
+Relational Mapping]
+* link:Configuring%20a%20Mapping%20(ELUG)[Configuring a Mapping].
+
+For information on using JPA to configure one-to-many mappings, see
+link:Introduction%20to%20EclipseLink%20JPA%20(ELUG)#@OneToMany[@OneToMany].
+
+'''''
+
+_link:EclipseLink_User's_Guide_Copyright_Statement[Copyright Statement]_
+
+Category:_EclipseLink_User's_Guide[Category: EclipseLink User’s Guide]
+Category:_Release_1[Category: Release 1] Category:_Task[Category: Task]
+Category:_ORM[Category: ORM]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Relational_One-to-One_Mapping_(ELUG).adoc b/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Relational_One-to-One_Mapping_(ELUG).adoc
new file mode 100644
index 00000000000..6a4c4954589
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Relational_One-to-One_Mapping_(ELUG).adoc
@@ -0,0 +1,90 @@
+*TOC* Special:Whatlinkshere_One-to-One_Mapping_(ELUG)[Related Topics]
+
+For information on how to create EclipseLink mappings, see
+link:Creating%20a%20Mapping%20(ELUG)[Creating a Mapping].
+
+This table lists the configurable options for a relational one-to-one
+mapping.
+
+[#Table 36-1]##
+
+[width="100%",cols="<68%,<16%,<16%",options="header",]
+|===
+|*Option to Configure* |*Workbench* |*Java*
+|link:Configuring%20a%20Relational%20Mapping%20(ELUG)#Configuring_Reference_Descriptor[Reference
+descriptor] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Method_or_Direct_Field_Accessing_at_the_Mapping_Level[Method
+or direct field access] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Read-Only_Mappings[Read-only
+mapping] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Private_or_Independent_Relationships[Private
+or Independent relationships]
+|image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Relational%20Mapping%20(ELUG)#Configuring_Batch_Reading[Batch
+reading] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Relational%20Mapping%20(ELUG)#Configuring_Joining_at_the_Mapping_Level[Joining]
+|image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Indirection_(Lazy_Loading)[Indirection
+(lazy loading)] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Bidirectional_Relationship[Bidirectional
+relationship] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Mapping_Comments[Mapping
+comments] |image:support.gif[Supported,title="Supported"]
+|image:unsupport.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Relational%20Mapping%20(ELUG)#Configuring_Table_and_Field_References_(Foreign_and_Target_Foreign_Keys)[Table
+and field references] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+|===
+
+This example shows how to create a one-to-one mapping and add it to a
+descriptor using Java code.
+
+[#Example 38-1]## *_One-to-One Mapping_*
+
+....
+public void customize(ClassDescriptor descriptor) {
+ OneToOneMapping mapping = new OneToOneMapping();
+
+ // configure mapping
+ ...
+
+ // add mapping to descriptor
+ descriptor.addMapping(mapping);
+}
+....
+
+For more information, see the following:
+
+* link:Introduction%20to%20Relational%20Mappings%20(ELUG)#One-to-One_Mapping[One-to-One
+Mapping]
+* link:Configuring%20a%20Relational%20Mapping%20(ELUG)[Configuring a
+Relational Mapping]
+* link:Configuring%20a%20Mapping%20(ELUG)[Configuring a Mapping].
+
+For information on using JPA to configure one-to-one mappings, see
+link:Introduction%20to%20EclipseLink%20JPA%20(ELUG)#@OneToOne[@OneToOne].
+
+'''''
+
+_link:EclipseLink_User's_Guide_Copyright_Statement[Copyright Statement]_
+
+Category:_EclipseLink_User's_Guide[Category: EclipseLink User’s Guide]
+Category:_Release_1[Category: Release 1] Category:_Task[Category: Task]
+Category:_ORM[Category: ORM]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Relational_Project_(ELUG).adoc b/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Relational_Project_(ELUG).adoc
new file mode 100644
index 00000000000..4d488ced6ff
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Relational_Project_(ELUG).adoc
@@ -0,0 +1,654 @@
+image:Elug_draft_icon.png[Image:Elug draft
+icon.png,title="Image:Elug draft icon.png"] *For the latest EclipseLink
+documentation, please see
+http://www.eclipse.org/eclipselink/documentation/*
+
+'''''
+
+*TOC*
+Special:Whatlinkshere_Configuring_a_Relational_Project_(ELUG)[Related
+Topics]
+
+This section describes the various components that you must configure in
+order to use a relational project.
+
+This section also describes logging into a database during development
+when using Workbench. For more information, see
+link:#Logging_In_to_the_Database[Logging In to the Database].
+
+For information on how to create relational projects, see
+link:Creating%20a%20Relational%20Project%20(ELUG)[Creating a Relational
+Project].
+
+This table lists the configurable options for relational projects. In
+addition to the configurable options described here, you must also
+configure the base class options described in
+link:Configuring%20a%20Project%20(ELUG)[Configuring a Project].
+
+[#Table 25-1]##
+
+[width="100%",cols="<66%,<16%,<18%",options="header",]
+|===
+|*Option to Configure* |*EclipseLink Workbench* |*Java*
+|link:Configuring%20a%20Project%20(ELUG)#Configuring_Project_Save_Location[Project
+save location] |image:support.gif[Supported,title="Supported"]
+|image:unsupport.gif[Unsupported,title="Unsupported"]
+
+|link:Configuring%20a%20Project%20(ELUG)#Configuring_Project_Classpath[Project
+classpath] |image:support.gif[Supported,title="Supported"]
+|image:unsupport.gif[Unsupported,title="Unsupported"]
+
+|link:Configuring%20a%20Project%20(ELUG)#Configuring_Project_Comments[Project
+comments] |image:support.gif[Supported,title="Supported"]
+|image:unsupport.gif[Unsupported,title="Unsupported"]
+
+|link:Configuring%20a%20Project%20(ELUG)#Configuring_Method_or_Direct_Field_Access_at_the_Project_Level[Method
+or direct field access]) |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Project%20(ELUG)#Configuring_Default_Descriptor_Advanced_Properties[Default
+descriptor advanced properties]
+|image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Project%20(ELUG)#Configuring_Existence_Checking_at_the_Project_Level[Existence
+checking] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Project%20(ELUG)#Configuring_Project_Deployment_XML_Options[Project
+deployment XML options] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Project%20(ELUG)#Configuring_Model_Java_Source_Code_Options[Model
+Java source code options]
+|image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:#Configuring_Relational_Database_Platform_at_the_Project_Level[Relational
+database] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:#Configuring_Sequencing_at_the_Project_Level[Sequencing]
+|image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:#Configuring_Login_Information_at_the_Project_Level[Login
+information] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:#Configuring_Development_and_Deployment_Logins[Development and
+deployment logins] |image:support.gif[Supported,title="Supported"]
+|image:unsupport.gif[Unsupported,title="Unsupported"]
+
+|link:Configuring%20a%20Project%20(ELUG)#Configuring_Cache_Type_and_Size_at_the_Project_Level[Cache
+type and size] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Project%20(ELUG)#Configuring_Cache_Isolation_at_the_Project_Level[Cache
+isolation] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Project%20(ELUG)#Configuring_Cache_Coordination_Change_Propagation_at_the_Project_Level[Cache
+coordination change propagation]
+|image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Project%20(ELUG)#Configuring_Cache_Expiration_at_the_Project_Level[Cache
+expiration] |image:support.gif[Supported,title="Supported"]
+|image:unsupport.gif[Unsupported,title="Unsupported"]
+
+|link:#Configuring_Named_Query_Parameterized_SQL_and_Statement_Caching_at_the_Project_Level[Named
+query parameterized SQL and statement caching]
+|image:support.gif[Supported,title="Supported"]
+|image:unsupport.gif[Unsupported,title="Unsupported"]
+
+|link:#Configuring_Table_Generation_Options[Table generation options]
+|image:support.gif[Supported,title="Supported"]
+|image:unsupport.gif[Unsupported,title="Unsupported"]
+
+|link:#Configuring_Table_Creator_Java_Source_Options[Table creator Java
+source options] |image:support.gif[Supported,title="Supported"]
+|image:unsupport.gif[Unsupported,title="Unsupported"]
+
+|link:#Configuring_Project_Java_Source_Code_Options[Project Java source
+code options] |image:support.gif[Supported,title="Supported"]
+|image:unsupport.gif[Unsupported,title="Unsupported"]
+|===
+
+For more information, see
+link:Introduction%20to%20Relational%20Projects%20(ELUG)[Introduction to
+Relational Projects].
+
+== Configuring Relational Database Platform at the Project Level
+
+For each relational project, you must specify the database platform
+(such as Oracle Database 10__g__). This platform configuration is
+overridden by the session login, if configured.
+
+For more information, see the following:
+
+* link:Configuring%20a%20Database%20Login%20(ELUG)#Configuring_a_Relational_Database_Platform_at_the_Session_Level[Configuring
+a Relational Database Platform at the Session Level]
+* link:Introduction%20to%20Data%20Access%20(ELUG)#Data_Source_Platform_Types[Data
+Source Platform Types]
+
+=== How to Configure Relational Database Platform at the Project Level Using Workbench
+
+To specify the database platform of a relational project, use this
+procedure:
+
+[arabic]
+. Select the database object in the *Navigator*. The Database property
+sheet appears. *_Database Property Sheet, Database Platform Options_*
+image:dbplat.gif[Database Property Sheet, Database Platform
+Options,title="Database Property Sheet, Database Platform Options"]
+. Complete the Database Platform option on the property sheet.
+. Click *Change* to select a new database platform for the project. For
+more information, see
+link:Introduction%20to%20Data%20Access%20(ELUG)#Data_Source_Platform_Types[Data
+Source Platform Types].
+
+== Configuring Sequencing at the Project Level
+
+Sequencing allows EclipseLink to automatically assign the primary key or
+ID of an object when the object is inserted.
+
+You configure EclipseLink sequencing at the project or session level to
+tell EclipseLink how to obtain sequence values: that is, what type of
+sequences to use.
+
+In a POJO project, you can configure a session directly: in this case,
+you can use a session-level sequence configuration to override
+project-level sequence configuration, on a
+link:Configuring%20a%20Database%20Login%20(ELUG)#Configuring_Sequencing_at_the_Session_Level[session-by-session
+basis]), if required (see .
+
+link:#How_to_Configure_Sequencing_at_the_Project_Level_Using_Workbench[Using
+the Workbench], you can configure
+link:Introduction%20to%20Relational%20Projects%20(ELUG)#Table_Sequencing[Table
+Sequencing] and native sequencing (see
+link:Introduction%20to%20Relational%20Projects%20(ELUG)#Native_Sequencing_with_an_Oracle_Database_Platform[Native
+Sequencing with an Oracle Database Platform] and
+link:Introduction%20to%20Relational%20Projects%20(ELUG)#Native_Sequencing_with_a_Non-Oracle_Database_Platform[Native
+Sequencing with a Non-Oracle Database Platform]), and you can configure
+a preallocation size that applies to all sequences (see
+link:Introduction%20to%20Relational%20Projects%20(ELUG)#Sequencing_and_Preallocation_Size[Sequencing
+and Preallocation Size]).
+
+link:#How_to_Configure_Sequencing_at_the_Project_Level_Using_Java[Using
+Java], you can configure any sequence type that EclipseLink supports
+(see
+link:Introduction%20to%20Relational%20Projects%20(ELUG)#Sequencing_Types[Sequencing
+Types]). You can create any number and combination of sequences. You can
+create a sequence object explicitly or use the default sequence that the
+platform creates. You can associate the same sequence with more than one
+descriptor and you can configure a separate preallocation size for each
+descriptor’s sequence.
+
+After configuring the sequence type at the project (or session) level,
+to enable sequencing, you must
+link:Configuring%20a%20Relational%20Descriptor%20(ELUG)#Configuring_Sequencing_at_the_Descriptor_Level[configure
+a descriptor with a sequence field and a sequence name].
+
+For more information about sequencing, see
+link:Introduction%20to%20Relational%20Projects%20(ELUG)#Sequencing_in_Relational_Projects[Sequencing
+in Relational Projects].
+
+=== How to Configure Sequencing at the Project Level Using Workbench
+
+To specify the sequencing information for the project, use this
+procedure:
+
+[arabic]
+. Select the project object in the *Navigator*.
+. Select the *Sequencing* tab in the *Editor*. The Sequencing tab
+appears. *_Sequencing Tab_* image:sequence.gif[Sequencing
+Tab,title="Sequencing Tab"]
+. Complete each field on Sequencing tab.
+
+Use this table to enter data in the following fields to configure the
+sequencing information:
+
+[width="100%",cols="<6%,<94%",options="header",]
+|===
+|*Field* |*Description*
+|*Preallocation Size* |Specify the default preallocation size (see
+link:Introduction%20to%20Relational%20Projects%20(ELUG)[Sequencing and
+Preallocation Size]). Default is *50*. The preallocation size you
+configure applies to all sequences.
+
+|*Default Sequence Table* |Select this option to use table sequencing
+(see
+link:Introduction%20to%20Relational%20Projects%20(ELUG)#Table_Sequencing[Table
+Sequencing]) with default sequence table name `+SEQUENCE+`, default
+sequence name field `+SEQ_NAME+`, and default sequence counter field
+`+SEQ_COUNT+`.
+
+|*Native Sequencing* |Select this option to use a sequencing object (see
+link:Introduction%20to%20Relational%20Projects%20(ELUG)#Native_Sequencing_with_an_Oracle_Database_Platform[Native
+Sequencing with an Oracle Database Platform] or
+link:Introduction%20to%20Relational%20Projects%20(ELUG)#Native_Sequencing_with_a_Non-Oracle_Database_Platform[Native
+Sequencing with a Non-Oracle Database Platform]) created by the database
+platform. This option applies only to Oracle, Sybase, Microsoft SQL, and
+IBM Informix database platforms.
+
+|*Custom Sequence Table* |Select this option to use table sequencing
+(see
+link:Introduction%20to%20Relational%20Projects%20(ELUG)#Table_Sequencing[Table
+Sequencing]) with a sequence table name, sequence name field, and
+sequence counter field name that you specify.
+
+|*Name* |Specify the name of the sequence table.
+
+|*Name Field* |Specify the name of the column used to store the sequence
+name.
+
+|*Counter Field* |Specify the name of the column used to store the
+sequence count.
+|===
+
+=== How to Configure Sequencing at the Project Level Using Java
+
+Using Java, you can configure a project to use multiple, different
+sequences, as this exmaple shows.
+
+[#Example 25-1]## *_Configuring Sequencing at the Project Level in
+Java_*
+
+[source,java]
+----
+ // Enable native sequencing for the project as the default. Configured the default
+ // preallocation size'''
+ project.getLogin().useNativeSequencing();
+ project.getLogin().setSequencePreallocationSize(50);
+
+ // Configure the EMP_SEQ to not use preallocation
+ DefaultSequence empSequence = new DefaultSequence("EMP_SEQ", 1);
+ project.getLogin().addSequence(empSequence);
+
+ // Configure the PROJ_SEQ to use a seperate sequence table
+ UnarySequence projSequence = new UnarySequence("PROJ_SEQ_TAB", "COUNTER");
+ project.getLogin().addSequence(projSequence);
+----
+
+== Configuring Login Information at the Project Level
+
+This section describes how to define a login to a relational database.
+After you define a login, you must
+link:#Configuring_Development_and_Deployment_Logins[designate its role].
+
+After you
+link:#Configuring_Login_Information_at_the_Project_Level[create a login]
+and specify it as a
+link:#Configuring_Development_and_Deployment_Logins[development login],
+you can link:#Logging_In_to_the_Database[log in to a database instance].
+
+=== How to Configure Login Information at the Project Level UsingWorkbench
+
+To create or edit a database login, use this procedure:
+
+[arabic]
+. Select the database object in the *Navigator*. The Database property
+sheet appears. *_Database Property Sheet, Database Login Fields_*
+image:dbdefine.gif[Database Property Sheet, Database Login
+Fields,title="Database Property Sheet, Database Login Fields"]
+. Click *Add* to create a new Defined Login.
+. Complete the Database Login fields on the property sheet.
+
+Use this table to enter data in the following fields on the Database
+property sheet to configure the database login:
+
+Field
+
+Description
+
+Defined Logins
+
+Login used to access the database. Click Add to add a new login, or
+Remove to delete an existing login.
+
+Driver Class
+
+The JDBC driver to use to connect to the database.
+
+URL
+
+The URL used to connect to the appropriate database.
+
+User Name
+
+The name required to log in to the database.
+
+Password
+
+The password required to log in to the database.
+
+Save Password
+
+Whether or not to save the Password for this Defined Login.
+
+We recommend that you do not save the password with a deployment login.
+
+Note: If you select Save Password, then when you export Java source and
+deployment XML, Workbench writes the database password using JCE
+encryption (when using JDK 1.4 or later). For information on how to
+specify password encryption options, see Configuring Password
+Encryption.
+
+Default: unselected.
+
+See Also:
+
+link:#Configuring_Login_Information_at_the_Project_Level[Configuring
+Login Information at the Project Level]
+
+link:#Configuring_Relational_Database_Platform_at_the_Project_Level[Configuring
+Relational Database Platform at the Project Level]
+
+link:#Configuring_Development_and_Deployment_Logins[Configuring
+Development and Deployment Logins]
+
+== Configuring Development and Deployment Logins
+
+This section describes how to designate a defined login’s role. For
+information on how to define a login, see
+link:#Configuring_Login_Information_at_the_Project_Level[Configuring
+Login Information at the Project Level]. EclipseLink recognizes the
+following login roles:
+
+* link:#Development_Role[Development Role]
+* link:#POJO_Session_Role[POJO Session Role]
+
+*Development Role*
+
+While using Workbench to develop a project (see
+link:Introduction%20to%20Projects_(ELUG)#Development_Role[Development
+Role]), you must define a login (see
+link:#Configuring_Login_Information_at_the_Project_Level[Configuring
+Login Information at the Project Level]) and designate it as the
+development login. The development login is stored in the EclipseLink
+project file. Workbench use the information in the development login
+whenever you perform a data source operation from within Workbench. For
+example, when you read or write schema information from or to a data
+source during application development, the development login information
+is never written to a `+sessions.xml+` or `+project.xml+` file and is
+overridden by the deployment login (or the session login) at run time.
+
+For more information on how to use a development login to connect to a
+database, see link:#Logging_In_to_the_Database[Logging In to the
+Database].
+
+*POJO Session Role*
+
+If you are creating a
+link:Introduction%20to%20Projects_(ELUG)#POJO_Session_Role[POJO
+project], we recommend that you use the `+sessions.xml+` file to store
+the sessions your project uses at run time (see
+link:Introduction%20to%20Data%20Access%20(ELUG)#Data_Source_Login_Types[Data
+Source Login Types]).
+
+=== How to Configure Development and Deployment Logins Using Workbench
+
+To specify different development and deployment database logins, use
+this procedure:
+
+[arabic]
+. Select the database object in the *Navigator*. The Database property
+sheet appears. *_Database Property Sheet, Development and Deployment
+Login Options_* image:dblogins.gif[Database Property Sheet, Development
+and Deployment Login
+Options,title="Database Property Sheet, Development and Deployment Login Options"]
+. Complete the Development and Deployment Login options on the property
+sheet by selecting from the logins you configured previously.
+
+Use this table to enter data in the following fields on the Database
+property sheet to configure the login:
+
+Field
+
+Description
+
+Development Login
+
+The Defined Login to be used by Workbench during development to connect
+with the database, and to read or write table information.
+
+For more information on how to use a development login to connect to a
+database, see Logging In to the Database.
+
+Deployment Login
+
+The Defined Login to be used by your EclipseLink-enabled application
+during deployment.
+
+See Also:
+
+link:#Configuring_Development_and_Deployment_Logins[Configuring
+Development and Deployment Logins]
+
+link:Introduction%20to%20Projects_(ELUG)#Development_Role[Development
+Role]
+
+== Logging In to the Database
+
+Using Workbench, after you
+link:#Configuring_Login_Information_at_the_Project_Level[create a login]
+and specify it as a
+link:#Configuring_Development_and_Deployment_Logins[development login],
+you can log in to a database instance.
+
+You must log in to the database before importing or exporting table
+information.
+
+To log in to the database using Workbench, use one of the following
+procedures:
+
+* Select the database object in the *Navigator* and click *Login*
+image:loginbtn.gif[Database Login button,title="Database Login button"].
+Workbench logs in to the database.
+* Right-click on the database object in the *Navigator* and choose *Log
+In to Database* from the context menu, or choose *Selected > Log In to
+Database* from the menu.
+
+image:logindb.gif[Database Logged In
+icon,title="Database Logged In icon"] The database icon in the Navigator
+window changes to indicate you are now logged in to the database.
+
+== Configuring Named Query Parameterized SQL and Statement Caching at the Project Level
+
+You can configure EclipseLink to use parameterized SQL (parameter
+binding) and prepared statement caching for all named queries and
+finders.
+
+By default, EclipseLink uses parameterized SQL.
+
+The use of parameterized SQL lets you create and store queries that are
+complete except for one or more bound parameters. The EclipseLink
+runtime binds the current parameter values when executing the query.
+This approach avoids the preparation of SQL execution and, thus,
+improves the performance of frequently executed SQL statements.
+
+This section describes configuring parameterized SQL and statement
+caching options at the project level. This configuration applies to
+_all_ named queries or finders (see
+link:Introduction%20to%20EclipseLink%20Queries%20(ELUG)[Named Queries])
+you create on the descriptors in this project–not to all queries in
+general or write operations.
+
+You can also configure parameterized SQL and statement caching options
+at the named query or finder-level to override this project-level
+configuration on a query-by-query basis (see
+link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_Named_Query_Options[Configuring
+Named Query Options]) or at the session login-level (see
+link:Configuring%20a%20Database%20Login%20(ELUG)#Configuring_JDBC_Options[Configuring
+JDBC Options]).
+
+For more information, see
+link:Optimizing%20the%20EclipseLink%20Application%20(ELUG)#How_to_Use_Parameterized_SQL_(Parameter_Binding)_and_Prepared_Statement_Caching_for_Optimization[How
+to Use Parameterized SQL (Parameter Binding) and Prepared Statement
+Caching for Optimization].
+
+[width="100%",cols="<100%",]
+|===
+|*Note*: For applications using a Java EE data source or external
+connection pool, you must configure statement caching in the Java EE
+server’s data source–not in EclipseLink.
+|===
+
+This table summarizes which projects support parameterized SQL and
+statement caching configuration.
+
+[#Table 25-2]## *_Project Support for Default Named Query Caching and
+Binding_*
+
+[width="100%",cols="<11%,<69%,<20%",options="header",]
+|===
+|*Descriptor*
+|*link:#How_to_Configure_Named_Query_Parameterized_SQL_and_Statement_Caching_at_the_Project_Level_Using_Workbench[How
+to use the Workbench]* |*How to Use Java*
+|Relational Projects |image:support.gif[Supported.,title="Supported."]
+|image:support.gif[Supported.,title="Supported."]
+
+|EIS Projects |image:unsupport.gif[Unsupported,title="Unsupported"]
+|image:unsupport.gif[Unsupported,title="Unsupported"]
+
+|XML Projects |image:unsupport.gif[Unsupported,title="Unsupported"]
+|image:unsupport.gif[Unsupported,title="Unsupported"]
+|===
+
+=== How to Configure Named Query Parameterized SQL and Statement Caching at the Project Level Using Workbench
+
+To specify the named query options, use this procedure:
+
+[arabic]
+. Select the project object in the *Navigator*.
+. Select the *Defaults* tab in the *Editor*. The Defaults tab appears.
+[#Figure 25-5]##*_Defaults Tab, Named Queries Options_*
+image:nmdqropt.gif[Defaults Tab, Named Queries
+Options,title="Defaults Tab, Named Queries Options"]
+. Complete the *Named Query* options on the tab.
+
+Use this table to enter data in following fields on the Defaults tab to
+specify the named query options for newly created descriptors.:
+
+[width="100%",cols="<21%,<79%",options="header",]
+|===
+|*Field* |*Description*
+|*Cache All Statements* |Caches the query’s prepared statement in the
+EclipseLink statement cache.
+
+|*Bind All Parameters* |By default, EclipseLink binds all of the query’s
+parameters. Deselect this option to disable binding.
+|===
+
+See Also:
+
+link:#Configuring_Named_Query_Parameterized_SQL_and_Statement_Caching_at_the_Project_Level[Configuring
+Named Query Parameterized SQL and Statement Caching at the Project
+Level]
+
+link:Configuring%20a%20Project%20(ELUG)[Configuring a Project]
+
+== Configuring Table Generation Options
+
+Using Workbench, you can configure options that apply when you generate
+database tables from the descriptors you define in your Workbench
+project. The resulting tables and columns will conform to the naming
+restrictions of the project’s target database.
+
+=== How to Configure Table Generation Options Using Workbench
+
+To specify the default table generation options, use this procedure:
+
+[arabic]
+. Select the project object in the *Navigator*.
+. Select the *Options* tab in the *Editor*. The Options tab appears.
+[#Figure 25-6]##*_Options Tab, Table Generation Options_*
+image:prjtbgen.gif[Options Tab, Table Generation
+Options,title="Options Tab, Table Generation Options"]
+. Complete the fields on the Table Generation defaults on the tab.
+
+Use this table to enter data in the following fields to specify the
+default export and generation options.
+
+[width="100%",cols="<32%,<68%",options="header",]
+|===
+|*Field* |*Description*
+|*Default Primary Key* |Enter the default name to use when generating
+primary keys.
+
+|*Primary Key Search Pattern* |Enter the default search pattern to use
+when generating primary keys.
+|===
+
+== Configuring Table Creator Java Source Options
+
+Using Workbench, you can configure options that apply when you export
+Java source code that you can use to create database tables.
+
+=== How to Configure Table Creator Java Source Options Using Workbench
+
+To specify the default Java code generation options, use this procedure:
+
+[arabic]
+. Select the project object in the *Navigator*.
+. Select the *Options* tab in the *Editor*. The Options tab appears.
+[#Figure 25-7]##*_Options Tab, Table Creator Java Source Options_*
+image:prjtblcrt.gif[Options Tab, Table Creator Java Source
+Options,title="Options Tab, Table Creator Java Source Options"]
+. Complete the fields on the Table Creator Java Source defaults on the
+tab.
+
+Use this table to enter data in the following fields to specify the
+default table creator options.
+
+[width="100%",cols="<20%,<80%",options="header",]
+|===
+|*Field* |*Description*
+|*Class Name* |Base class name to use when generating table’s Java
+source code from the project.
+
+|*Root Directory* |Directory for storing the generated source code.
+|===
+
+== Configuring Project Java Source Code Options
+
+Using Workbench, you can export a project as Java source. You can
+configure the class name and root directory that Workbench uses when
+exporting the project to Java source code.
+
+For more information on exporting a project as Java source, see
+link:Creating%20a%20Relational%20Project%20(ELUG)#How_to_Export_Project_Java_Source_Using_Workbench[How
+to Export Project Java Source Using Workbench].
+
+=== How to Configure Project Java Source Code Options Using Workbench
+
+To specify the default Java code generation options, use this procedure:
+
+[arabic]
+. Select the project object in the *Navigator*.
+. Select the *Options* tab in the *Editor*. The Options tab
+appears.[#Figure 25-8]## *_Options Tab, Project Java Source Options_*
+image:prjavasrc.gif[Options Tab, Project Java Source
+Options,title="Options Tab, Project Java Source Options"]
+. Complete the fields on the Project Java Source defaults on the tab.
+
+Use this table to enter data in the following fields to specify the
+default export and generation options:
+
+[width="100%",cols="<22%,<78%",options="header",]
+|===
+|*Field* |*Description*
+|*Class Name* |Base class name to use when generating Java source code
+from the project.
+
+|*Root Directory* |Directory for storing the generated source code.
+|===
+
+'''''
+
+_link:EclipseLink_User's_Guide_Copyright_Statement[Copyright Statement]_
+
+Category:_EclipseLink_User's_Guide[Category: EclipseLink User’s Guide]
+Category:_Release_1[Category: Release 1] Category:_Task[Category: Task]
+Category:_ORM[Category: ORM]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Relational_Transformation_Mapping_(ELUG).adoc b/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Relational_Transformation_Mapping_(ELUG).adoc
new file mode 100644
index 00000000000..6a94cc61474
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Relational_Transformation_Mapping_(ELUG).adoc
@@ -0,0 +1,76 @@
+*TOC*
+Special:Whatlinkshere_Configuring_a_Relational_Transformation_Mapping_(ELUG)[Related
+Topics]
+
+For information on how to create EclipseLink mappings, see
+link:Creating%20a%20Mapping%20(ELUG)[Creating a Mapping].
+
+This table lists the configurable options for a relational
+transformation mapping.
+
+[width="100%",cols="<65%,<17%,<18%",options="header",]
+|===
+|*Option* |*Workbench* |*Java*
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Attribute_Transformer[Attribute
+transformer] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Field_Transformer_Associations[Field
+transformer associations]
+|image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Indirection_(Lazy_Loading)[Indirection
+(lazy loading)] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_a_Type_Conversion_Converter[Configuring
+a Type Conversion Converter]
+|image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Mapping_Comments[Mapping
+comments] |image:support.gif[Supported,title="Supported"]
+|image:unsupport.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Method_or_Direct_Field_Accessing_at_the_Mapping_Level[Method
+or direct field access] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Read-Only_Mappings[Read-only
+mapping] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+|===
+
+This example shows how to create a transformation mapping and add it to
+a descriptor using Java code.
+
+[#Example 46-1]## *_Transformation Mapping_*
+
+....
+public void customize(ClassDescriptor descriptor) {
+ TransformationMapping mapping = new TransformationMapping();
+
+ // configure mapping
+ ...
+
+ // add mapping to descriptor
+ descriptor.addMapping(mapping);
+}
+....
+
+For more information, see the following:
+
+* link:Introduction%20to%20Relational%20Mappings%20(ELUG)#Transformation_Mapping[Transformation
+Mapping]
+* link:Configuring%20a%20Relational%20Mapping%20(ELUG)[Configuring a
+Relational Mapping]
+* link:Configuring%20a%20Mapping%20(ELUG)[Configuring a Mapping].
+
+'''''
+
+_link:EclipseLink_User's_Guide_Copyright_Statement[Copyright Statement]_
+
+Category:_EclipseLink_User's_Guide[Category: EclipseLink User’s Guide]
+Category:_Task[Category: Task] Category:_Concept[Category: Concept]
+Category:_ORM[Category: ORM]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Relational_Variable_One-to-One_Mapping_(ELUG).adoc b/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Relational_Variable_One-to-One_Mapping_(ELUG).adoc
new file mode 100644
index 00000000000..d4d90f85908
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Relational_Variable_One-to-One_Mapping_(ELUG).adoc
@@ -0,0 +1,529 @@
+*TOC*
+Special:Whatlinkshere_Configuring_a_Relational_Variable_One-to-One_Mapping_(ELUG)[Related
+Topics]
+
+For information on how to create EclipseLink mappings, see
+link:Creating%20a%20Mapping%20(ELUG)[Creating a Mapping].
+
+This table lists the configurable options for a relational variable
+one-to-one mapping.
+
+[#Table 37-1]##
+
+[width="100%",cols="<63%,<18%,<19%",options="header",]
+|===
+|*Option* |*Workbench* |*Java*
+|link:Configuring%20a%20Relational%20Mapping%20(ELUG)#Configuring_Reference_Descriptor[Configuring
+Reference Descriptor] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_a_Type_Conversion_Converter[Configuring
+a Type Conversion Converter]
+|image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Read-Only_Mappings[Configuring
+Read-Only Mappings] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Mapping_Comments[Configuring
+Mapping Comments] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)[Configuring Mapping Comments]
+|image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)[Configuring Mapping Comments]
+|image:support.gif[Supported,title="Supported"]
+|image:unsupport.gif[Supported,title="Supported"]
+
+|link:#Configuring_Query_Key_Association[Configuring Query Key
+Association] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:#Configuring_Class_Indicator[Configuring Class Indicator]
+|image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:#Configuring_Unique_Primary_Key[Configuring Unique Primary Key]
+|image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+|===
+
+This example shows how to create a variable one-to-one mapping and add
+it to a descriptor using Java code.
+
+[#Example 39-1]## *_Variable One-to-One Mapping_*
+
+`+public void customize(ClassDescriptor descriptor) { +`
+`+ VariableOneToOneMapping mapping = new VariableOneToOneMapping(); +`
+
+`+ // configure mapping+` `+ ... +`
+
+`+ // add mapping to descriptor+`
+`+ descriptor.addMapping(mapping);+` `+}+`
+
+For more information, see the following:
+
+* link:Introduction%20to%20Relational%20Mappings%20(ELUG)#Variable_One-to-One_Mapping[Variable
+One-to-One Mapping]
+* link:Configuring%20a%20Relational%20Mapping%20(ELUG)[Configuring a
+Relational Mapping]
+* link:Configuring%20a%20Mapping%20(ELUG)[Configuring a Mapping].
+
+== Configuring Class Indicator
+
+In variable one-to-one mappings, you can use an indicator column in the
+source table to specify the correct target table, as illustrated in
+link:#Figure_37-1[Variable One-to-One Mapping using Class indicator
+Field]. This section includes information on implementing class
+indicators.
+
+A source table has an indicator column that specifies the target table
+through the class indicator field.
+
+The link:#Figure_37-1[Variable One-to-One Mapping using Class indicator
+Field] figure illustrates the `+EMPLOYEE+` table that has a `+TYPE+`
+column that indicates the target for the row (either `+PHONE+` or
+`+EMAIL+`).
+
+[#Figure 37-1]## *_Variable One-to-One Mapping using Class indicator
+Field_*
+
+.Variable One-to-One Mapping using Class indicator Field
+image::clinfig.gif[Variable One-to-One Mapping using Class indicator
+Field,title="Variable One-to-One Mapping using Class indicator Field"]
+
+The principles of defining such a variable class relationship are
+similar to defining a normal one-to-one relationship, except:
+
+* The reference class is a Java _interface_, not a Java _class_.
+However, the method to set the interface is identical.
+* You must specify a type indicator field.
+* You specify the class indicator values on the mapping so that mapping
+can determine the class of object to create.
+* You must specify the foreign key names and the respective abstract
+query keys from the target interface descriptor.
+
+Alternatively, you can use unique primary keys to specify the correct
+target. See link:#Configuring_Unique_Primary_Key[Configuring Unique
+Primary Key] for more information.
+
+=== How to Configure a Class Indicator Using Workbench
+
+To specify the class indicators for a variable one-to-one mapping, use
+this procedure:
+
+[arabic]
+. Select the variable one-to-one mapping in the *Navigator*. Its
+attributes appear in the Editor.
+. Click the *Class Indicator Info* tab. The Class Indicator Info tab
+appears. '`**’Figure 37-2 Class Indicator Info Tab**`'
+image:clindfld.gif[Class Indicator Info
+Tab,title="Class Indicator Info Tab"]
+. Use the *Class Indicator Field* to select the field on the database
+table (associated with the mapping’s descriptor) to use as the indicator
+for the variable mapping.
+. Use the *Indicator Type* to specify the data type of the class
+indicator field by selecting the data type from the list.
+. To specify the specific class indicator field values for each
+(nonabstract) child class, click *Edit* and enter the appropriate value
+for each child class.
+
+=== How to Configure a Class Indicator Using Java
+
+This example illustrates how to define a variable one-to-one mapping
+using a class (type) indicator in Java code.
+
+[#Example 37-1]## *_Defining Variable One-to-One Mapping Using a Class
+Indicator_*
+
+`+public void customize(ClassDescriptor descriptor) { +`
+`+ VariableOneToOneMapping variableOneToOneMapping = new VariableOneToOneMapping(); +`
+`+ variableOneToOneMapping.setAttributeName("contact"); +`
+`+ variableOneToOneMapping.setReferenceClass (Contact.class); +`
+`+ variableOneToOneMapping.setForeignQueryKeyName ("C_ID", "id"); +`
+`+ variableOneToOneMapping.setTypeFieldName("TYPE"); +`
+
+`+ +`*`+//\'\' \'\'configure\'\' \'\'class\'\' \'\'indicators+`*
+`+ variableOneToOneMapping.addClassIndicator(Email.class, "Email"); +`
+`+ variableOneToOneMapping.addClassIndicator(Phone.class, "Phone"); +`
+
+`+ variableOneToOneMapping.dontUseIndirection(); +`
+`+ variableOneToOneMapping.privateOwnedRelationship(); +`
+
+`+ +`*`+//\'\' \'\'add\'\' \'\'mapping\'\' \'\'to\'\' \'\'descriptor+`*
+`+ descriptor.addMapping(variableOneToOneMapping);+` `+}+`
+
+For more information about the available methods for
+`+VariableOneToOneMapping+`, see the _EclipseLink API Reference_.
+
+== Configuring Unique Primary Key
+
+In variable one-to-one mappings, you can use a unique primary key in the
+source table to specify the correct target table, as illustrated in the
+link:#Figure_37-4[Variable One-to-One Relationship with Unique Primary
+Key] figure. This section includes information on implementing class
+indicators.
+
+Alternatively, you can use a class indicator to specify the correct
+target. See link:#Configuring_Class_Indicator[Configuring Class
+Indicator] for more information.
+
+=== How to Configure a Unique Primary Key UsingWorkbench
+
+To specify the variable one-to-one mapping with a primary key, use this
+procedure:
+
+[arabic]
+. Select the variable one-to-one mapping in the *Navigator*. Its
+attributes appear in the Editor.
+. Click the *Class Indicator Info* tab. The Class Indicator Info tab
+appears. *_Figure 37-3 Class Indicator Info Tab, Configuring Primary
+Key_* image:var11_map_conf_pk.gif[Class Indicator Info Tab, Configuring
+Primary Key,title="Class Indicator Info Tab, Configuring Primary Key"]
+* Use the *Class Indicator Field* to select none.
+* Use the *Indicator Type* to select none.
+* Use the *Indicator Value* column to specify none.
+. After choosing the reference descriptor for the mapping, deselect the
+*Include* check boxes.
+
+[width="100%",cols="<100%",]
+|===
+|*Note:* You cannot deselect the value in the Class Indicator Field,
+unless the foreign key values in the source table are unique.
+|===
+
+=== How to Configure a Unique Primary Key Using Java
+
+This example illustrates how to define a variable one-to-one mapping
+using a unique primary key in Java code.
+
+[#Example 37-2]## *_Defining Variable One-to-One Mapping Using a Unique
+Primary Key_*
+
+`+public void customize(ClassDescriptor descriptor) { +`
+`+ VariableOneToOneMapping variableOneToOneMapping = new VariableOneToOneMapping(); +`
+`+ variableOneToOneMapping.setAttributeName("contact"); +`
+`+ variableOneToOneMapping.setReferenceClass (Contact.class); +`
+`+ variableOneToOneMapping.setForeignQueryKeyName ("C_ID", "id"); +`
+`+ variableOneToOneMapping.dontUseIndirection(); +`
+`+ variableOneToOneMapping.privateOwnedRelationship();+`
+
+`+ +`*`+//\'\' \'\'add\'\' \'\'mapping\'\' \'\'to\'\' \'\'descriptor+`*
+`+ descriptor.addMapping(variableOneToOneMapping);+` `+}+`
+
+For more information about the available methods for
+`+VariableOneToOneMapping+`, see the _EclipseLink API Reference_.
+
+=== What You May Need to Know About Unique Primary Keys
+
+As the link:#Figure_37-4[Variable One-to-One Relationship with Unique
+Primary Key] figure illustrates, the value of the foreign key in the
+source table (`+C_ID+`) mapped to the primary key of the target table is
+unique. No primary key values among the target tables are the same, so
+primary key values are not unique just in the table, but also among the
+tables.
+
+[#Figure 37-4]## *_Variable One-to-One Relationship with Unique Primary
+Key_*
+
+.Variable One-to-One Relationship with Unique Primary Key
+image::uniquepk.gif[Variable One-to-One Relationship with Unique Primary
+Key,title="Variable One-to-One Relationship with Unique Primary Key"]
+
+If there is no indicator stored in the source table, EclipseLink cannot
+determine to which target table the foreign key value is mapped.
+Therefore, EclipseLink reads through all the target tables until it
+finds an entry in one of the target tables. This is an inefficient way
+of setting up a relation model. The class indicator is much more
+efficient as it reduces the number of reads performed on the tables to
+get the data. In the class indicator method, EclipseLink knows exactly
+which target table to look into for the data.
+
+The principles of defining such a variable class relationship are
+similar to defining class indicator variable one-to-one relationships,
+except the following:
+
+* A type indicator field is not specified.
+* The class indicator values are not specified.
+
+The type indicator field and its values are not needed, because
+EclipseLink goes through all the target tables until data is finally
+found.
+
+== Configuring Query Key Association
+
+This section includes information on configuring query key assosications
+using development tools, as well as Java.
+
+=== How to Configure a Query Key Association Using Workbench
+
+To specify the query keys used for a variable one-to-one mapping, use
+this procedure:
+
+[arabic]
+. Select the variable one-to-one mapping in the *Navigator*. Its
+attributes appear in the Editor.
+. Click the *Query Key Associations* tab. The Query Key Associations tab
+appears [#Figure 37-5]##*_Query Key Associations Tab_*
+image:qkassoc.gif[Query Key Associations
+Tab,title="Query Key Associations Tab"]
+. Complete each field on the Query Key Associations tab.
+. Use the *Indicator Type* to specify the data type of the class
+indicator field by selecting the data type from the list.
+
+[width="100%",cols="<9%,<91%",options="header",]
+|===
+|*Field* |*Description*
+|*Foreign Key* |The field from the database table to use as the foreign
+key in this relationship.
+
+|*Query Key Name* |The name of the query key (from the referenced
+descriptor) for this association. See
+link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_Query_Keys[Configuring
+Query Keys] for more information.
+|===
+
+=== How to Configure a Query Key Association Using Java
+
+The API to configure query key associations is
+`+org.eclipse.persistence.mappings.VariableOneToOneMapping+` method
+`+addForeingQueryKeyName(String, String)+`.
+
+For more information about the available methods for
+`+VariableOneToOneMapping+`, see the _EclipseLink API Reference_.
+
+== Configuring Class Indicator
+
+In variable one-to-one mappings, you can use an indicator column in the
+source table to specify the correct target table, as illustrated in the
+link:#Figure_37-1[Variable One-to-One Mapping using Class indicator
+Field] figure. This section includes information on implementing class
+indicators.
+
+A source table has an indicator column that specifies the target table
+through the class indicator field.
+
+The link:#Figure_37-1[Variable One-to-One Mapping using Class indicator
+Field] figure illustrates the `+EMPLOYEE+` table that has a `+TYPE+`
+column that indicates the target for the row (either `+PHONE+` or
+`+EMAIL+`).
+
+[#Figure 37-1]## *_Variable One-to-One Mapping using Class indicator
+Field_*
+
+.Variable One-to-One Mapping using Class indicator Field
+image::clinfig.gif[Variable One-to-One Mapping using Class indicator
+Field,title="Variable One-to-One Mapping using Class indicator Field"]
+
+The principles of defining such a variable class relationship are
+similar to defining a normal one-to-one relationship, except:
+
+* The reference class is a Java _interface_, not a Java _class_.
+However, the method to set the interface is identical.
+* You must specify a type indicator field.
+* You specify the class indicator values on the mapping so that mapping
+can determine the class of object to create.
+* You must specify the foreign key names and the respective abstract
+query keys from the target interface descriptor.
+
+Alternatively, you can use unique primary keys to specify the correct
+target. See link:#Configuring_Unique_Primary_Key[Configuring Unique
+Primary Key] for more information.
+
+=== How to Configure a Class Indicator Using Workbench
+
+To specify the class indicators for a variable one-to-one mapping, use
+this procedure:
+
+[arabic]
+. Select the variable one-to-one mapping in the *Navigator*. Its
+attributes appear in the Editor.
+. Click the *Class Indicator Info* tab. The Class Indicator Info tab
+appears. [#Figure 37-2]##'`**’ Class Indicator Info Tab**`'
+image:clindfld.gif[Class Indicator Info
+Tab,title="Class Indicator Info Tab"]
+. Use the *Class Indicator Field* to select the field on the database
+table (associated with the mapping’s descriptor) to use as the indicator
+for the variable mapping.
+. Use the *Indicator Type* to specify the data type of the class
+indicator field by selecting the data type from the list.
+. To specify the specific class indicator field values for each
+(nonabstract) child class, click *Edit* and enter the appropriate value
+for each child class.
+
+=== How to Configure a Class Indicator Using Java
+
+This example illustrates how to define a variable one-to-one mapping
+using a class (type) indicator in Java code.
+
+[#Example 37-1]## *_Defining Variable One-to-One Mapping Using a Class
+Indicator_*
+
+`+public void customize(ClassDescriptor descriptor) { +`
+`+ VariableOneToOneMapping variableOneToOneMapping = new VariableOneToOneMapping(); +`
+`+ variableOneToOneMapping.setAttributeName("contact"); +`
+`+ variableOneToOneMapping.setReferenceClass (Contact.class); +`
+`+ variableOneToOneMapping.setForeignQueryKeyName ("C_ID", "id"); +`
+`+ variableOneToOneMapping.setTypeFieldName("TYPE"); +`
+
+`+ +`*`+//\'\' \'\'configure\'\' \'\'class\'\' \'\'indicators+`*
+`+ variableOneToOneMapping.addClassIndicator(Email.class, "Email"); +`
+`+ variableOneToOneMapping.addClassIndicator(Phone.class, "Phone"); +`
+
+`+ variableOneToOneMapping.dontUseIndirection(); +`
+`+ variableOneToOneMapping.privateOwnedRelationship(); +`
+
+`+ +`*`+//\'\' \'\'add\'\' \'\'mapping\'\' \'\'to\'\' \'\'descriptor+`*
+`+ descriptor.addMapping(variableOneToOneMapping);+` `+}+`
+
+For more information about the available methods for
+`+VariableOneToOneMapping+`, see the _EclipseLink API Reference_.
+
+== Configuring Unique Primary Key
+
+In variable one-to-one mappings, you can use a unique primary key in the
+source table to specify the correct target table, as illustrated in the
+link:#Figure_37-4[Variable One-to-One Relationship with Unique Primary
+Key] figure. This section includes information on implementing class
+indicators.
+
+Alternatively, you can use a class indicator to specify the correct
+target. See link:#Configuring_Class_Indicator[Configuring Class
+Indicator] for more information.
+
+=== How to Configure a Unique Primary Key UsingWorkbench
+
+To specify the variable one-to-one mapping with a primary key, use this
+procedure:
+
+[arabic]
+. Select the variable one-to-one mapping in the *Navigator*. Its
+attributes appear in the Editor.
+. Click the *Class Indicator Info* tab. The Class Indicator Info tab
+appears. [#Figure 37-3]##*_Class Indicator Info Tab, Configuring Primary
+Key_* image:var11_map_conf_pk.gif[Class Indicator Info Tab, Configuring
+Primary Key,title="Class Indicator Info Tab, Configuring Primary Key"]
+. Use the *Class Indicator Field* to select none.
+. Use the *Indicator Type* to select none.
+. Use the *Indicator Value* column to specify none.
+. After choosing the reference descriptor for the mapping, deselect the
+*Include* check boxes.
+
+[width="100%",cols="<100%",]
+|===
+|*Note:* You cannot deselect the value in the Class Indicator Field,
+unless the foreign key values in the source table are unique.
+|===
+
+=== How to Configure a Unique Primary Key Using Java
+
+This example illustrates how to define a variable one-to-one mapping
+using a unique primary key in Java code.
+
+[#Example 37-2]## *_Defining Variable One-to-One Mapping Using a Unique
+Primary Key_*
+
+`+public void customize(ClassDescriptor descriptor) { +`
+`+ VariableOneToOneMapping variableOneToOneMapping = new VariableOneToOneMapping(); +`
+`+ variableOneToOneMapping.setAttributeName("contact"); +`
+`+ variableOneToOneMapping.setReferenceClass (Contact.class); +`
+`+ variableOneToOneMapping.setForeignQueryKeyName ("C_ID", "id"); +`
+`+ variableOneToOneMapping.dontUseIndirection(); +`
+`+ variableOneToOneMapping.privateOwnedRelationship();+`
+
+`+ +`*`+//\'\' \'\'add\'\' \'\'mapping\'\' \'\'to\'\' \'\'descriptor+`*
+`+ descriptor.addMapping(variableOneToOneMapping);+` `+}+`
+
+For more information about the available methods for
+`+VariableOneToOneMapping+`, see the _EclipseLink API Reference_.
+
+=== What You May Need to Know About Unique Primary Keys
+
+As the link:#Figure_37-4[Variable One-to-One Relationship with Unique
+Primary Key] figure illustrates, the value of the foreign key in the
+source table (`+C_ID+`) mapped to the primary key of the target table is
+unique. No primary key values among the target tables are the same, so
+primary key values are not unique just in the table, but also among the
+tables.
+
+[#Figure 37-4]## *_Variable One-to-One Relationship with Unique Primary
+Key_*
+
+.Variable One-to-One Relationship with Unique Primary Key
+image::uniquepk.gif[Variable One-to-One Relationship with Unique Primary
+Key,title="Variable One-to-One Relationship with Unique Primary Key"]
+
+If there is no indicator stored in the source table, EclipseLink cannot
+determine to which target table the foreign key value is mapped.
+Therefore, EclipseLink reads through all the target tables until it
+finds an entry in one of the target tables. This is an inefficient way
+of setting up a relation model. The class indicator is much more
+efficient as it reduces the number of reads performed on the tables to
+get the data. In the class indicator method, EclipseLink knows exactly
+which target table to look into for the data.
+
+The principles of defining such a variable class relationship are
+similar to defining class indicator variable one-to-one relationships,
+except the following:
+
+* A type indicator field is not specified.
+* The class indicator values are not specified.
+
+The type indicator field and its values are not needed, because
+EclipseLink goes through all the target tables until data is finally
+found.
+
+== Configuring Query Key Association
+
+This section includes information on configuring query key assosications
+using development tools, as well as Java.
+
+=== How to Configure a Query Key Association Using Workbench
+
+To specify the query keys used for a variable one-to-one mapping, use
+this procedure:
+
+[arabic]
+. Select the variable one-to-one mapping in the *Navigator*. Its
+attributes appear in the Editor.
+. Click the *Query Key Associations* tab. The Query Key Associations tab
+appears. [#Figure 37-5]##*_Query Key Associations Tab_*
+image:qkassoc.gif[Query Key Associations
+Tab,title="Query Key Associations Tab"]
+. Complete each field on the Query Key Associations tab.
+. Use the *Indicator Type* to specify the data type of the class
+indicator field by selecting the data type from the list.
+
+Use the following information to enter data in each field on the tab:
+
+[width="100%",cols="<9%,<91%",options="header",]
+|===
+|*Field* |*Description*
+|*Foreign Key* |The field from the database table to use as the foreign
+key in this relationship.
+
+|*Query Key Name* |The name of the query key (from the referenced
+descriptor) for this association. See
+link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_Query_Keys[Configuring
+Query Keys] for more information.
+|===
+
+=== How to Configure a Query Key Association Using Java
+
+The API to configure query key associations is
+`+org.eclipse.persistence.mappings.VariableOneToOneMapping+` method
+`+addForeingQueryKeyName(String, String)+`.
+
+For more information about the available methods for
+`+VariableOneToOneMapping+`, see the _EclipseLink API Reference_.
+
+'''''
+
+_link:EclipseLink_User's_Guide_Copyright_Statement[Copyright Statement]_
+
+Category:_EclipseLink_User's_Guide[Category: EclipseLink User’s Guide]
+Category:_Release_1[Category: Release 1] Category:_Task[Category: Task]
+Category:_ORM[Category: ORM]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Session_(ELUG).adoc b/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Session_(ELUG).adoc
new file mode 100644
index 00000000000..ba9e7c7d8bf
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Configuring_a_Session_(ELUG).adoc
@@ -0,0 +1,1346 @@
+image:Elug_draft_icon.png[Image:Elug draft
+icon.png,title="Image:Elug draft icon.png"] *For the latest EclipseLink
+documentation, please see
+http://www.eclipse.org/eclipselink/documentation/*
+
+'''''
+
+*TOC* Special:Whatlinkshere_Configuring_a_Session_(ELUG)[Related topics]
+
+This table lists the types of EclipseLink sessions that you can
+configure and provides a cross-reference to the type-specific chapter
+that lists the configurable options supported by that type.
+
+[#Table 85-1]##
+
+If you are creating…
+
+See…
+
+Server and client sessions
+
+Configuring Server Sessions
+
+Unit of Work Sessions
+
+Introduction to EclipseLink Transactions
+
+Isolated Client Sessions
+
+Configuring Exclusive Isolated Client Sessions for Virtual Private
+Database
+
+Historical sessions
+
+Configuring Historical Sessions
+
+Session broker and client sessions
+
+Configuring Session Broker and Client Sessions
+
+Database sessions
+
+Configuring Database Sessions
+
+For more information, see the following:
+
+* link:Introduction%20to%20EclipseLink%20Sessions%20(ELUG)[Introduction
+to EclipseLink Sessions]
+* link:Creating%20a%20Session%20(ELUG)[Creating a Session]
+
+== Configuring Common Session Options
+
+This table lists the configurable options shared by two or more
+EclipseLink session types. In addition to the configurable options
+described here, you must also configure the options described for the
+specific
+link:Introduction%20to%20EclipseLink%20Sessions%20(ELUG)#Session_Types[Session
+Types], as shown in The link:#Table_85-1[Configuring EclipseLink
+Sessions] table.
+
+[#Table 85-2]##
+
+Option to Configure
+
+EclipseLink Workbench
+
+Java
+
+Primary mapping project
+
+Session login
+
+Logging
+
+Multiple mapping projects
+
+Performance profiler
+
+Exception handler
+
+Session customizer class
+
+Server platform
+
+Session event listener
+
+Configuring a Coordinated Cache
+
+Integrity checker
+
+Connection policy
+
+Named queries
+
+== Configuring a Primary Mapping Project
+
+The mapping project contains your EclipseLink mapping metadata (see
+link:Introduction%20to%20Projects_(ELUG)[Introduction to Projects]),
+including descriptors and mappings. Each session is associated with at
+least one project so that the session can register the descriptors.
+
+This table summarizes which sessions support a primary mapping project
+configuration.
+
+[#Table 85-3]##
+
+Session
+
+Using the Workbench
+
+Using Java
+
+Server and Client Sessions
+
+Session broker and client sessions
+
+Database sessions
+
+Using the Workbench, you can export your mapping metadata as either a
+deployment XML file or as a Java class. Consequently, in a session, you
+can specify the mapping project as an XML file or as a Java class.
+
+If you export your mapping metadata as a Java class, you must compile it
+and
+link:Creating%20a%20Session%20(ELUG)#Configuring_a_Sessions_Configuration[add
+it to the session configuration classpath] before adding it to a
+session.
+
+Note: When specifying the mapping project using XML, you can specify the
+Java resource path. In most applications, the sessions.xml and
+project.xml files are deployed inside the JAR file, and the project XML
+path is specified as a Java resource path. When specifying the Java
+resource path, ensure that you are using the forward slash character ( /
+) for directories, not the back slash ( ).
+
+For example, com/myapp/mypersistence/my-project.xml, or
+META-INF/my-project.xml.
+
+See link:#Configuring_Multiple_Mapping_Projects[Configuring Multiple
+Mapping Projects] for information on configuring additional EclipseLink
+projects for the session.
+
+=== How to Configure a Primary Mapping Project Using Workbench
+
+To specify the primary EclipseLink project metadata for your session,
+use this procedure:
+
+[arabic]
+. Select a server or database session in the *Navigator*. Its properties
+appear in the Editor.
+. Click the *General* tab. The General tab appears.
+. Click the *Project* subtab. The Project subtab appears.
+[#Figure 85-1]##*_General Tab, Project Subtab, Primary Project Option_*
+image:sesgen.gif[General Tab, Project Subtab, Primary Project
+Option,title="General Tab, Project Subtab, Primary Project Option"]
+. Select the following options:
+* Click *Edit* to define the primary project. The Edit PrimaryProject
+dialog box appears.
+* Use the *Multiple Projects* option to
+link:#Configuring_Multiple_Mapping_Projects[add additional projects to
+the session]. [#Figure 85-2]##*_Edit Primary Project Dialog Box_*
+image:editprj.gif[Edit Primary Project Dialog
+Box,title="Edit Primary Project Dialog Box"]
+. Complete each field on the Edit Primary Project dialog box.
+
+Use this information to enter date in each field of the Edit Primary
+Project dialog box:
+
+[width="100%",cols="<9%,<91%",options="header",]
+|===
+|*Field* |*Description*
+|*XML* |Select *XML* to add a mapping project as a deployment XML file.
+Click *Browse* to select the file.
+
+|*Class* |Select *Class* to add a mapping project as a _compiled_ Java
+class file. Click *Browse* to select the file.
+|===
+
+=== How to Configure a Primary Mapping Project Using Java
+
+Using Java, you can register descriptors with a session using the
+following API:
+
+* `+Project+` API – Read your `+project.xml+` file (or instantiate your
+project class) and create your session using `+Project+` method
+`+createServerSession+` or `+createDatabaseSession+`.
+* `+Session+` API – Add a descriptor or set of descriptors to a session
+using the `+DatabaseSession+` API that the following table lists.
+Descriptors should be registered before login, but independent sets of
+descriptors can be added after login.
+
+[#Table 85-4]## *_DatabaseSession API for Registering Descriptors_*
+
+[width="100%",cols="<29%,<71%",options="header",]
+|===
+|*Session Method* |*Description*
+|`+addDescriptors(Project)+` |Add to the session all the descriptors
+owned by the passed in `+Project+`.
+
+|`+addDescriptors(Vector)+` |Add to the session all the descriptors in
+the passed in `+Vector+`.
+
+|`+addDescriptor(Descriptor)+` |Add an individual descriptor to the
+session.
+|===
+
+== Configuring a Session Login
+
+A session login encapsulates details of data source access for any
+session that persists to a data source. The session login overrides any
+other login configuration.
+
+This table summarizes which sessions support session login
+configuration.
+
+[#Table 85-5]##
+
+Session
+
+Session Login
+
+Server and Client Sessions
+
+Session Broker and Client Sessions
+
+Database Sessions
+
+The session login provides access to a variety of features, including
+the following:
+
+* Connection configuration such as whether or not to use external
+connection pooling.
+* Sequencing configuration (that overrides sequencing configuration made
+at the project level, if any).
+* Miscellaneous options specific to your chosen data source.
+* Properties (arbitrary, application-specific named values).
+
+For more information, see the following:
+
+* link:Introduction%20to%20Data%20Access%20(ELUG)#Data_Source_Login_Types[Data
+Source Login Types]
+* link:Configuring%20a%20Data%20Source%20Login%20(ELUG)[Configuring a
+Data Source Login]
+
+== Configuring Logging
+
+Use the EclipseLink logging framework to record EclipseLink behavior to
+a log file or session console.
+
+This table summarizes which sessions support logging configuration.
+
+[#Table 85-6]##
+
+Session
+
+Using the Workbench
+
+Using Java
+
+Server and client sessions
+
+Unit of work sessions
+
+Session broker and client sessions
+
+Database sessions
+
+[width="100%",cols="<100%",]
+|===
+|*Note*: If the session belongs to a session broker, you must specify
+the logging information in the session broker – not in the session
+itself.
+|===
+
+By default, EclipseLink uses its own native logger. Alternatively, you
+can configure EclipseLink to
+link:#How_to_Configure_a_Session_to_use_the_java.util.logging_Package[use
+the `+java.util.logging+` package].
+
+For more information, see
+link:Introduction%20to%20EclipseLink%20Sessions%20(ELUG)#Logging[Logging].
+
+=== How to Configure Logging Using Workbench
+
+To specify the logging information for a session, use this procedure:
+
+[arabic]
+. Select a database session in the *Navigator*. Its properties appear in
+the Editor.
+. Click the *Logging* tab. The Logging tab appears.
+[#Figure 85-3]##*_Logging Tab_* image:seslog.gif[Logging
+Tab,title="Logging Tab"]
+. Complete the Logging fields on the tab.
+
+Use the following information to enter data in each field of the Logging
+tab to select the profiler option to use with this session:
+
+Option
+
+Description
+
+No Logging
+
+Select this option to specify that nothing is logged for this session.
+
+Server
+
+Select this option to use logging capabilities of the application server
+to which you are deploying this application.
+
+Java
+
+Select this option to use java.util.logging package.
+
+Standard
+
+Select this option to use the EclipseLink logging framework. When
+selected, you can optionally configure the following options.
+
+Logging Level
+
+Define the amount of logging information to record (in ascending order
+of information):
+
+Config – Log only login, JDBC connection, and database information.
+
+Info (default) – Log the login/logout per sever session, with user name.
+After acquiring the session, detailed information is logged.
+
+Warning – Log exceptions that do not force EclipseLink to stop,
+including all exceptions not logged with Severe level. This does not
+include a stack trace.
+
+Severe – Log exceptions indicating EclipseLink cannot continue, and any
+exceptions generated during login. This includes a stack trace.
+
+Fine – Log SQL (including thread information).
+
+Finer – Similar to warning. Includes stack trace.
+
+Finest – Includes additional low-level information.
+
+All – Log everything.
+
+Console
+
+Select this option to display logging information to the standard
+console output.
+
+File
+
+Select this option to record logging information in a file. Click Browse
+to specify the name and location of the log file.
+
+Options
+
+Select this option to override additional logging option defaults for
+Java and Standard logging only.
+
+Log Exception Stack Trace
+
+Select this option to include the stack trace with any exception written
+to the log.
+
+Default: For SEVERE messages, log stack trace. For WARNING messages,
+only log stack trace at log level FINER or lower.
+
+Print Connection
+
+Select this option to include the connection identifier in any
+connection related log messages.
+
+Default: Enabled for all message and log levels.
+
+Print Date
+
+Select this option to include the date and time at which the log message
+was generated.
+
+Default: Enabled for all message and log levels.
+
+Print Session
+
+Select this option to include the session name in any session related
+log messages.
+
+Default: Enabled for all message and log levels.
+
+Print Thread
+
+Select this option to include the thread name in any thread related log
+messages.
+
+Default: Log only at log level FINER or lower.
+
+=== How to Configure Logging Using Session API in Java
+
+If you use EclipseLink native logging (the default), then at run time,
+you can configure logging options using
+`+org.eclipse.persistence.sessions.Session+` logging API.
+
+The `+Session+` interface defines the following logging methods:
+
+* `+setSessionLog+` – specify the type of logging to use (any
+implementor of `+org.eclipse.persistence.logging.SessionLog+`)
+* `+dontLogMessages+` – disable logging
+* `+setLog+` – specify the `+java.io.Writer+` to which the session logs
+messages
+* `+setLogLevel+` – specify the level at which the session logs using
+`+org.eclipse.persistence.logging.SessionLog+` constants:
+** `+OFF+`
+** `+SEVERE+`
+** `+WARNING+`
+** `+INFO+`
+** `+CONFIG+`
+** `+FINE+`
+** `+FINER+`
+** `+FINEST+`
+** `+ALL+`
+
+This example illustrates how to configure a session to use
+`+java.util.logging+` package.
+
+[#Example 85-1]## *_Configuring a Session to Use java.util.logging_*
+
+`+session.setSessionLog(new JavaLog());+`
+
+This example illustrates how to configure a session to use the server
+log that OC4J provides. For more information about server logging, see
+link:Introduction%20to%20EclipseLink%20Sessions%20(ELUG)#Server_Logging[Server
+Logging].
+
+*_Configuring a Session to Use Application Server Logging_*
+
+`+session.setSessionLog(new OjdlLog());+`
+
+This example illustrates how to configure a session to log to a
+`+java.io.Writer+`:
+
+[#Example 85-3]## *_Configuring a Session to Log to a java.io.Writer_*
+
+`+session.setLog(myWriter);+`
+
+=== How to Configure a Session to use the java.util.logging Package
+
+If you use `+java.util.logging+` package, then you configure logging
+options in the __`+/lib/logging.properties+` file. Messages are written
+to zero or multiple destinations based on this configuration file.
+
+If you configure a session to use `+java.util.logging+` package,
+consider the following:
+
+* link:#logging.properties[logging.properties]
+* link:#Formatters[Formatters]
+* link:#Namespace[Namespace]
+
+==== logging.properties
+
+Configure the `+logging.properties+` file as this example illustrates:
+
+[#Example 85-4]## *_java.util.logging Configuration in
+logging.properties_*
+
+[source,java]
+----
+ handlers = java.util.logging.ConsoleHandler
+ java.util.logging.ConsoleHandler.level = CONFIG
+ java.util.logging.ConsoleHandler.formatter = org.eclipse.persistence.logging.LogFormatter
+ org.eclipse.persistence.LoggingSession.connection.level = CONFIG
+----
+
+For information about the types of formatters available, see
+link:#Formatters[Formatters].
+
+==== Formatters
+
+EclipseLink provides two formatters: `+LogFormatter+` and
+`+XMLLogFormatter+`. They override the `+SimpleFormatter+` and
+`+XMLFormatter+` `+java.util.logging+` formatters and always log session
+and connection info when available. They also log thread and exception
+stack trace information at certain levels as specified by the logging
+level.
+
+==== Namespace
+
+Namespace is supported for `+java.util.logging+`. This table lists the
+static constants defined in
+`+org.eclipse.persistence.sessions.SessionLog+` for EclipseLink
+components and the corresponding strings in `+logging.properties+`.
+
+[#Table 85-7]## *_Logging Property FIle Names_*
+
+[width="100%",cols="<25%,<75%",options="header",]
+|===
+|*SessionLog* |*logging.properites*
+|Not Applicable |`+org.eclipse.persistence+`
+|Not Applicable |`+org.eclipse.persistence.+`
+|`+SQL+` |`+org.eclipse.persistence.+``+.sql+`
+|`+TRANSACTION+` |`+org.eclipse.persistence.+``+.transaction+`
+|`+EVENT+` |`+org.eclipse.persistence.+``+.event+`
+|`+CONNECTION+` |`+org.eclipse.persistence.+``+.connection+`
+|`+QUERY+` |`+org.eclipse.persistence.+``+.query+`
+|`+CACHE+` |`+org.eclipse.persistence.+``+.cache+`
+|`+PROPAGATION+` |`+org.eclipse.persistence.+``+.propagation+`
+|`+SEQUENCING+` |`+org.eclipse.persistence.+``+.sequencing+`
+|`+EJB+` |`+org.eclipse.persistence.+``+.ejb+`
+|`+EJB_OR_METADATA+` |`+org.eclipse.persistence.+``+.ejb_or_metadata+`
+|`+WEAVER+` |`+org.eclipse.persistence.+``+.weaver+`
+|`+PROPERTIES+` |`+org.eclipse.persistence.+``+.properties+`
+|`+SERVER+` |`+org.eclipse.persistence.+``+.server+`
+|===
+
+In the `+logging.properties+` names listed in the
+link:#Table_85-7[Logging Property FIle Names] table, note that is the
+name of the session that the application is running in. For example, if
+the name of the session is `+MyApplication+`, then you would use
+`+org.eclipse.persistence.MyApplication.sql+` for the SQL logging
+property.
+
+An application can also define its own namespace and write to it through
+the logging API, as long as the logger for that namespace is defined in
+the logging configuration. Otherwise messages are written to the parent
+logger, `+org.eclipse.persistence.+`.
+
+== Configuring Multiple Mapping Projects
+
+Each session is associated with at least
+link:#Configuring_a_Primary_Mapping_Project[one mapping project]. You
+can include additional EclipseLink mapping projects for a session.
+
+This table summarizes which sessions support additional mapping project
+configuration.
+
+[#Table 85-8]##
+
+Session
+
+Using the Workbench
+
+Using Java
+
+Server and client sessions
+
+Session Broker and Client Sessions
+
+Database sessions
+
+=== How to Configure Multiple Mapping Projects Using Workbench
+
+To specify additional EclipseLink projects for your session, use this
+procedure:
+
+[arabic]
+. Select a server or database session in the *Navigator*. Its properties
+appear in the Editor.
+. Click the *General* tab. The General tab appears.
+. Click the *Project* subtab. The Project subtab appears.
+[#Figure 85-4 ]##*_General Tab, Project Subtab, Multiple Projects
+Options_* image:sesgenad.gif[General Tab, Project Subtab, Multiple
+Projects
+Options,title="General Tab, Project Subtab, Multiple Projects Options"]
+. Select *Multiple Projects* option. The Multiple Projects subtab
+appears.
+. Click the *Multiple Projects* subtab.
++
+*_General Tab, Multiple Projects Subtab_* image:sesadv.gif[General Tab,
+Multiple Projects Subtab,title="General Tab, Multiple Projects Subtab"]
+. To add an additional mapping project to this session, click *Add*. For
+more information, see
+link:#Configuring_a_Primary_Mapping_Project[Configuring a Primary
+Mapping Project]. To remove EclipseLink mapping projects, select the
+project file and click *Remove*.
+
+=== How to Configure Multiple Mapping Projects Using Java
+
+Using Java, you can register descriptors from more than one project with
+a session using the `+DatabaseSession+` API that this table lists. You
+can register descriptors before login, but you can add independent sets
+of descriptors after login.
+
+[#Table 85-9]## *_DatabaseSession API for Registering Descriptors_*
+
+[width="100%",cols="<26%,<74%",options="header",]
+|===
+|*Session Method* |*Description*
+|`+addDescriptors(Project)+` |Add additional descriptor to the session
+in the form of a project.
+
+|`+addDescriptors(Vector)+` |Add a vector of individual descriptor files
+to the session in the form of a project.
+
+|`+addDescriptor(Descriptor)+` |Add individual descriptor to the
+session.
+|===
+
+== Configuring a Performance Profiler
+
+To successfully improve the performance of an EclipseLink application,
+you must measure performance before and after each optimization.
+EclipseLink provides a variety of built-in performance measuring
+features (known as profilers) that you can configure at the session
+level.
+
+This table summarizes which sessions support performance profiler
+configuration.
+
+[#Table 85-10]##
+
+Session
+
+Using the Workbench
+
+Using Java
+
+Server and client sessions
+
+Session broker and client sessions
+
+Database sessions
+
+EclipseLink provides the following profilers:
+
+* EclipseLink profiler: logs performance statistics for every executed
+query in a given session (see
+link:Optimizing%20the%20EclipseLink%20Application%20(ELUG)#Measuring_EclipseLink_Performance_with_the_EclipseLink_Profiler[Measuring
+EclipseLink Performance with the EclipseLink Profiler])
+
+=== How to Configure a Performance Profiler Using Workbench
+
+To specify the type of profiler in a session, use this procedure:
+
+[arabic]
+. Select a session in the *Navigator*. Its properties appear in the
+Editor.
+. Click the *Options* tab. The Options tab appears. *_Options Tab,
+Profiler Options_* image:sespro.gif[Options Tab, Profiler
+Options,title="Options Tab, Profiler Options"]
+. Complete the *Profiler* field on the tab.
+
+Use the following information to select the profiler option to use with
+this session:
+
+Option
+
+Description
+
+No Profiler
+
+Disable all profiling.
+
+Standard (EclipseLink)
+
+Enable EclipseLink profiling. For more information, see the following:
+
+How to Configure the EclipseLink Performance Profiler
+
+Measuring EclipseLink Performance with the EclipseLink Profiler
+
+=== How to Configure a Performance Profiler Using Java
+
+You can use Java to configure a session with a profiler using
+`+Session+` method `+setProfiler+`, as this example shows.
+
+[#Example 85-5]## *_Configuring a Session with an EclipseLink Profiler_*
+
+`+session.setProfiler(new PerformanceProfiler());+`
+
+To end a profiling session, use `+Session+` method `+clearProfiler+`.
+
+== Configuring an Exception Handler
+
+You can associate a single exception handling class with each session.
+This class must implement the
+`+org.eclipse.persistence.exceptions.ExceptionHandler+` interface.
+
+This table summarizes which sessions support exception handler
+configuration.
+
+[#Table 85-11]## *_Session Support for Exception Handler Configuration_*
+
+Session
+
+Using the Workbench
+
+Using Java
+
+Server and client sessions
+
+Session broker and client sessions
+
+Database sessions
+
+For an example exception handler implementation, see
+link:#How_to_Configure_an_Exception_Handler_Using_Java[Using Java].
+
+For more information, see
+link:Introduction%20to%20EclipseLink%20Sessions%20(ELUG)#Exception_Handlers[Exception
+Handlers].
+
+=== How to Configure an Exception Handler Using Workbench
+
+To specify the exception handler class in a session, use this procedure:
+
+[arabic]
+. Select a session in the *Navigator*. Its properties appear in the
+Editor.
+. Click the *Options* tab. The Options tab appears. *_Options Tab,
+Exception Handler Field_* image:sescust.gif[Options Tab, Exception
+Handler Field,title="Options Tab, Exception Handler Field"]
+. Complete the *Exception Handler* field.
+. Click *Browse* and select the exception handler class for this
+session.
+
+=== How to Configure an Exception Handler Using Java
+
+This example shows an example exception handler implementation. In this
+implementation, the exception handler always tries to reestablish the
+connection if it has been reset by peer, but only retries a query if it
+is an instance of `+ReadQuery+`. Note that this exception handler either
+returns the result of the reexecuted `+ReadQuery+` or throws an
+exception.
+
+[#Example 85-6]## *_Implementing an Exception Handler_*
+
+[source,java]
+----
+ session.setExceptionHandler(
+ new ExceptionHandler() {
+ public Object handleException(RuntimeException exception) {
+ if (exception instanceof DatabaseException) {
+ DatabaseException dbex = (DatabaseException) exception;
+ if ((dbex.getInternalException() instanceof SQLException) &&
+ (((SQLException) dbex.getInternalException()).getErrorCode() == MyDriver.CONNECTION_RESET_BY_PEER)) {
+ dbex.getAccessor().reestablishConnection(dbex.getSession());
+ if (dbex.getQuery() instanceof ReadQuery) {
+ return dbex.getSession().executeQuery(dbex.getQuery(), dbex.getQuery().getTranslationRow());
+ }
+ throw exception;
+ }
+ }
+ throw exception;
+ }
+ }
+ );
+----
+
+[width="100%",cols="<100%",]
+|===
+|*Note*: Unhandled exceptions must be rethrown by the exception handler
+code.
+|===
+
+== Configuring a Session Customizer Class
+
+A session customizer class is a Java class that implements the
+`+org.eclipse.persistence.internal.sessions.factories.SessionCustomizer+`
+interface and provides a default (zero-argument) constructor. You can
+use a session customizer to customize a session at run time on a loaded
+session before login occurs, similar to how you can use an
+link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_Amendment_Methods[amendment
+method to customize a descriptor]) For example, you can use a session
+customizer class to define and register session event listeners with the
+session event manager (see
+link:#Configuring_Session_Event_Listeners[Configuring Session Event
+Listeners]).
+
+This table summarizes which sessions support customizer class
+configuration.
+
+[#Table 85-12]## *_Session Support for Customizer Class Configuration_*
+
+Session
+
+Using the Workbench
+
+How to Use Java
+
+Server and client sessions
+
+Session broker and client sessions
+
+Database sessions
+
+For more information, see
+link:Introduction%20to%20EclipseLink%20Sessions%20(ELUG)#Session_Customization[Session
+Customization].
+
+=== How to Configure Customizer Class Using Workbench
+
+To specify the session customizer class in a session, use this
+procedure:
+
+[arabic]
+. Select a session in the *Navigator*. Its properties appear in the
+Editor.
+. Click the *Options* tab. The Options tab appears. *_Options Tab,
+Session Customizer Class Field_* image:sestran.gif[Options Tab, Session
+Customizer Class
+Field,title="Options Tab, Session Customizer Class Field"]
+. Complete the *Session Customizer Class* field.
+. Click *Browse* and select the customizer class for this session.
+
+=== How to Configure Customizer Class Using Java
+
+When using Java, create a customize class that implements the
+`+org.eclipse.persistence.internal.sessions.factories.SessionCustomizer+`
+interface. This example illustrates the creation of the session
+customizer. The `+customize+` method contains the configuration of the
+`+Login+` owned by the `+Session+` with the appropriate transaction
+isolation.
+
+[#Example 85-7]## *_Creating a SessionCustomizer Class_*
+
+[source,java]
+----
+ import org.eclipse.persistence.internal.sessions.factories.SessionCustomizer;
+ import org.eclipse.persistence.sessions.Session;
+ import org.eclipse.persistence.sessions.DatabaseLogin;
+
+ public class EmployeeSessionCustomizer implements SessionCustomizer {
+
+ public void customize(Sesssion session) {
+ DatabaseLogin login = (DatabaseLogin)session.getDatasourceLogin();
+ login.setTransactionIsolation(DatabaseLogin.TRANSACTION_READ_UNCOMMITTED);
+ }
+ }
+----
+
+== Configuring the Server Platform
+
+The EclipseLink server platform defines how a session integrates with a
+Java EE server including the following:
+
+* Run-time services: Enables the deployment of a Java Management
+Extensions (JMX) MBean that allows monitoring of the EclipseLink
+session.
+* External transaction controller: Integrates the EclipseLink session
+with the server’s Java Transaction API (JTA) service. This should always
+be used when using EJB or JTA transactions. You configure EclipseLink to
+integrate with the container’s external transaction service by
+specifying an EclipseLink external transaction controller. For more
+information on external transaction services, see
+link:Introduction%20to%20EclipseLink%20Transactions_(ELUG)#Unit_of_Work_Transaction_Demarcation[Unit
+of Work Transaction Demarcation].
+
+This table summarizes which sessions support a server platform.
+
+[#Table 85-13]## *_Session Support for Server Platform_*
+
+Session
+
+Using the Workbench
+
+Using Java
+
+Server and client sessions
+
+Session broker and client sessions
+
+Database sessions
+
+=== How to Configure the Server Platform Using Workbench
+
+To specify the server platform options for a session, use this
+procedure:
+
+[arabic]
+. Select a session in the *Navigator*. Its properties appear in the
+Editor.
+. Click the *General* tab. The General tab appears.
+. Click the *Server Platform* subtab. The Server Platform subtab
+appears. *_General Tab, Server Platform Subtab_* image:sessp.gif[General
+Tab, Server Platform Subtab,title="General Tab, Server Platform Subtab"]
+. Enter complete each field on the Server Platform subtab.
+
+Use the following information to enter data in each field of the Server
+Platform subtab:
+
+Field
+
+Description
+
+Server Platform
+
+Check this field if you intend to deploy your application to a Java EE
+application server.
+
+If you check this field, you must configure the target application
+server by selecting a Platform.
+
+Platform
+
+Select the Java EE application server to which you will deploy your
+application.
+
+EclipseLink supports the following Java EE application servers:
+
+OC4J 10.1.3
+
+SunAS 9
+
+WebLogic 10.3
+
+WebLogic 10
+
+WebLogic 9.0
+
+WebSphere 6.1
+
+JBoss 4.2.2
+
+JBoss 4.2.2
+
+GlassFish 2.1
+
+GlassFish 3
+
+Custom
+
+EclipseLink supports the following Java Servlet container servers:
+
+Tomcat 6
+
+For detailed information about supported application server versions and
+configuration requirements, see Integrating EclipseLink with an
+Application Server. Select Custom if you have created your own
+org.eclipse.persistence.platform.server.ServerPlatform class to use an
+application server not currently supported by EclipseLink or to override
+an existing ServerPlatform. If you select Custom, you must specify your
+custom ServerPlatform class by selecting a Server Platform Class.
+
+The server platform you select overrides the default server platform set
+at the sessions configuration leve.
+
+Enable Runtime Services
+
+Check this field to configure the EclipseLink runtime to enable the
+deployment of a JMX MBean that allows monitoring of the EclipseLink
+session.
+
+Enable External Transaction Controller (JTA)
+
+Check this field if you intend to integrate your application with an
+external transaction controller. For more information, see Unit of Work
+Transaction Demarcation.
+
+If you configure Platform for a Java EE application server that
+EclipseLink supports, the EclipseLink runtime will automatically select
+the appropriate external transaction controller class.
+
+If you configure Platform as Custom, you must specify an external
+transaction controller class by selecting an External Transaction
+Controller.
+
+Server Platform Class
+
+This option is only available if you configure Platform as Custom.
+
+Click Browse to select your custom ServerPlatform class.
+
+Transaction Controller Class (JTA)
+
+This option is only available if you configure Platform as Custom.
+
+If you checked Enable External Transaction Controller (JTA), click
+Browse to select the transaction controller class that corresponds with
+your custom ServerPlatform class.
+
+=== How to Configure the Server Platform Using Java
+
+When using Java, you must pass the session in a server platform
+constructor. This example illustrates using a session customizer (see
+link:Customizing%20the%20EclipseLink%20Application_(ELUG)#Using_the_Session_Customizer_Class[Using
+the Session Customizer Class]) to configure a session with a server
+platform from the `+org.eclipse.persistence.platform.server+` package.
+
+[#Example 85-8]## *_Configuring a Session with a Server Platform_*
+
+[source,java]
+----
+ import org.eclipse.persistence.internal.sessions.factories.SessionCustomizer;
+ ...
+ public class MySessionCustomizer implements SessionCustomizer {
+ public void customize (Session session) {
+ Server server = (Server)session;
+ server.setServerPlatform(new Oc4j_11_1_1_Platform(DatabaseSession)server)):
+ }
+ }
+----
+
+== Configuring Session Event Listeners
+
+As you perform persistence operations with a session, the session
+produces various events (see
+link:Introduction%20to%20EclipseLink%20Sessions%20(ELUG)#Session_Event_Manager_Events[Session
+Event Manager Events]) that the EclipseLink runtime uses to coordinate
+its various components. You can configure a session with one or more
+link:Introduction%20to%20EclipseLink%20Sessions%20(ELUG)#Session_Event_Listeners[session
+event listeners] to customize session behavior and debug session
+operations. For example, session event listeners play an important role
+in the
+link:Configuring%20Exclusive%20Isolated%20Client%20Sessions%20for%20Virtual%20Private%20Database%20(ELUG)#Configuring_Exclusive_Isolated_Client_Sessions_for_Virtual_Private_Database[configuration
+of isolated sessions].
+
+This table summarizes which sessions support event listeners
+(SessionEventListener).
+
+[#Table 85-14]## *_Session Support for Event Listeners_*
+
+Session
+
+Using the Workbench
+
+Using Java
+
+Server and client sessions
+
+Session broker and client sessions
+
+Database sessions
+
+=== How to Configure Session Event Listeners Using Workbench
+
+*Session Event Listeners*
+
+To specify the event listener class in a session, use this procedure:
+
+[arabic]
+. Select a session in the *Navigator*. Its properties appear in the
+Editor.
+. Click the *Options* tab. The Options tab appears. *_Options Tab, Event
+Listeners field_* image:sesevnt.gif[Options Tab, Event Listeners
+field,title="Options Tab, Event Listeners field"]
+. To add a new event listener, click *Add*, then select the event
+listener class for this session. To remove an existing event listener,
+select the *Event Listener* and click *Remove*.
+
+=== How to Configure Session Event Listeners Using Java
+
+This example illustrates how to use Java to register a session event
+listener with a session. EclipseLink provides a `+SessionEventAdapter+`
+to simplify creating a `+SessionEventListener+`. The
+`+SessionEventAdapter+` provides a default implementation of all the
+methods of the `+SessionEventListener+` interface. You need only
+override the specific methods of interest. Typically, you would define
+session event listeners in a
+link:#Configuring_a_Session_Customizer_Class[session customizer class].
+
+[#Example 85-9]## *_Using the Session Event Adapter to Create a Session
+Event Listener_*
+
+[source,java]
+----
+ ...
+ SessionEventAdapter myEventListener = new SessionEventAdapter() {
+ // Listen for PostCommitUnitOfWork events
+ public void postCommitUnitOfWork(SessionEvent event) {
+ // Call the handler routine
+ unitOfWorkCommitted();
+ }
+ };
+ mySession.getEventManager().addListener(myEventListener);
+ ...
+----
+
+For information on how to add logging to your listeners, see
+link:Introduction%20to%20EclipseLink%20Sessions%20(ELUG)#Logging[Logging].
+
+== Configuring the Integrity Checker
+
+When you log into a session, EclipseLink initializes and validates the
+descriptors you registered with it. By configuring the integrity
+checker, you can customize this validation process to do the following:
+
+* link:#Check_Database[Check Database]
+* link:#Catch_All_Exceptions[Catch All Exceptions]
+* link:#Catch_Instantiation_Policy_Exceptions[Catch Instantiation Policy
+Exceptions]
+
+This table summarizes which sessions support descriptor integrity
+checking configuration.
+
+[#Table 85-15]## *_Session Support for Checking Descriptor Integrity_*
+
+Session
+
+Using the Workbench
+
+Using Java
+
+Server and client sessions
+
+Session broker and client sessions
+
+Database sessions
+
+*Check Database*
+
+The `+IntegrityChecker+` method `+setShouldCheckDatabase+` specifies
+whether or not the integrity checker should verify the descriptor’s
+metadata against the database metadata. This will report any errors due
+to missing or incorrect table or fields specified in the descriptors.
+This is turned off by default as it adds a significant overhead to
+connecting a session.
+
+*Catch All Exceptions*
+
+By default, the integrity checker catches all exceptions that occur
+during initialization, and throws a single exception at the end of
+initialization reporting all of the errors detected. If you only want
+the first exception encountered, you can disable this feature using
+`+IntegrityChecker+` method `+setShouldCatchExceptions(false)+`.
+
+*Catch Instantiation Policy Exceptions*
+
+By default, the integrity checker tests the default or configured
+constructor for each descriptor initialized in the session. To disable
+this feature, use `+IntegrityChecker+` method
+`+setShouldCheckInstantiationPolicy(false)+`.
+
+=== How to Configure the Integrity Checker Using Java
+
+As this example shows, you can configure the integrity checker
+validation process.
+
+[#Example 85-10]## *_Configuring the Integrity Checker_*
+
+[source,java]
+----
+ session.getIntegrityChecker().setShouldCheckDatabase(true);
+ session.getIntegrityChecker().setShouldCatchExceptions(false);
+ session.getIntegrityChecker().setShouldCheckInstantiationPolicy(false);
+ session.login();
+----
+
+== Configuring Connection Policy
+
+Using a connection policy, you can control how an EclipseLink session
+acquires and uses read and write connections, including the following:
+
+* link:#Exclusive_Write_Connections[Exclusive Write Connections]
+* link:#Lazy_Connection_Acquisition[Lazy Connection Acquisition]
+
+This table summarizes which sessions support connection policy
+configuration.
+
+[#Table 85-16]## *_Session Support for Connection Policy_*
+
+Session
+
+Using Workbench
+
+Using Java
+
+Server and client sessions
+
+Session broker and client sessions
+
+Database sessions
+
+*Exclusive Write Connections*
+
+An exclusive connection is one that EclipseLink allocates to a client
+session for reading (of isolated data) and writing for the duration of
+the client session’s life cycle.
+
+By default, exclusive connections are not used and a client session uses
+the server session’s read connection pool for all non-pessimistic read
+queries. A connection is obtained from the read connection pool for each
+read query execution and released back to the pool after the query is
+executed. A connection is only obtained from the write connection pool
+for the unit of work commit operation, or, potentially, earlier if data
+modify queries, or read queries using pessimistic locking are used. The
+connection will be release back to the write connection pool after the
+unit of work is committed or released. Exclusive connections are
+provided for use with database read security or Virtual Private Database
+(VPD) support. When using an exclusive connection, you will obtain it
+from the server session’s write connection pool. When you acquire the
+client, the exclusive connection will be used for read queries to
+isolated classes (see
+link:Introduction%20to%20EclipseLink%20Sessions%20(ELUG)#Isolated_Client_Sessions[Isolated
+Client Sessions]), exclusive read queries, pessimistic read queries, and
+for the unit of work commit operation. The exclusive connection will
+only be released when the client session is released. EclipseLink still
+acquires a shared connection from the read connection pool for reading
+nonisolated data. If you use a JTA-managed external connection pool with
+exclusive connections, do not reuse a client session across JTA
+transaction boundaries, as the physical JTA database connection is
+released and acquired from the connection pool relative to the JTA
+transaction life cycle. A new client session, or the active unit of
+work, should be used for each JTA transaction. For more information, see
+link:Configuring%20an%20Internal%20Connection%20Pool%20(ELUG)#Configuring_Exclusive_Read_Connections[Configuring
+Exclusive Read Connections].
+
+You can also configure exclusive connections on a
+client-session-by-client-session basis (see
+link:Acquiring%20and%20Using%20Sessions%20at%20Run%20Time%20(ELUG)#How_to_Acquire_a_Client_Session_that_Uses_Exclusive_Connections[How
+to Acquire a Client Session that Uses Exclusive Connections]) and for
+named queries (see
+link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_Named_Query_Advanced_Options[Configuring
+Named Query Advanced Options]).
+
+[width="100%",cols="<100%",]
+|===
+|*Note*: If any client session contains an exclusive connection, you
+must release the session (see
+link:Acquiring%20and%20Using%20Sessions%20at%20Run%20Time%20(ELUG)#Logging_Out_of_a_Session[Logging
+Out of a Session]) when you are finished using it. We do not recommend
+relying on the finalizer to release the connection when the session is
+garbage-collected. If you are using an active unit of work in a JTA
+transaction, you do not need to release the client session–the unit of
+work will release it after the JTA transaction completes.
+|===
+
+*Lazy Connection Acquisition*
+
+By default, EclipseLink acquires write connections lazily, when you
+perform the first unit of work commit operation, exclusive read query,
+or pessimistic read query with your client session. The write connection
+will also be released after each unit of work it committed or released.
+
+Alternatively, you can configure EclipseLink to acquire the write
+connection at the time you acquire a client session, and release the
+connection when you release the client session.
+
+You can also configure lazy connection acquisition on a
+client-session-by-client-session basis (see
+link:Acquiring%20and%20Using%20Sessions%20at%20Run%20Time%20(ELUG)#How_to_Acquire_a_Client_Session_that_Does_Not_Use_Lazy_Connection_Allocation[How
+to Acquire a Client Session that Does Not Use Lazy Connection
+Allocation]).
+
+=== How to Configure Connection Policy Using Workbench
+
+To specify the connection policy in a session, use this procedure:
+
+[arabic]
+. Select a session in the *Navigator*. Its properties appear in the
+Editor.
+. Click the *Connection Policy* tab. The Connection Policy tab appears.
+*_Connection Policy Tab_* image:sescpol.gif[Connection Policy
+Tab,title="Connection Policy Tab"]
+
+=== How to Configure Connection Policy Using Java
+
+To configure whether or not an exclusive connection is allocated to a
+particular isolated session, use the
+`+org.eclipse.persistence.sessions.server.ConnectionPolicy+` method
+`+setExclusiveMode+`. You can set the `+ExclusiveMode+` to one of the
+following:
+
+* `+Transactional+` - triggers the creation of a `+ClientSession+`. You
+can also enable this option by selecting *Acquire Connections Lazily* in
+link:#How_to_Configure_Connection_Policy_Using_TopLink_Workbench[Workbench].
+* `+Isolated+` - triggers the creation of an
+`+ExclusiveIsolatedClientSession+`. You can also enable this option by
+selecting *Acquire Exclusive Connection* in
+link:#How_to_Configure_Connection_Policy_Using_TopLink_Workbench[Workbench].
+* `+Asways+` - also triggers the creation of an
+`+ExclusiveIsolatedClientSession+`. Note that this mode allows the usage
+of an exclusive connection without requiring isolation. You cannot use
+Workbench to set this option.
+
+To define a map of properties used to support an isolated session, use
+the following `+ConnectionPolicy+` methods:
+
+* `+setProperty(Object key, Object value)+`: Adds the property `+value+`
+to the `+Map+` under `+key+`, overwriting the existing value if `+key+`
+already exists in the `+Map+`. Note that these properties are not
+specifically geared toward an isolated client session. EclipseLink
+runtime makes them available during the creation of a client session in
+a `+PostAcquireExclusiveConnection+` event, but does not pass them to
+any event. Instead, it keeps these properties in the
+`+ConnectionPolicy+`, which, in turn, is kept by the client session.
+* `+Object getProperty(Object key)+`: Returns the value associated with
+`+key+` as an `+Object+`.
+* `+boolean hasProperties+`: Returns `+true+` if one or more properties
+exist in the `+Map+`; otherwise returns false.
+
+The EclipseLink runtime passes this `+Map+` into `+SessionEvent+` events
+`+PostAcquireExclusiveConnection+` and `+PreReleaseExclusiveConnection+`
+so that your implementation can make the appropriate PL/SQL calls to the
+underlying database platform (see
+link:Configuring%20Exclusive%20Isolated%20Client%20Sessions%20for%20Virtual%20Private%20Database%20(ELUG)#Using_PostAcquireExclusiveConnection_Event_Handler[Using
+PostAcquireExclusiveConnection Event Handler] and
+link:Configuring%20Exclusive%20Isolated%20Client%20Sessions%20for%20Virtual%20Private%20Database%20(ELUG)#Using_PreReleaseExclusiveConnection_Event_Handler[Using
+PreReleaseExclusiveConnection Event Handler]).
+
+To configure the session to use a named connection pool, use the
+`+ConnectionPool+` constructor that takes a `+String+` connection pool
+name as an argument, as follows:
+
+`+Session clientSession = server.acquireClientSession(new ConnectionPolicy("myConnectionPool"));+`
+
+== Configuring Named Queries at the Session Level
+
+A *named query* is an EclipseLink query that you create and store, by
+name, in a session for later retrieval and execution. Named queries
+improve application performance, because they are prepared once and they
+(and all their associated supporting objects) can be efficiently reused
+thereafter making them well-suited for frequently executed operations.
+
+If a named query is global to a project, configure it at the session
+level. Alternatively, you can configure a named query at the descriptor
+level (see
+link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_Named_Queries_at_the_Descriptor_Level[Configuring
+Named Queries at the Descriptor Level]).
+
+Use named queries to specify SQL, EJB QL, or EclipseLink `+Expression+`
+queries to access your data source.
+
+This table summarizes which sessions support named query configuration.
+
+[#Table 85-17]##
+
+Session
+
+Using the Workbench
+
+Using Java
+
+Server and client sessions
+
+Session broker and client sessions
+
+Database sessions
+
+After you create a named query, you can execute it by name on the
+EclipseLink session (see
+link:Using%20Basic%20Query%20API%20(ELUG)#Using_Named_Queries[Using
+Named Queries]).
+
+For more information about named queries, see
+link:Introduction%20to%20EclipseLink%20Queries%20(ELUG)#Named_Queries[Named
+Queries].
+
+=== How to Configure Named Queries at the Session Level Using Java
+
+You can store a query by name in a `+Session+` using `+Session+` method
+`+addQuery(String name, DatabaseQuery query)+`.
+
+'''''
+
+_link:EclipseLink_User's_Guide_Copyright_Statement[Copyright Statement]_
+
+Category:_EclipseLink_User's_Guide[Category: EclipseLink User’s Guide]
+Category:_Release_1[Category: Release 1] Category:_Task[Category: Task]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Configuring_an_EIS_Composite_Collection_Mapping_(ELUG).adoc b/docs/docs.ug/src/main/asciidoc/core/Configuring_an_EIS_Composite_Collection_Mapping_(ELUG).adoc
new file mode 100644
index 00000000000..9f768fe1362
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Configuring_an_EIS_Composite_Collection_Mapping_(ELUG).adoc
@@ -0,0 +1,46 @@
+*TOC*
+Special:Whatlinkshere_Configuring_an_EIS_Composite_Collection_Mapping_(ELUG)[Related
+Topics]
+
+For information on how to create EclipseLink mappings, see
+link:Creating%20a%20Mapping%20(ELUG)#CBBHHHJC[Creating a Mapping].
+
+This table lists the configurable options for an EIS composite
+collection mapping.
+
+[#Table 78-1]##
+
+Option to Configure
+
+Workbench
+
+Java
+
+XPath
+
+Reference Descriptors
+
+Configuring Method or Direct Field Accessing at the Mapping Level
+
+Read-only mappings
+
+Configuring Container policy
+
+Mapping comments
+
+For more information, see the following:
+
+* link:Introduction%20to%20EIS%20Mappings%20(ELUG)#EIS_Composite_Collection_Mapping[EIS
+Composite Collection Mapping]
+* link:Configuring%20an%20EIS%20Mapping%20(ELUG)#CHDHFGAH[Configuring an
+EIS Mapping]
+* link:Configuring%20a%20Mapping%20(ELUG)#CEGFEFJG[Configuring a
+Mapping]
+
+'''''
+
+_link:EclipseLink_User's_Guide_Copyright_Statement[Copyright Statement]_
+
+Category:_EclipseLink_User's_Guide[Category: EclipseLink User’s Guide]
+Category:_Release_1[Category: Release 1] Category:_Task[Category: Task]
+Category:_EIS[Category: EIS]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Configuring_an_EIS_Composite_Direct_Collection_Mapping_(ELUG).adoc b/docs/docs.ug/src/main/asciidoc/core/Configuring_an_EIS_Composite_Direct_Collection_Mapping_(ELUG).adoc
new file mode 100644
index 00000000000..fd7eb9486c4
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Configuring_an_EIS_Composite_Direct_Collection_Mapping_(ELUG).adoc
@@ -0,0 +1,56 @@
+*TOC*
+Special:Whatlinkshere_Configuring_an_EIS_Composite_Direct_Collection_Mapping_(ELUG)[Related
+Topics]
+
+For information on how to create EclipseLink mappings, see
+link:Creating%20a%20Mapping%20(ELUG)#CBBHHHJC[Creating a Mapping].
+
+This table lists the configurable options for an EIS composite direct
+collection mapping.
+
+[#Table 76-1]##
+
+Option to Configure
+
+Workbench
+
+Java
+
+XPath
+
+Simple type translator
+
+Use of a single node
+
+Configuring Method or Direct Field Accessing at the Mapping Level
+
+Read-only mappings
+
+Container policy
+
+Mapping comments
+
+Serialized object converter
+
+Type conversion converter
+
+Object type converter
+
+JAXB typesafe enumerated converter
+
+For more information, see the following:
+
+* link:Introduction%20to%20EIS%20Mappings%20(ELUG)#EIS_Composite_Direct_Collection_Mapping[EIS
+Composite Direct Collection Mapping]
+* link:Configuring%20an%20EIS%20Mapping%20(ELUG)#CHDHFGAH[Configuring an
+EIS Mapping]
+* link:Configuring%20a%20Mapping%20(ELUG)#CBBHHHJC[Configuring a
+Mapping]
+
+'''''
+
+_link:EclipseLink_User's_Guide_Copyright_Statement[Copyright Statement]_
+
+Category:_EclipseLink_User's_Guide[Category: EclipseLink User’s Guide]
+Category:_Release_1[Category: Release 1] Category:_Task[Category: Task]
+Category:_EIS[Category: EIS]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Configuring_an_EIS_Composite_Object_Mapping_(ELUG).adoc b/docs/docs.ug/src/main/asciidoc/core/Configuring_an_EIS_Composite_Object_Mapping_(ELUG).adoc
new file mode 100644
index 00000000000..581aff131ac
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Configuring_an_EIS_Composite_Object_Mapping_(ELUG).adoc
@@ -0,0 +1,44 @@
+*TOC*
+Special:Whatlinkshere_Configuring_an_EIS_Composite_Object_Mapping_(ELUG)[Related
+Topics]
+
+For information on how to create EclipseLink mappings, see
+link:Creating%20a%20Mapping%20(ELUG)#CBBHHHJC[Creating a Mapping].
+
+This table lists the configurable options for an EIS composite object
+mapping.
+
+[#Table 77-1]##
+
+Option to Configure
+
+Workbench
+
+Java
+
+XPath
+
+Configuring Reference Descriptors
+
+Method or direct field access at the mapping level
+
+Read-only mappings
+
+Mapping comments
+
+For more information, see the following:
+
+* link:Introduction%20to%20EIS%20Mappings%20(ELUG)#EIS_Composite_Object_Mapping[EIS
+Composite Object Mapping]
+* link:Configuring%20an%20EIS%20Mapping%20(ELUG)#CHDHFGAH[Configuring an
+EIS Mapping]
+* link:Configuring%20a%20Mapping%20(ELUG)#CEGFEFJG[Configuring a
+Mapping]
+
+'''''
+
+_link:EclipseLink_User's_Guide_Copyright_Statement[Copyright Statement]_
+
+Category:_EclipseLink_User's_Guide[Category: EclipseLink User’s Guide]
+Category:_Release_1[Category: Release 1] Category:_Task[Category: Task]
+Category:_EIS[Category: EIS]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Configuring_an_EIS_Descriptor_(ELUG).adoc b/docs/docs.ug/src/main/asciidoc/core/Configuring_an_EIS_Descriptor_(ELUG).adoc
new file mode 100644
index 00000000000..62df4dac3e5
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Configuring_an_EIS_Descriptor_(ELUG).adoc
@@ -0,0 +1,484 @@
+image:Elug_draft_icon.png[Image:Elug draft
+icon.png,title="Image:Elug draft icon.png"] *For the latest EclipseLink
+documentation, please see
+http://www.eclipse.org/eclipselink/documentation/*
+
+'''''
+
+*TOC* Special:Whatlinkshere_Configuring_an_EIS_Descriptor_(ELUG)[Related
+Topics]
+
+For information on how to create EIS descriptors, see
+link:Creating%20an%20EIS%20Descriptor%20(ELUG)[Creating an EIS
+Descriptor].
+
+This table lists the default configurable options for an EIS descriptor.
+
+[#Table 72-1]##
+
+Option to Configure
+
+EclipseLink Workbench
+
+Java
+
+How to Configure XML Schema Namespace
+
+How to Configure an XML Schema Reference
+
+Configuring Schema Context for an EIS Descriptor
+
+Configuring Default Root Element
+
+Configuring Primary Keys 1
+
+Configuring Read-Only Descriptors
+
+Configuring Unit of Work Conforming at the Descriptor Level
+
+Configuring Descriptor Alias
+
+Configuring Descriptor Comments)
+
+Configuring Record Format
+
+How to Create Classes
+
+Configuring Named Queries at the Descriptor Level
+
+Configuring Custom EIS Interactions for Basic Persistence Operations
+
+Configuring Cache Refreshing
+
+Configuring Cache Type and Size at the Descriptor Level
+
+Configuring Cache Isolation at the Descriptor Level
+
+Configuring Cache Coordination Change Propagation at the Descriptor
+Level
+
+Configuring Cache Expiration at the Descriptor Level
+
+Configuring Cache Existence Checking at the Descriptor Level
+
+Configuring an EIS Descriptor as a Root or Composite Type
+
+Configuring Inheritance for a Child (Branch or Leaf) Class Descriptor
+
+Configuring Inheritance for a Parent (Root) Descriptor
+
+Configuring Inherited Attribute Mapping in a Subclass
+
+Configuring a Domain Object Method as an Event Handler
+
+Configuring a Descriptor Event Listener as an Event Handler
+
+Configuring Locking Policy
+
+Configuring Returning Policy
+
+Configuring Instantiation Policy
+
+Configuring Copy Policy
+
+Configuring Change Policy
+
+Configuring Wrapper Policy
+
+Configuring Amendment Methods
+
+Configuring a Mapping
+
+1EIS root descriptors only (see
+link:#Configuring_an_EIS_Descriptor_as_a_Root_or_Composite_Type[Configuring
+an EIS Descriptor as a Root or Composite Type]). For more information,
+see link:Introduction%20to%20EIS%20Descriptors%20(ELUG)[Introduction to
+EIS Descriptors].
+
+== Configuring Schema Context for an EIS Descriptor
+
+Workbench uses the schema context to associate the class that the EIS
+descriptor describes with a simple or complex type in one of the schemas
+associated with the EIS project (see
+link:Using%20Workbench%20(ELUG)#How_to_Configure_an_XML_Schema_Reference[How
+to Configure an XML Schema Reference]). This allows Workbench to display
+the appropriate attributes available for mapping in that context.
+
+You must configure the schema context for an EIS root descriptor (see
+link:#Configuring_an_EIS_Descriptor_as_a_Root_or_Composite_Type[Configuring
+an EIS Descriptor as a Root or Composite Type]) only if you are using
+the Workbench.
+
+=== How to Configure Schema Context for an EIS Descriptor Using Workbench
+
+To associate an EIS descriptor with a simple or complex type in this
+project’s schema, use this procedure:
+
+[arabic]
+. Select an EIS descriptor in the *Navigator*. Its properties appear in
+the Editor.
+. Click the *Descriptor Info* tab. The Descriptor Info tab appears.
+[#Figure 72-1]##*_Descriptor Info Tab, Schema Context Option_*
+image:desschcx.gif[Descriptor Info Tab, Schema Context
+Option,title="Descriptor Info Tab, Schema Context Option"]
+. Complete the *Schema Context* option on the tab.
+. Click *Browse* to select the schema element to associate with this
+descriptor. For more information, see
+link:#Configuring_a_Schema_Context[Configuring a Schema Context].
+
+==== Choosing a Schema Context
+
+Use the Choose Schema Context dialog box to select a specific schema
+element (such as when mapping an element).
+
+[#Figure 72-2]## *_Choose Schema Context Dialog Box_*
+
+.Choose Schema Context Dialog Box
+image::schcontx.gif[Choose Schema Context Dialog
+Box,title="Choose Schema Context Dialog Box"]
+
+Select the schema element and click *OK*.
+
+=== How to Configure Schema Context for an EIS Descriptor Using Java
+
+For an EIS descriptor, the EclipseLink runtime does not need the schema
+context: the runtime can determine the schema context based on the
+mappings you configure on the descriptor. No further configuration is
+required.
+
+== Configuring Default Root Element
+
+You must configure the default root element for
+link:Creating%20an%20EIS%20Descriptor%20(ELUG)#EIS_Root_Descriptors[EIS
+Root Descriptors] so that the EclipseLink runtime knows the data source
+data type associated with the class the descriptor describes.
+Descriptors used only in composite relationship mappings do not require
+a default root element.
+
+[width="100%",cols="<100%",]
+|===
+|*Note:* Although you select an element from your project’s schema to
+configure this attribute, you are choosing the element’s simple or
+complex type.
+|===
+
+For more information, see
+link:Introduction%20to%20Descriptors%20(ELUG)#Default_Root_Element[Default
+Root Element].
+
+=== How to Configure Default Root Element Using Workbench
+
+When you create an EIS project using Workbench, you must use XML
+records. Consequently, you must configure a default root element so that
+Workbench knows what element to start with when persisting an instance
+of the class that the EIS descriptor describes.
+
+To specify a schema element as the default root element for the
+descriptor, use this procedure:
+
+[arabic]
+. Select a descriptor in the *Navigator*. Its properties appear in the
+Editor.
+. Click the *Descriptor Info* tab. The Descriptor Info tab appears.
+[#Figure 72-3]##*_Descriptor Info Tab, Default Root Element Option_*
+image:didocroot.gif[Descriptor Info Tab, Default Root Element
+Option,title="Descriptor Info Tab, Default Root Element Option"]
+. Use the *Default Root Element* option to select the root element for
+this descriptor. Click *Browse* to select the schema element to identify
+as the root element. See link:#onfiguring_a_Root_Element[Configuring a
+Root Element] for more information.
+
+==== Choosing a Root Element
+
+Use the Choose Root Element dialog box to select a specific root
+element.
+
+[#Figure 72-4]## *_Choose Root Element Dialog Box_*
+
+.Choose Root Element Dialog Box
+image::rootelem.gif[Choose Root Element Dialog
+Box,title="Choose Root Element Dialog Box"]
+
+Select the root element and click *OK*.
+
+=== How to Configure Default Root Element Using Java
+
+When you create an EIS project using Java code, use the
+`+EISDescriptor+` method `+setDataTypeName+` to specify the XML schema
+complex type name (if you are using XML records) or the JCA record name
+(if you are using indexed or mapped records) corresponding to the class
+that the EIS descriptor describes. For more information, see
+_EclipseLink API Reference_.
+
+== Configuring Record Format
+
+The EIS descriptor record format determines the EIS record type to which
+the descriptor’s EIS mappings map.
+
+When you create an EIS project using Workbench, EclipseLink configures
+all EIS descriptors with a record format of XML.
+
+When you create an EIS project in Java, you can configure the EIS
+descriptor record type to any of the supported types, as this table
+shows.
+
+[#Table 72-2]##
+
+EISDescriptor Method
+
+EIS Record Type
+
+useMappedRecordFormat
+
+All EIS mappings owned by this descriptor map to EIS mapped records.
+
+useIndexedRecordFormat
+
+All EIS mappings owned by this descriptor map to EIS indexed records.
+
+useXMLRecordFormat
+
+All EIS mappings owned by this descriptor map to EIS XML records.If you
+use the XML record format, you must specify one or more XML schemas in
+your EIS project (see How to Import an XML Schema). The EclipseLink
+runtime performs XML data conversion based on one or more XML schemas.
+In an EIS XML project, Workbench does not directly reference schemas in
+the deployment XML, but insteadexports mappings configured with respect
+to the schemas you specify.
+
+For information on EclipseLink support for XML namespaces, see XML
+Namespaces.
+
+For more information, see
+link:Introduction%20to%20EIS%20Mappings%20(ELUG)#EIS_Record_Type[EIS
+Record Type].
+
+=== How to Configure Record Format Using Java
+
+To configure the EIS record format for an EIS descriptor, use one of the
+`+EISDescriptor+` methods listed in the link:#Table_72-2[EIS Record
+Formats] table, as shown in this example.
+
+[#Example 72-1]## *_Configuring EISDescriptor Record Format_*
+
+`+EISDescriptor descriptor = new EISDescriptor();+`
+`+descriptor.useIndexedRecordFormat();+`
+
+== Configuring Custom EIS Interactions for Basic Persistence Operations
+
+You can use EclipseLink to define an interaction for each basic
+persistence operation (*insert*, *update*, *delete*, *read object*,
+*read all*, or *does exist*) so that when you query and modify your
+EIS-mapped objects, the EclipseLink runtime will use the appropriate EIS
+interaction instead of the default EIS interaction.
+
+You can configure custom EIS interactions for basic persistence
+operations only for EIS descriptors designated as root descriptors (
+link:#Configuring_an_EIS_Descriptor_as_a_Root_or_Composite_Type[Configuring
+an EIS Descriptor as a Root or Composite Type]).
+
+Using Workbench, you can create `+XMLInteraction+` objects, in which
+there is a single query per interaction (see
+link:#How_to_Configure_Custom_EIS_Interactions_for_Basic_Persistence_Operations_Using_Workbench[How
+to Configure Custom EIS Interactions for Basic Persistence Operations
+Using Workbench]).
+
+Using Java, you can create any `+EISInteraction+` type. For some EIS
+projects, it is common for multiple interactions to be used in a single
+query. For example, one interaction–to enqueue a request, and another–to
+dequeue the response. Because Workbench does not support setting
+multiple interactions on a single query, you must use an amendment
+method to create and configure the interaction in Java (see
+link:#How_to_Configure_Custom_EIS_Interactions_for_Basic_Persistence_Operations_Using_Java[How
+to Configure Custom EIS Interactions for Basic Persistence Operations
+Using Java]).
+
+[width="100%",cols="<100%",]
+|===
+|*Note:* In a one-to-one or one-to-many EIS mapping, you must also
+specify a selection interaction that EclipseLink uses to acquire target
+objects. You can use either the target object’s read interaction (the
+default) or specify a separate selection interaction, if necessary. For
+more information, see
+link:Configuring%20an%20EIS%20Mapping%20(ELUG)#Configuring_Selection_Interaction[Configuring
+Selection Interaction]).
+|===
+
+=== How to Configure Custom EIS Interactions for Basic Persistence Operations Using Workbench
+
+To configure custom EIS interactions for basic persistence operations,
+use the following procedure:
+
+[arabic]
+. In the *Navigator*, select an EIS root descriptor in a EIS project.
+. Click the *Queries* tab in the *Editor*. The Queries tab appears.
+. Click the *Custom Calls* tab. The Custom Calls tab appears.
+[#Figure 72-5]##*_Queries, Custom Calls Tab for EIS Calls_*
+image:Qrcalltab.gif[Queries, Custom Calls Tab for EIS
+Calls,title="Queries, Custom Calls Tab for EIS Calls"]
+. Click the appropriate interaction type from the list (*Insert*,
+*Update*, *Delete*, *Read Object*, *Read All*, or *Does Exist*) and use
+the following table to enter data in each field
+
+[width="100%",cols="<7%,<93%",options="header",]
+|===
+|*Field* |*Description*
+|*Interaction Type* |Using Workbench, you can only use XML Interactions.
+You cannot change this field.
+
+|*Function Name* |The name of the EIS function that this call type (Read
+Object or Read All) invokes on the EIS.
+
+|*Input Record Name* |The name passed to the JCA adapter when creating
+the input record.
+
+|*Input Root Element* |The root element name to use for the input DOM.
+
+|*Input Arguments* |The query argument name to map to the interaction
+field or XPath nodes in the argument record. For example, if you are
+using XML records, use this option to map input argument `+name+` to the
+XPath `+name/first-name+`.
+
+|*Output Arguments* |The result record field or XPath nodes to map to
+the correct nodes in the record used by the descriptor’s mappings. For
+example, if you are using XML records, use this option to map the output
+`+fname+` to `+name/first-name+`.Output arguments are not required if
+the interaction returns an XML result that matches the descriptor’s
+mappings.
+
+|*Input Result Path* |Use this option if the EIS interaction expects the
+interaction arguments to be nested in the XML record. For example,
+specify `+arguments+`, if the arguments were to be nested under the root
+element `+exec-find-order+`, then under an `+arguments+` element.
+
+|*Output Result Path* |Use this option if the EIS interaction result
+record contains the XML data that maps to the objects in a nested
+structure. For example, specify `+order+`, if the results were return
+under a root element `+results+`, then under an `+order+` element.
+
+|*Properties* |Any properties required by your EIS platform. For
+example, property name `+operation+` (from
+`+AQPlatform.QUEUE_OPERATION+`) and property value `+enqueue+` (from
+`+AQPlatform.ENQUEUE+`).
+|===
+
+=== How to Configure Custom EIS Interactions for Basic Persistence Operations Using Java
+
+Using Java, you can create any type of
+link:Using%20Basic%20Query%20API%20(ELUG)#Using_EIS_Interactions[EIS
+interaction] that EclipseLink supports.
+
+For some EIS projects, it is common for multiple interactions to be used
+in a single query: for example, one interaction to enqueue a request and
+another to dequeue the response. Because Workbench does not support
+setting multiple interactions on a single query, you must use an
+amendment method to create and configure the interaction in Java, as
+this examle shows.
+
+[#Example 72-2]## *_Creating an XML Interaction for an AQ Platform_*
+
+`+public static void addXMLInteractions(ClassDescriptor descriptor) {+`
+`+ +`*`+//\'\' \'\'find\'\' \'\'order\'\' \'\'interaction+`*
+`+ XMLInteraction request = new XMLInteraction();+`
+`+ request.setProperty(AQPlatform.QUEUE_OPERATION, AQPlatform.ENQUEUE);+`
+`+ request.setProperty(AQPlatform.QUEUE, "ORDER_INBOUND_QUEUE");+`
+`+ request.setProperty(AQPlatform.SCHEMA, "AQUSER");+`
+`+ request.setInputRootElementName("READ_ORDER");+`
+`+ request.addArgument("@id");+` `+ +`
+`+ XMLInteraction response = new XMLInteraction();+`
+`+ response.setProperty(AQPlatform.QUEUE_OPERATION, AQPlatform.DEQUEUE);+`
+`+ response.setProperty(AQPlatform.QUEUE, "ORDER_OUTBOUND_QUEUE");+`
+`+ response.setProperty(AQPlatform.SCHEMA, "AQUSER");+` `+ +`
+`+ ReadObjectQuery query = new ReadObjectQuery();+`
+`+ query.addCall(request);+` `+ query.addCall(response);+`
+`+ descriptor.getQueryManager().setReadObjectQuery(query);+` `+ +`
+`+ +`*`+//\'\' \'\'place\'\' \'\'order\'\' \'\'interaction+`*
+`+ XMLInteraction insert = new XMLInteraction();+`
+`+ insert.setProperty(AQPlatform.QUEUE_OPERATION, AQPlatform.ENQUEUE);+`
+`+ insert.setProperty(AQPlatform.QUEUE, "ORDER_INBOUND_QUEUE");+`
+`+ insert.setProperty(AQPlatform.SCHEMA, "AQUSER");+`
+`+ insert.setInputRootElementName("INSERT_ORDER");+`
+`+ +`
+`+ descriptor.getQueryManager().setInsertCall(insert);+` `+}+`
+
+== Configuring an EIS Descriptor as a Root or Composite Type
+
+You can designate an EIS descriptor as
+link:Creating%20an%20EIS%20Descriptor%20(ELUG)#EIS_Root_Descriptors[root]
+or
+link:Creating%20an%20EIS%20Descriptor%20(ELUG)#EIS_Composite_Descriptors[composite].
+
+When you designate an EIS descriptor as a root, you tell the EclipseLink
+runtime that the EIS descriptor’s reference class is a parent classš–no
+other class will reference it by way of a composite object mapping or
+composite collection mapping. Using an EIS root descriptor, you can
+configure all supported mappings and you can configure the descriptor
+with
+link:Using%20Basic%20Query%20API%20(ELUG)#Using_EIS_Interactions[EIS
+interactions]. However, if you configure the EIS root descriptor with a
+composite object mapping or composite collection mapping, the reference
+descriptor you define must be an EIS composite descriptor; it cannot be
+another EIS root descriptor.
+
+When you designate an EIS descriptor as a composite (the default), you
+tell the EclipseLink runtime that the EIS descriptor’s reference class
+may be referenced by a
+link:Configuring%20an%20EIS%20Composite%20Object%20Mapping%20(ELUG)[composite
+object] or
+link:Configuring%20an%20EIS%20Composite%20Collection%20Mapping_(ELUG)[composite
+collection] mapping. Using an EIS composite descriptor, you can
+configure all supported mappings, but you cannot configure it with EIS
+interactions.
+
+You can configure inheritance for a descriptor designated as a composite
+(see
+link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_Inheritance_for_a_Child_(Branch_or_Leaf)_Class_Descriptor[Configuring
+Inheritance for a Child (Branch or Leaf) Class Descriptor]), however, in
+this case, _all_ the descriptors in the inheritance tree must be
+aggregates. Aggregate and class descriptors cannot exist in the same
+inheritance tree. For more information, see
+link:Introduction%20to%20Descriptors%20(ELUG)#Aggregate_and_Composite_Descriptors_and_Inheritance[Aggregate
+and Composite Descriptors and Inheritance].
+
+If you configure a descriptor as a composite using Workbench, you cannot
+configure the descriptor with EJB information.
+
+For more information, see the following:
+
+* link:Introduction%20to%20XML%20Descriptors%20(ELUG)#XML_Descriptors_and_Aggregation[XML
+Descriptors and Aggregation]
+* link:Introduction%20to%20EIS%20Mappings%20(ELUG)#Composite_and_Reference_EIS_Mappings[Composite
+and Reference EIS Mappings]
+
+=== How to Configure an EIS Descriptor as a Root or Composite Type Using Workbench
+
+To configure an EIS descriptor as a root or composite EIS descriptor,
+use this procedure:
+
+[arabic]
+. In the *Navigator*, select an EIS composite descriptor.
+. Click the *Root* or *Composite* descriptor button on the mapping
+toolbar.You can also select the descriptor and choose *Selected* >
+*Descriptor Type* > *Root* or *Composite* from the menu or by
+right-clicking on the descriptor in the *Navigator* and selecting
+*Descriptor Type* > *Root* or *Composite* from the context menu.
+
+=== How to Configure an EIS Descriptor as a Root or Composite Type Using Java
+
+To configure an EIS descriptor as root or composite using Java, create a
+descriptor amendment method (see
+link:Configuring%20a%20Descriptor%20(ELUG)#Configuring_Amendment_Methods[Configuring
+Amendment Methods]) and use the following `+EISDescriptor+` methods:
+
+* To designate an EIS descriptor as a root descriptor, use
+`+EISDescriptor+` method `+descriptorIsNormal+`.
+* To designate an EIS descriptor as a composite (nonroot) descriptor,
+use `+EISDescriptor+` method `+descriptorIsAggregate+`.
+
+'''''
+
+_link:EclipseLink_User's_Guide_Copyright_Statement[Copyright Statement]_
+
+Category:_EclipseLink_User's_Guide[Category: EclipseLink User’s Guide]
+Category:_Release_1[Category: Release 1] Category:_Task[Category: Task]
+Category:_EIS[Category: EIS]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Configuring_an_EIS_Direct_Mapping_(ELUG).adoc b/docs/docs.ug/src/main/asciidoc/core/Configuring_an_EIS_Direct_Mapping_(ELUG).adoc
new file mode 100644
index 00000000000..48b01689ee0
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Configuring_an_EIS_Direct_Mapping_(ELUG).adoc
@@ -0,0 +1,55 @@
+*NOTOC*
+Special:Whatlinkshere_Configuring_an_EIS_Direct_Mapping_(ELUG)[Related
+Topics]
+
+For information on how to create EclipseLink mappings, see
+link:Creating%20a%20Mapping%20(ELUG)[Creating a Mapping].
+
+This table lists the configurable options for an EIS direct mapping.
+
+[#Table 75-1]##
+
+Option to Configure
+
+Workbench
+
+Java
+
+XPath
+
+Use of a single node
+
+Simple type translator
+
+Method or direct field access at the mapping level
+
+Default null value at the mapping level
+
+Read-only mappings
+
+Mapping comments
+
+Serialized object converter
+
+Type conversion converter
+
+Object type converter
+
+JAXB typesafe enumerated converter
+
+For more information, see the following:
+
+* link:Introduction%20to%20EIS%20Mappings%20(ELUG)#EIS_Direct_Mapping[EIS
+Direct Mapping]
+* link:Configuring%20an%20EIS%20Mapping%20(ELUG)[Configuring an EIS
+Mapping]
+* link:Configuring%20a%20Mapping%20(ELUG)#CEGFEFJG[Configuring a
+Mapping]
+
+'''''
+
+_link:EclipseLink_User's_Guide_Copyright_Statement[Copyright Statement]_
+
+Category:_EclipseLink_User's_Guide[Category: EclipseLink User’s Guide]
+Category:_Release_1[Category: Release 1] Category:_Task[Category: Task]
+Category:_EIS[Category: EIS]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Configuring_an_EIS_Login_(ELUG).adoc b/docs/docs.ug/src/main/asciidoc/core/Configuring_an_EIS_Login_(ELUG).adoc
new file mode 100644
index 00000000000..5beeb946984
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Configuring_an_EIS_Login_(ELUG).adoc
@@ -0,0 +1,149 @@
+*TOC* Special:Whatlinkshere_Configuring_an_EIS_Login_(ELUG)[Related
+Topics]
+
+[#Table 95-1]## *_Configurable Options for EIS Login_*
+
+[width="100%",cols="<63%,<20%,<17%",options="header",]
+|===
+|*Option to Configure* |*Workbench* |*Java*
+|link:#Configuring_an_EIS_Data_Source_Platform_at_the_Session_Level[Data
+source platform at the session level]
+|image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:#Configuring_EIS_Connection_Specification_Options_at_the_Session_Level[Connection
+specification options at the session level]
+|image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Data%20Source%20Login%20(ELUG)#Configuring_User_Name_and_Password[User
+name and password] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Data%20Source%20Login%20(ELUG)#Configuring_Password_Encryption[Password
+encryption] |image:unsupport.gif[Unsupported,title="Unsupported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Data%20Source%20Login%20(ELUG)#Configuring_External_Connection_Pooling[External
+connection pooling] |image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Data%20Source%20Login%20(ELUG)#Configuring_Properties[Properties]
+|image:support.gif[Supported,title="Supported"]
+|image:support.gif[Supported,title="Supported"]
+|===
+
+== Configuring an EIS Data Source Platform at the Session Level
+
+For each EIS session, you must specify the platform (such as AQ). This
+platform configuration overrides the platform at the project level, if
+configured.
+
+For more information, see the following:
+
+* link:Configuring%20a%20Relational%20Project%20(ELUG)#Configuring_Relational_Database_Platform_at_the_Project_Level[Configuring
+Relational Database Platform at the Project Level]
+* link:Introduction%20to%20Data%20Access%20(ELUG)#Data_Source_Login_Types[Data
+Source Login Types]
+
+=== How to Configure an EIS Data Source Platform at the Session Level Using Workbench
+
+To specify the database platform options for an EIS session login, use
+this procedure:
+
+[arabic]
+. Select an EIS session in the *Navigator*. Its properties appear in the
+Editor.
+. Click the *Login* tab. The Login tab appears.
+. Click the *Connection* subtab. The Connection subtab appears. *_Login
+Tab, Connection Subtab, Platform Options_* image:eispla.gif[Connection
+Subtab, Platform Options,title="Connection Subtab, Platform Options"]
+. Complete the *Platform* option on the Connection tab.
+
+Use the following information to enter data in the Platform field on the
+Connection tab to configure the platform:
+
+[width="100%",cols="<9%,<91%",options="header",]
+|===
+|*Field* |*Description*
+|*Platform* |The EIS platform for the session. Select from the menu of
+options. This menu includes all instances of `+EISPlatform+` in the
+EclipseLink classpath.
+|===
+
+See Also:
+
+link:Configuring%20a%20Relational%20Project%20(ELUG)#Configuring_Relational_Database_Platform_at_the_Project_Level[Configuring
+Relational Database Platform at the Project Level]
+
+== Configuring EIS Connection Specification Options at the Session Level
+
+You can configure connection information at the session level for an EIS
+application. This information is stored in the `+sessions.xml+` file.
+The EclipseLink runtime uses this information whenever you perform a
+persistence operation using the session in your EIS application.
+
+This connection configuration overrides the connection information at
+the project level, if configured. For more information about
+project-level configuration, see
+link:Configuring%20a%20Relational%20Project%20(ELUG)#Configuring_Development_and_Deployment_Logins[Configuring
+Development and Deployment Logins] and
+link:Configuring%20an%20EIS%20Project%20(ELUG)#Configuring_EIS_Connection_Specification_Options_at_the_Project_Level[Configuring
+EIS Connection Specification Options at the Project Level].
+
+This connection configuration is overridden by the connection
+information at the connection pool level. For more information about
+connection pool-level configuration, see
+link:Configuring%20an%20Internal%20Connection%20Pool%20(ELUG)#Configuring_Connection_Pool_Connection_Options[Configuring
+Connection Pool Connection Options].
+
+=== How to Configure EIS Connection Specification Options at the Session Level Using Workbench
+
+Use this procedure to specify the connection options for an EIS session
+login.
+
+[arabic]
+. Select an EIS session in the Navigator window. Its properties appear
+in the Editor window.
+. Click the *Login* tab. The Login tab appears.
+. Click the *Connection* subtab. The Connection tab appears.
+[#Figure 95-2]##*_Login Tab, Connection Subtab_* image:eisconn.gif[Login
+Tab, Connection Subtab,title="Login Tab, Connection Subtab"]
+. Complete fields on the Login-–Connection tab.
+
+Use the following information to enter data in the connection fields on
+the tab:
+
+Field
+
+Description
+
+Connection Specification Class
+
+Specify the appropriate connection specification class for the selected
+Platform. Click Browse to choose from all the classes in the EclipseLink
+classpath. (For example: if Platform is
+org.eclipse.persistence.eis.aq.AQPlatform, use
+org.eclipse.persistence.eis.aq.AQEISConnectionSpec).
+
+For more information on platform configuration, see Configuring an EIS
+Data Source Platform at the Session Level.
+
+Connection Factory URL
+
+Specify the appropriate connection factory URL for the selected
+Connection Specification Class (For example:
+jdbc:oracle:thin@:localhost:1521:orcl).
+
+See Also:
+
+link:Configuring%20a%20Relational%20Project%20(ELUG)#Configuring_Development_and_Deployment_Logins[Configuring
+Development and Deployment Logins]
+
+'''''
+
+_link:EclipseLink_User's_Guide_Copyright_Statement[Copyright Statement]_
+
+Category:_EclipseLink_User's_Guide[Category: EclipseLink User’s Guide]
+Category:_Release_1[Category: Release 1] Category:_Task[Category: Task]
+Category:_EIS[Category: EIS]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Configuring_an_EIS_Mapping_(ELUG).adoc b/docs/docs.ug/src/main/asciidoc/core/Configuring_an_EIS_Mapping_(ELUG).adoc
new file mode 100644
index 00000000000..44f7b908bdc
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Configuring_an_EIS_Mapping_(ELUG).adoc
@@ -0,0 +1,298 @@
+image:Elug_draft_icon.png[Image:Elug draft
+icon.png,title="Image:Elug draft icon.png"] *For the latest EclipseLink
+documentation, please see
+http://www.eclipse.org/eclipselink/documentation/*
+
+'''''
+
+*TOC* Special:Whatlinkshere_Configuring_an_EIS_Mapping_(ELUG)[Related
+Topics]
+
+For information on how to create EclipseLink mappings, see
+link:Creating%20a%20Mapping%20(ELUG)#CBBHHHJC[Creating a Mapping].
+
+This table lists the types of EIS mappings that you can configure and
+provides a cross-reference to the type-specific chapter that lists the
+configurable options supported by that type.
+
+[#Table 74-1]##
+
+If you are creating…
+
+See…
+
+EIS direct mapping
+
+Configuring an EIS Direct Mapping
+
+EIS composite direct collection mapping
+
+Configuring an EIS Composite Direct Collection Mapping
+
+EIS composite object mapping
+
+Configuring an EIS Composite Object Mapping
+
+EIS composite collection mapping
+
+Configuring an EIS Composite Collection Mapping
+
+EIS one-to-one mapping
+
+Configuring an EIS One-to-One Mapping
+
+EIS one-to-many mapping
+
+Configuring an EIS One-to-Many Mapping
+
+EIS transformation mapping
+
+Configuring an EIS Transformation Mapping
+
+Fore more information, see the following:
+
+* link:Introduction%20to%20Mappings%20(ELUG)[Introduction to Mappings]
+* link:Introduction%20to%20EIS%20Mappings%20(ELUG)#EIS_Mapping_Types[EIS
+Mapping Types]
+* link:Configuring%20a%20Mapping%20(ELUG)#CEGFEFJG[Configuring a
+Mapping]
+
+== Configuring Common EIS Mapping Options
+
+This table lists the configurable options shared by two or more EIS
+mapping types. In addition to the configurable options described here,
+you must also configure the options described for the specific EIS
+mapping types (see
+link:Introduction%20to%20EIS%20Mappings%20(ELUG)#EIS_Mapping_Types[EIS
+Mapping Types]), as shown in the following table.
+
+[#Table 74-2]##
+
+Option to Configure
+
+Workbench
+
+Java
+
+Read-only
+
+Indirection (lazy loading)
+
+XPath
+
+Default null value
+
+Reference descriptors
+
+Configuring Method or Direct Field Accessing at the Mapping Level
+
+Private or independent relationships
+
+Comments
+
+Serialized object converter
+
+Type conversion converter
+
+Object type converter
+
+Simple type translator
+
+Container policy
+
+Selection interaction
+
+Use of a single node
+
+JAXB typesafe enumeration converter
+
+== Configuring Reference Descriptors
+
+In EIS mappings that extend
+`+org.eclipse.persistence.mappings.ForeignReferenceMapping+` or
+`+org.eclipse.persistence.mappings.AggregateMapping+` class, attributes
+reference other EclipseLink descriptors–not the data source. You can
+select a descriptor in the current project, or a descriptor from some
+other project.
+
+This table summarizes which EIS mappings support this option.
+
+[#Table 74-3]## *_Mapping Support for Reference Descriptor_*
+
+Mapping
+
+Using the Workbench
+
+Using Java
+
+Direct mapping
+
+Composite direct collection mapping
+
+Composite object mapping
+
+Composite collection mapping
+
+One-to-one mapping
+
+One-to-many mapping
+
+Transformation mapping
+
+=== How to Configure Reference Descriptors Using Workbench
+
+To specify a reference descriptor for an EIS mapping, use this
+procedure.
+
+[arabic]
+. Select the mapped attribute in the *Navigator*. Its properties appear
+in the Editor.
+. Click the *General* tab. The General tab appears.
+[#Figure 74-1]##*_General Tab, Reference Descriptor Field_*
+image:mpgenref.gif[General Tab, Reference Descriptor
+Field,title="General Tab, Reference Descriptor Field"]
+. Use the *Reference Descriptor* field to select the descriptor
+referenced by this relationship mapping.
+
+[width="100%",cols="<100%",]
+|===
+|*Note:* For one-to-one and one-to-many EIS mappings, the reference
+descriptor must be a root descriptor. See
+link:Configuring%20an%20EIS%20Descriptor%20(ELUG)#Configuring_an_EIS_Descriptor_as_a_Root_or_Composite_Type[Configuring
+an EIS Descriptor as a Root or Composite Type].
+|===
+
+You can specify a reference descriptor that is not in the current
+Workbench project. For example, to create a mapping to an `+Employee+`
+class that does not exist in the current project, do the following:
+
+[arabic]
+. Add the `+Employee+` class to your current project. See
+link:Creating%20a%20Project%20(ELUG)#Working_with_Projects[Working with
+Projects].
+. Create the relationship mapping to the `+Employee+` descriptor.
+. Deactivate the `+Employee+` descriptor. See
+link:Using%20Workbench%20(ELUG)#Active_and_Inactive_Descriptors[Active
+and Inactive Descriptors].
+
+When you generate the deployment XML for your project, the mapping to
+the `+Employee+` class will be included, but not the `+Employee+` class
+itself.
+
+== Configuring Selection Interaction
+
+In EIS mappings that extend
+`+org.eclipse.persistence.mappings.ForeignReferenceMapping+` class,
+EclipseLink uses a selection interaction to acquire the instance of the
+target object to which the mapping refers.
+
+By default, EclipseLink uses the read interaction you define for the
+mapping’s reference descriptor (see
+link:#Configuring_Reference_Descriptors[Configuring Reference
+Descriptors]). In most cases, this interaction is sufficient. If the
+reference descriptor’s read interaction is not sufficient, you can
+define a separate interaction.
+
+This table summarizes which EIS mappings support this option.
+
+[#Table 74-4]## *_Mapping Support for Selection Interaction_*
+
+Mapping
+
+Using the Workbench
+
+Using Java
+
+Direct mapping
+
+Composite direct collection mapping
+
+One-to-one mapping
+
+One-to-many mapping
+
+Composite object mapping
+
+Composite collection mapping
+
+Transformation mapping
+
+For more information about how EclipseLink uses the selection criteria,
+see
+link:Introduction%20to%20EIS%20Mappings%20(ELUG)#Reference_EIS_Mappings[Reference
+EIS Mappings].
+
+=== How to Configure Selection Interaction Using Workbench
+
+To specify the selection interaction (such as Read Object) for the EIS
+mapping, use this procedure:
+
+[arabic]
+. Select the one-to-many EIS mapping in the *Navigator*. Its properties
+appear in the Editor.
+. Click the *Selection Interaction* tab. The Selection Interaction tab
+appears. [#Figure 74-2 ]##*_Selection Interaction Tab_*
+image:selinter.gif[Selection Interaction
+Tab,title="Selection Interaction Tab"]
+. Complete each field on the tab.
+
+Use the following information to enter data in each field on the tab:
+
+Field
+
+Description
+
+Function Name
+
+The name of the EIS function that this call type (Read Object or Read
+All) invokes on the EIS.
+
+Input Record Name
+
+The name passed to the JCA adapter when creating the input record.
+
+Input Root Element Name
+
+The root element name to use for the input DOM.
+
+Input Arguments
+
+The query argument name to map to the interaction field or XPath nodes
+in the argument record. For example, if you are using XML records, use
+this option to map input argument name to the XPath name/first-name.
+
+Output Arguments
+
+The result record field or XPath nodes to map to the correct nodes in
+the record used by the descriptor’s mappings. For example, if you are
+using XML records, use this option to map the output fname to
+name/first-name.
+
+Output arguments are not required if the interaction returns an XML
+result that matches the descriptor’s mappings.
+
+Input Result Path
+
+Use this option if the EIS interaction expects the interaction arguments
+to be nested in the XML record. For example, specify arguments, if the
+arguments were to be nested under the root element exec-find-order, then
+under an arguments element.
+
+Output Result Path
+
+The name of the EIS function that this call type (Read Object or Read
+All) invokes on the EIS.
+
+Properties
+
+Any properties required by your EIS platform. For example, property name
+operation (from AQPlatform.QUEUE_OPERATION) and property value enqueue
+(from AQPlatform.ENQUEUE).
+
+'''''
+
+_link:EclipseLink_User's_Guide_Copyright_Statement[Copyright Statement]_
+
+Category:_EclipseLink_User's_Guide[Category: EclipseLink User’s Guide]
+Category:_Release_1[Category: Release 1] Category:_Task[Category: Task]
+Category:_EIS[Category: EIS]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Configuring_an_EIS_One-to-Many_Mapping_(ELUG).adoc b/docs/docs.ug/src/main/asciidoc/core/Configuring_an_EIS_One-to-Many_Mapping_(ELUG).adoc
new file mode 100644
index 00000000000..641414733dc
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Configuring_an_EIS_One-to-Many_Mapping_(ELUG).adoc
@@ -0,0 +1,198 @@
+*TOC*
+Special:Whatlinkshere_Configuring_an_EIS_One-to-Many_Mapping_(ELUG)[Related
+Topics]
+
+For information on how to create EclipseLink mappings, see
+link:Creating%20a%20Mapping%20(ELUG)#CBBHHHJC[Creating a Mapping].
+
+This table lists the configurable options for an EIS one-to-many
+mapping.
+
+[#Table 80-1]##
+
+Option to Configure
+
+Workbench
+
+Java
+
+Reference descriptors
+
+Foreign key pairs
+
+Bidirectional relationship
+
+Method or direct field access at the mapping level
+
+Read-only mappings
+
+Private or independent relationships
+
+Indirection (lazy loading)
+
+Container policy
+
+Mapping comments
+
+Selection interaction
+
+Delete all interactions
+
+For more information, see the following:
+
+* link:Introduction%20to%20EIS%20Mappings%20(ELUG)[EIS One-to-Many
+Mapping]
+* link:Configuring%20an%20EIS%20Mapping%20(ELUG)#CHDHFGAH[Configuring an
+EIS Mapping]
+* link:Configuring%20a%20Mapping%20(ELUG)#CEGFEFJG[Configuring a
+Mapping]
+
+== Configuring Foreign Key Pairs
+
+In a one-to-many EIS mapping, you relate a source object attribute to a
+target object attribute by specifying one or more pairs of source and
+target object fields.
+
+In a one-to-many EIS mapping with key on source (see
+link:Introduction%20to%20EIS%20Mappings%20(ELUG)#EIS_One-to-Many_Mappings_with_Key_on_Source[EIS
+One-to-Many Mappings with Key on Source]) using XML records, EclipseLink
+puts the target XML field value into the source object’s record as a
+simple value. By default, these values are not grouped, as this example
+shows.
+
+[#Example 80-1]## *_Source Object XML Record without Grouping_*
+
+`+ +``+Jane+` `+ +``+3+` `+ +``+4+`
+
+If you specify more than one source and target XML field pair, you must
+specify a grouping element, as this example shows.
+
+[#Example 80-2]## *_Source Object XML Record with Grouping_*
+
+`+ +``+Jane+`
+
+`+ +` `+ +``+3+` `+ +``+Project 3+` `+ +` `+ +`
+
+`+ +``+4+` `+ +``+Project 4+` `+ +`
+
+In a one-to-one EIS mapping with key on target (see
+link:Introduction%20to%20EIS%20Mappings%20(ELUG)#EIS_One-to-Many_Mappings_with_Key_on_Target[EIS
+One-to-Many Mappings with Key on Target]) using XML records, EclipseLink
+uses the source XML field value in the selection interaction to acquire
+the appropriate instances of target object.
+
+=== How to Configure Foreign Key Pairs Using Workbench
+
+To specify the source and target XML field pairs for a one-to-many EIS
+mapping, use this procedure:
+
+[arabic]
+. Select the one-to-one EIS mapping in the *Navigator*. Its properties
+appear in the Editor.
+. Click the *General* tab. The General tab appears.
+[#Figure 80-1]##*_Foreign Keys Field on General Tab_*
+image:onemeisfk.gif[Foreign Keys Field on General
+Tab,title="Foreign Keys Field on General Tab"]
+. Complete the Foreign Keys fields on the General tab.
+
+Use the following information to complete the Foreign Keys fields on the
+*General* tab:
+
+Field
+
+Description
+
+Foreign Keys Located On Target
+
+Select if you are creating a one-to-many EIS mapping with key on target
+(see EIS One-to-Many Mappings with Key on Target).
+
+Foreign Keys Located On Source
+
+Select if you are creating a one-to-many EIS mapping with key on source
+(see EIS One-to-Many Mappings with Key on Source).
+
+Grouping Element
+
+Specify the element in which foreign key pairs are grouped in the source
+object’s EIS record. If you specify only one pair of source and target
+XML fields, this is optional.
+
+If you specify more than one pair of source and target XML fields, this
+is required.
+
+Field Pairs
+
+Click Add to add a pair of source and target XML fields. Specify Field
+Pair dialog box opens. Click Browse to add a foreign key for the Source
+XPath and Target XPath fields.
+
+== Configuring Delete All Interactions
+
+The EclipseLink query and expression framework supports delete all
+queries. If your JCA adapter provides access to an EIS Delete All
+function, you can configure a delete all interaction to support
+EclipseLink delete all queries.
+
+=== How to Configure Delete All Interactions Using Workbench
+
+To specify the DeleteAll interaction for an EIS one-to-many mapping, use
+this procedure:
+
+[arabic]
+. Select the mapped attribute in the *Navigator*. Its properties appear
+in the Editor.
+. Click the *Delete All Interaction* tab. The Delete All Interaction tab
+appears.[#Figure 80-2]## *_Delete All Interaction Tab_*
+image:deletealltab.gif[Delete All Interaction
+Tab,title="Delete All Interaction Tab"]
+. Complete the fields on the Delete All Interaction tab.
+
+Use the following information to enter data in each field on the Delete
+All Interaction tab:
+
+[width="100%",cols="<8%,<92%",options="header",]
+|===
+|*Field* |*Description*
+|*Function Name* |The name of the EIS function that this call type (Read
+Object or Read All) invokes on the EIS.
+
+|*Input Record Name* |The name passed to the JCA adapter when creating
+the input record.
+
+|*Input Root Element Name* |The root element name to use for the input
+DOM.
+
+|*Input Arguments* |The query argument name to map to the interaction
+field or XPath nodes in the argument record. For example, if you are
+using XML records, use this option to map input argument `+name+` to the
+XPath `+name/first-name+`.
+
+|*Output Arguments* |The result record field or XPath nodes to map to
+the correct nodes in the record used by the descriptor’s mappings. For
+example, if you are using XML records, use this option to map the output
+`+fname+` to `+name/first-name+`.Output arguments are not required if
+the interaction returns an XML result that matches the descriptor’s
+mappings.
+
+|*Input Result Path* |Use this option if the EIS interaction expects the
+interaction arguments to be nested in the XML record. For example,
+specify `+arguments+`, if the arguments were to be nested under the root
+element `+exec-find-order+`, then under an `+arguments+` element.
+
+|*Output Result Path* |The name of the EIS function that this call type
+(Read Object or Read All) invokes on the EIS.
+
+|*Properties* |Any properties required by your EIS platform. For
+example, property name `+operation+` (from
+`+AQPlatform.QUEUE_OPERATION+`) and property value `+enqueue+` (from
+`+AQPlatform.ENQUEUE+`).
+|===
+
+'''''
+
+_link:EclipseLink_User's_Guide_Copyright_Statement[Copyright Statement]_
+
+Category:_EclipseLink_User's_Guide[Category: EclipseLink User’s Guide]
+Category:_Release_1[Category: Release 1] Category:_Task[Category: Task]
+Category:_EIS[Category: EIS]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Configuring_an_EIS_One-to-One_Mapping_(ELUG).adoc b/docs/docs.ug/src/main/asciidoc/core/Configuring_an_EIS_One-to-One_Mapping_(ELUG).adoc
new file mode 100644
index 00000000000..f259f59ee35
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Configuring_an_EIS_One-to-One_Mapping_(ELUG).adoc
@@ -0,0 +1,88 @@
+*TOC*
+Special:Whatlinkshere_Configuring_an_EIS_One-to-One_Mapping_(ELUG)[Related
+Topics]
+
+For information on how to create EclipseLink mappings, see
+link:Creating%20a%20Mapping%20(ELUG)#CBBHHHJC[Creating a Mapping].
+
+This table lists the configurable options for an EIS one-to-one mapping.
+
+[#Table 79-1]##
+
+Option to Configure
+
+Workbench
+
+Java
+
+Reference descriptors
+
+Foreign key pairs
+
+Bidirectional relationship
+
+Method or direct field access at the mapping level
+
+Read-only mappings
+
+Private or independent relationships
+
+Indirection (lazy loading)
+
+Mapping comments
+
+Selection interaction
+
+For more information, see the following:
+
+* link:Introduction%20to%20EIS%20Mappings%20(ELUG)#EIS_One-to-One_Mapping[EIS
+One-to-One Mapping]
+* link:Configuring%20an%20EIS%20Mapping%20(ELUG)#CHDHFGAH[Configuring an
+EIS Mapping]
+* link:Configuring%20a%20Mapping%20(ELUG)#CEGFEFJG[Configuring a
+Mapping]
+
+== Configuring Foreign Key Pairs
+
+In a one-to-one EIS mapping, you relate a source object attribute to a
+target object attribute by specifying one or more pairs of source and
+target object fields.
+
+In a one-to-one EIS mapping with key on source (see
+link:Introduction%20to%20EIS%20Mappings%20(ELUG)#EIS_One-to-One_Mappings_with_Key_on_Source[EIS
+One-to-One Mappings with Key on Source]) using XML records, EclipseLink
+puts the target XML field value into the source object’s record as a
+simple value.
+
+In a one-to-one EIS mapping with key on target (see
+link:Introduction%20to%20EIS%20Mappings%20(ELUG)#EIS_One-to-One_Mappings_with_Key_on_Target[EIS
+One-to-One Mappings with Key on Target]) using XML records, EclipseLink
+uses the source XML field value in the selection interaction to acquire
+the appropriate instance of target object.
+
+=== How to Configure Foreign Key Pairs Using Workbench
+
+To specify the source and target XML field pairs for a one-to-one EIS
+mapping, use this procedure:
+
+[arabic]
+. Select the one-to-one EIS mapping in the *Navigator*. Its properties
+appear in the Editor.
+. Click the *General* tab. The General tab opens.
+[#Figure 79-1]##*_General Tab, Foreign Keys Field_*
+image:onetoone_eis_fk.gif[General Tab, Foreign Keys
+Field,title="General Tab, Foreign Keys Field"]
+. Click *Add* in the Foreign Keys area to add a key pair. The Specify
+Field Pair dialog box appears. [#Figure 79-2]##*_Specify Field Pair
+Dialog Box_* image:spfldpr.gif[Specify Field Pair Dialog
+Box,title="Specify Field Pair Dialog Box"]
+. Click *Browse* to add a foreign key for the *Source XPath* and *Target
+XPath* fields.
+
+'''''
+
+_link:EclipseLink_User's_Guide_Copyright_Statement[Copyright Statement]_
+
+Category:_EclipseLink_User's_Guide[Category: EclipseLink User’s Guide]
+Category:_Release_1[Category: Release 1] Category:_Task[Category: Task]
+Category:_EIS[Category: EIS]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Configuring_an_EIS_Project_(ELUG).adoc b/docs/docs.ug/src/main/asciidoc/core/Configuring_an_EIS_Project_(ELUG).adoc
new file mode 100644
index 00000000000..6420d17f86d
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Configuring_an_EIS_Project_(ELUG).adoc
@@ -0,0 +1,168 @@
+image:Elug_draft_icon.png[Image:Elug draft
+icon.png,title="Image:Elug draft icon.png"] *For the latest EclipseLink
+documentation, please see
+http://www.eclipse.org/eclipselink/documentation/*
+
+'''''
+
+*TOC* Special:Whatlinkshere_Configuring_an_EIS_Project_(ELUG)[Related
+Topics]
+
+This section describes the various components that you must configure in
+order to use an EIS project.
+
+For information on how to create EIS projects, see
+link:Creating%20an%20EIS%20Project%20(ELUG)[Creating an EIS Project].
+
+This table lists the configurable options for EIS projects.
+
+[#Table 69-1]##
+
+Option to Configure
+
+EclipseLink Workbench
+
+Java
+
+Configuring Project Save Location
+
+Configuring Project Classpath
+
+Configuring Project Comments
+
+Configuring Method or Direct Field Access at the Project Level
+
+Configuring Default Descriptor Advanced Properties
+
+Configuring Existence Checking at the Project Level
+
+Configuring Project Deployment XML Options
+
+Configuring Model Java Source Code Options
+
+Configuring EIS Data Source Platform at the Project Level
+
+Configuring EIS Connection Specification Options at the Project Level
+
+Configuring XML Parser Platform
+
+How to Import an XML Schema
+
+How to Configure XML Schema Namespace
+
+Configuring Cache Type and Size at the Project Level
+
+Configuring Cache Isolation at the Project Level
+
+Configuring Cache Coordination Change Propagation at the Project Level
+
+Configuring Cache Expiration at the Project Level
+
+For more information, see
+link:Introduction%20to%20EIS%20Projects%20(ELUG)[Introduction to EIS
+Projects].
+
+== Configuring EIS Data Source Platform at the Project Level
+
+For each EIS project, you must specify one of the following JCA data
+source platforms that you will be using:
+
+* Oracle AQ
+* Attunity Connect
+* IBM MQSeries
+
+This platform configuration is overridden by the session login, if
+configured.
+
+For more information, see the following:
+
+* link:Configuring%20an%20EIS%20Login%20(ELUG)#Configuring_an_EIS_Data_Source_Platform_at_the_Session_Level[Configuring
+an EIS Data Source Platform at the Session Level]
+* link:Introduction%20to%20Data%20Access%20(ELUG)#Data_Source_Platform_Types[Data
+Source Platform Types]
+
+=== How to Configure EIS Data Source Platform at the Project Level Using Workbench
+
+To specify the data source platform of an EIS project, use this
+procedure:
+
+[arabic]
+. Select an EIS project object in the *Navigator*.
+. Select the *Connection Specifications* tab in the *Editor*. The
+Connection Specifications tab appears.
+. Select the *Connection* tab. The Connection tab appears.
+[#Figure 69-1]##*_Connection Tab, Platform Option_*
+image:eispplat.gif[Connection Tab, Platform
+Option,title="Connection Tab, Platform Option"]
+. Select the EIS platform for this project from the list of options. For
+more information, see
+link:Introduction%20to%20Data%20Access%20(ELUG)#Data_Source_Platform_Types[Data
+Source Platform Types].
+
+== Configuring EIS Connection Specification Options at the Project Level
+
+You can configure connection information at the project level for an EIS
+application. This information is stored in the `+project.xml+` file. The
+EclipseLink runtime uses this information as its deployment login:
+whenever your EIS application performs a persistence operation when
+deployed in a Java EE application server.
+
+This connection configuration is overridden by the connection
+information at the session level, if configured. For more information
+about session level configuration, see
+link:Configuring%20an%20EIS%20Login%20(ELUG)#Configuring_EIS_Connection_Specification_Options_at_the_Session_Level[Configuring
+EIS Connection Specification Options at the Session Level].
+
+=== How to Configure EIS Connection Specification Options at the Project Level Using Workbench
+
+To specify the connection information for an EIS project, use this
+procedure.
+
+[arabic]
+. Select an EIS project object in the *Navigator*.
+. Select the *Connection Specifications* tab in the *Editor*. The
+Connection Specifications tab appears.
+. Select the *Connection* tab. The Connection tab appears.
+[#Figure 69-2]##*_Connection Tab, Connection Specification Options_*
+image:eispcsc.gif[Connection Tab, Connection Specification
+Options,title="Connection Tab, Connection Specification Options"]
+. Complete the fields on the Connection tab.
+
+Use this table to enter data in the following fields to configure the
+connection specification options:
+
+[width="100%",cols="<7%,<93%",options="header",]
+|===
+|*Field* |*Description*
+|*Connection Specification Class* |Specify the appropriate connection
+specification class for the selected *Platform*. Click *Browse* to
+choose from all the classes in the EclipseLink class path. (example: if
+*Platform* is `+org.eclipse.persistence.eis.aq.AQPlatform+`, use
+`+org.eclipse.persistence.eis.aq.AQEISConnectionSpec+`). For more
+information on platform configuration, see
+link:Configuring%20an%20EIS%20Login%20(ELUG)#Configuring_an_EIS_Data_Source_Platform_at_the_Session_Level[Configuring
+an EIS Data Source Platform at the Session Level].
+
+|*Connection Factory URL* |Specify the appropriate connection factory
+URL (as a Java EE JNDI name) for the selected *Connection Specification
+Class* (example: `+java:comp/env/eis/attuntiy+`).
+
+|*Username* |Specify the name required to log in to the data source.
+
+|*Password* |Specify the password required to log in to the data source.
+*Note:* When exporting Java source and deployment XML (see
+link:Creating%20a%20Project%20(ELUG)#Exporting_Project_Information[Exporting
+Project Information]), Workbench writes the database password (if
+applicable) using JCE encryption (when using JDK 1.4). For information
+on how to specify password encryption options, see
+link:Configuring%20a%20Data%20Source%20Login%20(ELUG)#Configuring_Password_Encryption[Configuring
+Password Encryption].
+|===
+
+'''''
+
+_link:EclipseLink_User's_Guide_Copyright_Statement[Copyright Statement]_
+
+Category:_EclipseLink_User's_Guide[Category: EclipseLink User’s Guide]
+Category:_Release_1[Category: Release 1] Category:_Task[Category: Task]
+Category:_EIS[Category: EIS]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Configuring_an_EIS_Transformation_Mapping_(ELUG).adoc b/docs/docs.ug/src/main/asciidoc/core/Configuring_an_EIS_Transformation_Mapping_(ELUG).adoc
new file mode 100644
index 00000000000..bb633d50f3b
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Configuring_an_EIS_Transformation_Mapping_(ELUG).adoc
@@ -0,0 +1,46 @@
+*TOC*
+Special:Whatlinkshere_Configuring_an_EIS_Transformation_Mapping_(ELUG)[Related
+Topics]
+
+For information on how to create EclipseLink mappings, see
+link:Creating%20a%20Mapping%20(ELUG)[Creating a Mapping].
+
+This table lists the configurable options for an EIS transformation
+mapping.
+
+[#Table 81-1]##
+
+Option to Configure
+
+Workbench
+
+Java
+
+Attribute transformer
+
+Field transformer associations
+
+Method or direct field access at the mapping level
+
+Read-only mappings
+
+Mutable mappings
+
+Mapping comments
+
+For more information, see the following:
+
+* link:Introduction%20to%20EIS%20Mappings%20(ELUG)#EIS_Transformation_Mapping[EIS
+Transformation Mapping]
+* link:Configuring%20an%20EIS%20Mapping%20(ELUG)[Configuring an EIS
+Mapping]
+* link:Configuring%20a%20Mapping%20(ELUG)#CEGFEFJG[Configuring a
+Mapping]
+
+'''''
+
+_link:EclipseLink_User's_Guide_Copyright_Statement[Copyright Statement]_
+
+Category:_EclipseLink_User's_Guide[Category: EclipseLink User’s Guide]
+Category:_Release_1[Category: Release 1] Category:_Task[Category: Task]
+Category:_EIS[Category: EIS]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Configuring_an_Internal_Connection_Pool_(ELUG).adoc b/docs/docs.ug/src/main/asciidoc/core/Configuring_an_Internal_Connection_Pool_(ELUG).adoc
new file mode 100644
index 00000000000..6af2fdc9663
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Configuring_an_Internal_Connection_Pool_(ELUG).adoc
@@ -0,0 +1,372 @@
+image:Elug_draft_icon.png[Image:Elug draft
+icon.png,title="Image:Elug draft icon.png"] *For the latest EclipseLink
+documentation, please see
+http://www.eclipse.org/eclipselink/documentation/*
+
+'''''
+
+*TOC*
+Special:Whatlinkshere_Configuring_an_Internal_Connection_Pool_(ELUG)[Related
+Topics]
+
+When you are using server sessions, you can configure the *default read
+connection pool* and *write connection pool*. You can also configure the
+optional *named connection pools* and *sequence connection pools* you
+may have created (see
+link:Creating%20an%20Internal%20Connection%20Pool%20(ELUG)#Introduction_to_the_Internal_Connection_Pool_Creation[Introduction
+to the Internal Connection Pool Creation]).
+
+[#Table 97-1]## *_Configurable Options for Connection Pools_*
+
+[width="100%",cols="<60%,<20%,<20%",options="header",]
+|===
+|*Option to Configure* |*Workbench* |*Java*
+|link:#Configuring_Connection_Pool_Sizes[Connection pool sizes]
+|image:support.gif[Supported.,title="Supported."]
+|image:support.gif[Supported.,title="Supported."]
+
+|link:#Configuring_Exclusive_Read_Connections[Exclusive read
+connections] 1 |image:support.gif[Supported.,title="Supported."]
+|image:support.gif[Supported.,title="Supported."]
+
+|link:#Configuring_a_Nontransactional_Read_Login[Nontransactional read
+login]1 |image:support.gif[Supported.,title="Supported."]
+|image:support.gif[Supported.,title="Supported."]
+
+|link:#Configuring_Properties[Properties]
+|image:support.gif[Supported.,title="Supported."]
+|image:support.gif[Supported.,title="Supported."]
+
+|link:#Configuring_Connection_Pool_Connection_Options[Connection pool
+connection options] 2, 3
+|image:support.gif[Supported.,title="Supported."]
+|image:support.gif[Supported.,title="Supported."]
+|===
+
+1Read connection pools only. 2Not applicable to write connection pools.
+2Available for sequence connection pools.
+
+== Configuring Connection Pool Sizes
+
+By default, if using EclipseLink internal connection pooling, the
+EclipseLink write connection pool maintains a minimum of five
+connections and a maximum of ten. The read connection pool maintains a
+minimum and maximum of two connections.
+
+Connection pool size can significantly influence the concurrency of your
+application and should be set to be large enough to handle your expected
+application load.
+
+[width="100%",cols="<100%",]
+|===
+|*Tip*: To maintain compatibility with JDBC drivers that do not support
+many connections, the default number of connections is small. If your
+JDBC driver supports it, use a larger number of connections for reading
+and writing.
+|===
+
+The smallest value you can enter is 0. Setting the maximum number of
+connections to 0 will make it impossible for EclipseLink to allocate any
+connections.
+
+The minimum number of connections should always be less than or equal to
+the maximum number of connections.
+
+If the maximum number of connections is in use, the next connection
+request will be blocked until a connection is available.
+
+=== How to Configure Connection Pool Size Using Workbench
+
+To specify the minimum and maximum number of connections in an
+EclipseLink internal connection pool, use this procedure:
+
+[arabic]
+. Expand a server session to reveal its connection pools in the
+*Navigator*.
+. Select a connection pool in the *Navigator*. Its properties appear in
+the Editor.
+. Click the *General* tab. The General tab appears.
+[#Figure 97-1]##*_General Tab, Connection Count Options_*
+image:cpcount.gif[General Tab, Connection Count
+Options,title="General Tab, Connection Count Options"]
+
+Enter the desired minimum and maximum number of connections and press
+*Enter* or use the increment and decrement arrows.
+
+For more information, see the following:
+
+* link:#Configuring_Connection_Pool_Sizes[Configuring Connection Pool
+Sizes]
+* link:Configuring%20a%20Session%20(ELUG)#Configuring_Common_Session_Options[Configuring
+Common Session Options]
+
+== Configuring Properties
+
+For all connection pools, except write connection pools, you can specify
+arbitrary named values, called properties.
+
+Some data sources require additional, driver-specific properties not
+supported in the `+ConnectionPool+` API. Add these properties to the
+`+ConnectionPool+` so that EclipseLink can pass them to the driver.
+
+=== How to Configure Properties Using Workbench
+
+To specify arbitrary named value pairs that EclipseLink associates with
+a `+ConnectionPool+`, use this procedure:
+
+[arabic]
+. Expand a server session to reveal its connection pools in the
+*Navigator*.
+. Select a read, named, or sequence connection pool in the *Navigator*.
+Its properties appear in the Editor.
+. Click the *Login* tab. The Login tab appears.
+. Click the *Properties* subtab. The Properties subtab appears.
+[#Figure 97-2]##*_Login Tab, Properties Subtab_* image:cpprop.gif[Login
+Tab, Properties Subtab,title="Login Tab, Properties Subtab"]
+. You can add, edit, or remove properties using Add Property dialog box
+that appears upon clicking Add, Edit or Remove.
+
+Complete the *Add Property* dialog box.
+
+Use the following information to add or edit a login property on the Add
+Property dialog box to add or edit a login property:
+
+[width="100%",cols="<6%,<94%",options="header",]
+|===
+|*Option* |*Description*
+|*Name* |The name by which EclipseLink retrieves the property value
+using the `+DatasourceLogin+` method `+getProperty+`.
+
+|*Value* |The value EclipseLink retrieves using the `+DatasourceLogin+`
+method `+getProperty+` passing in the corresponding property name. Using
+Workbench, you can set only character values which EclipseLink returns
+as `+String+` objects.
+|===
+
+To add (or change) a new *Name*/*Value* property, click *Add* (or
+*Edit*).
+
+To delete an existing property, select the *Name*/*Value* row and click
+*Remove*.
+
+For more information, see link:#Configuring_Properties[Configuring
+Properties]
+
+=== How to Configure Properties Using Java
+
+Using Java, you can set any `+Object+` value using the
+`+DatasourceLogin+` method `+setProperty+`. To remove a property, use
+the `+DatasourceLogin+` method `+removeProperty+`.
+
+== Configuring a Nontransactional Read Login
+
+When you use an external transaction controller (see
+link:Configuring%20a%20Session%20(ELUG)#Configuring_the_Server_Platform[Configuring
+the Server Platform]), establishing a connection requires not only the
+usual connection setup overhead, but also transactional overhead. If
+your application reads data only to display it and only infrequently
+modifies data, you can configure an internal read connection pool to use
+its own connection specification that does not use the external
+transaction controller. This may improve performance by reducing the
+time it takes to establish a new read connection.
+
+=== How to Configure Nontransactional Read Login Using Workbench
+
+To enable the configuration of nontransactional connection information
+for an EclipseLink read connection pool, use this procedure:
+
+[arabic]
+. Expand a server session to reveal its connection pools in the
+*Navigator*.
+. Select a read connection pool in the *Navigator*. Its properties
+appear in the Editor.
+. Click the *Login* tab. The Login tab appears.
+. Click the *Connection* subtab. The Connection subtab appears.
+[#Figure 97-3]## *_Login Tab, Connection Subtab_*
+image:cpnontrn.gif[Login Tab, Connection
+Subtab,title="Login Tab, Connection Subtab"]
+
+To enable a nontransactional read login, select the *Use
+Non-Transactional Read Login* option (see
+link:Introduction%20to%20Data%20Access%20(ELUG)#Externally_Managed_Transactional_Data_Sources[Externally
+Managed Transactional Data Sources]). Continue with
+link:#Configuring_Connection_Pool_Connection_Options[Configuring
+Connection Pool Connection Options] to specify the connection
+information.
+
+For more information, see
+link:#Configuring_a_Nontransactional_Read_Login[Configuring a
+Nontransactional Read Login].
+
+=== How to Configure Nontransactional Read Login Using Java
+
+Use the `+getLogin+` method of your connection pool to obtain a
+`+DatabaseLogin+`, and then use the following `+DatabaseLogin+` methods
+to configure the nontransactional read login options:
+
+* `+useExternalTransactionController+`
+* `+setDriverClass+`
+* `+setDriverClassName+`
+* `+setDriverURLHeader+`
+
+== Configuring Connection Pool Connection Options
+
+By default, connection pools use the login configuration specified for
+their session (see
+link:Configuring%20a%20Database%20Login%20(ELUG)#Configuring_Database_Login_Connection_Options[Configuring
+Database Login Connection Options] and
+link:Configuring%20an%20EIS%20Login%20(ELUG)#Configuring_EIS_Connection_Specification_Options_at_the_Session_Level[Configuring
+EIS Connection Specification Options at the Session Level]).
+
+For read, named, and sequence connection pools, you can override the
+session login configuration on a per-connection pool basis.
+
+To configure login configuration for a read connection pool, you must
+first enable it for link:#Configuring_a_Nontransactional_Read_Login[a
+nontransactional read login]).
+
+=== How to Configure Connection Pool Connection Options Using Workbench
+
+To configure connection information for an EclipseLink read, named, or
+sequence connection pool, use this procedure:
+
+[arabic]
+. Expand a server session to reveal its connection pools in the
+*Navigator*.
+. Select a read, named, or sequence connection pool in the *Navigator*.
+Its properties appear in the Editor.
+. Click the *Login* tab. The Login tab appears.
+. Click the *Connection* subtab. The Connection subtab appears.
+[#Figure 97-4]##*_Login Tab, Connection Subtab, Relational Session
+Connection Pool Options_* image:cpcon.gif[Login Tab, Connection Subtab,
+Relational Session Connection Pool
+Options,title="Login Tab, Connection Subtab, Relational Session Connection Pool Options"]
+[#Figure 97-5]##*** Login Tab, Connection Subtab, EIS Session Connection
+Pool Options*** image:cpconeis.gif[Login Tab, Connection Subtab, EIS
+Session Connection Pool
+Options,title="Login Tab, Connection Subtab, EIS Session Connection Pool Options"]
+. Ensure the *Use Non-Transaction Read Login* option is selected.
+. Complete each field on the Connection tab.
+
+Use the following information to complete fields on the Connection
+subtab:
+
+Field
+
+Description
+
+Database Driver1
+
+Specify the appropriate database driver:
+
+Driver Manager: Specify this option to configure the driver class and
+URL used to connect to the database. In this case, you must configure
+the Driver Class and Driver URL fields.
+
+J2EE Datasource: Specify this option to use a Java EE data source
+already configured on your target application server. In this case, you
+must configure the Datasource Name field.
+
+Note: If you select J2EE Datasource, you must use external connection
+pooling. You cannot use internal connection pools with this Database
+Driver option (for more information, see Configuring External Connection
+Pooling).
+
+Driver Class1
+
+Configure this field when Database Driver is set to Driver Manager.
+Select from the menu of options. This menu includes all JDBC drivers in
+the EclipseLink application classpath.
+
+URL1
+
+Configure this field when Database Driver is set to Driver Manager.
+Select from the menu of options relevant to the selected Driver Class
+and edit the URL to suit your data source.
+
+Datasource Name1
+
+Configure this field when Database Driver is set to J2EE Datasource.
+Specify any valid JNDI name that identifies the Java EE data source
+preconfigured on your target application server (For example:
+jdbc/EmployeeDB). By convention, all such names should resolve to the
+JDBC subcontext (relative to the standard java:comp/env naming context
+that is the root of all provided resource factories).
+
+Connection Specification Class2
+
+Specify the appropriate connection specification class for the selected
+Platform. Click Browse to choose from all the classes in the EclipseLink
+classpath. (For example: if Platform is
+org.eclipse.persistence.eis.aq.AQPlatform, use
+org.eclipse.persistence.eis.aq.AQEISConnectionSpec). For more
+information on platform configuration, see Configuring an EIS Data
+Source Platform at the Session Level.
+
+Connection Factory URL2
+
+Specify the appropriate connection factory URL for the selected
+Connection Specification Class (For example:
+jdbc:oracle:thin@:localhost:1521:orcl).
+
+1For sessions that contain a `+DatabaseLogin+`. 2For sessions that
+contain an `+EISLogin+`.
+
+For more information, see
+link:#Configuring_Connection_Pool_Connection_Options[Configuring
+Connection Pool Connection Options]
+
+== Configuring Exclusive Read Connections
+
+An exclusive connection is one that EclipseLink allocates specifically
+to a given session and one that is never used by any other session.
+
+Allowing concurrent reads on the same connection reduces the number of
+read connections required and reduces the risk of having to wait for an
+available connection. However, many JDBC drivers do not support
+concurrent reads.
+
+If you are using
+link:Introduction%20to%20Data%20Access%20(ELUG)#Internal_Connection_Pools[Internal
+Connection Pools], you can configure EclipseLink to acquire an exclusive
+connection from the read connection pool.
+
+By default, EclipseLink acquires exclusive read connections.
+
+If you are using external connection pools, read connections are always
+exclusive.
+
+=== How to Configure Exclusive Read Connections Using Workbench
+
+To configure an EclipseLink read connection pool to allocate exclusive
+connections, use this procedure:
+
+[arabic]
+. Expand a server session to reveal its connection pools in the
+*Navigator*.
+. Select a read connection pool in the *Navigator*. Its properties
+appear in the Editor.
+. Click the *Login* tab. The Login tab appears.
+. Click the *Connection* subtab. The Connection subtab appears.
+[#Figure 97-6]##*_Login Tab, Connection Subtab, Exclusive Connections
+Option_* image:exclus.gif[Login Tab, Connection Subtab, Exclusive
+Connections
+Option,title="Login Tab, Connection Subtab, Exclusive Connections Option"]
+
+Select the *Exclusive Connections* option to configure EclipseLink to
+acquire an exclusive connection from the read connection pool.
+
+Deselect the *Exclusive Connections* option to configure EclipseLink to
+share read connections and allow concurrent reads. Before selecting this
+option, ensure that your JDBC driver supports concurrent reads.
+
+For more information, see
+link:#Configuring_Exclusive_Read_Connections[Configuring Exclusive Read
+Connections]
+
+'''''
+
+_link:EclipseLink_User's_Guide_Copyright_Statement[Copyright Statement]_
+
+Category:_EclipseLink_User's_Guide[Category: EclipseLink User’s Guide]
+Category:_Release_1[Category: Release 1] Category:_Task[Category: Task]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Configuring_an_Object-Relational_Data_Type_Array_Mapping_(ELUG).adoc b/docs/docs.ug/src/main/asciidoc/core/Configuring_an_Object-Relational_Data_Type_Array_Mapping_(ELUG).adoc
new file mode 100644
index 00000000000..102ffddf0ef
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Configuring_an_Object-Relational_Data_Type_Array_Mapping_(ELUG).adoc
@@ -0,0 +1,84 @@
+*TOC*
+Special:Whatlinkshere_Configuring_an_Object-Relational_Data_Type_Array_Mapping_(ELUG)[Related
+Topics]
+
+For information on how to create EclipseLink mappings, see
+link:Creating%20a%20Mapping%20(ELUG)[Creating a Mapping].
+
+[width="100%",cols="<100%",]
+|===
+|*Note:* To map a collection of aggregate structures, use an
+object-relational data type object array mapping (see
+link:Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG)#Object-Relational_Data_Type_Object_Array_Mapping[Object-Relational
+Data Type Object Array Mapping]). To store information in a separate
+table from the parent structure’s table, use an object-relational data
+type nested table mapping (see
+link:Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG)#Object-Relational_Data_Type_Nested_Table_Mapping[Object-Relational
+Data Type Nested Table Mapping]).
+|===
+
+This table lists the configurable options for an object-relational data
+type array mapping.
+
+[#Table 48-1]##
+
+[width="100%",cols="<70%,<16%,<14%",options="header",]
+|===
+|*Option to Configure* |*Workbench* |*Java*
+|link:Configuring%20an%20Object-Relational%20Data%20Type%20Mapping_(ELUG)#Configuring_Attribute_Name[Configuring
+Attribute Name] |image:unsupport.gif[Unsupported,title="Unsupported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20an%20Object-Relational%20Data%20Type%20Mapping_(ELUG)#Configuring_Field_Name[Configuring
+Field Name] |image:unsupport.gif[Unsupported,title="Unsupported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20an%20Object-Relational%20Data%20Type%20Mapping_(ELUG)#Configuring_Structure_Name[Configuring
+Structure Name] |image:unsupport.gif[Unsupported,title="Unsupported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Read-Only_Mappings[Configuring
+Read-Only Mappings]
+|image:unsupport.gif[Unsupported,title="Unsupported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Method_or_Direct_Field_Accessing_at_the_Mapping_Level[Configuring
+Method or Direct Field Accessing at the Mapping Level]
+|image:unsupport.gif[Unsupported,title="Unsupported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_a_Serialized_Object_Converter[Configuring
+a Serialized Object Converter]
+|image:unsupport.gif[Unsupported,title="Unsupported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_a_Type_Conversion_Converter[Configuring
+a Type Conversion Converter]
+|image:unsupport.gif[Unsupported,title="Unsupported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_an_Object_Type_Converter[Configuring
+an Object Type Converter]
+|image:unsupport.gif[Unsupported,title="Unsupported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Container_Policy[Configuring
+Container Policy] |image:unsupport.gif[Unsupported,title="Unsupported"]
+|image:support.gif[Supported,title="Supported"]
+|===
+
+For more information, see the following:
+
+* link:Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG)#Object-Relational_Data_Type_Array_Mapping[Object-Relational
+Data Type Array Mapping]
+* link:Configuring%20an%20Object-Relational%20Data%20Type%20Mapping_(ELUG)[Configuring
+an Object-Relational Data Type Mapping]
+* link:Configuring%20a%20Mapping_(ELUG)[Configuring a Mapping]
+
+'''''
+
+_link:EclipseLink_User's_Guide_Copyright_Statement[Copyright Statement]_
+
+Category:_EclipseLink_User's_Guide[Category: EclipseLink User’s Guide]
+Category:_Release_1[Category: Release 1] Category:_Task[Category: Task]
+Category:_ORM[Category: ORM]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Configuring_an_Object-Relational_Data_Type_Descriptor_(ELUG).adoc b/docs/docs.ug/src/main/asciidoc/core/Configuring_an_Object-Relational_Data_Type_Descriptor_(ELUG).adoc
new file mode 100644
index 00000000000..ce003ef7bff
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Configuring_an_Object-Relational_Data_Type_Descriptor_(ELUG).adoc
@@ -0,0 +1,95 @@
+*TOC*
+Special:Whatlinkshere_Configuring_an_Object-Relational_Data_Type_Descriptor_(ELUG)[Related
+Topics]
+
+For information on how to create object-relational data type
+descriptors, see
+link:Creating%20an%20Object-Relational%20Data%20Type%20Descriptor%20(ELUG)[Creating
+an Object-Relational Data Type Descriptor].
+
+This table lists the configurable options for an object-relational data
+type descriptor.
+
+[#Table 31-1]##
+
+Option to Configure
+
+EclipseLink Workbench
+
+Java
+
+Field ordering
+
+Primary keys
+
+Read-only descriptors
+
+Unit of work conforming
+
+Query keys
+
+Cache expiration
+
+Amendment methods
+
+Reading subclasses on queries
+
+Inheritance for a child class descriptor
+
+Inheritance for a parent class descriptor
+
+Inheritance expressions for a parent class descriptor
+
+Inherited attribute mapping in a subclass
+
+Cache type and size
+
+Domain object method as an event handler
+
+Descriptor event listener as an event handler
+
+Locking policy
+
+Copy policy
+
+Instantiation policy
+
+Wrapper policy
+
+History policy
+
+Returning policy
+
+For more information, see
+link:Introduction%20to%20Relational%20Descriptors%20(ELUG)[Introduction
+to Relational Descriptors].
+
+== Configuring Field Ordering
+
+If your object-relational data type data source driver uses JDBC indexed
+arrays, you can specify the order in which EclipseLink persists object
+attributes to define the field index.
+
+=== How to Configure Field Ordering Using Java
+
+Use `+ObjectRelationalDescriptor+` method `+addFieldOrdering+` to
+specify the field ordering. This example shows how to specify the order
+of the object-relational data type database fields `+OBJECT_ID+`,
+`+F_NAME+`, and `+L_NAME+` for the `+Employee+` descriptor.
+
+[#Example 31-1]## *_Field Ordering_*
+
+[source,java]
+----
+ descriptor.addFieldOrdering("ID");
+ descriptor.addFieldOrdering("F_NAME");
+ descriptor.addFieldOrdering("L_NAME");
+----
+
+'''''
+
+_link:EclipseLink_User's_Guide_Copyright_Statement[Copyright Statement]_
+
+Category:_EclipseLink_User's_Guide[Category: EclipseLink User’s Guide]
+Category:_Release_1[Category: Release 1] Category:_Task[Category: Task]
+Category:_ORM[Category: ORM]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Configuring_an_Object-Relational_Data_Type_Mapping_(ELUG).adoc b/docs/docs.ug/src/main/asciidoc/core/Configuring_an_Object-Relational_Data_Type_Mapping_(ELUG).adoc
new file mode 100644
index 00000000000..72ae43d663b
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Configuring_an_Object-Relational_Data_Type_Mapping_(ELUG).adoc
@@ -0,0 +1,297 @@
+*TOC*
+Special:Whatlinkshere_Configuring_an_Object-Relational_Data_Type_Mapping_(ELUG)[Related
+Topics]
+
+For information on how to create EclipseLink mappings, see
+link:Creating%20a%20Mapping%20(ELUG)[Creating a Mapping].
+
+This table lists the types of object-relational data type mappings that
+you can configure and provides a cross-reference to the type-specific
+chapter that lists the configurable options supported by that type.
+
+[#Table 50-1]##
+
+If you are creating…
+
+See…
+
+Object-relational data type structure mapping
+
+Configuring an Object-Relational Data Type Structure Mapping
+
+Object-relational data type reference mapping
+
+Configuring an Object-Relational Data Type Reference Mapping
+
+Object-relational data type array mapping
+
+Configuring an Object-Relational Data Type Array Mapping
+
+Object-relational data type object array mapping
+
+Configuring an Object-Relational Data Type Object Array Mapping
+
+Object-relational data type nested table mapping
+
+Configuring an Object-Relational Data Type Nested Table Mapping
+
+For more information, see the following:
+
+* link:Introduction%20to%20Mappings%20(ELUG)[Introduction to Mappings]
+* link:Introduction%20to%20Relational%20Mappings%20(ELUG)[Introduction
+to Relational Mappings]
+
+== Configuring Common Object-Relational Data Type Mapping Options
+
+Thist able lists the configurable options shared by two or more
+object-relational data type mapping types. In addition to the
+configurable options described here, you must also configure the options
+described for the specific object-relational data type mapping types
+(see
+link:Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG)#Object-Relational_Data_Type_Mapping_Types[Object-Relational
+Data Type Mapping Types]), as shown in the following table.
+
+[#Table 50-2]##
+
+Option to Configure
+
+Workbench
+
+Java
+
+Reference class
+
+Attribute name
+
+Field name
+
+Structure name
+
+Read-only
+
+Method or direct field access
+
+Indirection (lazy loading)
+
+Container policy
+
+== Configuring Reference Class
+
+When mapping an attribute that involves a relationship to another class,
+you must specify the reference class–the Java class to which the mapped
+attribute refers.
+
+This table summarizes which object-relational data type mappings support
+this option.
+
+[#Table 50-3]##
+
+Mapping
+
+Using the Workbench
+
+Using Java
+
+Object-relational data type structure mapping
+
+Object-relational data type reference mapping
+
+Object-relational data type array mapping
+
+Object-relational data type object array mapping
+
+Object-relational data type nested table mapping
+
+=== How to Configure Reference Class Using Java
+
+Use `+org.eclipse.persistence.mappings.ForeignReferenceMapping+` method
+`+setReferenceClass+` to specify the target class of the attribute being
+mapped.
+
+Tihs example shows how to use this method with a `+ReferenceMapping+`
+that maps the `+manager+` attribute of the `+Employee+` class.
+
+[#Example 50-1]## *_Configuring Reference Class in Java_*
+
+[source,java]
+----
+ public void customize(ClassDescriptor descriptor) {
+ ReferenceMapping managerMapping = new ReferenceMapping();
+ managerMapping.setReferenceClass("Employee.class"); // set reference class
+ managerMapping.setAttributeName("manager");
+
+ // add this mapping to descriptor
+ descriptor.addMapping (managerMapping);
+ }
+----
+
+For more information, see the _EclipseLink API Reference_.
+
+== Configuring Attribute Name
+
+All object-relational data type mappings map an attribute in a Java
+object to field in the database. The attribute name is the name of the
+attribute being mapped. The name is as specified in the reference class
+(see link:#Configuring_Reference_Class[Configuring Reference Class]).
+
+This table summarizes which object-relational data type mappings support
+this option.
+
+[#Table 50-4]##
+
+Mapping
+
+Using the Workbench
+
+Using Java
+
+Object-relational data type structure mapping
+
+Object-relational data type reference mapping
+
+Object-relational data type array mapping
+
+Object-relational data type object array mapping
+
+Object-relational data type nested table mapping
+
+=== How to Configure Attribute Name Using Java
+
+Use `+org.eclipse.persistence.mappings.DatabaseMapping+` method
+`+setAttributeName+` to specify the name of the attribute being mapped.
+
+This table shows how to use this method with a `+ReferenceMapping+` that
+maps the `+manager+` attribute of the `+Employee+` class.
+
+[#Example 50-2]## *_Configuring Attribute Name in Java_*
+
+[source,java]
+----
+ public void customize(ClassDescriptor descriptor) {
+ ReferenceMapping managerMapping = new new ReferenceMapping();
+ managerMapping.setReferenceClass("Employee.class");
+ managerMapping.setAttributeName("manager"); // set attribute name
+
+ '''// add this mapping to descriptor'''
+ descriptor.addMapping (managerMapping);
+ }
+----
+
+For more information, see the _EclipseLink API Reference_.
+
+== Configuring Field Name
+
+All object-relational data type mappings require the name of database
+field to which their specified attribute is mapped. This field name can
+be the column name of a database table or the name of a field in an
+object type created on the database.
+
+This table summarizes which object-relational data type mappings support
+this option.
+
+[#Table 50-5]##
+
+Mapping
+
+Using the Workbench
+
+Using Java
+
+Object-relational data type structure mapping
+
+Object-relational data type reference mapping
+
+Object-relational data type array mapping
+
+Object-relational data type object array mapping
+
+Object-relational data type nested table mapping
+
+=== How to Configure Field Name Using Java
+
+Use the object-relational data type mapping method `+setFieldName+` to
+specify the database field to which the attribute is mapped.
+
+This example shows how to use this method with an `+ObjectArrayMapping+`
+that maps the `+Employee+` class attribute `+phone+` to database field
+name `+PHONE_NUMBER+`.
+
+[#Example 50-3]## *_Configuring Field Name in Java_*
+
+[source,java]
+----
+ public void customize(ClassDescriptor descriptor) {
+ ObjectArrayMapping phonesMapping = new ObjectArrayMapping();
+ phonesMapping.setReferenceClass("Employee.class");
+ phonesMapping.setAttributeName("phone");
+ phonesMapping.setFieldName("PHONE_NUMBER"); '''// set field name'''
+
+ '''// add this mapping to descriptor'''
+ descriptor.addMapping (phonesMapping);
+ }
+----
+
+For more information, see the _EclipseLink API Reference_.
+
+== Configuring Structure Name
+
+Certain object-relational data type mappings require the specification
+of the data type or structure name of the field being mapped. The
+structure name is the name of the array or table type that defines the
+field.
+
+This table summarizes which object-relational data type mappings support
+this option.
+
+[#Table 50-6]##
+
+Mapping
+
+Using the Workbench
+
+Using Java
+
+Object-relational data type structure mapping
+
+Object-relational data type reference mapping
+
+Object-relational data type array mapping
+
+Object-relational data type object array mapping
+
+Object-relational data type nested table mapping
+
+=== How to Configure Structure Name Using Java
+
+Use the object-relational data type mapping method `+setStructureName+`
+to specify the structure of the attribute being mapped.
+
+This example shows how to use this method with an `+ObjectArrayMapping+`
+that maps the `+Employee+` class attribute `+phones+` to database field
+name `+PHONE_NUMBERS+` of type `+PHONE_ARRAY_TYPE+`.
+
+[#Example 50-4]## *_Configuring Structure Name in Java_*
+
+[source,java]
+----
+ public void customize(ClassDescriptor descriptor) {
+ ObjectArrayMapping phonesMapping = new ObjectArrayMapping();
+ phonesMapping.setReferenceClass("Employee.class");
+ phonesMapping.setAttributeName("phones");
+ phonesMapping.setFieldName("PHONE_NUMBERS");
+ phonesMapping.setStructureName("PHONE_ARRAY_TYPE"); // set structure name
+
+ // add this mapping to descriptor
+ descriptor.addMapping (phonesMapping);
+ }
+----
+
+For more information, see the _EclipseLink API Reference_.
+
+'''''
+
+_link:EclipseLink_User's_Guide_Copyright_Statement[Copyright Statement]_
+
+Category:_EclipseLink_User's_Guide[Category: EclipseLink User’s Guide]
+Category:_Release_1[Category: Release 1] Category:_Task[Category: Task]
+Category:_ORM[Category: ORM]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Configuring_an_Object-Relational_Data_Type_Nested_Table_Mapping_(ELUG).adoc b/docs/docs.ug/src/main/asciidoc/core/Configuring_an_Object-Relational_Data_Type_Nested_Table_Mapping_(ELUG).adoc
new file mode 100644
index 00000000000..a639287ce19
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Configuring_an_Object-Relational_Data_Type_Nested_Table_Mapping_(ELUG).adoc
@@ -0,0 +1,76 @@
+*TOC*
+Special:Whatlinkshere_Configuring_an_Object-Relational_Data_Type_Nested_Table_Mapping_(ELUG)[Related
+Topics]
+
+For information on how to create EclipseLink mappings, see
+link:Creating%20a%20Mapping%20(ELUG)[Creating a Mapping].
+
+[width="100%",cols="<100%",]
+|===
+|*Note:* For an equivalent mapping for basic or other structured data
+types, use object-relational data type array (see
+link:Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG)#Object-Relational_Data_Type_Array_Mapping[Object-Relational
+Data Type Array Mapping]) or object array (see
+link:Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG)#Object-Relational_Data_Type_Object_Array_Mapping[Object-Relational
+Data Type Object Array Mapping]) mappings.
+|===
+
+This table lists the configurable options for an object-relational data
+type nested table mapping.
+
+[#Table 51-1]##
+
+[width="100%",cols="<70%,<16%,<14%",options="header",]
+|===
+|*Option to Configure* |*Workbench* |*Java*
+|link:Configuring%20an%20Object-Relational%20Data%20Type%20Mapping_(ELUG)#Configuring_Reference_Class[Configuring
+Reference Class] |image:unsupport.gif[Unsupported,title="Unsupported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20an%20Object-Relational%20Data%20Type%20Mapping_(ELUG)#Configuring_Attribute_Name[Configuring
+Attribute Name] |image:unsupport.gif[Unsupported,title="Unsupported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20an%20Object-Relational%20Data%20Type%20Mapping_(ELUG)#Configuring_Field_Name[Configuring
+Field Name] |image:unsupport.gif[Unsupported,title="Unsupported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20an%20Object-Relational%20Data%20Type%20Mapping_(ELUG)#Configuring_Structure_Name[Configuring
+Structure Name] |image:unsupport.gif[Unsupported,title="Unsupported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Read-Only_Mappings[Configuring
+Read-Only Mappings]
+|image:unsupport.gif[Unsupported,title="Unsupported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Method_or_Direct_Field_Accessing_at_the_Mapping_Level[Configuring
+Method or Direct Field Accessing at the Mapping Level]
+|image:unsupport.gif[Unsupported,title="Unsupported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Indirection_(Lazy_Loading)[Configuring
+Indirection (Lazy Loading)]
+|image:unsupport.gif[Unsupported,title="Unsupported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Container_Policy[Configuring
+Container Policy] |image:unsupport.gif[Unsupported,title="Unsupported"]
+|image:support.gif[Supported,title="Supported"]
+|===
+
+For more information, see the following:
+
+* link:Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG)#Object-Relational_Data_Type_Nested_Table_Mapping[Object-Relational
+Data Type Nested Table Mapping]
+* link:Configuring%20an%20Object-Relational%20Data%20Type%20Mapping_(ELUG)[Configuring
+an Object-Relational Data Type Mapping]
+* link:Configuring%20a%20Mapping%20(ELUG)[Configuring a Mapping].
+
+'''''
+
+_link:EclipseLink_User's_Guide_Copyright_Statement[Copyright Statement]_
+
+Category:_EclipseLink_User's_Guide[Category: EclipseLink User’s Guide]
+Category:_Release_1[Category: Release 1] Category:_Task[Category: Task]
+Category:_ORM[Category: ORM]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Configuring_an_Object-Relational_Data_Type_Object_Array_Mapping_(ELUG).adoc b/docs/docs.ug/src/main/asciidoc/core/Configuring_an_Object-Relational_Data_Type_Object_Array_Mapping_(ELUG).adoc
new file mode 100644
index 00000000000..bf7362f17b6
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Configuring_an_Object-Relational_Data_Type_Object_Array_Mapping_(ELUG).adoc
@@ -0,0 +1,61 @@
+*TOC*
+Special:Whatlinkshere_Configuring_an_Object-Relational_Data_Type_Object_Array_Mapping_(ELUG)[Related
+Topics]
+
+For information on how to create EclipseLink mappings, see
+link:Creating%20a%20Mapping%20(ELUG)[Creating a Mapping].
+
+This table lists the configurable options for an object-relational data
+type object array mapping.
+
+[#Table 49-1]##
+
+[width="100%",cols="<70%,<16%,<14%",options="header",]
+|===
+|*Option to Configure* |*Workbench* |*Java*
+|link:Configuring%20an%20Object-Relational%20Data%20Type%20Mapping_(ELUG)#Configuring_Reference_Class[Configuring
+Reference Class] |image:unsupport.gif[Unsupported,title="Unsupported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20an%20Object-Relational%20Data%20Type%20Mapping_(ELUG)#Configuring_Attribute_Name[Configuring
+Attribute Name] |image:unsupport.gif[Unsupported,title="Unsupported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20an%20Object-Relational%20Data%20Type%20Mapping_(ELUG)#Configuring_Field_Name[Configuring
+Field Name] |image:unsupport.gif[Unsupported,title="Unsupported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20an%20Object-Relational%20Data%20Type%20Mapping_(ELUG)#Configuring_Structure_Name[Configuring
+Structure Name] |image:unsupport.gif[Unsupported,title="Unsupported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Read-Only_Mappings[Configuring
+Read-Only Mappings]
+|image:unsupport.gif[Unsupported,title="Unsupported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Method_or_Direct_Field_Accessing_at_the_Mapping_Level[Configuring
+Method or Direct Field Accessing at the Mapping Level]
+|image:unsupport.gif[Unsupported,title="Unsupported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Container_Policy[Configuring
+Container Policy] |image:unsupport.gif[Unsupported,title="Unsupported"]
+|image:support.gif[Supported,title="Supported"]
+|===
+
+For more information, see the following:
+
+* link:Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG)[Object-Relational
+Data Type Object Array Mapping]
+* link:Configuring%20an%20Object-Relational%20Data%20Type%20Mapping_(ELUG)[Configuring
+an Object-Relational Data Type Mapping]
+* link:Configuring%20a%20Mapping%20(ELUG)[Configuring a Mapping].
+
+'''''
+
+_link:EclipseLink_User's_Guide_Copyright_Statement[Copyright Statement]_
+
+Category:_EclipseLink_User's_Guide[Category: EclipseLink User’s Guide]
+Category:_Release_1[Category: Release 1] Category:_Task[Category: Task]
+Category:_ORM[Category: ORM]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Configuring_an_Object-Relational_Data_Type_Reference_Mapping_(ELUG).adoc b/docs/docs.ug/src/main/asciidoc/core/Configuring_an_Object-Relational_Data_Type_Reference_Mapping_(ELUG).adoc
new file mode 100644
index 00000000000..740f24737ff
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Configuring_an_Object-Relational_Data_Type_Reference_Mapping_(ELUG).adoc
@@ -0,0 +1,70 @@
+*TOC*
+Special:Whatlinkshere_Configuring_an_Object-Relational_Data_Type_Reference_Mapping_(ELUG)[Related
+Topics]
+
+This section describes the various components that you must configure in
+order to use an object-relational data type reference mapping.
+
+For information on how to configure EclipseLink mappings options common
+to two or more mapping types, see
+link:Configuring%20a%20Mapping%20(ELUG)[Configuring a Mapping].
+
+For information on how to create EclipseLink mappings, see
+link:Creating%20a%20Mapping%20(ELUG)[Creating a Mapping].
+
+This table lists the configurable options for an object-relational data
+type reference mapping.
+
+[#Table 47-1]##
+
+[width="100%",cols="<70%,<16%,<14%",options="header",]
+|===
+|*Option to Configure* |*Workbench* |*Java*
+|link:Configuring%20an%20Object-Relational%20Data%20Type%20Mapping_(ELUG)#Configuring_Reference_Class[Configuring
+Reference Class] |image:unsupport.gif[Unsupported,title="Unsupported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20an%20Object-Relational%20Data%20Type%20Mapping_(ELUG)#Configuring_Attribute_Name[Configuring
+Attribute Name] |image:unsupport.gif[Unsupported,title="Unsupported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20an%20Object-Relational%20Data%20Type%20Mapping_(ELUG)#Configuring_Field_Name[Configuring
+Field Name] |image:unsupport.gif[Unsupported,title="Unsupported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Read-Only_Mappings[Configuring
+Read-Only Mappings]
+|image:unsupport.gif[Unsupported,title="Unsupported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Method_or_Direct_Field_Accessing_at_the_Mapping_Level[Configuring
+Method or Direct Field Accessing at the Mapping Level]
+|image:unsupport.gif[Unsupported,title="Unsupported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Private_or_Independent_Relationships[Configuring
+Private or Independent Relationships]
+|image:unsupport.gif[Unsupported,title="Unsupported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Indirection_(Lazy_Loading)[Configuring
+Indirection (Lazy Loading)]
+|image:unsupport.gif[Unsupported,title="Unsupported"]
+|image:support.gif[Supported,title="Supported"]
+|===
+
+For more information, see the following:
+
+* link:Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG)#Object-Relational_Data_Type_Reference_Mapping[Object-Relational
+Data Type Reference Mapping]
+* link:Configuring%20an%20Object-Relational%20Data%20Type%20Mapping_(ELUG)[Configuring
+an Object-Relational Data Type Mapping]
+* link:Configuring%20a%20Mapping_(ELUG)[Configuring a Mapping]
+
+'''''
+
+_link:EclipseLink_User's_Guide_Copyright_Statement[Copyright Statement]_
+
+Category:_EclipseLink_User's_Guide[Category: EclipseLink User’s Guide]
+Category:_Release_1[Category: Release 1] Category:_Task[Category: Task]
+Category:_ORM[Category: ORM]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Configuring_an_Object-Relational_Data_Type_Structure_Mapping_(ELUG).adoc b/docs/docs.ug/src/main/asciidoc/core/Configuring_an_Object-Relational_Data_Type_Structure_Mapping_(ELUG).adoc
new file mode 100644
index 00000000000..4fcec4ed4fe
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Configuring_an_Object-Relational_Data_Type_Structure_Mapping_(ELUG).adoc
@@ -0,0 +1,53 @@
+*TOC*
+Special:Whatlinkshere_Configuring_an_Object-Relational_Data_Type_Structure_Mapping_(ELUG)[Related
+Topics]
+
+For information on how to create EclipseLink mappings, see
+link:Creating%20a%20Mapping%20(ELUG)[Creating a Mapping].
+
+This table lists the configurable options for an object-relational data
+type structure mapping.
+
+[#Table 46-1]##
+
+[width="100%",cols="<70%,<16%,<14%",options="header",]
+|===
+|*Option to Configure* |*Workbench* |*Java*
+|link:Configuring%20an%20Object-Relational%20Data%20Type%20Mapping_(ELUG)#Configuring_Reference_Class[Configuring
+Reference Class] |image:unsupport.gif[Unsupported,title="Unsupported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20an%20Object-Relational%20Data%20Type%20Mapping_(ELUG)#Configuring_Attribute_Name[Configuring
+Attribute Name] |image:unsupport.gif[Unsupported,title="Unsupported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20an%20Object-Relational%20Data%20Type%20Mapping_(ELUG)#Configuring_Field_Name[Configuring
+Field Name] |image:unsupport.gif[Unsupported,title="Unsupported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Read-Only_Mappings[Configuring
+Read-Only Mappings]
+|image:unsupport.gif[Unsupported,title="Unsupported"]
+|image:support.gif[Supported,title="Supported"]
+
+|link:Configuring%20a%20Mapping%20(ELUG)#Configuring_Method_or_Direct_Field_Accessing_at_the_Mapping_Level[Configuring
+Method or Direct Field Accessing at the Mapping Level]
+|image:unsupport.gif[Unsupported,title="Unsupported"]
+|image:support.gif[Supported,title="Supported"]
+|===
+
+For more information, see the following:
+
+* link:Introduction%20to%20Object-Relational%20Data%20Type%20Mappings%20(ELUG)#Object-Relational_Data_Type_Structure_Mapping[Object-Relational
+Data Type Structure Mapping]
+* link:Configuring%20an%20Object-Relational%20Data%20Type%20Mapping_(ELUG)[Configuring
+an Object-Relational Data Type Mapping]
+* link:Configuring%20a%20Mapping_(ELUG)[Configuring a Mapping]
+
+'''''
+
+_link:EclipseLink_User's_Guide_Copyright_Statement[Copyright Statement]_
+
+Category:_EclipseLink_User's_Guide[Category: EclipseLink User’s Guide]
+Category:_Release_1[Category: Release 1] Category:_Task[Category: Task]
+Category:_ORM[Category: ORM]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Configuring_an_RMI_Coordinated_Cache_(ELUG).adoc b/docs/docs.ug/src/main/asciidoc/core/Configuring_an_RMI_Coordinated_Cache_(ELUG).adoc
new file mode 100644
index 00000000000..a7b598ec63f
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Configuring_an_RMI_Coordinated_Cache_(ELUG).adoc
@@ -0,0 +1,38 @@
+*TOC*
+Special:Whatlinkshere_Configuring_an_RMI_Coordinated_Cache_(ELUG)[Related
+Topics]
+
+[#Table 101-1]## *_Configurable Options for an RMI Coordinated Cache_*
+
+Option to Configure
+
+EclipseLink Workbench
+
+Java
+
+Cache coordination change propagation at the descriptor level
+
+Synchronous change propagation mode
+
+Service channel
+
+Multicast group address
+
+Multicast port
+
+Naming service type
+
+Announcement delay
+
+Connection handling
+
+Context properties
+
+Packet time-to-live
+
+'''''
+
+_link:EclipseLink_User's_Guide_Copyright_Statement[Copyright Statement]_
+
+Category:_EclipseLink_User's_Guide[Category: EclipseLink User’s Guide]
+Category:_Release_1[Category: Release 1] Category:_Task[Category: Task]
diff --git a/docs/docs.ug/src/main/asciidoc/core/Creating_EclipseLink_Files_for_Deployment_(ELUG).adoc b/docs/docs.ug/src/main/asciidoc/core/Creating_EclipseLink_Files_for_Deployment_(ELUG).adoc
new file mode 100644
index 00000000000..79d2d545816
--- /dev/null
+++ b/docs/docs.ug/src/main/asciidoc/core/Creating_EclipseLink_Files_for_Deployment_(ELUG).adoc
@@ -0,0 +1,325 @@
+image:Elug_draft_icon.png[Image:Elug draft
+icon.png,title="Image:Elug draft icon.png"] *For the latest EclipseLink
+documentation, please see
+http://www.eclipse.org/eclipselink/documentation/*
+
+'''''
+
+*TOC*
+Special:Whatlinkshere_Creating_EclipseLink_Files_for_Deployment_(ELUG)[Related
+Topics]
+
+This section includes EclipseLink information that you need when
+creating deployment files for various types of applications.
+
+For more information on packaging and deployment, see the following:
+
+* link:#Introduction_to_the_EclipseLink_Deployment_File_Creation[Introduction
+to the EclipseLink Deployment File Creation]
+* link:Integrating%20EclipseLink%20with%20an%20Application%20Server%20(ELUG)[Integrating
+EclipseLink with an Application Server]
+* link:Packaging%20a%20EclipseLink%20Application%20(ELUG)[Packaging a
+EclipseLink Application]
+* link:Deploying%20a%20EclipseLink%20Application%20(ELUG)[Deploying a
+EclipseLink Application]
+* link:Packaging_and_Deploying_EclipseLink_JPA_Applications_(ELUG)[Packaging
+and Deploying EclipseLink JPA Applications]
+* link:EclipseLink_UserGuide_Creating_Deployment_Files_for_EclipseLink_Database_Web_Services_%28ELUG%29[Creating
+Deployment Files for EclipseLink Web Services]
+
+== Introduction to the EclipseLink Deployment File Creation
+
+Depending on the type of application you are deploying, you may need to
+create any of the following deployment files:
+
+* link:#project.xml_File[project.xml File]
+* link:#sessions.xml_File[sessions.xml File]
+
+Workbench provides the ability to
+link:Creating%20a%20Project%20(ELUG)#Exporting_Project_Information[create
+deployment files from a Workbench project] "`wikilink`"). After you
+build a project, you have two options to create the deployment files:
+
+* Create XML deployment files that require no compiling.
+* Create Java source files, which you compile and deploy outside of
+Workbench.
+
+We recommend XML deployment because XML files are easier to deploy and
+troubleshoot than compiled Java files. This approach gives you a very
+flexible configuration that enables you to make changes safely and
+easily. XML deployment files do not require third-party applications or
+compilers to deploy successfully.
+
+[width="100%",cols="<100%",]
+|===
+|*Note:* If you are using JPA, you can use annotations to specify most
+of what you formerly specified in deployment descriptors. Use deployment
+descriptors to override annotations or specify options not supported by
+annotations.
+|===
+
+=== project.xml File
+
+The `+project.xml+` file is the core of your application. It contains
+the descriptors and mappings you define and also includes any named
+queries or finders associated with your project.
+
+==== XSD File Format
+
+The `+project.xml+` file XSD is `+persistence_1_0.xsd+` and it is
+located in the __`+\xsds+` directory.
+
+See link:EclipseLink_XSDs[EclipseLink/XSDs] for more information.
+
+==== POJO Applications and Project Metadata
+
+For a POJO application, you define your project metadata in a
+`+project.xml+` file.
+
+The `+project.xml+` file provides a simple and flexible way to
+configure, modify, and troubleshoot the project metadata. Because of
+these attributes, the `+project.xml+` file is the preferred way to
+configure an EclipseLink project.Workbench provides a graphical tool to
+build and edit the `+project.xml+` file. For information on creating
+projects with Workbench, see
+link:#Creating_the_project.xml_File_with_Workbench[Creating the
+project.xml File with Workbench].
+
+==== JPA Applications and Project Metadata
+
+For a JPA application, you can express project metadata using JPA
+annotations, `+persistence.xml+`, `+orm.xml+`, and EclipseLink JPA
+annotation and `+persistence.xml+` property extensions. The EclipseLink
+JPA persistence provider interprets all these sources of metadata to
+create an in-memory EclipseLink session and project at run time.
+
+Using EclipseLink JPA, you also have the option of specifying your
+metadata using EclipseLink `+sessions.xml+` and `+project.xml+` while
+accessing your persistent classes using JPA and an `+EntityManager+`.
+For more information, see
+link:Using%20EclipseLink%20JPA%20Extensions%20(ELUG)#What_You_May_Need_to_Know_About_EclipseLink_JPA_Overriding_Mechanisms[What
+You May Need to Know About EclipseLink JPA Overriding Mechanisms].
+
+==== Creating the project.xml File with Workbench
+
+Because you must synchronize the `+project.xml+` file with the classes
+and data source associated with your application, we recommend that you
+not modify this file manually. Workbench ensures proper synchronization,
+and is the best way to make changes to the project. Simply modify the
+project in Workbench and redeploy the `+project.xml+` file. Using this
+option reduces development time by eliminating the need to regenerate
+and recompile Java code each time the project changes.
+
+See
+link:Creating%20a%20Project%20(ELUG)#Exporting_Project_Information[Exporting
+Project Information] for detailed information on exporting the
+deployment XML information.
+
+[width="100%",cols="<100%",]
+|===
+|*Note*: You can name this file with a name other than `+project.xml+`;
+however, for clarity, this discussion assumes that the file has not been
+renamed.
+|===
+
+==== Creating project.xml Programatically
+
+Optionally, you can use the `+DeploymentXMLGenerator+` API to
+programatically generate the `+project.xml+` file in either of the
+following ways:
+
+* From an application, instantiate the `+DeploymentXMLGenerator+` and
+your java source. Call the following
+method:`+generate (+`_`++`_`+,+`
+_`+