-->
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: Using Hibernate on one DB with different users
PostPosted: Wed Apr 25, 2012 3:11 am 
Newbie

Joined: Wed Nov 23, 2011 8:33 am
Posts: 4
Hi there,

I am new to Hibernate and just started developing a web application using it.
Now i have got some questions, regarding user handling. I have got a unknown number of database users. Each user can login to my database. That means, in my webapp the user types his username and password and the he will be connected to the database. How can i do this with Hibernate?
All examples i have seen used only one "real" database user to configure and build the sessionfactory and the query to a user-table stored at the database to authenticate the user. But in my case there is no user table and all users that can login to the database are "real" DB-Users like "sa" or something else. If i have understand this quite correct, i have to build a new sessionfactory for each user, right?
This will run into errors when i enable caching with EHCache and i will get exceptions like "Another CacheManager with same name 'abcdef' already exists in the same VM."

You see, i run into a lot of problems and at the moment it is really hard for me to keep an overview.

Could you please help me? Thank you very much!
J.


Top
 Profile  
 
 Post subject: Re: Using Hibernate on one DB with different users
PostPosted: Wed Apr 25, 2012 5:51 am 
Newbie

Joined: Wed Apr 25, 2012 5:19 am
Posts: 1
Thanks for this useful information!!
I am new to be here I hope to update My knowledge Thank you

_________________
mayfair escorts | chelsea escorts


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.