com.ibm.wsspi.al
Class ALContext

java.lang.Object
  extended bycom.ibm.wsspi.al.ALContext
All Implemented Interfaces:
com.ibm.ws.al.util.ALConstants, com.ibm.ws.al.util.ALPIIMessages, com.ibm.ws.al.ralclient.RALClientConstants

public class ALContext
extends java.lang.Object
implements com.ibm.ws.al.util.ALConstants, com.ibm.ws.al.ralclient.RALClientConstants

The AL Context provides the dynamic api of setting/adding/removing remote AL configuarations


Field Summary
protected static java.lang.String CLASS
           
static java.lang.String COPYRIGHT
           
protected static java.util.logging.Logger l
           
 
Fields inherited from interface com.ibm.ws.al.util.ALConstants
ADMIN, ALEXTCFG_AL, ALEXTCFG_METAINF_CONFIG, APPLICATIONEARPATH, ARCHIVE, ARCHIVES, CLASSLOADER, EMF_MODEL_PACKAGE_IMPL, EMF_MODEL_PACKAGE_IMPL_SUFFIX, ENVIRONMENT, EXTENSION, EXTENSIONPOINT, J2SE, LIBS, POST_WAS_START, REMOTE_LOCATOR_CLASS, REMOTE_WEBSPHERE_LOCATOR_CLASS, WAS_LOGGER_CLASS_NAME, WAS60
 
Fields inherited from interface com.ibm.ws.al.util.ALPIIMessages
ALLOGGER, ApplicationFileNotFound_Message, ARTIFACTLOADER_ACTIVATED_MBEAN, ARTIFACTLOADER_ADMINTASK_EDITRALSERVERSECURITY_SUCCESS, ARTIFACTLOADER_ADMINTASK_EXEC_SUCCESS, ARTIFACTLOADER_CONFIGFILE_ROOT_NULL, ARTIFACTLOADER_COULD_NOT_ACTIVATE_MBEAN, ARTIFACTLOADER_COULD_NOT_CONNECT_MBEAN, ARTIFACTLOADER_COULD_NOT_FIND_APP_CROSSCELL, ARTIFACTLOADER_COULD_NOT_FIND_APP_WITHINCELL, ARTIFACTLOADER_COULD_NOT_LOAD_CONFIGFILE, ARTIFACTLOADER_COULD_NOT_LOAD_CONFIGFILE_NOREASON, ARTIFACTLOADER_EVENT_RELAY_ERROR, ARTIFACTLOADER_FILENOTFOUND, ARTIFACTLOADER_INCORRECT_URL, ARTIFACTLOADER_INIT_LISTNER_CLASS_ILLEGAL_ACCESS_ERROR, ARTIFACTLOADER_INIT_LISTNER_CLASS_INSTANCESTION_ERROR, ARTIFACTLOADER_INIT_LISTNER_CLASS_NOTFOUND_ERROR, ARTIFACTLOADER_INITIALIZING_CLASSLOADER_ERROR, ARTIFACTLOADER_INITIALIZING_INDEXDIRECTORY_ERROR, ARTIFACTLOADER_INITIALIZING_INDEXZIP_ERROR, ARTIFACTLOADER_INITIALIZING_MODULE_AVAILABLE_MODULENAME, ARTIFACTLOADER_INITIALIZING_MODULE_MODULENAME, ARTIFACTLOADER_IO_FAILURE, ARTIFACTLOADER_LOCATOR_INITIALIZATION_ERROR, ARTIFACTLOADER_OPENFAILURE, ARTIFACTLOADER_PROTOCOL_REG_FAILURE, ARTIFACTLOADER_REMOTE_COULD_NOT_QUERY_APP, ArtifactLoaderConfigDataError_Message_info, ArtifactLoaderInitServerConfigError_Message, ArtifactLoaderInstanceCreation_ClassMethodError, ArtifactLoaderInstanceCreation_RuntimeError, ArtifactLoaderInstanceCreation_SecurityError, BUNDLE, ERR_MALFORMED_SCHEMA_LOCATION_URL$1_MESSAGE$2, RES_BUNDLE, WARN_UNABLE_TO_PARSE_$1DOC_$2URL
 
Fields inherited from interface com.ibm.ws.al.ralclient.RALClientConstants
EXTADMINNAME, EXTAPPNAME, EXTDEPLOYMENTMANAGER, EXTSECURITY, EXTSERVER, EXTTRANS, EXTTRANSHTTP, EXTTRANSMDB, RALSVRMBEANNAME, WCCM_ALCONFIGURATIONS_NAME, WCCM_ALCONFIGURATIONS_TYPE, WCCM_PROP_NAMEATTRIBUTE_NAME, WCCM_PROP_VALUEATTRIBUTE_NAME, WCCM_RALCONFIG_PROP_NAME, WCCM_RALCONFIG_PROP_TYPE, WCCM_RALSECURITY_NAME, WCCM_RALSECURITY_TYPE, WCCM_RALSERVER_ATTR_PASSWORD, WCCM_RALSERVER_ATTR_SECURITYENABLE, WCCM_RALSERVER_ATTR_USER, WCCM_ROOT_CONFIGOBJ_NAME
 
Constructor Summary
ALContext()
           
 
Method Summary
static void add(ALConfiguration config)
          add an instance of ALConfig to the current thread's ALContext.
static void remove(ALConfiguration config)
          remove an instance of ALConfig from the current thread's ALContext.
static void setContext(ALConfiguration config)
          set AL context to an instance of ALConfig.
static void setContext(java.util.Collection configs)
          set AL context to a list of ALConfig.
static void setContext(java.lang.String tempName, java.lang.String appName)
          This is a easy of use wrapper method.
static void unset()
          unset the current thread??s AL context
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
See Also:
Constant Field Values

CLASS

protected static final java.lang.String CLASS

l

protected static java.util.logging.Logger l
Constructor Detail

ALContext

public ALContext()
Method Detail

setContext

public static void setContext(ALConfiguration config)
                       throws InvalidConfigException
set AL context to an instance of ALConfig. When context is set to an ALConfig, the AL for the current thread is configured to use the ALConfig to locate artifact

Parameters:
config - an instance of ALConfig
Throws:
InvalidConfigException - this exception will be thrown if the configuration is invalid. For example, in RAL case, if a configuration does not have server information or application name, the configuration is incomplete, therefore is invalid.

setContext

public static void setContext(java.util.Collection configs)
                       throws InvalidConfigException
set AL context to a list of ALConfig. When context is set to an ALConfig, the AL for the current thread is configured to use the ALConfig to locate artifact

Parameters:
configs - an config list of ALConfig
Throws:
InvalidConfigException - this exception will be thrown if the configuration is invalid. For example, in RAL case, if a configuration does not have server information or application name, the configuration is incomplete, therefore is invalid.

unset

public static void unset()
unset the current thread??s AL context


add

public static void add(ALConfiguration config)
                throws InvalidConfigException
add an instance of ALConfig to the current thread's ALContext.

Parameters:
config - an instance of ALConfig
Throws:
InvalidConfigException - this exception will be thrown if the configuration is invalid. For example, in RAL case, if a configuration does not have server information or application name, the configuration is incomplete, therefore is invalid

remove

public static void remove(ALConfiguration config)
remove an instance of ALConfig from the current thread's ALContext.

Parameters:
config - an instance of ALConfig that to be removed

setContext

public static void setContext(java.lang.String tempName,
                              java.lang.String appName)
                       throws InvalidConfigException
This is a easy of use wrapper method. What it does is, Step1: it will fetch a RAL template based on tempName. If a template does not exist, it will create a new template using default value. Step2: it will set application property using appName to the template created in step1. Step3: it will set the template to current AL context.

Parameters:
tempName - a template name
appName - a name of a remote application
Throws:
InvalidConfigException - invalid configuration