|
I saw the following exchange over on news://ibm.software.websphere.application-server.as400 and thought it might be of interest to some here. Tony wrote: > I noted that the node name is POSTMASTER_WAS50 where WAS50 is my server > instance name. Is there a way to retrieve this node name programmatically in > either java or RPG code? At least how to retrieve the first part > (POSTMASTER) programmatically for a given iSeries box? Art responded: I'm not sure if you intend the java pgm to be run as an application separate from WebSphere or as an invoked java servlet running within WebSphere. I guess I'd suggest getting this information using java.io.File methods... If running separate from WebSphere, the java pgm can form the string "/QIBM/UserData/WebAS5/Base/" + instance + "/config/cells" (where the java code would have to somehow know the WebSphere instance). It is possible for you to have installed multiple instances of WebSphere on your iSeries, so your java pgm can't necessarily assume there will be only one instance. If running as a servlet, it can issue: String baseDir = System.getProperty("user.install.root"); to get the String for ---> "/QIBM/UserData/WebAS5/Base/" + instance - which you can use to append "/config/cells". Then it is a matter of interrogating its contained subdirectory name, which should be POSTMASTER_WAS50 on your system.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.