Hi, peter

Same problem here. I spent some time too, but since I was out of it, I
had to find a quick hack. Not pretty, but it works:

Go to the class org.exolab.castor.jdo.engine.DatabaseRegistry, method
createConnection(LockEngine)

Where it says:

return dbs._dataSource.getConnection();

change to:

String username = ...;
String passwd = ...;

return dbs._dataSource.getConnection(username, passwd);

where username and password are values you are reading from the
application configuration. In my case, I have a class with static method
s which access a global properties object.

Of course, as is, any JNDI mapping you do (maybe "data-source" mapping
too) will use this same username/passwd pair. That's something I can
live with in my environment (I'm using just one Datasource). Again, I
know this is not pretty at all.. but it's a solution nevertheless.

By the way, I imply you were able to specify the username/passwd on a 
JNDI mapping (compared to "data-source" mapping, which is cake using
params nodes). How did you do it?? Since I was not able at all.

-- Andr�s

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to