Hibernate caching . problem with backdoor
In our java/j2ee app we have hibernate and hibernate caching is enabled . But because of some business r开发者_JAVA百科easons we MUST also have a kind of a backdoor that we should be able to update some columns from the database .
When we are doing so the hibernate cache is not getting updated . So the only option we are now left with is restarting the application (running on jboss 6).
Now this is happening on CIT/staging environment . And the app moves to live on coming Monday , and there it will be impossible for obvious reasons to restart an app.
Any suggestions on how to tackle this ? (apart from disabling hibernate cache . That is my final fall back solution)
Don't do it directly in the DB. Create a secured page in the app which does what you want, through Hibernate. Its a baaaad idea to directly update live DB's, as you can mess things up very easily. This controlled page will limit damage yet still allow you to do what you need to do.
精彩评论