Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Is hibernate.cfg.xml still needed when I am also using JPA annotation ?  RSS feed

 
tangara goh
Ranch Hand
Posts: 267
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

After failing to use JPA alone to insert my data, I have now added on one more layer aka Hibernate.

However, I do not know if hibernate.cfg.xml is still needed cos most of the information about my connection is in persistence.xml.

Hope someone can tell me the right way of doing things.

Many thanks.
 
SunilK Chauhan
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes I think it's needed as per the hibernate terms, this is the configuration file and it contains how hibernate framework will work which which database.

That's why it's required at all.
 
tangara goh
Ranch Hand
Posts: 267
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SunilK Chauhan wrote:Yes I think it's needed as per the hibernate terms, this is the configuration file and it contains how hibernate framework will work which which database.

That's why it's required at all.


OK.  Then, can I know if I am using the JPA in Java API in my application and using Eclipse as IDE, do I need to use EclipseLink now that I am using Hibernate also ?
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!