com.sun.enterprise.admin.cli.cluster
Class ImportSyncBundleCommand
java.lang.Object
com.sun.enterprise.admin.cli.CLICommand
com.sun.enterprise.admin.cli.LocalServerCommand
com.sun.enterprise.admin.cli.cluster.LocalInstanceCommand
com.sun.enterprise.admin.cli.cluster.ImportSyncBundleCommand
- All Implemented Interfaces:
- org.jvnet.hk2.component.PostConstruct
@Service(name="import-sync-bundle")
@Scoped(value=org.jvnet.hk2.component.PerLookup.class)
public class ImportSyncBundleCommand
- extends LocalInstanceCommand
This is a local command that unbundles the bundle generated by export-sync-bundle.
import-sync-bundle applies the content under ${com.sun.aas.instanceRoot}/
directory. Synchronization cookie with DAS's timestamp should be created.
It also creates das.properties (if not present) under agent dir (ex.
installRoot/glassfish3/glassfish/nodes//agent/config/das.properties).
Before running this command the instance should already have been registered in
DAS (server element created in DAS domain.xml) by running create-instance.
This command does not validate --node or instance_name.
For upgrade - this command creates a new instance filesystem if it does not exist.
and completes DAS registration by setting rendezvousOccurred=true.
For manual sync - this command creates a new instance filesystem or updates the
directories of an existing instance (remove existing application, generated,
config, docroot, lib dir first and explode the zip) and completes registration with DAS
by setting rendezvousOccurred=true.
If setting of rendezvousOccurred=true with DAS fails, the command does not
not fail. Only a warning is printed out in the command output. We provide the
exact "asadmin set command" in this warning so that user can run
that command on DAS to change the rendezvousOccurred property for the server instance.
Usage:
import-sync-bundle [--node node_name] [--nodedir node_path] --file
xyz-sync-bundle.zip instance_name
--node name of the node; this is optional. The command fails if there
is more than one node under the default location
(installRoot/glassfish3/glassfish/nodes//)
--nodedir parent dir where node is created; this is optional. Default
location is installRoot/glassfish3/glassfish/nodes/
--file sync bundle created by export-sync-bundle
instance_name name of the server instance
| Fields inherited from class com.sun.enterprise.admin.cli.CLICommand |
argv, commandModel, CONNECTION_ERROR, env, ERROR, INVALID_COMMAND_ERROR, logger, metadataErrors, name, operands, options, passwords, programOpts, SUCCESS, WARNING |
| Methods inherited from class com.sun.enterprise.admin.cli.cluster.LocalInstanceCommand |
getDasProperties, getInstallRootPath, getInstanceDirs, getMasterPasswordFile, getNodeInstallDir, getProductRootPath, initInstance, isDirectory, mkdirs, setDasDefaults, setServerDirs, validateDasOptions, whackFilesystem |
| Methods inherited from class com.sun.enterprise.admin.cli.LocalServerCommand |
checkForSpecialFiles, getAdminAddress, getAdminAddress, getDomainXml, getMasterPassword, getPrevPid, getServerDirs, getUptime, isRestartable, isRunning, isRunning, isRunning, isThisServer, loadAndVerifyKeystore, readFromMasterPasswordFile, resetServerDirs, setLocalPassword, setServerDirs, unsetLocalPassword, verifyMasterPassword, waitForRestart |
| Methods inherited from class com.sun.enterprise.admin.cli.CLICommand |
checkHelp, execute, getBooleanOption, getCommand, getManPage, getName, getOperandModel, getOption, getPassword, getProgramOptions, getSystemProperties, getSystemProperty, getUsage, initializeLogger, initializePasswords, inject, ok, parse, postConstruct, prepare, prevalidate, printExceptionStackTrace, processProgramOptions, quote, readPassword, toString, usageOptions |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
_node
protected java.lang.String _node
setDasDefaultsOnly
protected boolean setDasDefaultsOnly
ImportSyncBundleCommand
public ImportSyncBundleCommand()
validate
protected void validate()
throws CommandException
- Overrides:
validate in class LocalInstanceCommand
- Throws:
CommandException
executeCommand
protected int executeCommand()
throws CommandException
- Specified by:
executeCommand in class CLICommand
- Throws:
CommandException
Copyright © 2012 GlassFish Community. All Rights Reserved.