-->
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.  [ 7 posts ] 
Author Message
 Post subject: Hibernate problem
PostPosted: Sat Jan 06, 2007 6:11 am 
Newbie

Joined: Sat Jan 06, 2007 6:01 am
Posts: 3
Dear All,

I have the following problem with hibernate:

I am using hibernate as persistent in a web system (i.e. on line access) with a centralized database, In our system the user rules are many and grow continuously, the thing which force us to make a view for each rule and of course a mapping file for that view the thing which force me to start up the tomcat each time I add new view which is un reasonable. For example, consider the case we have account table that contains all the accounts and each set of accounts for a specific district, the normal users can only access a specific set of accounts while the mangers can access another set of account and I can say each user may have its own set of accounts.

What I wonder is it possible to eliminate this problem without the need to startup the tomcat

Kind regards


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 06, 2007 8:57 am 
Beginner
Beginner

Joined: Sat Dec 16, 2006 9:53 pm
Posts: 31
Location: Brisbane, Australia
ohamed,

I'm not sure I understand your problem, so I'm going to paraphrase it in English and ask you to confirm that I have the gist of it...

You are using hibernate with tomcat. You are using database views to enforce table-level-access-control to individual users.

The problem is, whenever you add a user you need to tailor-make an access-control view for that user, which also requires a new hibernate mapping creation... and you need to bounce tomcat so that it picks up your changes to the hibernate mapping file ${class}.hbm.xml, which is obviously not good for your uptime.

So you wonder if there is a way to make hibernate reload it's mapping file(s) "on the fly" (without restarting tomcat).... and you're starting to worry that you'll have to redesign your whole application just to meet these crazy security requirements.

Is this correct?

Keith.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 06, 2007 10:22 am 
Newbie

Joined: Sat Jan 06, 2007 6:01 am
Posts: 3
Keith. Yes this is waht I mean .


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 06, 2007 1:06 pm 
Expert
Expert

Joined: Tue Dec 28, 2004 7:02 am
Posts: 573
Location: Toulouse, France
Have you thought about recreating your sessionfactory, after modifying the hibernate.cfg.xml file referring to the new mappings?

_________________
Baptiste
PS : please don't forget to give credits below if you found this answer useful :)


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 07, 2007 2:50 am 
Beginner
Beginner

Joined: Sat Dec 16, 2006 9:53 pm
Posts: 31
Location: Brisbane, Australia
batmat wrote:
Have you thought about recreating your sessionfactory, after modifying the hibernate.cfg.xml file referring to the new mappings?


sounds good to me... pls post if you get it working.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 07, 2007 3:40 am 
Newbie

Joined: Sat Jan 06, 2007 6:01 am
Posts: 3
Hi Batmat. Yes i tried it, but i still have a problem.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 07, 2007 5:27 am 
Beginner
Beginner

Joined: Sat Dec 16, 2006 9:53 pm
Posts: 31
Location: Brisbane, Australia
ohamed wrote:
Hi Batmat. Yes i tried it, but i still have a problem.

What exception do you get?


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