Only 48 hours left in the trailboss' kickstarter!

New rewards and stretch goals. CLICK HERE!

  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How can I use Hibernate as JPA implementation without hardcoding datasource in persistence.xml ?  RSS feed

Boris Romashov
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As Glassfish has built-in Toplink JPA I need to explicitly define to use Hibernate as JPA implementation.
So I need to specify provider in persistence.xml.
When I did it, I need also specify jta-data-source and hibernate.transaction.manager_lookup_class.
After that I cannot write unit test because in unit-test I don't have any jndi resource.
How can I make it ?
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!