Java.util.Properties.load() not loading all properties
Hi,
I'm trying to load the following properties into my Properties class. However, Im only able to load SOME properties not ALL (11 to be precise)
This is my properties file :
~~~~~~~~~~~~~~~~~~~~~
gds.host=chissd235.bankofamerica.com
gds.datasource=gds.310.fob1
its.dataSource=gds.310.fob1
adv.dataSource=adv.310.fob1
gds.port=9650
gds.dataType=FpML
maxNumberOfConnectors=1000
itsConnectionMethod=ejb
advDB.driverToUse=jConnect2
advDB.userName=advDev1User
advDB.password=advDev1User
advDB.databaseName=advDev1
advDB.serverName=chisdd30.bankofamerica.com
advDB.port=2910
its.user=derivuser
This is my java code snippet:
~~~~~~~~~~~~~~~~~~~~~~~
private void loadProperties()
{
try
{
GDSConfigurationAdapter adapter = new GDSConfigurationAdapter();
String configurationResource = adapter.getConfigurationPropertiesResource();
load(loadStream(configurationResource));
String eventingPropsResource = adapter.getEventingPropertiesResource();
load(loadStream(eventingPropsResource));
} catch (IOException e)
{
throw new RuntimeException("Could not load GDS/Eventing properties");
}
}
private InputStream loadStream(String propFile) throws IOException
{
InputStream propStream = ResourceLocator.getResourceAsStream(propFile);
if (propStream == null)
{
logger.warning("could not find in JAR! Looking in classpath: " + propFile);
propStream = ResourceLocator.getResourceAsStream(propFile);
}
if (propStream == null)
{
IOException t = new IOException("Failed to load property file: " + propFile);
logger.throwing(getClass().getName(), "loadProperties", t);
throw t;
}
return propStream;
}
Any help will be appreciated.
Thanks
Bjork