File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes How to add a  JPA project to Web Project? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "How to add a  JPA project to Web Project?" Watch "How to add a  JPA project to Web Project?" New topic
Author

How to add a JPA project to Web Project?

Marco Di Baggio
Greenhorn

Joined: Apr 11, 2009
Posts: 12
Hi everyone,

I'm rather new to many things Java related. I recently have been reading up on JPA
and want to take advantage of the ability to reverse engineer the tables into JPA
entities.

I successfully created a JPA project that did this through the use of a online tutorial. I too
have an exiting web project (dynamic) that I would like to take advantage of the JPA project
and was wondering what is best practice.

Should I have my web project reference my JPA project or is there a way to create a Web project
that has JPA capabilities (specifically the reverse engineering)?

Thanks everyone
ntumba lobo
Ranch Hand

Joined: Oct 21, 2008
Posts: 180
I am assuming your are using Eclipse.
I would just create a web project and add JPA manually on top of it.
1)You will understand better the JPA components and how they work together
2) there is not much configuration anyway to make a project JPA enable. Merely persistence.xml to add to classpath amd pojo classes with annotations and that's about it.

My point of view is that using too much advanced tools hide a lot of details that you may need to know


SCJP 5 , SCWCD 5, SCEA 5
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to add a JPA project to Web Project?
 
Similar Threads
Jar a JPA Web Project?
JPA Annotations in Hibernate 2.0
EJB web project in Eclipse
log4j.properties file for a project with multiple modules
Hibernate JPA - java.lang.NoClassDefFoundError: javax/persistence/Persistence