[prev in list] [next in list] [prev in thread] [next in thread] 

List:       turbine-torque-user
Subject:    Property Initialization in WSAD 5.0
From:       jcaserta () chubb ! com
Date:       2003-08-28 15:06:45
[Download RAW message or body]

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic