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: Jboss deploy
PostPosted: Mon Jun 18, 2007 3:50 am 
Newbie

Joined: Thu Jun 14, 2007 5:38 am
Posts: 6
Hi!

How could I change the deploy sequence of the *.hbm.xml files on Jboss?
I am using hibernate-service.xml and as far as I know in this case the hibernate.cgf.xml doesn't play...

I have an usertype.hbm.xml (define type mapping between enum classes) that should be first at the deploy but the jboss deploys the xmls in alphabetical order so it is processed only at the and of the sequence => deploy is unsuccessful.
If I rename this to aausertype.hbm.xml everything is OK the deploy is successful...
I don't like this solution there is any other way to do?

Thanks,
Topicfun


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 18, 2007 5:50 am 
Senior
Senior

Joined: Thu May 17, 2007 2:31 am
Posts: 194
Location: Sri Lanka
Hi

Don't use hibernate.cgf.xml

use this code in your programme

Configuration confg = new Configuration();
...

confg.setProperty("hibernate.connection.driver_class","net.sourceforge.jtds.jdbc.Driver");

//more properies


confg.addClass(usertype.class);
//more addClass


sessionFactory = confg.buildSessionFactory();

Amila

(Don't forget to rate if helps)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 19, 2007 4:05 am 
Newbie

Joined: Thu Jun 14, 2007 5:38 am
Posts: 6
thanks your reply!

It's not clear for me... As far as I understood from manuals the session factory is build by the Jboss automaticaly and in this case I don't have to implement any configuration property in my source (eg. I don't have HibernateUtil class at all)? Jboss Mbean takes care of the JNDI as well.

Or you want to tell don't use the hibernate-service.xml? but this is the new and prefered way by the Jboss?
Sorry but I am totaly confused now....

Thanks,
Topicfun


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.