Paul,
My batch program uses hiberante to for DB2. It needs the user id and password to make a connectivity at runtime( when run though a launch client approach). Right now my program reads the user id and password from the property file and dose the connection.
// Reading from the property file
String userName = SPMUWPropertyProvider.getProperty("sp.muw.sics.hibernate.connection.username");
String password = SPMUWPropertyProvider.getProperty("sp.muw.sics.hibernate.connection.password");
// Setting user id and pass to the hibernate config
cfg.setProperty("hibernate.connection.username",userName);
cfg.setProperty("hibernate.connection.password",password);
sessionFactory = cfg.buildSessionFactory();
In websphere, under datasource ( Resources-->
jdbc provide --> datasource), i have created a data source and provide a jndi name. I was thinking, if there is a way to retrive the user id and password from the datasource configured on the websphere so that i can pass it to the above block of code.
Is it possible?