Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to add a JPA project to Web Project?

 
Marco Di Baggio
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 180
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic