-->
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.  [ 5 posts ] 
Author Message
 Post subject: dynamic login
PostPosted: Sun Apr 24, 2005 9:04 am 
Newbie

Joined: Wed Nov 10, 2004 11:17 am
Posts: 7
i have an application in which the user enters a username and password. instead of validating the user against a table i created, i want to use the oracle backend to validate him/her.

how do i dynamically tell hibernate to connect (or attempt to connect) via the data entered and not via that which is already hardcoded in the hibernate.cfg.xml file??


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 24, 2005 9:34 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
provide you own connection or write a connection provider that does what you want.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: example needed
PostPosted: Sun Apr 24, 2005 10:12 am 
Newbie

Joined: Wed Nov 10, 2004 11:17 am
Posts: 7
max,

could you give me a very simple code explanation of how to do that. i'm new to hibernate and it is still rather confusing.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 24, 2005 10:32 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
Providing your own connection:
sessionfactory.openSession(yourOwnOpenedConnection);

Implement your own ConnectionProvider: Look at the diffeent implementations of ConnectionProvider and see what they are doing.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 24, 2005 10:38 am 
Newbie

Joined: Wed Nov 10, 2004 11:17 am
Posts: 7
i'll give it a shot. thanks.


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