blob: 28d7c1fbdb13a61ba639909eb84044351ad92bff [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<sections title="Dali JPA Tools"
subtitle="An Eclipse Web Tools Platform Sub-Project">
<section class="main" name="Getting Started with Dali 1.0">
<description>
<strong>To work with Java Persistence Entities you
need couple of prerequisites:</strong>
<ul>
<li>An installed 1.5 JRE</li>
<li>A Java EE 5 compliant runtime
or compliant Java Persistence API implementation. You can download a JPA implementation
from <a target="_blank" href="http://otn.oracle.com/jpa">Oracle</a>,
<a href="http://jboss.com/products/ejb3">JBoss</a>, or
<a href="http://www.bea.com/kodo/">BEA</a>.
The Java EE 5 reference implementation
<a href="https://glassfish.dev.java.net/">
Glassfish</a>
also ships with the <a href="http://otn.oracle.com/jpa">TopLink
Essentials JPA Reference Implementation</a>.</li>
</ul>
<strong>To work with Java Persistence Entities you need
to create a JPA Projectt:</strong>
<ul>
<li>Make sure your Project's Java Compiler
Compliance Level is set to 5.0</li>
<li>Select File->New Project...JPA->JPA Project</li>
<li>Follow the instructions on the Wizard.
You'll need to identify the jar containing the JPA annotation
definitions so your entities will compile. You'll also need
to select, or define, a database connection that will be used
to access relational schema information.</li>
</ul>
<strong>To create a new persistent Entity:</strong>
<ul>
<li>Create a new Java Class and add this class to your persistence.xml file</li>
<li>In the JPA Details view, select to map the class as an Entity.</li>
</ul>
<strong>To make an existing POJO an Entity:</strong>
<ul>
<li>Open the class in the JPA Perspective. In the JPA Details view
select to map the class as an Entity</li>
<li>Or simply add the "@Entity" annotation
to any existing POJO class definition. The Dali tools will pickup
the change and the editing views will activate.</li>
</ul>
Take a look at the viewlet demos
on the <a href="main.php">Dali Home Page</a> for a walk through
of building property access and field access Entities.
</description>
</section>
<section class="main" name="Running JPA Applications 'Out of Container'">
<description>
How you run your JPA application in a compliant runtime
in a Java SE environment ('out of container') is vendor specific.
We'll add links to how-to's for any runtime we're told about.
Post to the Dali newsgroup or mailing list if you have a how-to
you'd like included.
<ul>
<li> <a href="https://glassfish.dev.java.net/javaee5/persistence/entity-persistence-support.html">TopLink
Essentials Java SE How-To</a></li>
<li><a href="http://www.hibernate.org/hib_docs/entitymanager/reference/en/html_single">JBoss
Hibernate How-To</a></li>
</ul>
</description>
</section>
<section class="main" name="Notes">
<description>
<ul>
<li>In order to compile JPA Entities,
it is a requirement that the appropriate jar(s) from a JPA
runtime are available on the project classpath. The
"Add Java Persistence..." wizard will help you add the required library
to your project classpath. You must have previously installed a
Java EE 5 or JPA persistence runtime implementation--one is
not distributed with Dali. If you are working inside of a WebTools
Enterprise Application Project, no classpath configuration is needed
as your classpath should already contain the appropriate jars from your
Server configuration, assuming the server supports EJB 3.0.</li>
</ul>
</description>
</section>
</sections>