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 Jar a JPA Web Project? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Object Relational Mapping
Reply Bookmark "Jar a JPA Web Project?" Watch "Jar a JPA Web Project?" New topic
Author

Jar a JPA Web Project?

Konstantin Kreuzer
Greenhorn

Joined: Sep 27, 2009
Posts: 3
Hi!

Here's the situation:

I'm writing 3 Web Applications, all of them use the same Bean to access a mysql db via JPA. I thought the right way to do this, was to jar the JPA project, put it on my tomcat and use the jar in all 3 projects. What I have experienced so far is "pain and agony" however. It says there is no persistence provider, which usually means it cannot find the persistence.xml.

So the question is, is it even possible to export a JPA Project as a jar file, to use it on a web server?

I could make all 3 projects JPA projects and put the bean in every project, but that would lead to redundant code.
 
 
subject: Jar a JPA Web Project?
 
developer file tools