-->
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.  [ 1 post ] 
Author Message
 Post subject: Server restart needed after a Custom Field added?
PostPosted: Wed Apr 01, 2009 5:09 am 
Newbie

Joined: Wed Apr 01, 2009 4:00 am
Posts: 1
Hi,

We are trying to implementing Hibernate Custom Fields with spring + Hibernate


With the support of some documents available on custom Fields approach, we are able to create a custom field properly and can able to see added custom field to database but we are not able to add the data to the newly added custom Field. This might be because of Hibernate first level cache not being updated with updated database schema?

When we are trying to add data to the domain object including to the newly added custom Fields, the data that was inserted to database properly except to the newly added custom field, its storing value NULL to the newly added field. Seems, this is valid issue, as Session will not aware of the updated Database schema?

When we tried adding the data after restarting the servers, I was able to see that data is properly inserted even to newly added custom Field. To achieve this with out restarting server, we tried to reload the session factory bean and trying to use the reloaded session factory bean for all operations then it’s started working but we are facing with 2 issues.

- Connection that are opened in old session are still in sleeping state and Connections are keeps on increasing each time when we add a custom field.
- And application is getting struck as most of the sql commands to database are getting suspended. (This might be because of the connections leakage issue, listed above?)

Is there any way, we can reload the session factory and the first level cache with updated database schema.


For some references to implementation,

We are using Spring2.5.6,
Hibernate3.2
Database - sqlserver2005

Please let me know if you need any other details.

Thanks,
Mohan


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

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.