Configuration Editing Commands
This section describes the commands that edit JEUS configurations. JEUS’s dynamic configuration modification tool can be used through the console by using these commands.
For detailed explanations on the dynamic configuration change feature, refer to Changing Domain Settings in JEUS Domain Guide |
The following needs to be pointed out before describing the commands.
-
JEUS configurations edited by using the configuration editing commands
The configuration editing commands are used to edit Java objects which are used by the JEUS server to save configurations. These objects used JAXB to change the XML schema defined in domain.xml (which expresses JEUS configuration) to Java objects. As a result, the object structure and the names of each item are similar to those in domain.xml, but some parts may be expressed differently.
-
Simple Type
Does not contain child items.
-
Complex Type
Contains child items. A child can have simple types, or lists that contain complex types and simple types, or lists that contain complex types.
-
List
Also contains configuration items in the list format containing simple types or complex types as elements.
-
Path
Configuration editing commands indicate the location of each item as a path in JEUS configurations. A path consists of the name of a configuration item, the identifier of a complex type, or an index. Each item is separated by a slash (/).
-
A root is expressed as a single slash.
-
The current location is expressed as a single dot.
-
The parent item of the current location is expressed as two dots. For example, the path name for the parent of the '/servers' item is expressed as '/servers/..'.
-
The name of a configuration item is usually the path name of the configuration item. For example, the path of the servers item under 'root' are expressed as '/servers'. The servers item has child items, and if one of the item’s name is called 'server', then the path of the server item is '/servers/server'.
-
A list that contains a complex type as an element uses the value of the identifier of the complex type as the path name. An identifier is a child item with a unique value that identifies a specific complex type when multiple complex types in the same format exist. For example, '/servers/server' is a list that consists of multiple complex types that contains the configurations of each server in the domain configuration. An identifer is specified to use the server name in a complex type, which contains the server configuration. As a result, the path name of the configuration item for server1 can be expressed as '/servers/server/server1'.
-
A list that has a simple type (instead of a complex type) as an element cannot contain an identifier. As a result, an index, which identifies the element number in the list, is used as the path name. An index number with an integer greater than 0 is specified inside brackets. For example, if there is a list with a path named '/a/b' and 'b' as the simple type, then the first element of the list is expressed as '/a/b/[0]'.
The first element when expressing the path for a simple type list is expressed as [0], not [1].
-
Each configuration editing command may specify or modify the current path. The current path is stored in a server. As a result, if multiple jeusadmin are executed, and configuration changes are applied in multiple places, then the current path may be changed inadvertently. This may result in abnormal execution of the command. Therefore, when modifying a configuration, it is recommended that only one jeusadmin is executed.
-
The following table describes the list of commands used for editing configurations. All these commands can only be used when connected to a server.
Command | Description |
---|---|
Applies modified configurations to a server and displays the results. |
|
Disables the lock for dynamic configuration changes, and deletes the modified history stored in a server. This command can be used even when there is no lock. |
|
Checks or changes the current path. |
|
Creates an empty complex type in a specified item, or creates a new item in a list that has complex type as an element. |
|
Deletes an item located in a specified path. |
|
Changes the value of a specified simple type, or adds a new item to a list that has simple type as an element. |
|
Sends a request to a server to request a lock for dynamic configuration changes. |
|
Displays the information about an item that exists in a specified path. |
1. activate-configuration
Applies modified configurations to a server and displays the results.
-
Alias
activate
-
Usage
activate-configuration
-
Example
[MASTER]domain1.adminServer>cd / [MASTER]domain1.adminServer>ls description Not specified (string ) productionMode true id 982883233 securityManager complex type passwordValidator Not specified (complex type) adminServerName adminServer domainLogHome Not specified (string ) systemClusteringFramework complex type domainBackup complex type enableWebadmin true enableJsonCommand false enableToResynchronizeApplications false servers complex type sessionCluster complex type clusters Not specified (complex type) serverTemplates Not specified (complex type) lifecycleInvocation list of [lifecycleInvocation] applicationRepositories Not specified (complex type) deployedApplications Not specified (complex type) deployedLibraries Not specified (complex type) resources Not specified (complex type) [MASTER]domain1.adminServer>set description "Hello, world" The value Hello, world is set at the specified location /description. [MASTER]domain1.adminServer>ls description Hello, world productionMode true id 982883233 securityManager complex type passwordValidator Not specified (complex type) adminServerName adminServer domainLogHome Not specified (string ) systemClusteringFramework complex type domainBackup complex type enableWebadmin true enableJsonCommand false enableToResynchronizeApplications false servers complex type sessionCluster complex type clusters Not specified (complex type) serverTemplates Not specified (complex type) lifecycleInvocation list of [lifecycleInvocation] applicationRepositories Not specified (complex type) deployedApplications Not specified (complex type) deployedLibraries Not specified (complex type) resources Not specified (complex type) [MASTER]domain1.adminServer>activate The activation completed successfully. [Details] domain.xml : ACTIVATED domain : ACTIVATED domain.description : ACTIVATED
2. cancel
Deletes changes, and releases the lock for dynamic configuration changes. This can be used even when a user that executes commands does not acquire a lock. This is a command that can forcibly release the lock intended for dynamic configuration changes.
-
Usage
cancel
-
Example
[MASTER]domain1.adminServer>edit Successfully acquired a configuration lock from Domain Administration Server. [MASTER]domain1.adminServer>ls description Hello, world productionMode true id 982883233 securityManager complex type passwordValidator Not specified (complex type) adminServerName adminServer domainLogHome Not specified (string ) systemClusteringFramework complex type domainBackup complex type enableWebadmin true enableJsonCommand false enableToResynchronizeApplications false servers complex type sessionCluster complex type clusters Not specified (complex type) serverTemplates Not specified (complex type) lifecycleInvocation list of [lifecycleInvocation] applicationRepositories Not specified (complex type) deployedApplications Not specified (complex type) deployedLibraries Not specified (complex type) resources Not specified (complex type) [MASTER]domain1.adminServer>cancel Current configuration editing status is cleared, and the configuration lock is released. [MASTER]domain1.adminServer>ls Current user does not have the configuration lock.
3. change-current-path
Changes a specified path to the current path. If a path is not specified, then the current path will be displayed.
-
Alias
cd
-
Usage
change-current-path [<path>]
-
Parameters
Parameter Description [<path>]
Either an absolute path or a relative path to change.
-
Example
[MASTER]domain1.adminServer>change-current-path servers/server/adminServer Current path is changed to /servers/server/adminServer [MASTER]domain1.adminServer>change-current-path .. Current path is changed to /servers/server [MASTER]domain1.adminServer>change-current-path . Current path is changed to /servers/server [MASTER]domain1.adminServer>change-current-path / Current path is changed to / [MASTER]domain1.adminServer>change-current-path servers/server/server1/../.././server/adminServer Current path is changed to /servers/server/adminServer [MASTER]domain1.adminServer>cd /servers/server/adminServer
4. create-empty-element
Creates a new complex type in a specified location. The complex type will be empty, and it must be filled manually. If an element with a complex type uses an identifier value as an item name, it creates a type in which a specified value becomes an identifier value, and adds the type to the list.
-
Alias
create
-
Usage
create-empty-element <name> [<type>]
-
Parameters
Parameter Description <name>
Name of the item to be created. When adding a new complex type in a list that has a complex type as an element, then this parameter creates a complex type which uses the value specified by using the item name as the identifier value.
[<type>]
Type of the item to be created. Typically they do not need to be specified. However, for a list with multiple types as the element, then the type to be created needs to be specified.
-
Example
-
The following is an example of creating an empty complex type.
[MASTER]domain1.adminServer>cd / [MASTER]domain1.adminServer>create-empty-element passwordValidator Created an empty complex type of passwordValidator at path /
-
The following is an example of adding a new complex type to a list that has a complex type as an element. A new server item that uses 'server2' as the server name (which is an identifier) is created and added to the list.
[MASTER]domain1.adminServer>cd /servers/server Current path is changed to /servers/server [MASTER]domain1.adminServer>ls adminServer server1 Current list can contain the following type of elements: [server] The name of the identifier element of [server] element is [name]. [MASTER]domain1.adminServer>create-empty-element server2 Added a new element of type server with id [name == server2] to the list at path /servers/server [MASTER]domain1.adminServer>ls adminServer server1 server2 Current list can contain the following type of elements: [server] The name of the identifier element of [server] element is [name].
-
The following is an example of specifying the complex type to be created by using the type option. The results of the show-element command shows multiple types of elements. If a type is not specified, then a help message will be displayed.
[MASTER]domain1.adminServer>cd /servers/server/adminServer/systemLogging/jeus/handler/ fileHandlerOrSmtpHandlerOrSocketHandler [MASTER]domain1.adminServer>ls fileHandler Current list can contain the following type of elements: [fileHandler, userHandler, smtpHandler, socketHandler] The name of the identifier element of [fileHandler, userHandler, smtpHandler, socketHandler] element is [name]. [MASTER]domain1.adminServer>create-empty-element handler1 Must specify an element type to create a new element. Available types are fileHandler, userHandler, smtpHandler, socketHandler. [MASTER]domain1.adminServer>create-empty-element handler1 userHandler Added a new element of type userHandler with id [name == handler1] to the list at path /servers/server/adminServer/systemLogging/jeus/handler/fileHandlerOrSmtpHandlerOrSocketHandler [MASTER]domain1.adminServer>ls fileHandler handler1 Current list can contain the following type of elements: [fileHandler, userHandler, smtpHandler, socketHandler] The name of the identifier element of [fileHandler, userHandler, smtpHandler, socketHandler] element is [name].
-
5. delete-element
Deletes an item located in a specified path.
-
Alias
delete, rm
-
Usage
delete-element <path>
-
Parameters
Parameter Description <path>
Path of the item whose value will be deleted.
-
Example
[MASTER]domain1.adminServer>cd / Current path is changed to / [MASTER]domain1.adminServer>ls description Hello,world productionMode true id 982883233 securityManager complex type passwordValidator Not specified (complex type) adminServerName adminServer domainLogHome Not specified (string ) systemClusteringFramework complex type domainBackup complex type enableWebadmin true enableJsonCommand false enableToResynchronizeApplications false servers complex type sessionCluster complex type clusters Not specified (complex type) serverTemplates Not specified (complex type) lifecycleInvocation list of [lifecycleInvocation] applicationRepositories Not specified (complex type) deployedApplications Not specified (complex type) deployedLibraries Not specified (complex type) resources Not specified (complex type) [MASTER]domain1.adminServer>delete-element description Successfully delete the target element at /description. [MASTER]domain1.adminServer>ls description Not specified (string ) productionMode true id 982883233 securityManager complex type passwordValidator Not specified (complex type) adminServerName adminServer domainLogHome Not specified (string ) systemClusteringFramework complex type domainBackup complex type enableWebadmin true enableJsonCommand false enableToResynchronizeApplications false servers complex type sessionCluster complex type clusters Not specified (complex type) serverTemplates Not specified (complex type) lifecycleInvocation list of [lifecycleInvocation] applicationRepositories Not specified (complex type) deployedApplications Not specified (complex type) deployedLibraries Not specified (complex type) resources Not specified (complex type)
6. start-configuration-editing
Acquires a lock for dynamic configuration changes by sending a request to a server. If a lock is acquired, then the server’s current path is initialized. When a lock is not acquired, commands (excluding the cancel command) are not executed. As a result, a lock must be acquired by first executing this command.
-
Alias
lock-and-edit, edit
-
Usage
start-configuration-editing [-f]
-
Parameters
Parameter Description [-f]
When another user has a lock for dynamic configuration changes, this parameter ignores this and attempts to forcibly acquire the lock.
-
Example
[MASTER]domain1.adminServer>start-configuration-editing Successfully acquired a configuration lock from Domain Administration Server.
7. set-element-value
This is used for modifying the value of a simple type item, or adding a value to a list that has simple type as an element.
-
Alias
set
-
Usage
set-element-value <path><value>
-
Parameters
Parameter Description <path>
Specifies the path of the item to modify.
<value>
Specifies the value to modify.
-
Example
-
This is an example of setting a value called "Hello,world!" in the description item by using the set-element-value command.
[MASTER]domain1.adminServer>cd / Current path is changed to / [MASTER]domain1.adminServer>ls description Not specified (string ) productionMode true id 982883233 securityManager complex type passwordValidator Not specified (complex type) adminServerName adminServer domainLogHome Not specified (string ) systemClusteringFramework complex type domainBackup complex type enableWebadmin true enableJsonCommand false enableToResynchronizeApplications false servers complex type sessionCluster complex type clusters Not specified (complex type) serverTemplates Not specified (complex type) lifecycleInvocation list of [lifecycleInvocation] applicationRepositories Not specified (complex type) deployedApplications Not specified (complex type) deployedLibraries Not specified (complex type) resources Not specified (complex type) [MASTER]domain1.adminServer>set-element-value description "Hello,world" The value Hello,world is set at the specified location /description. [MASTER]domain1.adminServer>ls description Hello,world productionMode true id 982883233 securityManager complex type passwordValidator Not specified (complex type) adminServerName adminServer domainLogHome Not specified (string ) systemClusteringFramework complex type domainBackup complex type enableWebadmin true enableJsonCommand false enableToResynchronizeApplications false servers complex type sessionCluster complex type clusters Not specified (complex type) serverTemplates Not specified (complex type) lifecycleInvocation list of [lifecycleInvocation] applicationRepositories Not specified (complex type) deployedApplications Not specified (complex type) deployedLibraries Not specified (complex type) resources Not specified (complex type)
-
This is an example of adding a value to a list that has simple type as an element. The path of the list in which a value will be added is used as an item name.
[MASTER]domain1.adminServer>start-configuration-editing Successfully acquired a configuration lock from Domain Administration Server. [MASTER]domain1.adminServer>cd lifecycleInvocation Current path is changed to /lifecycleInvocation [MASTER]domain1.adminServer>create-empty-element com.tmax.sample Added a new element of type lifecycleInvocation with id [className == com.tmax.sample] to the list at path /lifecycleInvocation [MASTER]domain1.adminServer>cd com.tmax.sample Current path is changed to /lifecycleInvocation/com.tmax.sample [MASTER]domain1.adminServer>cd invocation Current path is changed to /lifecycleInvocation/com.tmax.sample/invocation [MASTER]domain1.adminServer>create-empty-element invocation Added a new element of type invocation to the list at path /lifecycleInvocation/com.tmax.sample/invocation [MASTER]domain1.adminServer>cd [0] Current path is changed to /lifecycleInvocation/com.tmax.sample/invocation/[0] [MASTER]domain1.adminServer>ls invocationMethod Not specified (complex type) invocationArgument list of [string] invocationType Not specified (enum[BOOT, BEFORE_DEPLOY, AFTER_DEPLOY, READY, BEFORE_UNDEPLOY, AFTER_UNDEPLOY]) [MASTER]domain1.adminServer>set-element-value invocationArgument arg0 The value arg0 added to the list in the specified location: /lifecycleInvocation/com.tmax.sample/invocation/[0]/invocationArgument. [MASTER]domain1.adminServer>cd invocationArgument Current path is changed to /lifecycleInvocation/com.tmax.sample/invocation/[0]/invocationArgument [MASTER]domain1.adminServer>ls [0] arg0 Current list can contain the following type of elements: [string] [MASTER]domain1.adminServer>set-element-value . arg1 The value arg1 added to the list in the specified location: /lifecycleInvocation/com.tmax.sample/invocation/[0]/invocationArgument. [MASTER]domain1.adminServer>ls [0] arg0 [1] arg1 Current list can contain the following type of elements: [string]
-
8. show-element
Displays the information about the items located in a specified path. The information displayed includes name, value, and type. When a path is not specified, the path for the current location is displayed.
-
Alias
ls
-
Usage
show-element [<path>]
-
Parameters
Parameter Description [<path>]
Specifies the path of the item to be retrieved.
-
Example
-
This is an example of displaying the information about a complex type. The item name, value (if there is one), and the type of the value are displayed.
[MASTER]domain1.adminServer>show-element name adminServer nodeName node1 listeners complex type logHome Not specified (string ) group Not specified (string ) jvmConfig complex type userInterceptor Not specified (complex type) userLogging Not specified (complex type) systemLogging list of [systemLogging] logStdoutToRawFormat true actionOnResourceLeak WARNING (enum[NO_ACTION, WARNING, AUTO_CLOSE]) tmConfig complex type externalResource list of [externalResource] managedExecutorService list of [string] managedScheduledExecutorService list of [string] contextService list of [string] managedThreadFactory list of [string] scheduler Not specified (complex type) namingServer complex type jmxManager Not specified (complex type) systemThreadPool complex type dataSourceRemoteLookup false engineInitOnStartup true useWebEngine true useEjbEngine true useJmsEngine true webEngine complex type ejbEngine complex type jmsEngine complex type useMEJB false classFtp true enableInterop Not specified (complex type) lifecycleInvocation list of [lifecycleInvocation] resRef complex type jmsResource complex type dataSources Not specified (complex type) customResourceRefs Not specified (complex type) externalResourceRefs Not specified (complex type) autoGenerated Not specified (boolean )
-
This is an example of displaying the information about the list of the items that have complex type as an element. The name of each item is displayed as the value of the identifier. The identifer and the type of the value in the list are displayed.
[MASTER]domain1.adminServer>show-element /servers/server adminServer server1 Current list can contain the following type of elements: [server] The name of the identifier element of [server] element is [name].
-