-->
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: Per user connection
PostPosted: Thu Oct 08, 2009 10:13 am 
Newbie

Joined: Thu Oct 08, 2009 6:25 am
Posts: 1
Hi,

I'm trying to establish per user connection with Hibernate in a webapplication.
The only way I found is to implement custom ConnectionProvider with static legacyConnectionPool.

And before opening a session set the ConnectionProvider's static legacyConnectionPool to the connectionPool that will be held in an user's httpSession.

But I'm not sure if it's safe enough. I'm afraid of the following scenario.

1. First user sets his connectionPool in the ConnectionProvider
2. Second user sets his connectionPool in the ConnectionProvider
3. First user opens a HibernateSession and connects to the DB as the second user.

Any opinions or better solutions?

thanks in advance


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.