Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

get Properties from cfg-File of eWay in Java

Status
Not open for further replies.

nocomm

Programmer
May 23, 2003
16
AT
Hi all,

I have the following problem:
I want to determine the hostname and port of a socket connection target from the properties stored in the cfg-file of the eWay. For example, if I have a TCP/IP eWay there are parameters like "External Application Host", where I store the target TCP/IP server. When running my Java collaboration, I want to manually connect to this TCP/IP server, and therefore I need to get its name out of the property stored in the cfg-file of the current eWay.

Can anyone tell me how to do this (maybe with a small example) or generally if it is possible to get such a property within a Java collaboration?!

thanks
nocomm
 
I found it by myself - so for everyone:

java.util.Properties cfgProps = cntrCollab.getModuleConfigAsProperties();
if (cfgProps != null) {
hostName = cfgProps.getProperty("Outbound_(send)_settings.OutputDirectory");
portNo = cfgProps.getProperty("Outbound_(send)_settings.OutputFileName");
}

where cntrCollab is the JCollabController object and the two Properties listed here (Outbound_(send)_settings...) are just examples

nocomm
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top