Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Configuring a Project (ELUG)"

m (How to Configure Project Comments Using Workbench)
 
(17 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
<div style="float:right;border:1px solid #000000;padding:5px">__TOC__
 
<div style="float:right;border:1px solid #000000;padding:5px">__TOC__
 
[[Special:Whatlinkshere/Configuring a Project (ELUG)|Related Topics]]</div>
 
[[Special:Whatlinkshere/Configuring a Project (ELUG)|Related Topics]]</div>
This section describes how to create EclipseLink projects.
+
This section describes how to configure EclipseLink project options common to two or more project types.
  
For information on the various types of projects available, see [[Introduction%20to%20Projects (ELUG)|EclipseLink 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.
  
 +
<span id="Table 113-1"></span>
 +
{| class="HRuleFormal" dir="ltr" title="Configuring EclipseLink Projects" summary="This table provides a cross-reference to additional project configuration options for each type of project." width="100%" border="1" frame="hsides" rules="rows" cellpadding="3" frame="hsides" rules="rows"
 +
|- align="left" valign="top"
 +
! id="r1c1-t2" align="left" valign="bottom" | '''If you are creating...'''
 +
! id="r1c2-t2" align="left" valign="bottom" | '''See also...'''
 +
|- align="left" valign="top"
 +
| id="r2c1-t2" headers="r1c1-t2" align="left" |
 +
Relational Projects
 +
| headers="r2c1-t2 r1c2-t2" align="left" |
 +
[[Configuring%20a%20Relational%20Project%20(ELUG)|Configuring a Relational Project]]<br>
 +
|- align="left" valign="top"
 +
| id="r3c1-t2" headers="r1c1-t2" align="left" |
 +
EIS Projects
 +
| headers="r3c1-t2 r1c2-t2" align="left" |
 +
[[Configuring%20an%20EIS%20Project%20(ELUG)|Configuring an EIS Project]]<br>
 +
|- align="left" valign="top"
 +
| id="r4c1-t2" headers="r1c1-t2" align="left" |
 +
XML Projects
 +
| headers="r4c1-t2 r1c2-t2" align="left" |
 +
[[Configuring%20an%20XML%20Project%20(ELUG)|Configuring an XML Project]]<br>
 +
|}
  
==Introduction to the Project Creation==
+
<br>
You can create a project using the Workbench or Java code.
+
  
We recommend using the Workbench to create projects and generate deployment XML or Java source versions of the project for use at run time. For more information, see [[#How to Create a Project Using the Workbench|How to Create a Project Using the Workbench]].
+
The [[#Table 113-2|Common Project Options]] table lists the configurable options shared by two or more EclipseLink project types.
  
Alternatively, you can create projects in Java code. For an EIS project that uses a record type other than XML, you must use Java code. For more information, see [[#How to Create a Project Using Java|How to Create a Project Using Java]] and EclipseLink API Reference.
+
For more information, see the following:
 +
* [[Creating%20a%20Project%20(ELUG)#Introduction to the Project Creation|Introduction to the Project Creation]]
 +
* [[Introduction%20to%20Projects (ELUG)|Introduction to Projects]]
  
For information on how to create a project using Java, see [[#How to Create a Project Using Java|How to Create a Project Using Java]].
 
  
  
 +
==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 [[Introduction%20to%20Projects (ELUG)#EclipseLink Project Types|EclipseLink Project Types]]), as shown in the [[#Table 113-1|Configuring EclipseLink Projects]] table.
  
===How to Create a Project Using the Workbench===
+
<span id="Table 113-2"></span>
When you create a project using Workbench, all project information is stored in the project file ( .<tt>mwp</tt> file). This file references additional XML data files that contain the information about how the Java classes map to database tables or XML elements.
+
{| class="RuleFormalMax" dir="ltr" title="Common Project Options" summary="This table lists the configurable options common to Projects and categorizes them as Basic and Advanced and indicates if the option can be configured with the Workbench, Java, or both." width="100%" border="1" frame="border" rules="all" cellpadding="3" frame="border" rules="all"
 +
|- align="left" valign="top"
 +
! id="r1c1-t3" align="left" valign="bottom" | '''Option to Configure'''
 +
! id="r1c2-t3" align="left" valign="bottom" | '''EclipseLink Workbench'''
 +
! id="r1c3-t3" align="left" valign="bottom" | '''Java'''
 +
|- align="left" valign="top"
 +
| id="r2c1-t3" headers="r1c1-t3" align="left" |
 +
[[#Configuring Project Save Location|Project save location]]
 +
| headers="r2c1-t3 r1c2-t3" align="left" |
 +
[[Image:support.gif|Supported]]<br>
 +
| headers="r2c1-t3 r1c3-t3" align="left" |
 +
[[Image:unsupport.gif|Unsupported]]<br>
 +
|- align="left" valign="top"
 +
| id="r3c1-t3" headers="r1c1-t3" align="left" |
 +
[[#Configuring Project Classpath|Classpath]]
 +
| headers="r3c1-t3 r1c2-t3" align="left" |
 +
[[Image:support.gif|Supported]]<br>
 +
| headers="r3c1-t3 r1c3-t3" align="left" |
 +
[[Image:unsupport.gif|Unsupported]]<br>
 +
|- align="left" valign="top"
 +
| id="r4c1-t3" headers="r1c1-t3" align="left" |
 +
[[#Configuring Method or Direct Field Access at the Project Level|Method or direct field access]]
 +
| headers="r4c1-t3 r1c2-t3" align="left" |
 +
[[Image:support.gif|Supported]]<br>
 +
| headers="r4c1-t3 r1c3-t3" align="left" |
 +
[[Image:unsupport.gif|Unsupported]]<br>
 +
|- align="left" valign="top"
 +
| id="r5c1-t3" headers="r1c1-t3" align="left" |
 +
[[#Configuring Default Descriptor Advanced Properties|Default descriptor advanced properties]]
 +
| headers="r5c1-t3 r1c2-t3" align="left" |
 +
[[Image:support.gif|Supported]]<br>
 +
| headers="r5c1-t3 r1c3-t3" align="left" |
 +
[[Image:unsupport.gif|Unsupported]]<br>
 +
|- align="left" valign="top"
 +
| id="r6c1-t3" headers="r1c1-t3" align="left" |
 +
[[#Configuring Existence Checking at the Project Level|Existence checking]]
 +
| headers="r6c1-t3 r1c2-t3" align="left" |
 +
[[Image:support.gif|Supported]]<br>
 +
| headers="r6c1-t3 r1c3-t3" align="left" |
 +
[[Image:support.gif|Supported]]<br>
 +
|- align="left" valign="top"
 +
| id="r7c1-t3" headers="r1c1-t3" align="left" |
 +
[[#Configuring Project Deployment XML Options|Deployment XML options]]
 +
| headers="r7c1-t3 r1c2-t3" align="left" |
 +
[[Image:support.gif|Supported]]<br>
 +
| headers="r7c1-t3 r1c3-t3" align="left" |
 +
[[Image:unsupport.gif|Unsupported]]<br>
 +
|- align="left" valign="top"
 +
| id="r8c1-t3" headers="r1c1-t3" align="left" |
 +
[[#Configuring Model Java Source Code Options|Model Java source code options]]
 +
| headers="r8c1-t3 r1c2-t3" align="left" |
 +
[[Image:support.gif|Supported]]<br>
 +
| headers="r8c1-t3 r1c3-t3" align="left" |
 +
[[Image:unsupport.gif|Unsupported]]<br>
 +
|- align="left" valign="top"
 +
| id="r9c1-t3" headers="r1c1-t3" align="left" |
 +
[[#Configuring Cache Type and Size at the Project Level|Cache type and size]]
 +
| headers="r9c1-t3 r1c2-t3" align="left" |
 +
[[Image:support.gif|Supported]]<br>
 +
| headers="r9c1-t3 r1c3-t3" align="left" |
 +
[[Image:support.gif|Supported]]<br>
 +
|- align="left" valign="top"
 +
| id="r10c1-t3" headers="r1c1-t3" align="left" |
 +
[[#Configuring Cache Isolation at the Project Level|Cache isolation]]
 +
| headers="r10c1-t3 r1c2-t3" align="left" |
 +
[[Image:support.gif|Supported]]<br>
 +
| headers="r10c1-t3 r1c3-t3" align="left" |
 +
[[Image:support.gif|Supported]]<br>
 +
|- align="left" valign="top"
 +
| id="r11c1-t3" headers="r1c1-t3" align="left" |
 +
[[#Configuring Cache Coordination Change Propagation at the Project Level|Cache coordination change propagation]]
 +
| headers="r11c1-t3 r1c2-t3" align="left" |
 +
[[Image:support.gif|Supported]]<br>
 +
| headers="r11c1-t3 r1c3-t3" align="left" |
 +
[[Image:support.gif|Supported]]<br>
 +
|- align="left" valign="top"
 +
| id="r12c1-t3" headers="r1c1-t3" align="left" |
 +
[[#Configuring Cache Expiration at the Project Level|Cache expiration]]
 +
| headers="r12c1-t3 r1c2-t3" align="left" |
 +
[[Image:support.gif|Supported]]<br>
 +
| headers="r12c1-t3 r1c3-t3" align="left" |
 +
[[Image:support.gif|Supported]]<br>
 +
|- align="left" valign="top"
 +
| id="r13c1-t3" headers="r1c1-t3" align="left" |
 +
[[#Configuring Project Comments|Comments]]
 +
| headers="r13c1-t3 r1c2-t3" align="left" |
 +
[[Image:support.gif|Supported]]<br>
 +
| headers="r13c1-t3 r1c3-t3" align="left" |
 +
[[Image:unsupport.gif|Unsupported]]<br>
 +
|}
  
Using Workbench, you can export this information as a EclipseLink project XML file (that is, the deployment XML file) that is read in by the EclipseLink runtime. You can also export this information as a Java class. For more information, see [[#Exporting Project Information|Exporting Project Information]].
 
  
Workbench displays projects and their contents in the Navigator window. When you select a project, its attributes are displayed in the Editor window. See [[Using%20Workbench%20(ELUG)|How to Use the Navigator]] for more information. Workbench supports the following project types:
 
* [[Image:projdb.gif|Relational Database project icon]]<br> Relational project
 
* [[Image:projxml.gif|XML Project icon]]<br> XML project
 
* [[Image:projeis.gif|EIS project icon]]<br> EIS project
 
  
 +
==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.
  
====Creating New Workbench Projects====
 
This section includes information on creating a new Workbench project. To create a new project from an existing persistence application (such as OC4J), see [[Integrating%20EclipseLink%20with%20an%20Application%20Server%20(ELUG)|Integrating EclipseLink with an Application Server]]. To create a new project from JAXB, see [[Introduction%20to%20XML%20Projects%20(ELUG)|EclipseLink Support for Java Architecture for XML Binding (JAXB)]].
 
  
To create a new Workbench project, use this procedure:
+
<span id="Table 113-3"></span>
# [[Image:creatbtn.gif|New Project icon]]<br> Click '''New''' on the toolbar and select '''Project'''. The Create New Workbench Project dialog box appears.You can also create a new project by choosing '''File''' > '''New > Project''' from the menu.'''''<br><span id="Figure 112-1"></span> Create New Workbench Project Dialog Box '''''<br>[[Image:create.gif|Create New Workbench Project Dialog Box]]<br><br>
+
{| class="RuleFormal" dir="ltr" title="Project Support for Project Save Location" summary="This table summarizes which projects support project save location." width="100%" border="1" frame="border" rules="all" cellpadding="3" frame="border" rules="all"
# Enter data in each field on the Create New Workbench Project dialog box, and then click '''OK'''.
+
|- align="left" valign="top"
 +
! id="r1c1-t4" align="left" valign="bottom" | '''Descriptor'''
 +
! id="r1c2-t4" align="left" valign="bottom" | '''[[#How to Configure Project Save Location Using Workbench|Using the Workbench]]<br>'''
 +
! id="r1c3-t4" align="left" valign="bottom" | '''Using  Java'''
 +
|- align="left" valign="top"
 +
| id="r2c1-t4" headers="r1c1-t4" align="left" |
 +
Relational Projects
 +
| headers="r2c1-t4 r1c2-t4" align="left" |
 +
[[Image:support.gif|Supported.]]<br>
 +
| headers="r2c1-t4 r1c3-t4" align="left" |
 +
[[Image:unsupport.gif|Unsupported]]<br>
 +
|- align="left" valign="top"
 +
| id="r3c1-t4" headers="r1c1-t4" align="left" |
 +
EIS Projects
 +
| headers="r3c1-t4 r1c2-t4" align="left" |
 +
[[Image:support.gif|Supported.]]<br>
 +
| headers="r3c1-t4 r1c3-t4" align="left" |
 +
[[Image:unsupport.gif|Unsupported]]<br>
 +
|- align="left" valign="top"
 +
| id="r4c1-t4" headers="r1c1-t4" align="left" |
 +
XML Projects
 +
| headers="r4c1-t4 r1c2-t4" align="left" |
 +
[[Image:support.gif|Supported.]]<br>
 +
| headers="r4c1-t4 r1c3-t4" align="left" |
 +
[[Image:unsupport.gif|Unsupported]]<br>
 +
|}
  
Use the following information to enter data in each field of this dialog box:
 
  
{| class="HRuleInformal" dir="ltr" title="This table defines each field on the Create New EclipseLink Workbench Project dialog." summary="This table defines each field on the Create New EclipseLink Workbench Project dialog." width="100%" border="1" frame="hsides" rules="rows" cellpadding="3" frame="hsides" rules="rows"
+
 
 +
 
 +
===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.
 +
 
 +
<span id="Figure 113-1"></span>
 +
''''' General Tab, Project Save Location'''''<br>
 +
[[Image:saveloc.gif|General Tab, Project Save Location]]<br><br>
 +
 
 +
To select a new location, right-click on the project in the '''Navigator''' and select '''Save As''' from the context menu. See [[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.
 +
 
 +
 
 +
<span id="Table 113-4"></span>
 +
{| class="RuleFormal" dir="ltr" title="Project Support for Project Classpath" summary="This table summarizes which projects support classpath." width="100%" border="1" frame="border" rules="all" cellpadding="3" frame="border" rules="all"
 
|- align="left" valign="top"
 
|- align="left" valign="top"
! id="r1c1-t2" align="left" valign="bottom" | '''Field'''
+
! id="r1c1-t5" align="left" valign="bottom" | '''Descriptor'''
! id="r1c2-t2" align="left" valign="bottom" | '''Description'''
+
! id="r1c2-t5" align="left" valign="bottom" | '''[[#How to Configure Project Classpath Using Workbench|Using the Workbench]]<br>'''
 +
! id="r1c3-t5" align="left" valign="bottom" | '''Using  Java'''
 
|- align="left" valign="top"
 
|- align="left" valign="top"
| id="r2c1-t2" headers="r1c1-t2" align="left" | '''Name'''
+
| id="r2c1-t5" headers="r1c1-t5" align="left" |
| headers="r2c1-t2 r1c2-t2" align="left" | Enter the name of the Workbench project. This project name will also become the name of the <tt>.mwp</tt> file.
+
Relational Projects
 +
| headers="r2c1-t5 r1c2-t5" align="left" |
 +
[[Image:support.gif|Supported.]]<br>
 +
| headers="r2c1-t5 r1c3-t5" align="left" |
 +
[[Image:unsupport.gif|Unsupported]]<br>
 
|- align="left" valign="top"
 
|- align="left" valign="top"
| id="r3c1-t2" headers="r1c1-t2" align="left" | '''Data Source'''
+
| id="r3c1-t5" headers="r1c1-t5" align="left" |
| headers="r3c1-t2 r1c2-t2" align="left" | Use these options to specify the type of project to create, and its data source.
+
EIS Projects
 +
| headers="r3c1-t5 r1c2-t5" align="left" |
 +
[[Image:support.gif|Supported.]]<br>
 +
| headers="r3c1-t5 r1c3-t5" align="left" |
 +
[[Image:unsupport.gif|Unsupported]]<br>
 
|- align="left" valign="top"
 
|- align="left" valign="top"
| id="r4c1-t2" headers="r1c1-t2" align="left" | ''' Database'''
+
| id="r4c1-t5" headers="r1c1-t5" align="left" |
| headers="r4c1-t2 r1c2-t2" align="left" |
+
XML Projects
Select '''Database''' to create an relational project to a relational database. Use the '''Platform''' list to select the specific database platform. See [[Introduction%20to%20Relational%20Projects%20(ELUG)|Introduction to Relational Projects]] for more information.
+
| headers="r4c1-t5 r1c2-t5" align="left" |
 +
[[Image:support.gif|Supported.]]<br>
 +
| headers="r4c1-t5 r1c3-t5" align="left" |
 +
[[Image:unsupport.gif|Unsupported]]<br>
 +
|}
 +
 
 +
 
 +
Do not include JDBC drivers or other elements required to access the data source in the project classpath. Use the <tt>setenv</tt> file to specify these application-level settings (see [[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 [[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:
 +
# Select the project object in the '''Navigator'''.
 +
# Click the '''General''' tab in the '''Editor'''. The General tab appears.<br><span id="Figure 113-2"></span>''''' General Tab, Classpath Options'''''<br>[[Image:genclassp.gif|General Tab, Classpath Options]]<br><br>
 +
 
 +
To add a new classpath entry, click '''Add Entry''' or '''Browse''' and select the directory, <tt>.jar</tt> file, or <tt>.zip</tt> 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.
 +
 
 +
<span id="Table 113-5"></span>
 +
 
 +
{| class="RuleFormal" dir="ltr" title="Project Support for Mapped Field Access" summary="This table summarizes which projects support mapped field access." width="100%" border="1" frame="border" rules="all" cellpadding="3" frame="border" rules="all"
 
|- align="left" valign="top"
 
|- align="left" valign="top"
| id="r5c1-t2" headers="r1c1-t2" align="left" | ''' EIS'''
+
! id="r1c1-t6" align="left" valign="bottom" | '''Descriptor'''
| headers="r5c1-t2 r1c2-t2" align="left" |
+
! id="r1c2-t6" align="left" valign="bottom" | '''[[#How to Configure Method or Direct Field Access at the Project Level Using Workbench|Using the Workbench]]<br>'''
Select '''EIS''' to create an EIS project to a nonrelational data source using XML records. Use the '''Platform''' list to specify the JCA adapter to use.See [[Introduction%20to%20EIS%20Projects%20(ELUG)|Introduction to EIS Projects]] for more information.
+
! id="r1c3-t6" align="left" valign="bottom" | '''Using  Java'''
 
|- align="left" valign="top"
 
|- align="left" valign="top"
| id="r6c1-t2" headers="r1c1-t2" align="left" | ''' XML'''
+
| id="r2c1-t6" headers="r1c1-t6" align="left" |
| headers="r6c1-t2 r1c2-t2" align="left" |
+
Relational Projects
Select '''XML''' to create a nontransactional, nonpersistent XML project to an XML schema. Alternatively, you can generate both an XML project and object model classes (see [[Creating%20an%20XML%20Project%20(ELUG)|Creating an XML Project from an XML Schema]]).See [[Introduction%20to%20XML%20Projects%20(ELUG)|Introduction to XML Projects]] for more information.
+
| headers="r2c1-t6 r1c2-t6" align="left" |
 +
[[Image:support.gif|Supported.]]<br>
 +
| headers="r2c1-t6 r1c3-t6" align="left" |
 +
[[Image:unsupport.gif|Unsupported]]<br>
 +
|- align="left" valign="top"
 +
| id="r3c1-t6" headers="r1c1-t6" align="left" |
 +
EIS Projects
 +
| headers="r3c1-t6 r1c2-t6" align="left" |
 +
[[Image:support.gif|Supported.]]<br>
 +
| headers="r3c1-t6 r1c3-t6" align="left" |
 +
[[Image:unsupport.gif|Unsupported]]<br>
 +
|- align="left" valign="top"
 +
| id="r4c1-t6" headers="r1c1-t6" align="left" |
 +
XML Projects
 +
| headers="r4c1-t6 r1c2-t6" align="left" |
 +
[[Image:support.gif|Supported.]]<br>
 +
| headers="r4c1-t6 r1c3-t6" align="left" |
 +
[[Image:unsupport.gif|Unsupported]]<br>
 
|}
 
|}
  
<br>
 
  
For more project information, continue with the following:
 
* Configure the project (see [[Configuring%20a%20Project%20(ELUG)|Configuring a Project]]).
 
* Add mappings and descriptors (see [[Introduction%20to%20Descriptors%20(ELUG)|Introduction to Descriptors]] and [[Introduction%20to%20Mappings%20(ELUG)|Introduction to Mappings]]).
 
* Export the project for use with the EclipseLink runtime (see [[#Exporting Project Information|Exporting Project Information]]).
 
  
 +
This section describes configuring mapped field access at the project level: by default, this configuration applies to all descriptors and their mappings.
  
  
===How to Create a Project Using Java===
+
{| class="Note oac_no_warn" width="80%" border="1" frame="hsides" rules="groups" cellpadding="3" frame="hsides" rules="groups"
To create a project using Java code, use this procedure:
+
| align="left" |
# Implement a project class that extends the <tt>org.eclipse.persistence.sessions.Project</tt> class (see [[#Example 112-1|Specifying a EclipseLink Project in Code]]).
+
'''Note'''<nowiki>:</nowiki> If you change the access default, existing mappings retain their current access settings, but new mappings will be created with the new default.
# Compile the project class.
+
|}
  
 +
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 [[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]].
  
<span id="Example 112-1"></span>
+
If you enable change tracking on a property (for example, you decorate method <tt>getPhone</tt> with <tt>@ChangeTracking</tt>) and you access the field (<tt>phone</tt>) directly, note that EclipseLink does not detect the change. For more information, see [[Introduction to EclipseLink%20Application%20Development%20(ELUG)#Using Method and Direct Field Access|Using Method and Direct Field Access]].
''''' Specifying a EclipseLink Project in Code'''''
+
 
'''/**'''
+
 
'''<nowiki>* The class EmployeeProject is an example of an EclipseLink project defined in</nowiki>
+
 
'''<nowiki>* Java code. The individual parts of the project - the Login and the descriptors,</nowiki>
+
===How to Configure Method or Direct Field Access at the Project Level Using Workbench===
'''<nowiki>* are built inside of methods that are called by the constructor. Note that</nowiki>
+
To specify the field access method information, use this procedure:
'''<nowiki>* EmployeeProject extends the class org.eclipse.persistence.sessions.Project</nowiki>
+
# Select the project object in the '''Navigator'''.
'''<nowiki>*/</nowiki>
+
# Select the '''Defaults''' tab in the '''Editor'''. The Defaults tab appears.<br><span id="Figure 113-3"></span>''''' Defaults Tab, Field Accessing Options'''''<br>[[Image:genfield.gif|Defaults Tab, Field Accessing Options]]<br><br>
public class EmployeeProject extends org.eclipse.persistence.sessions.Project {
+
# Complete the Mapped Field Accessing options.
+
 
'''/**'''
+
 
'''<nowiki>* Supply a zero-argument constructor that initializes all aspects of the project.</nowiki>
+
 
+
==Configuring Default Descriptor Advanced Properties==
'''<nowiki>* Make sure that the login and all the descriptors are initialized and added to</nowiki>
+
You can configure default descriptor advanced properties when using the Workbench.
'''<nowiki>* the project. Project-level properties, such as the name of the project, should</nowiki>
+
 
'''<nowiki>* be specified here</nowiki>
+
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.
'''<nowiki>*/</nowiki>
+
 
public EmployeeProject() {
+
You can also select specific advanced properties for individual descriptors (see [[Configuring%20a%20Descriptor%20(ELUG)|Configuring a Descriptor]]).
  setName("EmployeeProject");
+
 
  applyLogin();
+
This table summarizes which projects support default descriptor advanced property configuration.
 
+
 
  addDescriptor(buildAddressDescriptor());
+
<span id="Table 113-6"></span>
  addDescriptor(buildEmployeeDescriptor());
+
 
  addDescriptor(buildPhoneNumberDescriptor());
+
{| class="RuleFormal" dir="ltr" title="Project Support for Default Descriptor Advanced Properties" summary="This table summarizes which projects support default descriptor advanced properties." width="100%" border="1" frame="border" rules="all" cellpadding="3" frame="border" rules="all"
}
+
|- align="left" valign="top"
+
! id="r1c1-t8" align="left" valign="bottom" | '''Descriptor'''
'''// Data source information'''
+
! id="r1c2-t8" align="left" valign="bottom" | '''[[#How to Configure Default Descriptor Advanced Properties Using Workbench|Using the Workbench]]<br>'''
public void applyLogin() {
+
! id="r1c3-t8" align="left" valign="bottom" | '''Using  Java'''
  DatabaseLogin login = new DatabaseLogin();
+
|- align="left" valign="top"
+
| id="r2c1-t8" headers="r1c1-t8" align="left" |
  '''// use platform appropriate for underlying database'''
+
Relational Projects
  login.usePlatform(
+
| headers="r2c1-t8 r1c2-t8" align="left" |
    new org.eclipse.persistence.platform.database.oracle.Oracle9Platform());
+
[[Image:support.gif|Supported.]]<br>
  login.setDriverClassName("oracle.jdbc.OracleDriver");
+
| headers="r2c1-t8 r1c3-t8" align="left" |
  login.setConnectionString("jdbc:oracle:thin:@HOST:PORT:SID");
+
[[Image:unsupport.gif|Unsupported]]<br>
  login.setUserName("USER NAME");
+
|- align="left" valign="top"
  login.setEncryptedPassword("PASSWORD, ENCRYPTED");
+
| id="r3c1-t8" headers="r1c1-t8" align="left" |
+
EIS Projects
  '''// Configuration Properties'''
+
| headers="r3c1-t8 r1c2-t8" align="left" |
+
[[Image:support.gif|Supported.]]<br>
    setDatasourceLogin(login);
+
| headers="r3c1-t8 r1c3-t8" align="left" |
}
+
[[Image:unsupport.gif|Unsupported]]<br>
+
|- align="left" valign="top"
'''/**'''
+
| id="r4c1-t8" headers="r1c1-t8" align="left" |
'''<nowiki>* Descriptors are built by defining table info, setting properties</nowiki>
+
XML Projects
'''<nowiki>* (caching, etc.) and by adding mappings to the descriptor</nowiki>
+
| headers="r4c1-t8 r1c2-t8" align="left" |
'''<nowiki>*/</nowiki>
+
[[Image:support.gif|Supported.]]<br>
+
| headers="r4c1-t8 r1c3-t8" align="left" |
'''// SECTION: DESCRIPTOR'''
+
[[Image:unsupport.gif|Unsupported]]<br>
public ClassDescriptor buildAddressDescriptor() {
+
|}
+
  RelationalDescriptor descriptor = new RelationalDescriptor();
+
+
  '''// specify the class to be made persistent'''
+
  descriptor.setJavaClass(examples.servletjsp.model.Address.class);
+
+
  '''// specify the tables to be used and primary key'''
+
+
  descriptor.addTableName("ADDRESS");
+
  descriptor.addPrimaryKeyFieldName("ADDRESS.ADDRESS_ID");
+
+
  '''// Descriptor Properties'''
+
  descriptor.useSoftCacheWeakIdentityMap(); 
+
  descriptor.setIdentityMapSize(100)
+
  descriptor.useRemoteSoftCacheWeakIdentityMap()
+
  descriptor.setRemoteIdentityMapSize(100)
+
  descriptor.setSequenceNumberFieldName("ADDRESS.ADDRESS_ID")
+
  descriptor.setSequenceNumberName("ADD_SEQ"); 
+
  descriptor.setAlias("Address");
+
+
  '''// Mappings'''
+
  DirectToFieldMapping cityMapping = new DirectToFieldMapping();
+
  cityMapping.setAttributeName("city");
+
  cityMapping.setFieldName("ADDRESS.CITY");
+
  descriptor.addMapping(cityMapping);
+
+
  '''// Additional mappings are added to the descriptor using the addMapping method'''
+
+
  return descriptor;}
+
  
 
<br>
 
<br>
  
{| class="Note oac_no_warn" width="80%" border="1" frame="hsides" rules="groups" cellpadding="3" frame="hsides" rules="groups"
+
 
| align="left" |
+
 
'''Note'''<nowiki>:</nowiki> Using Workbench provides a starting point for a custom project class. For more information, see [[Creating%20a%20Relational%20Project%20(ELUG)|How to Export Project Java Source Using Workbench]].
+
===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:
 +
# Select the project object in the '''Navigator'''.
 +
# Select the '''Defaults''' tab in the '''Editor'''. The Defaults tab appears.<br><span id="Figure 113-4"></span>''''' Defaults Tab, Descriptor Advanced Properties'''''<br>[[Image:desadv.gif|Defaults Tab, Descriptor Advanced Properties]]<br><br>
 +
 
 +
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'''
 +
: [[#Configuring Default Descriptor Advanced Properties|Configuring Default Descriptor Advanced Properties]]
 +
: [[Configuring%20a%20Descriptor%20(ELUG)|Configuring a Descriptor]]
 +
: [[#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.
 +
 
 +
 
 +
<span id="Table 113-7"></span>
 +
{| class="RuleFormal" dir="ltr" title="Project Support for Existence Checking" summary="This table summarizes which projects support existence checking." width="100%" border="1" frame="border" rules="all" cellpadding="3" frame="border" rules="all"
 +
|- align="left" valign="top"
 +
! id="r1c1-t9" align="left" valign="bottom" | '''Descriptor'''
 +
! id="r1c2-t9" align="left" valign="bottom" | '''[[#How to Configure Existence Checking at the Project Level Using Workbench|Using the Workbench]]<br>'''
 +
! id="r1c3-t9" align="left" valign="bottom" | '''Using  Java'''
 +
|- align="left" valign="top"
 +
| id="r2c1-t9" headers="r1c1-t9" align="left" |
 +
Relational Projects
 +
| headers="r2c1-t9 r1c2-t9" align="left" |
 +
[[Image:support.gif|Supported.]]<br>
 +
| headers="r2c1-t9 r1c3-t9" align="left" |
 +
[[Image:support.gif|Supported.]]<br>
 +
|- align="left" valign="top"
 +
| id="r3c1-t9" headers="r1c1-t9" align="left" |
 +
EIS Projects
 +
| headers="r3c1-t9 r1c2-t9" align="left" |
 +
[[Image:support.gif|Supported.]]<br>
 +
| headers="r3c1-t9 r1c3-t9" align="left" |
 +
[[Image:support.gif|Supported.]]<br>
 +
|- align="left" valign="top"
 +
| id="r4c1-t9" headers="r1c1-t9" align="left" |
 +
XML Projects
 +
| headers="r4c1-t9 r1c2-t9" align="left" |
 +
[[Image:unsupport.gif|Unsupported]]<br>
 +
| headers="r4c1-t9 r1c3-t9" align="left" |
 +
[[Image:unsupport.gif|Unsupported]]<br>
 +
|}
 +
 
 +
 
 +
 
 +
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 [[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:
 +
* [[Introduction%20to%20Cache%20(ELUG)#Cache Type and Object Identity|Cache Type and Object Identity]]
 +
* [[Introduction%20to%20EclipseLink%20Queries%20(ELUG)#Queries and the Cache|Queries and the Cache]]
 +
* [[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:
 +
# Select the project object in the '''Navigator'''.
 +
# Select the '''Defaults''' tab in the '''Editor'''. The Defaults tab appears.<br><span id="Figure 113-5"></span>''''' Defaults Tab, Existence Checking Options'''''<br>[[Image:existnc.gif|Defaults Tab, Existence Checking Options]]<br><br>
 +
# 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:
 +
 
 +
 
 +
 
 +
{| class="HRuleInformal" dir="ltr" title="This table defines existence checking options on the Defaults tab for Workbench project" summary="This table defines existence checking options on the Defaults tab for Workbench project" width="100%" border="1" frame="hsides" rules="rows" cellpadding="3" frame="hsides" rules="rows"
 +
|- align="left" valign="top"
 +
! id="r1c1-t10" align="left" valign="bottom" | '''Field'''
 +
! id="r1c2-t10" align="left" valign="bottom" | '''Description'''
 +
|- align="left" valign="top"
 +
| id="r2c1-t10" headers="r1c1-t10" align="left" | '''Check Cache'''
 +
| headers="r2c1-t10 r1c2-t10" align="left" |
 +
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.
 +
|- align="left" valign="top"
 +
| id="r3c1-t10" headers="r1c1-t10" align="left" | '''Check Database'''
 +
| headers="r3c1-t10 r1c2-t10" align="left" |
 +
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 [[Using%20Advanced%20Unit%20of%20Work%20API%20(ELUG)#Using Check Database|Using Check Database]].
 +
|- align="left" valign="top"
 +
| id="r4c1-t10" headers="r1c1-t10" align="left" | '''Assume Existence'''
 +
| headers="r4c1-t10 r1c2-t10" align="left" |
 +
Always assume objects exist: always do an update (never do an insert). For more information, see [[Using%20Advanced%20Unit%20of%20Work%20API%20(ELUG)#Using Assume Existence|Using Assume Existence]].
 +
|- align="left" valign="top"
 +
| id="r5c1-t10" headers="r1c1-t10" align="left" | '''Assume Nonexistence'''
 +
| headers="r5c1-t10 r1c2-t10" align="left" |
 +
Always assume objects do not exist: always do an insert (never do an update). For more information, see [[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 [[#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.
 +
 
 +
 
 +
<span id="Table 113-8"></span>
 +
{| class="RuleFormal" dir="ltr" title="Project Support for Project Deployment XML Options" summary="This table summarizes which projects support project deployment XML options." width="100%" border="1" frame="border" rules="all" cellpadding="3" frame="border" rules="all"
 +
|- align="left" valign="top"
 +
! id="r1c1-t11" align="left" valign="bottom" | '''Descriptor'''
 +
! id="r1c2-t11" align="left" valign="bottom" | '''[[#How to Configure Project Deployment XML Options Using Workbench|Using the Workbench]]<br>'''
 +
! id="r1c3-t11" align="left" valign="bottom" | '''Using  Java'''
 +
|- align="left" valign="top"
 +
| id="r2c1-t11" headers="r1c1-t11" align="left" |
 +
Relational Projects
 +
| headers="r2c1-t11 r1c2-t11" align="left" |
 +
[[Image:support.gif|Supported.]]<br>
 +
| headers="r2c1-t11 r1c3-t11" align="left" |
 +
[[Image:unsupport.gif|Unsupported]]<br>
 +
|- align="left" valign="top"
 +
| id="r3c1-t11" headers="r1c1-t11" align="left" |
 +
EIS Projects
 +
| headers="r3c1-t11 r1c2-t11" align="left" |
 +
[[Image:support.gif|Supported.]]<br>
 +
| headers="r3c1-t11 r1c3-t11" align="left" |
 +
[[Image:unsupport.gif|Unsupported]]<br>
 +
|- align="left" valign="top"
 +
| id="r4c1-t11" headers="r1c1-t11" align="left" |
 +
XML Projects
 +
| headers="r4c1-t11 r1c2-t11" align="left" |
 +
[[Image:support.gif|Supported.]]<br>
 +
| headers="r4c1-t11 r1c3-t11" align="left" |
 +
[[Image:unsupport.gif|Unsupported]]<br>
 +
|}
 +
 
 +
 
 +
 
 +
 
 +
 
 +
===How to Configure Project Deployment XML Options Using Workbench===
 +
To specify the default export options, use this procedure:
 +
# Select the project object in the '''Navigator'''.
 +
# Select the '''Options''' tab in the '''Editor'''. The Options tab appears.<br><span id="Figure 113-6"></span>''''' Options Tab, Project Deployment XML Options'''''<br>[[Image:prjoptxml.gif|Options Tab, Project Deployment XML Options]]<br><br>
 +
# 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:
 +
 
 +
{| class="HRuleInformal" dir="ltr" title="This table defines the Project Deployment XML options on the Options tab for Workbench project" summary="This table defines the Project Deployment XML options on the Options tab for Workbench project" width="100%" border="1" frame="hsides" rules="rows" cellpadding="3" frame="hsides" rules="rows"
 +
|- align="left" valign="top"
 +
! id="r1c1-t12" align="left" valign="bottom" | '''Field'''
 +
! id="r1c2-t12" align="left" valign="bottom" | '''Description'''
 +
|- align="left" valign="top"
 +
| id="r2c1-t12" headers="r1c1-t12" align="left" | '''File Name'''
 +
| headers="r2c1-t12 r1c2-t12" align="left" | File name (such as <tt>project.xml</tt>) to use when generating project deployment XML.
 +
|- align="left" valign="top"
 +
| id="r3c1-t12" headers="r1c1-t12" align="left" | '''Directory'''
 +
| headers="r3c1-t12 r1c2-t12" align="left" | Directory in which to save the generated deployment XML file.
 
|}
 
|}
  
 
<br>
 
<br>
  
 +
'''See Also'''
 +
: [[#Configuring Project Deployment XML Options|Configuring Project Deployment XML Options]]
 +
: [[#Configuring a Project|Configuring a Project]]
 +
: [[Creating%20a%20Project%20(ELUG)#Exporting Project Information|Exporting Project Information]]
  
  
==Working with Projects==
 
Using Workbench, you can perform the following project functions:
 
* [[#How to Open Existing Projects|How to Open Existing Projects]]
 
* [[#How to Save Projects|How to Save Projects]]
 
* [[#How to Generate the Project Status Report|How to Generate the Project Status Report]]
 
  
See [[Configuring%20a%20Project%20(ELUG)|Configuring a Project]] for additional information on working with Workbench projects.
+
==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 [[#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.
 +
 +
<span id="Table 113-9"></span>
 +
''''' Project Support for Model Java Source Options'''''
 +
{| class="RuleFormal" dir="ltr" title="Project Support for Model Java Source Options" summary="This table summarizes which projects support model java source options." width="100%" border="1" frame="border" rules="all" cellpadding="3" frame="border" rules="all"
 +
|- align="left" valign="top"
 +
! id="r1c1-t13" align="left" valign="bottom" | '''Descriptor'''
 +
! id="r1c2-t13" align="left" valign="bottom" | '''[[#How to Configure Model Java Source Code Options Using Workbench|Using the Workbench]]<br>'''
 +
! id="r1c3-t13" align="left" valign="bottom" | '''Using  Java'''
 +
|- align="left" valign="top"
 +
| id="r2c1-t13" headers="r1c1-t13" align="left" |
 +
Relational Projects
 +
| headers="r2c1-t13 r1c2-t13" align="left" |
 +
[[Image:support.gif|Supported.]]<br>
 +
| headers="r2c1-t13 r1c3-t13" align="left" |
 +
[[Image:unsupport.gif|Unsupported]]<br>
 +
|- align="left" valign="top"
 +
| id="r3c1-t13" headers="r1c1-t13" align="left" |
 +
EIS Projects
 +
| headers="r3c1-t13 r1c2-t13" align="left" |
 +
[[Image:support.gif|Supported.]]<br>
 +
| headers="r3c1-t13 r1c3-t13" align="left" |
 +
[[Image:unsupport.gif|Unsupported]]<br>
 +
|- align="left" valign="top"
 +
| id="r4c1-t13" headers="r1c1-t13" align="left" |
 +
XML Projects
 +
| headers="r4c1-t13 r1c2-t13" align="left" |
 +
[[Image:support.gif|Supported.]]<br>
 +
| headers="r4c1-t13 r1c3-t13" align="left" |
 +
[[Image:unsupport.gif|Unsupported]]<br>
 +
|}
 +
 +
 +
 +
 +
 +
===How to Configure Model Java Source Code Options Using Workbench===
 +
To specify the default export options, use this procedure:
 +
# Select the project object in the '''Navigator'''.
 +
# Select the '''Options''' tab in the '''Editor'''. The Options tab appears.<br><span id="Figure 113-7"></span>''''' Options Tab, Model Java Source options'''''<br>[[Image:prjoptmd.gif|Options Tab, Model Java Source options]]<br><br>
 +
# 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 [[Creating%20a%20Descriptor%20(ELUG)#Generating Java Code for Descriptors|Generating Java Code for Descriptors]].
 +
 +
'''See Also'''
 +
: [[#Configuring a Project|Configuring a Project]]
 +
: [[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.
 +
 +
 +
<span id="'Table 113-10"></span>
 +
''''' Project Support for Identity Map Configuration'''''
 +
 +
{| class="RuleFormal" dir="ltr" title="Project Support for Identity Map Configuration" summary="This table summarizes which projects support identity map configuration." width="100%" border="1" frame="border" rules="all" cellpadding="3" frame="border" rules="all"
 +
|- align="left" valign="top"
 +
! id="r1c1-t14" align="left" valign="bottom" | '''Descriptor'''
 +
! id="r1c2-t14" align="left" valign="bottom" | '''[[#How to Configure Cache Type and Size at the Project Level Using Workbench|Using the Workbench]]<br>'''
 +
! id="r1c3-t14" align="left" valign="bottom" | '''[[#How to Configure Cache Type and Size at the Project Level Using Java|Using Java]]<br>'''
 +
|- align="left" valign="top"
 +
| id="r2c1-t14" headers="r1c1-t14" align="left" |
 +
Relational Projects
 +
| headers="r2c1-t14 r1c2-t14" align="left" |
 +
[[Image:support.gif|Supported.]]<br>
 +
| headers="r2c1-t14 r1c3-t14" align="left" |
 +
[[Image:support.gif|Supported.]]<br>
 +
|- align="left" valign="top"
 +
| id="r3c1-t14" headers="r1c1-t14" align="left" |
 +
EIS Projects
 +
| headers="r3c1-t14 r1c2-t14" align="left" |
 +
[[Image:support.gif|Supported.]]<br>
 +
| headers="r3c1-t14 r1c3-t14" align="left" |
 +
[[Image:support.gif|Supported.]]<br>
 +
|- align="left" valign="top"
 +
| id="r4c1-t14" headers="r1c1-t14" align="left" |
 +
XML Projects
 +
| headers="r4c1-t14 r1c2-t14" align="left" |
 +
[[Image:unsupport.gif|Unsupported]]<br>
 +
| headers="r4c1-t14 r1c3-t14" align="left" |
 +
[[Image:unsupport.gif|Unsupported]]<br>
 +
|}
 +
 +
 +
 +
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 [[Configuring%20a%20Descriptor%20(ELUG)#Configuring Cache Type and Size at the Descriptor Level|Configuring Cache Type and Size at the Descriptor Level]].
  
===How to Open Existing Projects===
 
Use this procedure to open an existing project:
 
  
# [[Image:openbtn.gif|Open Project button]]<br> Click '''Open Project''' on the toolbar. The Choose a File dialog box appears. You can also open a project by choosing '''File''' > '''Open''' from the menu.<br>
 
  
 
{| class="Note oac_no_warn" width="80%" border="1" frame="hsides" rules="groups" cellpadding="3" frame="hsides" rules="groups"
 
{| class="Note oac_no_warn" width="80%" border="1" frame="hsides" rules="groups" cellpadding="3" frame="hsides" rules="groups"
 
| align="left" |
 
| align="left" |
'''Note'''<nowiki>:</nowiki>The '''File''' menu option contains a list of recently opened projects. You can select one of these projects to open. See [[Using%20Workbench%20(ELUG)|How to Use General Preferences]] for information on customizing this list.
+
'''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.
|}<br>
+
|}
  
 
<br>
 
<br>
  
'''See Also'''
+
For detailed information on caching and object identity, and the recommended settings to maximize EclipseLink performance, see to [[Introduction%20to%20Cache%20(ELUG)#Cache Type and Object Identity|Cache Type and Object Identity]].
: [[#Working with Projects]]
+
: [[Introduction%20to%20Projects|Introduction to Projects]]
+
  
 +
For more information about the cache, see [[Introduction%20to%20Cache%20(ELUG)|Introduction to Cache]].
  
  
===How to Save Projects===
 
Workbench does not automatically save your project. Be sure to save your project often to avoid losing data.
 
  
To save your project(s), use this procedure:
+
===How to Configure Cache Type and Size at the Project Level Using Workbench===
# [[Image:savebtn.gif|Save Selected Project button.]]<br>[[Image:saveall.gif|Save All Projects button.]]<br> Click '''Save''' or '''Save All''' to save your project(s).You can also save a project by choosing '''File''' > '''Save''' or '''File''' > '''Save All''' from the menu.
+
To specify the cache identity map, use this procedure:
# If you close Workbench while there are currently unsaved changes, the Save Project dialog box appears.<br><span id="Figure 112-3"></span>''''' Save Projects Dialog Box'''''<br>[[Image:save.gif|Save Projects Dialog Box]]<br><br>
+
# Select the project object in the '''Navigator'''.
# Select the project(s) to save and click '''OK'''.Click '''Select All''' to select all the available projects.
+
# Select the '''Defaults''' tab in the '''Editor'''. The Defaults tab appears.<br><span id="Figure 113-8"></span>''''' Defaults Tab, Cache Identity Map Options'''''<br>[[Image:projident.gif|Defaults Tab, Cache Identity Map Options]]<br><br>
 +
# Complete the '''Caching''' options on the tab.
  
To save your project with a new name or location, see [[#Saving Projects with a New Name or Location|Saving Projects with a New Name or Location]].
+
Use this table to enter data in each of the following fields to specify the caching options:
  
 +
{| class="HRuleInformal" dir="ltr" title="This table defines the cache identity map options on the Defaults tab for a project" summary="This table defines the cache identity map options on the Defaults tab for a project" width="100%" border="1" frame="hsides" rules="rows" cellpadding="3" frame="hsides" rules="rows"
 +
|- align="left" valign="top"
 +
! id="r1c1-t16" align="left" valign="bottom" | '''Field'''
 +
! id="r1c2-t16" align="left" valign="bottom" | '''Description'''
 +
|- align="left" valign="top"
 +
| id="r2c1-t16" headers="r1c1-t16" align="left" | '''Type'''
 +
| headers="r2c1-t16 r1c2-t16" align="left" |
 +
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 [[Introduction%20to%20Cache%20(ELUG)#Soft Cache Weak Identity Map and Hard Cache Weak Identity Map|<tt>SoftCacheWeakIdentityMap</tt>]]).
 +
* '''Weak with Hard Subcache'''  – cache first ''n'' elements in soft space, anything after that in hard space (see [[Introduction%20to%20Cache%20(ELUG)#Soft Cache Weak Identity Map and Hard Cache Weak Identity Map|<tt>HardCacheWeakIdentityMap</tt>]]).
 +
* '''Weak'''  – cache everything in weak space (see [[Introduction%20to%20Cache%20(ELUG)#Weak Identity Map|<tt>WeakIdentityMap</tt>]]).
 +
* '''Soft''' – cache everything in soft space (see [[Introduction%20to%20Cache%20(ELUG)#Soft Identity Map|<tt>SoftIdentityMap</tt>]]).
 +
* '''Full''' – cache everything permanently (see [[Introduction%20to%20Cache%20(ELUG)#Full Identity Map|<tt>FullIdentityMap</tt>]]).
 +
* '''None'''  – cache nothing (see [[Introduction%20to%20Cache%20(ELUG)#No Identity Map|No Identity Map]]|<tt>NoIdentityMap</tt>).
  
 +
For more information, see [[Introduction%20to%20Cache%20(ELUG)#Cache Type and Object Identity|Cache Type and Object Identity]].
  
====Saving Projects with a New Name or Location====
+
Changing the project's default identity map does not affect descriptors that already exist in the project.
To save your project with a different name or location, use this procedure:
+
|- align="left" valign="top"
# [[Image:saveasbt.gif|Save As button]]<br> Choose '''File''' > '''Save As'''. The Save As dialog box appears.<br><span id="Figure 112-4"></span>''''' Save As Dialog Box'''''<br>[[Image:saveas.gif|Save As Dialog Box]]<br><br>
+
| id="r3c1-t16" headers="r1c1-t16" align="left" | '''Size'''
# Select a name and location, then click '''Save'''.
+
| headers="r3c1-t16 r1c2-t16" align="left" |
 +
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 <tt>ClassDescriptor</tt> methods to configure the descriptor to use the appropriate type of identity map:
 +
* <tt>useFullIdentitMap</tt>
 +
* <tt>useWeakIdentitMap</tt>
 +
* <tt>useSoftIdentitMap</tt>
 +
* <tt>useSoftCacheWeakIdentitMap</tt>
 +
* <tt>useHardCacheWeakIdentityMap</tt>
 +
* <tt>useNoIdentityMap</tt>
 +
 
 +
Use the <tt>ClassDescriptor</tt> method <tt>setIdentityMapSize</tt> to configure the size of the identity map.
 +
 
 +
 
 +
 
 +
 
 +
==Configuring Cache Isolation at the Project Level==
 +
If you plan to use isolated sessions (see [[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.
 +
 
 +
 
 +
<span id="Table 113-11"><span>
 +
 
 +
{| class="RuleFormal" dir="ltr" title="Project Support for Cache Isolation Configuration" summary="This table summarizes which projects support cache isolation configuration." width="100%" border="1" frame="border" rules="all" cellpadding="3" frame="border" rules="all"
 +
|- align="left" valign="top"
 +
! id="r1c1-t17" align="left" valign="bottom" | '''Descriptor'''
 +
! id="r1c2-t17" align="left" valign="bottom" | '''[[#How to Configure Cache Isolation at the Project Level Using Workbench|Using the Workbench]]<br>'''
 +
! id="r1c3-t17" align="left" valign="bottom" | '''Using  Java'''
 +
|- align="left" valign="top"
 +
| id="r2c1-t17" headers="r1c1-t17" align="left" |
 +
Relational Projects
 +
| headers="r2c1-t17 r1c2-t17" align="left" |
 +
[[Image:support.gif|Supported.]]<br>
 +
| headers="r2c1-t17 r1c3-t17" align="left" |
 +
[[Image:support.gif|Supported.]]<br>
 +
|- align="left" valign="top"
 +
| id="r3c1-t17" headers="r1c1-t17" align="left" |
 +
EIS Projects
 +
| headers="r3c1-t17 r1c2-t17" align="left" |
 +
[[Image:support.gif|Supported.]]<br>
 +
| headers="r3c1-t17 r1c3-t17" align="left" |
 +
[[Image:support.gif|Supported.]]<br>
 +
|- align="left" valign="top"
 +
| id="r4c1-t17" headers="r1c1-t17" align="left" |
 +
XML Projects
 +
| headers="r4c1-t17 r1c2-t17" align="left" |
 +
[[Image:unsupport.gif|Unsupported]]<br>
 +
| headers="r4c1-t17 r1c3-t17" align="left" |
 +
[[Image:unsupport.gif|Unsupported]]<br>
 +
|}
 +
 
 +
<br>
 +
 
 +
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 [[Configuring%20a%20Descriptor%20(ELUG)#Configuring Cache Isolation at the Descriptor Level|Configuring Cache Isolation at the Descriptor Level]].
  
 
<br>
 
<br>
Line 218: Line 723:
 
{| class="Note oac_no_warn" width="80%" border="1" frame="hsides" rules="groups" cellpadding="3" frame="hsides" rules="groups"
 
{| class="Note oac_no_warn" width="80%" border="1" frame="hsides" rules="groups" cellpadding="3" frame="hsides" rules="groups"
 
| align="left" |
 
| align="left" |
'''Caution'''<nowiki>:</nowiki>Do not rename the <tt>.mwp</tt> file outside of Workbench. To rename a project, use the '''Save As''' option.
+
'''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.
 
|}
 
|}
  
<br>
 
  
  
  
===How to Generate the Project Status Report===
+
===How to Configure Cache Isolation at the Project Level Using Workbench===
Use the project status report to display a list of all warnings and errors in the Workbench project. This report is similar to the Problems window (see [[Using%20Workbench%20(ELUG)|Using Workbench]]), but lets you easily copy and paste the errors into documents or messages. To generate the project status report, use this procedure:
+
To specify the cache isolation options, use this procedure:
 +
# Select the project object in the '''Navigator'''.
 +
# Select the '''Defaults''' tab in the '''Editor'''. The Defaults tab appears.<br><span id="Figure 113-9"></span>''''' Defaults Tab, Cache Isolation Options'''''<br>[[Image:projisol.gif|Defaults Tab, Cache Isolation Options]]<br><br>
 +
# 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 [[Introduction%20to%20Cache%20(ELUG)#Cache Isolation|Cache Isolation]].
 +
#* '''Shared''' – if you want all objects visible in the shared session cache (default).
  
# [[Image:strptbtn.gif|Project Status Report button]]<br> Right-click the '''Problems''' label above the '''Problems''' window and select '''Problem Report'''. The Project Status Report dialog box appears, displaying the status of each Workbench project.'''You can also generate the project status report by selecting '''Tools''' > '''Problem Report''' from the menu.<br><span id="Figure 112-5"></span>''''' Problem Report Dialog Box'''''<br>[[Image:statrpt.gif|Problem Report Dialog Box]]<br><br>
 
  
See for information on each reported error.
 
  
To copy the report to another application, click '''Copy'''.
+
==Configuring Cache Coordination Change Propagation at the Project Level==
 +
If you plan to use a coordinated cache (see [[Introduction%20to%20Cache%20(ELUG)#Cache Coordination|Cache Coordination]]), you can configure how and under what conditions a coordinated cache propagates changes.
  
'''See Also'''
+
This table summarizes which projects support cache coordination change propagation configuration.
: [[#How to Generate the Project Status Report|How to Generate the Project Status Report]]
+
 
 +
 
 +
<span id="Table 113-12"></span>
 +
''''' Project Support for Cache Coordination Change Propagation Configuration'''''
 +
{| class="RuleFormal" dir="ltr" title="Project Support for Cache Coordination Change Propagation Configuration" summary="This table summarizes which projects support Cache Coordination Change Propagation Configuration" width="100%" border="1" frame="border" rules="all" cellpadding="3" frame="border" rules="all"
 +
|- align="left" valign="top"
 +
! id="r1c1-t19" align="left" valign="bottom" | '''Descriptor'''
 +
! id="r1c2-t19" align="left" valign="bottom" | '''[[#How to Configure Cache Coordination Change Propagation at the Project Level Using Workbench|Using the Workbench]]<br>'''
 +
! id="r1c3-t19" align="left" valign="bottom" | '''Using  Java'''
 +
|- align="left" valign="top"
 +
| id="r2c1-t19" headers="r1c1-t19" align="left" |
 +
Relational Projects
 +
| headers="r2c1-t19 r1c2-t19" align="left" |
 +
[[Image:support.gif|Supported.]]<br>
 +
| headers="r2c1-t19 r1c3-t19" align="left" |
 +
[[Image:support.gif|Supported.]]<br>
 +
|- align="left" valign="top"
 +
| id="r3c1-t19" headers="r1c1-t19" align="left" |
 +
EIS Projects
 +
| headers="r3c1-t19 r1c2-t19" align="left" |
 +
[[Image:support.gif|Supported.]]<br>
 +
| headers="r3c1-t19 r1c3-t19" align="left" |
 +
[[Image:support.gif|Supported.]]<br>
 +
|- align="left" valign="top"
 +
| id="r4c1-t19" headers="r1c1-t19" align="left" |
 +
XML Projects
 +
| headers="r4c1-t19 r1c2-t19" align="left" |
 +
[[Image:unsupport.gif|Unsupported]]<br>
 +
| headers="r4c1-t19 r1c3-t19" align="left" |
 +
[[Image:unsupport.gif|Unsupported]]<br>
 +
|}
  
  
 +
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.
  
==Exporting Project Information==
+
You can override the project-level configuration by defining cache coordination change propagation options at the descriptor level. For information, see [[Configuring%20a%20Descriptor%20(ELUG)#Configuring Cache Coordination Change Propagation at the Descriptor Level|Configuring Cache Coordination Change Propagation at the Descriptor Level]].
To use your project with the EclispeLink Foundation Library at run time, you must either generate deployment XML or export the project to Java source code.
+
  
For all project types, Workbench can generate and export the following project information:
+
To complete your coordinated cache configuration, see [[Configuring%20a%20Coordinated%20Cache%20(ELUG)#Configuring a Coordinated Cache|Configuring a Coordinated Cache]].
* Deployment information (see [[#How to Export Deployment XML Information Using Workbench|How to Export Deployment XML Information Using Workbench]]) (<tt>project.xml</tt> file)
+
* Model Java source (see [[#How to Export Model Java Source Using Workbench|ow to Export Model Java Source Using Workbench]])
+
  
 
<br>
 
<br>
Line 250: Line 786:
 
{| class="Note oac_no_warn" width="80%" border="1" frame="hsides" rules="groups" cellpadding="3" frame="hsides" rules="groups"
 
{| class="Note oac_no_warn" width="80%" border="1" frame="hsides" rules="groups" cellpadding="3" frame="hsides" rules="groups"
 
| align="left" |
 
| align="left" |
'''Note'''<nowiki>:</nowiki>When exporting Java source and deployment XML, Workbench writes the database password (if applicable) using Java Cryptography Extension (JCE) encryption. For information on how to specify password encryption options, see [[Configuring%20a%20Data%20Source%20Login%20(ELUG)|Configuring Password Encryption]].
+
'''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:
 +
# Select the project object in the '''Navigator'''.
 +
# Select the '''Defaults''' tab in the '''Editor'''. The Defaults tab appears.<br><span id="Figure 113-10"></span>''''' Defaults Tab, Coordination Options'''''<br>[[Image:projcord.gif|Defaults Tab, Coordination Options]]<br><br>
 +
# Complete the '''Coordination''' option] on the tab.
 +
 
 +
Use the following information to enter data in the Coordination field:
 +
 
 +
{| class="RuleInformalMax" dir="ltr" title="This table defines cache coordination options on the Defaults tab for the project." summary="This table defines cache coordination options on the Defaults tab for the project." width="100%" border="1" frame="border" rules="all" cellpadding="3" frame="border" rules="all"
 +
|- align="left" valign="top"
 +
! id="r1c1-t21" align="left" valign="bottom" | '''Coordination Option'''
 +
! id="r1c2-t21" align="left" valign="bottom" | '''Description'''
 +
! id="r1c3-t21" align="left" valign="bottom" | '''When to Use'''
 +
|- align="left" valign="top"
 +
| id="r2c1-t21" headers="r1c1-t21" align="left" | '''None'''
 +
| headers="r2c1-t21 r1c2-t21" align="left" | For both existing and new instances, do not propagate a change notification.
 +
| headers="r2c1-t21 r1c3-t21" align="left" | Infrequently read or changed objects.
 +
|- align="left" valign="top"
 +
| id="r3c1-t21" headers="r1c1-t21" align="left" | '''Synchronize Changes'''
 +
| headers="r3c1-t21 r1c2-t21" align="left" |
 +
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.
 +
| headers="r3c1-t21 r1c3-t21" align="left" |
 +
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.
 +
|- align="left" valign="top"
 +
| id="r4c1-t21" headers="r1c1-t21" align="left" | '''Synchronize Changes and New Objects'''
 +
| headers="r4c1-t21 r1c2-t21" align="left" |
 +
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).
 +
| headers="r4c1-t21 r1c3-t21" align="left" |
 +
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.
 +
|- align="left" valign="top"
 +
| id="r5c1-t21" headers="r1c1-t21" align="left" | '''Invalidate Changed Objects'''
 +
| headers="r5c1-t21 r1c2-t21" align="left" |
 +
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.
 +
| headers="r5c1-t21 r1c3-t21" align="left" | Frequently read or changed objects that contain many attributes in cases where many of the attributes are frequently changed.
 +
|}
 +
 
 +
<br>
 +
 
 +
 
 +
 
 +
==Configuring Cache Expiration at the Project Level==
 +
By default, objects remain in the cache until they are explicitly deleted (see [[Using%20Basic%20Unit%20of%20Work%20API%20(ELUG)#Deleting Objects|Deleting Objects]]) or garbage-collected when using a weak identity map (see [[#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 <tt>CacheInvalidationPolicy</tt> 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 [[Configuring%20a%20Descriptor%20(ELUG)#Configuring Cache Refreshing|Configuring Cache Refreshing]]).
 +
 
 +
This table summarizes which projects support cache invalidation configuration.
 +
 
 +
 
 +
<span id="Table 113-13"></span>
 +
{| class="RuleFormal" dir="ltr" title="Project Support for Cache Invalidation Configuration" summary="This table summarizes which projects support Cache Invalidation Configuration" width="100%" border="1" frame="border" rules="all" cellpadding="3" frame="border" rules="all"
 +
|- align="left" valign="top"
 +
! id="r1c1-t22" align="left" valign="bottom" | '''Descriptor'''
 +
! id="r1c2-t22" align="left" valign="bottom" | '''[[#How to Configure Cache Expiration at the Project Level Using Workbench|Using the Workbench]]<br>'''
 +
! id="r1c3-t22" align="left" valign="bottom" | '''Using Java'''
 +
|- align="left" valign="top"
 +
| id="r2c1-t22" headers="r1c1-t22" align="left" |
 +
Relational Projects
 +
| headers="r2c1-t22 r1c2-t22" align="left" |
 +
[[Image:support.gif|Supported.]]<br>
 +
| headers="r2c1-t22 r1c3-t22" align="left" |
 +
[[Image:support.gif|Supported.]]<br>
 +
|- align="left" valign="top"
 +
| id="r3c1-t22" headers="r1c1-t22" align="left" |
 +
EIS Projects
 +
| headers="r3c1-t22 r1c2-t22" align="left" |
 +
[[Image:support.gif|Supported.]]<br>
 +
| headers="r3c1-t22 r1c3-t22" align="left" |
 +
[[Image:support.gif|Supported.]]<br>
 +
|- align="left" valign="top"
 +
| id="r4c1-t22" headers="r1c1-t22" align="left" |
 +
XML Projects
 +
| headers="r4c1-t22 r1c2-t22" align="left" |
 +
[[Image:unsupport.gif|Unsupported]]<br>
 +
| headers="r4c1-t22 r1c3-t22" align="left" |
 +
[[Image:unsupport.gif|Unsupported]]<br>
 
|}
 
|}
  
 
<br>
 
<br>
  
 +
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 [[Configuring%20a%20Descriptor%20(ELUG)#Configuring Cache Expiration at the Descriptor Level|Configuring Cache Expiration at the Descriptor Level]]) or query level (see [[Using%20Advanced%20Query%20API%20(ELUG)#How to Configure Cache Expiration at the Query Level|How to Configure Cache Expiration at the Query Level]]).
  
===How to Export Deployment XML Information Using Workbench===
+
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 [[Configuring%20a%20Descriptor%20(ELUG)#Configuring Cache Coordination Change Propagation at the Descriptor Level|Configuring Cache Coordination Change Propagation at the Descriptor Level]].
To export your deployment XML file (<tt>project.xml</tt>), use this procedure (see [[Creating%20EclipseLink%20Files%20for%20Deployment%20(ELUG)|Creating EclipseLink Files for Deployment]] for detailed information):
+
# [[Image:expxml.gif|Export Deployment XML button]]<br> Select the project and click '''Export Deployment XML'''.You can also right-click the project in the '''Navigator''' and choose '''Export''' > '''Project Deployment XML''' from the context menu or choose '''Selected''' > '''Export''' > '''Project Deployment XML''' from the menu.If you have not defined deployment and source code generation defaults (see [[Configuring%20a%20Project%20(ELUG)|Configuring a Project]]) Workbench prompts for a file name and directory.
+
  
 
<br>
 
<br>
Line 265: Line 881:
 
{| class="Note oac_no_warn" width="80%" border="1" frame="hsides" rules="groups" cellpadding="3" frame="hsides" rules="groups"
 
{| class="Note oac_no_warn" width="80%" border="1" frame="hsides" rules="groups" cellpadding="3" frame="hsides" rules="groups"
 
| align="left" |
 
| align="left" |
'''Note'''<nowiki>:</nowiki> If your project contains errors, the <tt>project.xml</tt> may not be valid. See for information on each reported error.
+
'''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.
 
|}
 
|}
  
 
<br>
 
<br>
  
 +
For more information, see [[Introduction%20to%20Cache%20(ELUG)#Cache Invalidation|Cache Invalidation]].
  
  
===How to Export Model Java Source Using Workbench===
 
To generate the project model's Java source code, use this procedure:
 
# Right-click the project, package, or specific descriptor in the '''Navigator''' and choose '''Export''' > '''Export Model Java Source''' from the context menu. Workbench creates a <tt>.java</tt> file for each selected descriptor.You can also choose '''Workbench''' > '''Export''' > '''Export Model Java Source''' or '''Selected''' > '''Export''' > '''Model Java Source''' from the menu or click '''Generate Source Code''' on the '''Class''' tab. See [[Using%20Workbench%20(ELUG)|Configuring Class Information]] for more information.
 
# Click '''Generate Source Code''' to generate the project's model Java source.
 
  
If you have not defined deployment and source code generation defaults (see [[Configuring%20a%20Project%20(ELUG)|Configuring a Project]]) Workbench prompts for a root directory.
+
===How to Configure Cache Expiration at the Project Level Using Workbench===
 +
To specify the cache expiration options for the project, use this procedure:
 +
# Select the project object in the '''Navigator'''.
 +
# Select the '''Defaults''' tab in the '''Editor'''. The Defaults tab appears.<br><span id="Figure 113-11"></span>''''' Defaults Tab, Cache Expiry Options'''''<br>[[Image:cachexp.gif|Defaults Tab, Cache Expiry Options]]<br><br>
 +
# Complete the Cache Expiry options on the tab.
 +
 
 +
Use this table to enter data in the following fields on this tab:
 +
 
 +
{| class="HRuleInformal" dir="ltr" title="This table defines the cache expiry options on the Defaults tab for the project." summary="This table defines the cache expiry options on the Defaults tab for the project." width="100%" border="1" frame="hsides" rules="rows" cellpadding="3" frame="hsides" rules="rows"
 +
|- align="left" valign="top"
 +
! id="r1c1-t24" align="left" valign="bottom" | '''Field'''
 +
! id="r1c2-t24" align="left" valign="bottom" | '''Description'''
 +
|- align="left" valign="top"
 +
| id="r2c1-t24" headers="r1c1-t24" align="left" | '''No Expiry'''
 +
| headers="r2c1-t24 r1c2-t24" align="left" | Specify that objects in the cache do not expire.
 +
|- align="left" valign="top"
 +
| id="r3c1-t24" headers="r1c1-t24" align="left" | '''Time to Live Expiry'''
 +
| headers="r3c1-t24 r1c2-t24" align="left" | 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.
 +
|- align="left" valign="top"
 +
| id="r4c1-t24" headers="r1c1-t24" align="left" | '''Daily Expiry'''
 +
| headers="r4c1-t24 r1c2-t24" align="left" | 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.
 +
|- align="left" valign="top"
 +
| id="r5c1-t24" headers="r1c1-t24" align="left" | '''Update Read Time on Update'''
 +
| headers="r5c1-t24 r1c2-t24" align="left" | Specify if the expiry time should be reset after updating an object.
 +
|}
  
<br>
 
  
 
{| class="Note oac_no_warn" width="80%" border="1" frame="hsides" rules="groups" cellpadding="3" frame="hsides" rules="groups"
 
{| class="Note oac_no_warn" width="80%" border="1" frame="hsides" rules="groups" cellpadding="3" frame="hsides" rules="groups"
 
| align="left" |
 
| align="left" |
'''Note'''<nowiki>:</nowiki> If your Workbench project uses UTF-8 character set, you must use a compatible JDK when compiling the exported Java source.
+
'''Note:''' These options apply to all descriptors in a project. See [[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.
 
|}
 
|}
  
<br>
+
 
 +
 
 +
 
 +
 
 +
==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.
 +
 
 +
 
 +
<span id="Table 113-14"></span>
 +
{| class="RuleFormal" dir="ltr" title="Project Support for Project Comments" summary="This table summarizes which projects support project comments." width="100%" border="1" frame="border" rules="all" cellpadding="3" frame="border" rules="all"
 +
|- align="left" valign="top"
 +
! id="r1c1-t26" align="left" valign="bottom" | '''Project Type'''
 +
! id="r1c2-t26" align="left" valign="bottom" | '''[[#How to Configure Project Comments Using Workbench|Using the Workbench]]<br>'''
 +
! id="r1c3-t26" align="left" valign="bottom" | '''Using  Java'''
 +
|- align="left" valign="top"
 +
| id="r2c1-t26" headers="r1c1-t26" align="left" |
 +
Relational Projects
 +
| headers="r2c1-t26 r1c2-t26" align="left" |
 +
[[Image:support.gif|Supported.]]<br>
 +
| headers="r2c1-t26 r1c3-t26" align="left" |
 +
[[Image:unsupport.gif|Unsupported]]<br>
 +
|- align="left" valign="top"
 +
| id="r3c1-t26" headers="r1c1-t26" align="left" |
 +
EIS Projects
 +
| headers="r3c1-t26 r1c2-t26" align="left" |
 +
[[Image:support.gif|Supported.]]<br>
 +
| headers="r3c1-t26 r1c3-t26" align="left" |
 +
[[Image:unsupport.gif|Unsupported]]<br>
 +
|- align="left" valign="top"
 +
| id="r4c1-t26" headers="r1c1-t26" align="left" |
 +
XML Projects
 +
| headers="r4c1-t26 r1c2-t26" align="left" |
 +
[[Image:support.gif|Supported.]]<br>
 +
| headers="r4c1-t26 r1c3-t26" align="left" |
 +
[[Image:unsupport.gif|Unsupported]]<br>
 +
|}
 +
 
 +
 
 +
 
 +
 
 +
 
 +
===How to Configure Project Comments Using Workbench===
 +
To specify a comment for the project, use this procedure:
 +
# Select the project object in the '''Navigator'''.
 +
# Select the '''General''' tab in the '''Editor'''. The General tab appears.<br><span id="Figure 113-12"></span>''''' General Tab, Comments Options'''''<Br>[[Image:gencomment.gif|General Tab, Comments Options]]<br><br>
 +
# Enter descriptive text information in the '''Comment''' field.
 +
 
 +
 
 +
 
 +
 
 +
----
 +
''[[EclipseLink User's Guide Copyright Statement|Copyright Statement]]''
 +
 
 +
 
 +
[[Category: EclipseLink User's Guide]]
 +
[[Category: Release 1]]
 +
[[Category: Task]]

Latest revision as of 07:35, 20 August 2008

Contents

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.

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 Common Project Options table lists the configurable options shared by two or more EclipseLink project types.

For more information, see the following:


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 EclipseLink Project Types), as shown in the Configuring EclipseLink Projects table.

Option to Configure EclipseLink Workbench Java

Project save location

Supported

Unsupported

Classpath

Supported

Unsupported

Method or direct field access

Supported

Unsupported

Default descriptor advanced properties

Supported

Unsupported

Existence checking

Supported

Supported

Deployment XML options

Supported

Unsupported

Model Java source code options

Supported

Unsupported

Cache type and size

Supported

Supported

Cache isolation

Supported

Supported

Cache coordination change propagation

Supported

Supported

Cache expiration

Supported

Supported

Comments

Supported

Unsupported


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.


Descriptor Using the Workbench
Using Java

Relational Projects

Supported.

Unsupported

EIS Projects

Supported.

Unsupported

XML Projects

Supported.

Unsupported



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.

General Tab, Project Save Location
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 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.


Descriptor Using the Workbench
Using Java

Relational Projects

Supported.

Unsupported

EIS Projects

Supported.

Unsupported

XML Projects

Supported.

Unsupported


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 Configuring the Workbench Environment).

After you configure the project classpath, you can use Workbench to import classes into your project (see How to Import and Update Classes).


How to Configure Project Classpath Using Workbench

To specify the project classpath information, use this procedure:

  1. Select the project object in the Navigator.
  2. Click the General tab in the Editor. The General tab appears.
    General Tab, Classpath Options
    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.

Descriptor Using the Workbench
Using Java

Relational Projects

Supported.

Unsupported

EIS Projects

Supported.

Unsupported

XML Projects

Supported.

Unsupported


This section describes configuring mapped field access at the project level: by default, this configuration applies to all descriptors and their mappings.


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 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 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:

  1. Select the project object in the Navigator.
  2. Select the Defaults tab in the Editor. The Defaults tab appears.
    Defaults Tab, Field Accessing Options
    Defaults Tab, Field Accessing Options

  3. 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 Configuring a Descriptor).

This table summarizes which projects support default descriptor advanced property configuration.

Descriptor Using the Workbench
Using Java

Relational Projects

Supported.

Unsupported

EIS Projects

Supported.

Unsupported

XML Projects

Supported.

Unsupported



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:

  1. Select the project object in the Navigator.
  2. Select the Defaults tab in the Editor. The Defaults tab appears.
    Defaults Tab, Descriptor Advanced Properties
    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

Configuring Default Descriptor Advanced Properties
Configuring a Descriptor
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.


Descriptor Using the Workbench
Using Java

Relational Projects

Supported.

Supported.

EIS Projects

Supported.

Supported.

XML Projects

Unsupported

Unsupported


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 Configuring Cache Existence Checking at the Descriptor Level.

For more information see the following:


How to Configure Existence Checking at the Project Level Using Workbench

To specify the existence checking information, use this procedure:

  1. Select the project object in the Navigator.
  2. Select the Defaults tab in the Editor. The Defaults tab appears.
    Defaults Tab, Existence Checking Options
    Defaults Tab, Existence Checking Options

  3. 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:


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 Using Check Database.

Assume Existence

Always assume objects exist: always do an update (never do an insert). For more information, see Using Assume Existence.

Assume Nonexistence

Always assume objects do not exist: always do an insert (never do an update). For more information, see 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 Configuring Project Save Location), and will contain folders for each generated package.

This table summarizes which projects support deployment XML options.


Descriptor Using the Workbench
Using Java

Relational Projects

Supported.

Unsupported

EIS Projects

Supported.

Unsupported

XML Projects

Supported.

Unsupported



How to Configure Project Deployment XML Options Using Workbench

To specify the default export options, use this procedure:

  1. Select the project object in the Navigator.
  2. Select the Options tab in the Editor. The Options tab appears.
    Options Tab, Project Deployment XML Options
    Options Tab, Project Deployment XML Options

  3. 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:

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

Configuring Project Deployment XML Options
Configuring a Project
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 Configuring Project Save Location), and will contain folders for each generated package.

This table summarizes which projects support model Java source code options.

Project Support for Model Java Source Options

Descriptor Using the Workbench
Using Java

Relational Projects

Supported.

Unsupported

EIS Projects

Supported.

Unsupported

XML Projects

Supported.

Unsupported



How to Configure Model Java Source Code Options Using Workbench

To specify the default export options, use this procedure:

  1. Select the project object in the Navigator.
  2. Select the Options tab in the Editor. The Options tab appears.
    Options Tab, Model Java Source options
    Options Tab, Model Java Source options

  3. Complete the fields on the Model Java Source options on the tab.
  4. Specify the project root directory to which Workbench generates model Java source files. For more information, see Generating Java Code for Descriptors.

See Also

Configuring a Project
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.


Project Support for Identity Map Configuration

Descriptor Using the Workbench
Using Java

Relational Projects

Supported.

Supported.

EIS Projects

Supported.

Supported.

XML Projects

Unsupported

Unsupported


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 Configuring Cache Type and Size at the Descriptor Level.


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 Cache Type and Object Identity.

For more information about the cache, see 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:

  1. Select the project object in the Navigator.
  2. Select the Defaults tab in the Editor. The Defaults tab appears.
    Defaults Tab, Cache Identity Map Options
    Defaults Tab, Cache Identity Map Options

  3. 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:

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 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

Supported.

Supported.

EIS Projects

Supported.

Supported.

XML Projects

Unsupported

Unsupported


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 Configuring Cache Isolation at the Descriptor Level.


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:

  1. Select the project object in the Navigator.
  2. Select the Defaults tab in the Editor. The Defaults tab appears.
    Defaults Tab, Cache Isolation Options
    Defaults Tab, Cache Isolation Options

  3. 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 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 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.


Project Support for Cache Coordination Change Propagation Configuration

Descriptor Using the Workbench
Using Java

Relational Projects

Supported.

Supported.

EIS Projects

Supported.

Supported.

XML Projects

Unsupported

Unsupported


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 Configuring Cache Coordination Change Propagation at the Descriptor Level.

To complete your coordinated cache configuration, see Configuring a Coordinated Cache.


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:

  1. Select the project object in the Navigator.
  2. Select the Defaults tab in the Editor. The Defaults tab appears.
    Defaults Tab, Coordination Options
    Defaults Tab, Coordination Options

  3. Complete the Coordination option] on the tab.

Use the following information to enter data in the Coordination field:

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 Deleting Objects) or garbage-collected when using a weak identity map (see 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 Configuring Cache Refreshing).

This table summarizes which projects support cache invalidation configuration.


Descriptor Using the Workbench
Using Java

Relational Projects

Supported.

Supported.

EIS Projects

Supported.

Supported.

XML Projects

Unsupported

Unsupported


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 Configuring Cache Expiration at the Descriptor Level) or query level (see 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 Configuring Cache Coordination Change Propagation at the Descriptor Level.


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 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:

  1. Select the project object in the Navigator.
  2. Select the Defaults tab in the Editor. The Defaults tab appears.
    Defaults Tab, Cache Expiry Options
    Defaults Tab, Cache Expiry Options

  3. Complete the Cache Expiry options on the tab.

Use this table to enter data in the following fields on this tab:

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.


Note: These options apply to all descriptors in a project. See 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.


Project Type Using the Workbench
Using Java

Relational Projects

Supported.

Unsupported

EIS Projects

Supported.

Unsupported

XML Projects

Supported.

Unsupported



How to Configure Project Comments Using Workbench

To specify a comment for the project, use this procedure:

  1. Select the project object in the Navigator.
  2. Select the General tab in the Editor. The General tab appears.
    General Tab, Comments Options
    General Tab, Comments Options

  3. Enter descriptive text information in the Comment field.




Copyright Statement

Back to the top