Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Doubt about the right project to place the JPA facet and persistence.xml file
Doubt about the right project to place the JPA facet and persistence.xml file [message #223090] Fri, 24 October 2008 13:44 Go to next message
Marcos Antonio is currently offline Marcos Antonio
Messages: 16
Registered: July 2009
Junior Member
Hello, everybody!

Simple question: what is the right project to place the JPA facet and the
persistence.xml file: the EJB project or the EJB Client project?

Thank you.

Marcos
Re: Doubt about the right project to place the JPA facet and persistence.xml file [message #223155 is a reply to message #223090] Mon, 27 October 2008 04:54 Go to previous message
Kaloyan Raev is currently offline Kaloyan Raev
Messages: 185
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
If the business method of your EJB beans use JPA entites for parameters and
return values then you would need entities classes in the EJB Client
project. Otherwise, the clients of your EJBs will not resolve the entities
classes. From this point of view having the JPA facet on the EJB Client
project is better.

The best practice in my opinion is to put your JPA entites in a separate JPA
project.
This way you have the flexibility to include the project/jar in either EJB
project or EJB Client project and wherever you need it.

Greetings,
Kaloyan

"Marcos " <marcos_antonio_ps@hotmail.com> wrote in message
news:4400af8be92ff2322ed685e8bfe652d5$1@www.eclipse.org...
> Hello, everybody!
>
> Simple question: what is the right project to place the JPA facet and the
> persistence.xml file: the EJB project or the EJB Client project?
>
> Thank you.
>
> Marcos
>
Previous Topic:Dynamic ENTITY resolution
Next Topic:how to change the filesystem location of a wtp server?
Goto Forum:
  


Current Time: Wed Jul 30 07:19:59 EDT 2014

Powered by FUDForum. Page generated in 0.05268 seconds