|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.enterprise.v3.admin.cluster.SecureAdminBootstrapHelper
public abstract class SecureAdminBootstrapHelper
Bootstraps the secure admin-related files, either over ssh (copying files from the current runtime environment to the remote system via secure ftp) or locally (using more straightforward file-copying).
| Nested Class Summary | |
|---|---|
static class |
SecureAdminBootstrapHelper.BootstrapException
|
| Constructor Summary | |
|---|---|
SecureAdminBootstrapHelper()
|
|
| Method Summary | |
|---|---|
protected abstract void |
backdateInstanceDomainXML()
Adjusts the date on the new instance's domain.xml so it looks older than the original one on the DAS. |
void |
bootstrapInstance()
Bootstraps the instance for remote admin. |
protected abstract void |
close()
|
protected abstract void |
copyBootstrapFiles()
Copies the bootstrap files from their origin to their destination. |
static SecureAdminBootstrapHelper |
getLocalHelper(java.io.File existingInstanceDir,
java.io.File newInstanceDir)
Creates a new helper for delivering files needed for secure admin to the local instance (local meaning on the same node as the DAS). |
static SecureAdminBootstrapHelper |
getRemoteHelper(org.jvnet.hk2.component.Habitat habitat,
java.io.File DASInstanceDir,
java.lang.String remoteNodeDir,
java.lang.String instance,
Node node,
java.util.logging.Logger logger)
Creates a new helper for delivering files needed for secure admin to the remote instance. |
protected abstract void |
mkdirs(java.lang.String dirURI)
Cleans up any allocated resources. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SecureAdminBootstrapHelper()
| Method Detail |
|---|
public static SecureAdminBootstrapHelper getRemoteHelper(org.jvnet.hk2.component.Habitat habitat,
java.io.File DASInstanceDir,
java.lang.String remoteNodeDir,
java.lang.String instance,
Node node,
java.util.logging.Logger logger)
throws SecureAdminBootstrapHelper.BootstrapException
habitat - hk2 habitatDASInstanceDir - directory of the local instance - source for the required filesremoteNodeDir - directory of the remote node on the remote systeminstance - name of the instance on the remote node to bootstrapnode - Node from the domain configuration for the target nodelogger -
java.io.IOException
SecureAdminBootstrapHelper.BootstrapException
public static SecureAdminBootstrapHelper getLocalHelper(java.io.File existingInstanceDir,
java.io.File newInstanceDir)
existingInstanceDir - directory of an existing instance (typically the DAS) from where the files can be copiednewInstanceDir - directory of the new instance to where the files will be copied
protected abstract void mkdirs(java.lang.String dirURI)
throws java.io.IOException
java.io.IOExceptionprotected abstract void close()
protected abstract void copyBootstrapFiles()
throws java.io.FileNotFoundException,
java.io.IOException
Concrete subclasses implement this differently, depending on exactly how they actually transfer the files.
java.io.FileNotFoundException
java.io.IOException
protected abstract void backdateInstanceDomainXML()
throws SecureAdminBootstrapHelper.BootstrapException
We have copied the domain.xml and a small number of other files to the instance, but not all the files needed for the instance to be fully sync-ed. The sync logic decides if an instance is up-to-date by comparing the timestamp of the instance's domain.xml with that of the DAS. If those timestamps match then the sync logic judges the instance to be up-to-date. When we copy the DAS domain.xml to the instance to deliver the secure admin configuration (so the start-local-instance command and the instance will know how to connect to the DAS) it is left with the same timestamp as the DAS copy. To make sure sync works when start-local-instance runs, we backdate the instance's copy of domain.xml.
SecureAdminBootstrapHelper.BootstrapException
public void bootstrapInstance()
throws SecureAdminBootstrapHelper.BootstrapException
java.io.IOException
SecureAdminBootstrapHelper.BootstrapException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||