db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jcase...@chubb.com
Subject Property Initialization in WSAD 5.0
Date Thu, 28 Aug 2003 15:06:45 GMT
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


Mime
View raw message