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: Reloading Hibernate configuration
PostPosted: Wed May 25, 2005 12:13 pm 
Newbie

Joined: Wed May 25, 2005 12:01 pm
Posts: 6
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version: 3.0.5


Hi!

I am using Hibernate 3 as a persistence layer in Spring 1.2 web application running under JBoss 4.0.2.

I am using named queries in HBM.XML files and during development I change/optimize these queries while the application is running under JBoss.

Since it is expensive to restart JBoss I wonder how could I programatically refresh sessionFactory configuration at run-time so that it would re-read HBM.XML file?

I am using Spring's OpenSessionInViewFilter.

Regards,
Borut


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 26, 2005 5:58 pm 
Newbie

Joined: Wed May 25, 2005 12:01 pm
Posts: 6
Currently I am trying to reinitialize LocalSessionFactoryBean to make this work but I am having a hard time.
I got Configuration (cfg) object from LocalSessionFactoryBean, but when I call cfg.buildSessionFactory(), I get the error:

Code:
org.hibernate.HibernateException: No local DataSource found for configuration - dataSource property must be set on LocalSessionFactoryBean


How would I force Spring/Hibernate to refresh Hibernate configuration?

Regards,
Borut


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.