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.