Skip to main content
summaryrefslogtreecommitdiffstats
blob: 41f23c040bf1d18bba0e296d242683433a133840 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<title>Creating a new JPA project</title>
<meta name="copyright" content="Copyright (c) 2000, 2009 oracle . All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. Contributors: Oracle - initial API and implementation" />
<meta name="generator" content="Oracle DARB XHTML Converter (Mode = ohj/ohw) - Version 1.0.11" />
<meta name="date" content="2013-01-03T9:24:48Z" />
<meta name="robots" content="noarchive" />
<meta name="doctitle" content="Creating a new JPA project" />
<meta name="relnum" content="Release 3.3" />
<meta name="partnum" content="Release 3.3" />
<link rel="copyright" href="dcommon/html/cpyr.htm" title="Copyright" type="text/html" />
<link rel="stylesheet" href="dcommon/css/blafdoc.css" title="Oracle BLAFDoc" type="text/css" />
</head>
<body>
<p class="betadraftsubtitle">Beta Draft: 2013-01-03</p>
<p><a id="CIHHEJCJ" name="CIHHEJCJ"></a></p>
<div class="sect1"><!-- infolevel="all" infotype="General" -->
<h1>Creating a new JPA project</h1>
<p><a id="sthref38" name="sthref38"></a><a id="sthref39" name="sthref39"></a>Use this procedure to create a new JPA project.</p>
<ol>
<li>
<p>From the Navigator or Project Explorer, select <span class="bold">File &gt; New &gt; Project</span>. The Select a wizard dialog appears.</p>
<div align="center">
<div class="inftblnotealso"><br />
<table class="NoteAlso oac_no_warn" summary="" cellpadding="3" cellspacing="0">
<tbody>
<tr>
<td align="left">
<p class="notep1">Tip:</p>
<p>You can also select the JPA perspective and then select <span class="bold">File &gt; New &gt; JPA Project</span>.</p>
</td>
</tr>
</tbody>
</table>
<br /></div>
<!-- class="inftblnotealso" --></div>
<div class="figure"><a id="sthref40" name="sthref40"></a>
<p class="titleinfigure"><a id="sthref41" name="sthref41"></a>Selecting the Create a JPA Project wizard</p>
<img src="img/select_a_wizard_jpa_project.png" alt="The Select a Wizard dialog with JPA project selected." title="The Select a Wizard dialog with JPA project selected." /><br /></div>
<!-- class="figure" --></li>
<li>
<p>Select <span class="bold">JPA Project</span> and then click <span class="bold">Next</span>. The <a href="ref_new_jpa_project.htm#CACBJAGC">New JPA Project page</a> appears.</p>
<div class="figure"><a id="sthref42" name="sthref42"></a>
<p class="titleinfigure"><a id="sthref43" name="sthref43"></a>The JPA Project Page</p>
<img src="img/new_jpa_project_task.png" alt="The JPA Project page of the Create a JPA Project wizard." title="The JPA Project page of the Create a JPA Project wizard." /><br /></div>
<!-- class="figure" --></li>
<li>
<p>Complete the fields on the <a href="ref_new_jpa_project.htm#CACBJAGC">New JPA Project page</a> to specify the project name and location, target runtime, and pre-defined configuration.</p>
<div align="center">
<div class="inftblnote"><br />
<table class="Note oac_no_warn" summary="" cellpadding="3" cellspacing="0">
<tbody>
<tr>
<td align="left">
<p class="notep1">Note:</p>
<p>The <span class="bold">Target runtime</span> is not required for Java SE development.</p>
</td>
</tr>
</tbody>
</table>
<br /></div>
<!-- class="inftblnote" --></div>
</li>
<li>
<p>Click <span class="bold">Next</span>. The Java source page appears.</p>
<div class="figure"><a id="CIHIFEGJ" name="CIHIFEGJ"></a>
<p class="titleinfigure">The Java Source Page</p>
<img src="img/new_jpa_project_source.png" alt="The JPA Facet page of the Create a JPA Project wizard." title="The JPA Facet page of the Create a JPA Project wizard." /><br /></div>
<!-- class="figure" --></li>
<li>
<p>Click <span class="bold">Add Folder</span> to add existing Java source files to the project.</p>
</li>
<li>
<p>Click <span class="bold">Next</span>. <a href="ref_jpa_facet.htm#CACIFDIF">JPA Facet page</a> appears.</p>
<div class="figure"><a id="sthref44" name="sthref44"></a>
<p class="titleinfigure"><a id="sthref45" name="sthref45"></a>The JPA Facet Page</p>
<img src="img/new_jpa_facet_task.png" alt="The JPA Facet page of the Create a JPA Project wizard." title="The JPA Facet page of the Create a JPA Project wizard." /><br /></div>
<!-- class="figure" --></li>
<li>
<p>Complete the fields on the <a href="ref_jpa_facet.htm#CACIFDIF">JPA Facet page</a> to specify your vender-specific platform, JPA implementation library, and database connection.</p>
<p>Click <span class="bold">Manage libraries</span> to create or update your JPA user libraries. Click <span class="bold">Download libraries</span> to obtain additional JPA implementation libraries.</p>
<p>If Dali derives the incorrect schema, select <span class="bold">Override the Default Schema for Connection</span>. Using this option, you can select a development time schema for defaults and validation.</p>
<p>If you clear the <span class="bold">Create mapping file (orm.xml)</span> option (which is selected by default), you can later add a mapping file to the project using the <a href="reference007.htm#CIAIJCCE">Create ORM Mapping File wizard</a>.</p>
<div align="center">
<div class="inftblnote"><br />
<table class="Note oac_no_warn" summary="" cellpadding="3" cellspacing="0">
<tbody>
<tr>
<td align="left">
<p class="notep1">Note:</p>
<p>If the server runtime does not provide a JPA implementation, you must explicitly select a JPA implementation library.</p>
<p>To insure the portability of your application, you must explicitly list the managed persistence classes that are included in the persistence unit. If the server supports EJB 3.0, the persistent classes will be discovered automatically.</p>
<p>Depending on your JPA implementation (for example, Generic or EclipseLink), different options may be available when creating JPA projects.</p>
</td>
</tr>
</tbody>
</table>
<br /></div>
<!-- class="inftblnote" --></div>
</li>
<li>
<p>Click <span class="bold">Finish</span>. Dali creates the new JPA project.</p>
<p>You should now open the <a href="ref_persistence_perspective.htm#BABIFBDB">JPA Development perspective</a>.</p>
</li>
</ol>
<a id="sthref46" name="sthref46"></a>
<p class="subhead2">Related reference</p>
<ul>
<li>
<p><a href="ref_new_jpa_project_wizard.htm#CACBJGBG">Create New JPA Project wizard</a></p>
</li>
<li>
<p><a href="ref_persistence_perspective.htm#BABIFBDB">JPA Development perspective</a></p>
</li>
<li>
<p><a href="reference007.htm#CIAIJCCE">Create ORM Mapping File wizard</a></p>
</li>
</ul>
<a id="sthref47" name="sthref47"></a>
<p class="subhead2">Related tasks</p>
<ul>
<li>
<p><a href="task_manage_persistence.htm#CIHDAJID">Managing the persistence.xml file</a></p>
</li>
<li>
<p><a href="task_add_persistence.htm#BABHICAI">Adding persistence to a class</a></p>
</li>
<li>
<p><a href="tasks003.htm#BEIBADHH">Converting a Java project to a JPA project</a></p>
</li>
</ul>
<a id="sthref48" name="sthref48"></a>
<p class="subhead2">Related concepts</p>
<ul>
<li>
<p><a href="concept_persistence.htm#BABCAHIC">Understanding Java persistence</a></p>
</li>
<li>
<p><a href="concepts002.htm#CHDHAGIH">The persistence.xml file</a></p>
</li>
</ul>
</div>
<!-- class="sect1" -->
<!-- Start Footer -->
<div class="footer">
<table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100%">
<col width="86%" />
<col width="*" />
<tr>
<td align="left"><span class="copyrightlogo">Copyright&nbsp;&copy;&nbsp;2011, 2013,&nbsp;Oracle&nbsp;and/or&nbsp;its&nbsp;affiliates.&nbsp;All&nbsp;rights&nbsp;reserved.</span><br />
<a href="dcommon/html/cpyr.htm"><span class="copyrightlogo">Legal Notices</span></a></td>
</tr>
</table>
</div>
<!-- class="footer" -->
</body>
</html>

Back to the top