-->
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: DBUser Sessions from same Config
PostPosted: Fri Apr 22, 2005 9:03 am 
Newbie

Joined: Fri Apr 22, 2005 8:47 am
Posts: 1
Hi, I am using Hibernate 3.0.1 and was wondering if anyone new of a good way to open hibernate sessions as different database users from the same sessionFactory? At the moment I am using a custom configuration class that subclasses org.hibernate.cfg.Configuration in order to provide a method, buildSessionFactory(username, password), to create session factories in order to create sessions for specific users. This seems to be working ok but I am bit concerned about the performance of creating multiple session factories (and dynamically modifying the configuration information) for each database user.

Does anyone have a better idea? I'd like to have a session factory that has an openSession(username, password) type method but have no idea about how to plug my own implementation in and get this to work. Any ideas would be greatfully received.


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.