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.
|