I have multiple ISs on a single box and I am trying to use getFile service to read a file from the packages directory. Everytime I have to enter the path manually when ever I change the IS instance. Is there any service available or any other way to read the path of the file from different instances of IS and give it as an input to the getFile service.
The PSUtilities package has a service called PSUtilites.properties:getSystemProperty (pass in user.dir as propertyName parameter) which will retrieve the IS directory. From there you can concat the paths to the targeted package directory to build the full path to be used by getFile. This way, you don’t have to type in the paths manually, but let your code build the paths for you. It should work for any IS instance because it gets the appropriate IS directory for that particular IS instance.
If the path and the filename are always the same except that the IntegrationServer home changes, then you can use a relative path.
For example, instead of using the path C:/Program Files/webMethods6/IntegrationServer/packages/MyPackage/myfile.txt, you can simply use packages/MyPackage/myfile.txt.
Reviving an old thread. We’re running both DEV and QA on the same machine but with two seperate VMs.
For some reason, when I call pub.utils:getServerProperty from dev using “user.dir”, it returns the QA path, which is really weird to me. We have different start scripts and user environments so this should not happen.
Anyone with ideas? Is there a way to change the “user.dir” for the DEV instance?