-->
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: Read db password from non hibernate.properties file
PostPosted: Mon Mar 24, 2008 4:11 pm 
Newbie

Joined: Fri Mar 21, 2008 4:30 pm
Posts: 2
Hi All,
I want to use sybase db for two different modules. Only one module will be using hibernate.
Other module has its own property file which has username password driver etc .
My problem is with hibernate.connection.password.
I want:
a) Password to be encrypted.
b) Placed only in one location. Dont want 2 seprate properties file.


Now can i make hibernate read my otherdb.properties file instead of hibernate.properties file?? and how ??
Or any alternative ??

Also i cannot make other module to read hibernate.properties.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 24, 2008 4:17 pm 
Expert
Expert

Joined: Fri Aug 19, 2005 2:11 pm
Posts: 628
Location: Cincinnati
look at the javadoc for the Configuration class. You can read in properties from anywhere you want. There are a lot of other methods that will allow you to manipulate it by hand as well.

_________________
Chris

If you were at work doing this voluntarily, imagine what you'd want to see to answer a question.


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.