You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by jc...@chubb.com on 2003/08/28 17:06:45 UTC
Property Initialization in WSAD 5.0
I'm trying to initialize the Torque properties using a property file that
is located in JavaSource/properties/ in WSAD.
It appears to be working but I cannot get a DB2 connection. Here is the
code I am using to initialize.. Can anyone verify this is correct?
Thank you...
String filePath = "properties/Torque.test.properties";
String fileName = "Torque.test.properties";
try{
InputStream in2 = DmeApplication.class.getClassLoader
().getResourceAsStream(filePath); Properties properties = new
Properties();
properties.load(in2);
in2.close();
BaseConfiguration bConfig = new BaseConfiguration();
bConfig.addProperty(fileName, properties);
org.apache.torque.Torque.init(bConfig);
com.chubb.emarine.dataaccess.TorqueApplication.setDatabaseOwnerId(properties.getProperty
"database.owner"));
}
James Caserta
Whitehouse Station CCI - PM&M Systems
WTO Tie Line - (884) 4788
Office: (908) 572-4788
Mail Stop: WHB2S-15
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org