-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Hibernate EntityManager *requires* Annotations?
PostPosted: Wed Nov 02, 2005 6:30 pm 
Newbie

Joined: Wed Nov 02, 2005 6:22 pm
Posts: 2
I know the EJB 3.0 spec supports annotations, but alternatively also supports old fashioned xml files for configuration.

The site doc says that Hibernate Annotations are required to use Hibernate EntityManager - is that definitely true? In other words, could you use EntityManager and use xml files for configuration instead of annotations as supported in the EJB 3 spec? (I know it is doc'd that you could can use Hibernate Annotations without EntityManager, but is the reverse true?)

Also, is Java 5 still required to use Hibernate EntityManager if annotations are not used?

Thanks in advance,
Matt


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 02, 2005 6:34 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
You probably can use only XML files to configure an EMF and hence use an EM without annotated classes. But what's the point in doing that? If you are not going to use the best feature of EJB3 persistence, why not simply use Hibernate API all the way? JDK5 is required in all cases, except for pure Hibernate.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 02, 2005 6:43 pm 
Newbie

Joined: Wed Nov 02, 2005 6:22 pm
Posts: 2
Thanks for the response.

We are currently at JRE 1.4.2 - 5 is not yet an option for us yet. I think EJB 3 will be strategic for us when our app server does support JRE 5 - in the meantime, I am trying to determine a good tactical solution for people that want to build something today and still be aligned as much as possible with the strategic direction.

Straight Hibernate is of course an option today that we use, however I am trying to see if there is anything we can do now to better align with EJB 3.0 (such as somehow coding to the EJB 3 persistence API in the 1.4.2 world) so that there will be fewer code changes for people down the road. Sounds like beyond using pure Hibernate, there are not any options.

Thanks,
Matt


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.