/** * Returns the directory for the selected instance that is on the local * system. * @param instanceName name of the instance * @return File for the local file system location of the instance directory * @throws IOException */ protected File getLocalInstanceDir(String instance) throws IOException { /* * Pass the node directory parent and the node directory name explicitly * or else InstanceDirs will not work as we want if there are multiple * nodes registered on this node. * * If the configuration recorded an explicit directory for the node, * then use it. Otherwise, use the default node directory of * ${installDir}/glassfish/nodes/${nodeName}. */ String nodeDir = node.getNodeDirAbsolute(); final File nodeDirFile = (nodeDir != null ? new File(nodeDir) : defaultLocalNodeDirFile()); InstanceDirs instanceDirs = new InstanceDirs(nodeDirFile.toString(), node.getName(), instance); return instanceDirs.getInstanceDir(); }
InstanceDirUtils insDU = new InstanceDirUtils(node, serverContext); pidFile = new File (insDU.getLocalInstanceDir(instance.getName()) , "config/pid"); } catch (java.io.IOException eio){ pidFile = new File (insDU.getLocalInstanceDir(instance.getName()) , "config/pid"); } catch (java.io.IOException eio){
Node node = nodes.getNode(nodeName); String nodeHost = node.getNodeHost(); InstanceDirUtils insDU = new InstanceDirUtils(node, serverContext); try { pidFile = new File (insDU.getLocalInstanceDir(instance.getName()) , "config/pid"); } catch (java.io.IOException eio){
/** * Returns the directory for the selected instance that is on the local * system. * @param instanceName name of the instance * @return File for the local file system location of the instance directory * @throws IOException */ File getLocalInstanceDir(String instance) throws IOException { /* * Pass the node directory parent and the node directory name explicitly * or else InstanceDirs will not work as we want if there are multiple * nodes registered on this node. * * If the configuration recorded an explicit directory for the node, * then use it. Otherwise, use the default node directory of * ${installDir}/glassfish/nodes/${nodeName}. */ String nodeDir = node.getNodeDirAbsolute(); final File nodeDirFile = (nodeDir != null ? new File(nodeDir) : defaultLocalNodeDirFile()); InstanceDirs instanceDirs = new InstanceDirs(nodeDirFile.toString(), node.getName(), instance); return instanceDirs.getInstanceDir(); }