Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » New with JPA(JPA)
New with JPA [message #523444] Fri, 26 March 2010 09:55 Go to next message
Alex Nek is currently offline Alex Nek
Messages: 2
Registered: March 2010
Junior Member
Hey,

I'm pretty new with JPA.
What i need to do to be able to use JPA in an existing Eclipse-Java project?

An explanation or a link would be helpful. Thanks!
Re: New with JPA [message #523876 is a reply to message #523444] Mon, 29 March 2010 13:16 Go to previous messageGo to next message
James Sutherland is currently offline James Sutherland
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

At a minimum you just need to add JPA spec persistence.jar and a JPA provider jar, such as eclipselink.jar to your projects classpath.

You will then need a persistence.xml for your project, and some annotated @Entity classes, or an orm.xml file.

In Eclipse you could use the Eclipse JPA support
http://www.eclipse.org/webtools/dali/

I think Eclipse also has some built-in libraries for JPA and EclipseLink.



James : Wiki : Book : Blog : Twitter
Re: New with JPA [message #526145 is a reply to message #523444] Thu, 08 April 2010 17:39 Go to previous message
Karen Butzke is currently offline Karen Butzke
Messages: 220
Registered: July 2009
Senior Member
After downloading the Dali project, in Eclipse 3.5 or 3.6 you can right click on a java project and choose Configure -> Convert to JPA Project. This will lead you through the JPA wizard. Using Eclipse 3.6 (Dali 2.3) will give you tooling for the JPA 2.0 spec along with the 1.0 spec.

If you have questions about the Dali tools feel free to ask us questions over on
http://www.eclipse.org/forums/index.php?t=thread&frm_id=113
Previous Topic:strange behaviour
Next Topic:Insert row with @SequenceGenerator ID fails
Goto Forum:
  


Current Time: Thu Aug 21 22:06:17 EDT 2014

Powered by FUDForum. Page generated in 0.01607 seconds