Package com.sun.enterprise.util.cluster.windows.io

Examples of com.sun.enterprise.util.cluster.windows.io.WindowsRemoteFileSystem


            for (String host : hosts) {
                String remotePassword = getWindowsPassword(host);
                passwords.add(new HostAndPassword(host, remotePassword));

                if (!getForce()) {
                    WindowsRemoteFileSystem wrfs = new WindowsRemoteFileSystem(host, getRemoteUser(), remotePassword);
                    WindowsRemoteFile remoteInstallDir = new WindowsRemoteFile(wrfs, remoteInstallDirString);

                    if (remoteInstallDir.exists())
                        throw new CommandException(Strings.get("install.dir.exists", remoteInstallDir));
                }
View Full Code Here


        final String zipFileName = "glassfish_install.zip";
        final String unpackScriptName = "unpack.bat";

        for (String host : hosts) {
            String remotePassword = getPassword(host);
            WindowsRemoteFileSystem wrfs = new WindowsRemoteFileSystem(host, getRemoteUser(), remotePassword);
            WindowsRemoteFile remoteInstallDir = new WindowsRemoteFile(wrfs, remoteInstallDirString);
            remoteInstallDir.mkdirs(getForce());
            WindowsRemoteFile remoteZip = new WindowsRemoteFile(remoteInstallDir, zipFileName);
            WindowsRemoteFile unpackScript = new WindowsRemoteFile(remoteInstallDir, unpackScriptName);
            //createUnpackScript
View Full Code Here


            String loggingDir = getLoggingDirectoryForNode(instanceLogFileName, node, sNode, instanceName);

            DcomInfo info = new DcomInfo(node);
            WindowsRemoteFileSystem wrfs = new WindowsRemoteFileSystem(info.getHost(), info.getUser(), info.getPassword());

            if (logFileName == null || logFileName.equals("")) {
                logFileName = "server.log";
            }
            WindowsRemoteFile wrf = new WindowsRemoteFile(wrfs, loggingDir + File.separator + logFileName);
View Full Code Here

            String sourceDir = getLoggingDirectoryForNode(instanceLogFileDirectory, node, sNode, instanceName);

            DcomInfo info = new DcomInfo(node);

            WindowsRemoteFileSystem wrfs = new WindowsRemoteFileSystem(info.getHost(), info.getUser(), info.getPassword());

            for (int i = 0; i < instanceLogFileNames.size(); i++) {

                String logFileName = (String) instanceLogFileNames.get(i);
                WindowsRemoteFile wrf = new WindowsRemoteFile(wrfs, sourceDir + File.separator + logFileName);
View Full Code Here

        } else if (node.getType().equals("DCOM")) {

            String loggingDir = getLoggingDirectoryForNode(instanceLogFileDirectory, node, sNode, instanceName);

            DcomInfo info = new DcomInfo(node);
            WindowsRemoteFileSystem wrfs = new WindowsRemoteFileSystem(info.getHost(), info.getUser(), info.getPassword());
            WindowsRemoteFile wrf = new WindowsRemoteFile(wrfs, loggingDir);
            String[] allLogFileNames = wrf.list();

            for (int i = 0; i < allLogFileNames.length; i++) {
                File file = new File(allLogFileNames[i]);
View Full Code Here

            for (String host : hosts) {
                String remotePassword = getWindowsPassword(host);
                passwords.add(new HostAndPassword(host, remotePassword));

                if (!getForce()) {
                    WindowsRemoteFileSystem wrfs = new WindowsRemoteFileSystem(host, getRemoteUser(), remotePassword);
                    WindowsRemoteFile remoteInstallDir = new WindowsRemoteFile(wrfs, remoteInstallDirString);

                    if (remoteInstallDir.exists())
                        throw new CommandException(Strings.get("install.dir.exists", remoteInstallDir));
                }
View Full Code Here

        final String zipFileName = "glassfish_install.zip";
        final String unpackScriptName = "unpack.bat";

        for (String host : hosts) {
            String remotePassword = getPassword(host);
            WindowsRemoteFileSystem wrfs = new WindowsRemoteFileSystem(host, getRemoteUser(), remotePassword);
            WindowsRemoteFile remoteInstallDir = new WindowsRemoteFile(wrfs, remoteInstallDirString);
            remoteInstallDir.mkdirs(getForce());
            WindowsRemoteFile remoteZip = new WindowsRemoteFile(remoteInstallDir, zipFileName);
            WindowsRemoteFile unpackScript = new WindowsRemoteFile(remoteInstallDir, unpackScriptName);
            //createUnpackScript
View Full Code Here

     * 2. copy the token/auth stuff into it
     * 3. add the correct args to the remote commandline
     *    Put the file in the same directory that asadmin lives in (bin)
     */
    private void setupAuthTokenFile(List<String> cmd, List<String> stdin) throws WindowsException {
        WindowsRemoteFileSystem wrfs = new WindowsRemoteFileSystem(dcomInfo.getCredentials());
        authTokenFilePath = dcomInfo.getAsadminParentPath() + "\\token_" + System.nanoTime() + new Random().nextInt(1000);
        authTokenFilePath = createUniqueFilename(dcomInfo.getAsadminParentPath());
        authTokenFile = new WindowsRemoteFile(wrfs, authTokenFilePath);
        authTokenFile.copyFrom(stdin);

View Full Code Here

     */
    void pingDcomConnection(String host, String domain, String username,
            String password, String installRoot) throws CommandValidationException {
        try {
            installRoot = installRoot.replace('/', '\\');
            WindowsRemoteFileSystem wrfs = new WindowsRemoteFileSystem(host, username, password);
            WindowsRemoteFile wrf = new WindowsRemoteFile(wrfs, installRoot);
            WindowsCredentials creds = new WindowsCredentials(host, domain, username, password);

            // also looking for side-effect of Exception getting thrown...
            if (!wrf.exists()) {
View Full Code Here

        if (!ok(windowsdomain))
            windowsdomain = host;

        creds = new WindowsCredentials(host, windowsdomain, user, password);
        wrfs = new WindowsRemoteFileSystem(creds);
        scriptFullPath = testdir + "\\" + SCRIPT_NAME;
    }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.util.cluster.windows.io.WindowsRemoteFileSystem

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.