Hi Andreas,

please have a look at javadoc of DataSource

http://java.sun.com/j2se/1.4.2/docs/api/javax/sql/DataSource.html#getConnection(java.lang.String,%20java.lang.String)

It is possible to setup DataSource with the ability to specify user/password at runtime.

> if I tell ojb in repository_database.xml to use a specifc JNDI datasource,
> ojb could obtain a connection from this datasource without a
> password/username (because they are already configured wihtin the
> datasource), so why does ojb need them again?


If your DataSource does not expect user/password, you don't need to set this in repository_database.
But some user don't want to specify user/password in an configuration file (in OJB or in the app providing the Datasource), thus you have to pass it at runtime.


regards,
Armin


abo wrote:
hi,

I have read some postings about OJB's datasource handling and I'm confused now.
It's said, that you have to
a.) put username/password both in the datasource.xml and repository_database.xml or
b.) let username/password blank and give it to the broker (with pbkey) at runtime.


why is that?

if I tell ojb in repository_database.xml to use a specifc JNDI datasource,
ojb could obtain a connection from this datasource without a password/username (because they are already configured wihtin the datasource), so why does ojb need them again?


thanks very much for your answers,
andreas






--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to