Skip to main content
Jump to: navigation, search

Difference between revisions of "Customizing the EclipseLink Application (ELUG)"

m (Configuring Oracle Database Proxy Authentication for JPA Applications)
m
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
[[Image:Elug draft icon.png]] '''For the latest EclipseLink documentation, please see http://www.eclipse.org/eclipselink/documentation/ '''
 +
 +
----
 +
 
<div style="margin:5px;float:right;border:1px solid #000000;padding:5px">__TOC__
 
<div style="margin:5px;float:right;border:1px solid #000000;padding:5px">__TOC__
 
[[Special:Whatlinkshere/Customizing the EclipseLink Application (ELUG)|Related Topics]]</div>
 
[[Special:Whatlinkshere/Customizing the EclipseLink Application (ELUG)|Related Topics]]</div>
Line 52: Line 56:
  
 
==Using the Session Customizer Class==
 
==Using the Session Customizer Class==
You can customize a session at run time by specifying a session customizer–a Java class that implements the <tt>org.eclipse.persistence.internal.sessions.factories.SessionCustomizer</tt> interface.
+
You can customize a session at run time by specifying a session customizer–a Java class that implements the <tt>org.eclipse.persistence.config.SessionCustomizer</tt> interface.
  
 
For more information, see the following:
 
For more information, see the following:
Line 60: Line 64:
  
 
==Using the Descriptor Customizer Class==
 
==Using the Descriptor Customizer Class==
You can customize a descriptor at run time by specifying a descriptor customizer–a Java class that implements the <tt>org.eclipse.persistence.internal.sessions.factories.DescriptorCustomizer</tt> interface.
+
You can customize a descriptor at run time by specifying a descriptor customizer–a Java class that implements the <tt>org.eclipse.persistence.config.DescriptorCustomizer</tt> interface.
  
 
For more information, see the following:
 
For more information, see the following:
Line 93: Line 97:
  
 
[[Category: EclipseLink User's Guide]]
 
[[Category: EclipseLink User's Guide]]
[[Category: Draft]]
+
[[Category: Release 1]]
 
[[Category: Concept]]
 
[[Category: Concept]]
 
[[Category: Task]]
 
[[Category: Task]]

Latest revision as of 11:22, 18 July 2012

Elug draft icon.png For the latest EclipseLink documentation, please see http://www.eclipse.org/eclipselink/documentation/


There are multiple ways to customize your EclipseLink application, ranging from creating custom data types to using JPA extensions.


By design, EclipseLink can adapt to a variety of relational and nonrelational data sources.

To integrate EclipseLink with a data source that is not directly supported by the EclipseLink API,we recommend that you use an EIS project or a XML project ).

Using an EIS project, you can integrate your EclipseLink-enabled application with any nonrelational data source that supports a JCA adapter and any supported EIS record type, including indexed, mapped, or XML. If no JCA adapter exists for your target data source, you can concentrate your integration efforts on creating an adapter. Simultaneously, you can build your application according to JCA specifications. Although this still requires custom development effort, it is more efficient than trying to extend EclipseLink classes and provides you with a JCA adapter that you can leverage in any other project (making it a better value).

Using an XML project, you can integrate your EclipseLink-enabled application with Web services or other XML-message based designs.

The remainder of this chapter describes other customization options provided by the EclipseLink API.


Creating Custom Data Types

EclipseLink provides support for all the most common Java data types. This table lists the EclipseLink mapping extensions that you can use to support custom data types. You can also create your object converter to allow conversion between a data type and your own Java type.

Mapping Extensions for Custom Data Types

Extension Description

Object Type Converter

An extension of direct and direct collection mappings that lets you match a fixed number of data values to Java objects. Use this converter when the values in the schema differ from those in Java

Serialized Object Converter

An extension of direct and direct collection mappings that lets you map serializable objects, such as multimedia data, to a binary format in a data source, such as a base64 element in an XML document or Binary Large Object (BLOB) field in a database

Type Conversion Converter

An extension of direct and direct collection mappings that lets you explicitly map a data source type to a Java type. For example, a java.util.Date in Java can be mapped to a java.sql.Date in the data source.

Simple Type Translator

An extension of direct and direct collection mappings that lets you automatically translate an XML element value to an appropriate Java type based on the element's <type> attribute as defined in your XML schema.



Using the Session Customizer Class

You can customize a session at run time by specifying a session customizer–a Java class that implements the org.eclipse.persistence.config.SessionCustomizer interface.

For more information, see the following:

Using the Descriptor Customizer Class

You can customize a descriptor at run time by specifying a descriptor customizer–a Java class that implements the org.eclipse.persistence.config.DescriptorCustomizer interface.

For more information, see the following:

Using the Descriptor Amendment Methods

To customize descriptors, you can use their amendment methods.

For more information, see the following:


Using EclipseLink JPA Extensions

If you are developing an EclipseLink JPA application, use EclipseLink JPA metadata annotations and XML extensions for customization.

For more information, see Using EclipseLink JPA Extensions.


Using Oracle Database Proxy Authentication in JPA Applications

For information, see Configuring Oracle Database Proxy Authentication for a JPA Application.



Copyright Statement

Back to the top