Re: How to hide database user and password

Armin Waibel <[email protected]> Tue, 09 Sep 2008 11:25:14 +0200
Newsgroups gmane.comp.jakarta.ojb.user
Message-ID <[email protected]>
Hi Frank,

Hiller, Frank RD-PT31 wrote:
> I'm using PB version 1.0.3. Database user and password are in
> repository_database.xml. How can one hide usr + pwd? I'd prefer to
> have placeholders there and set both in source code.
> 

http://db.apache.org/ojb/docu/faq.html#userPasswordNeeded

If you like to the convenience method to lookup a PB instance for one 
PBKey (user, pwd combination) - PBF.defaultPersistenceBroker(), you can 
set the PBKey in the PBF with PersistenceBrokerFactory#setDefaultKey at 
start of our application.
Sorry but I don't remember if this works for version 1.0.3 ditto - give 
it a try.

regards,
Armin

> Thanks...........Frank
> 
> 
>