Mark,
I got little bit of information regarding how it’s invoking the DB2 DB.
“Well, what’s inside the black box is actually important. Depending on how the classes in the jar do things like setting up connection pools or maintaining state, it may or may not be a good candidate to run as a java service in IS.”
It’s reading from a properties file loaded into System. This properties file is a simple flatfile.
My questions are
- How to load this properties file into “System”? as I cannot modify the Code given below
private static String getTokenFromProperties(String key)
{
String value = null;
String propPath = System.getProperty(".properties");
if(prop == null && propPath != null)
{
logger.debug(“Prop value was null. Going to read the property file”);
try
{
FileInputStream in = new FileInputStream(propPath);
prop = new Properties();
prop.load(in);
in.close();
}
catch(FileNotFoundException e1)
{
logger.error("GiftRegistryAPI: can’t find property file " + propPath);
}
catch(IOException e2)
{
logger.error("GiftRegistryAPI: can’t read property file " + propPath);
}
}
if(prop != null)
value = prop.getProperty(key);
return value;
}