Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JBoss 5.1: Hibernate with JPA

I've got two questions to ask regarding JBoss 5.1. We are in process of migrating from JBoss 4.2 to JBoss 5.1.

We are also using Java 1.6 and JPA 2.0 with Hibernate 3.6 as the provider.

My questions are:

  1. Is it possible to use Hibernate 3.6+ with JBoss 5.1. If yes, then how?
  2. What about JPA 2.0? I know that JBoss 5.1 comes with JPA 1.0 compatibility. Can we use JPA2?

And as we can not do any kind of configuration to the JBoss installation, all the fixes need to be done in our application only.

Thanks in advance, JassB

like image 631
JazB Avatar asked Apr 13 '12 11:04

JazB


1 Answers

I just got the same problem today, and after trying many alternatives and asking everywhere, the answer is no

You cannot use JPA 2.0 with Jboss 5.1 (even more if you cannot change the server's configuration)

But I've seen hibernate3.X working on Jboss5.1, but never with the annotations features : only the old XML configuration way.

Now, in my point of view, you've got 2 solutions : either asking for server upgrades or changing your data acess system with the old fashion.

like image 125
antoine Avatar answered Oct 06 '22 00:10

antoine