-->
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.  [ 2 posts ] 
Author Message
 Post subject: JBoss + Hibernate + Annotations -> How?
PostPosted: Wed Dec 14, 2005 6:01 pm 
Newbie

Joined: Wed Dec 14, 2005 5:30 pm
Posts: 2
If I want to use annotations in Hibernate, and still use JBoss' Hibernate mbean for the session factory, how do I configure the factory to know about the annotated classes?

In the Hibernate docs, this is done via modifications to the session in HibernateUtil before the session is built, or via mapping sub-elements on the session-factory element in hibernate-configuration.

How do I achieve this via mbean configuration? I am ignoring the EJB3 route (EJB3/PAR files) for now.

Thanks, cc


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 15, 2005 1:35 pm 
Newbie

Joined: Wed Dec 14, 2005 5:30 pm
Posts: 2
I've looked at both JBoss and Hibernate source, and I am thinking the quick answer is NO. At least in JBoss 4.0.3.

Currently, the JBoss Hibernate MBean uses a Configuration object to initialize the session factory. In order to support annotations, it will need to use an AnnotationConfiguration object for initialization. It will also need to add some facility through the MBean's attributes to add the annotated packages and classes.

So, for those using JBoss 4.0.3, wishing to try out annotations without resorting to EJB3, it looks like JBoss' Hibernate session mgmt cannot be used.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.