Resource configuration scripts
The scripting library provides multiple script procedures to automate your application server configurations. Use the mail, URL, and resource environment configuration scripts to create and configure resources in your environment. You can run each script individually or combine procedures to create custom automation scripts.
The mail, URL, and resource management script procedures are located in a app_server_root/scriptLibraries/resources/ directory.
Format for the scope argument
The scope format applies to the scripts in the script library that have the scope argument.
A cell is optional on node, server, and cluster scopes. A node is required on the server scope.
You can delimit the type by using a comma (,) or a colon (:). You can use earlier case for the type (cell=, node=, server=, or cluster=.)
The examples in the following table are split on multiple lines for publishing purposes.
Scope | Containment path | Configuration ID | Type |
---|---|---|---|
Cell | /Cell:myCell/ |
|
Cell=myCell or cell=myCell |
Node | /Cell:myCell/Node:myNode/ or /Node:myNode/ |
|
or
or
|
Server |
or
|
|
or or
|
Cluster |
or
|
|
or
or
|
createCompleteMailProvider
This script configures additional configuration attributes for your mail provider. A mail provider encapsulates a collection of protocol providers like SMTP, IMAP and POP3, while mail sessions authenticate users and controls user access to messaging systems. Configure your own mail providers and sessions to customize how JavaMail is handled. The script returns the configuration ID of the created mail provider.
Argument | Description |
---|---|
nodeName | Specifies the name of the node of interest. |
serverName | Specifies the name of the server of interest. |
mailProviderName | Specifies the mail provider that the application server uses for this mail session. |
propName | Specifies the name of the custom property. |
propValue | Specifies the value of the custom property. |
protocolName | Specifies the name of the protocol provider. The application server contains protocol providers for SMTP, IMAP and POP3. |
className | Specifies the implementation class name of the protocol provider. |
mailSessionName | Specifies the administrative name of the JavaMail session object. |
JNDIName | Specifies the Java Naming and Directory Interface (JNDI) name for the resource, including any naming subcontexts. This name provides the link between the platform binding information for resources defined in the client application deployment descriptor and the actual resources bound into JNDI by the platform. |
mailStoreHost | Specifies the server that is accessed when receiving the mail. This setting, combined with the mail store user ID and password, represents a valid mail account. For example, if the mail account is john_william@my.company.com, then the mail store host is my.company.com. |
mailStoreUser | Specifies the user ID for the given mail account. For example, if the mail account is john_william@my.company.com then the user is john_william. |
mailStorePassword | Specifies the password for the given mail account. For example, if the mail account is john_william@my.company.com then enter the password for ID john_william. |
Syntax
AdminResources.createCompleteMailProvider(nodeName,
serverName, mailProviderName, propName, propValue,
protocolName, className, mailSessionName, JNDIName,
mailStoreHost, mailStoreUser, mailStorePassword)
Example usage
AdminResources.createCompleteMailProvider("myNode",
"myServer", "myMailProvider", "myProp", "myPropValue", "myMailProtocol",
"com.ibm.mail.myMailProtocol.myMailStore", "myMailSession", "myMailSession/jndi", "server1",
"mailuser", "password")
createCompleteMailProviderAtScope
This script configures additional configuration attributes for your mail provider for the scope that you specify. A mail provider encapsulates a collection of protocol providers like SMTP, IMAP and POP3, while mail sessions authenticate users and controls user access to messaging systems. Configure your own mail providers and sessions to customize how JavaMail is handled. The script returns the configuration ID of the created mail provider for the specified scope.
Argument | Description |
---|---|
scope | Specifies a scope of cell, node, server, or cluster for the mail provider. |
mailProviderName | Specifies the mail provider that the application server uses for this mail session. |
propName | Specifies the name of the custom property. |
propValue | Specifies the value of the custom property. |
protocolName | Specifies the name of the protocol provider. The application server contains protocol providers for SMTP, IMAP and POP3. |
className | Specifies the implementation class name of the protocol provider. |
type | Specifies the type of protocol provider. Valid options are STORE or TRANSPORT. |
mailSessionName | Specifies the administrative name of the JavaMail session object. |
jndiName | Specifies the Java Naming and Directory Interface (JNDI) name for the resource, including any naming subcontexts. This name provides the link between the platform binding information for resources defined in the client application deployment descriptor and the actual resources bound into JNDI by the platform. |
otherAttributesList, mailProviderAttributesList, mailSessionAttributesList |
Optionally specifies additional attributes in a particular format:
|
Attributes | Description |
---|---|
classpath | Specifies a list of paths or Java archive (JAR) file names which together form the location for the resource provider classes. Use a semicolon (;) to separate class paths. |
description | Specifies a description of the mail provider. |
isolatedClassLoader | If set to true, specifies that the mail provider is loaded in its own class
loader. Attention: A provider cannot be isolated when a native library path is
specified.
|
nativepath | Specifies an optional path to any native libraries, such as *.dll and *.so. Use a semicolon (;) to separate native path entries. |
providerType | Specifies the mail provider type that this mail provider uses. |
Attributes | Description |
---|---|
category | Specifies the category that can be used to classify or group the resource. |
debug | Specifies whether debug mode is used for this mail session. The default value
is off . |
description | Specifies a description of the mail provider. |
mailFrom | Specifies the internet email address. If set to true, this mail provider is
loaded in its own class loader. CAUTION: A provider cannot be isolated when a native
library path is specified.
|
mailStoreHost | Specifies the server to connect to when receiving mail. |
mailStorePort | Specifies the port to connect to when receiving mail. |
mailStoreUser | Specifies the user of a mail account when an incoming mail server requires authentication. |
mailStorePassword | Specifies the password of a mail account when an incoming mail server requires authentication. |
mailStoreProtocol | Specifies the protocol to use when receiving mail. |
mailTransportHost | Specifies the server to connect to when sending mail. |
mailTransportPort | Specifies the port to connect to when sending mail. |
mailTransportUser | Specifies the user of a mail account when an outgoing mail server requires authentication. |
mailTransportPassword | Specifies the password of a mail account when an outgoing mail server requires authentication. |
mailTransportProtocol | Specifies the protocol to use when sending mail. |
strict | Specifies whether the recipient addresses is parsed in compliance with RFC
822. The default value is true . |
Syntax
AdminResources.createCompleteMailProviderAtScope(scope,
mailProviderName, propName, propValue,
protocolName, className, type, mailSessionName, JNDIName, otherAttributesList,
mailProviderAttributesList, mailSessionAttributesList)
Example usage
The following example script contains required attributes only:
AdminResources.createCompleteMailProviderAtScope("myScope",
"myMailProvider", "myProp", "myPropValue", "myMailProtocol",
"com.ibm.mail.myMailProtocol.myMailStore", "myMailSession", "myMailSession/jndi", "server1", "STORE")
AdminResources.createCompleteMailProviderAtScope("Node=MY4Node09, server=server1", "myMailProvider", "myProp",
"myPropValue", "myMailProtocol", "com.ibm.mail.myMailProtocol.myMailStore", "STORE", "myMailSession", "myMailSession/jndi",
"classpath=c:/temp, description='this is my mail', nativepath=c:/temp/nativepath, isolatedClassLoader=true",
"category=myCategory, debug=true, description='this is my mailsession', mailStoreUser=user1, mailStorePassword=password,
mailStoreHost=user1, mailStorePort=1000, mailTransportUser=user2, mailTransportPassword=password, mailTransportHost=test2,
mailTransportPort=1001, strict=true, mailFrom=test1@gmail.com")
The following example script includes optional attributes in a list format:
AdminResources.createCompleteMailProviderAtScope("/Cell:MY4Cell01/ServerCluster:c1/", "myMailProvider", "myProp",
"myPropValue", "myMailProtocol", "com.ibm.mail.myMailProtocol.myMailStore", "STORE", "myMailSession", "myMailSession/jndi",
[['classpath', 'c:/temp'], ['description', 'this is my mail'], ['nativepath', 'c:/temp/nativepath'],
['isolatedClassLoader', 'true']]
[['category', 'myCategory'], ['debug', 'true'], ['description', 'this is my mailsession'], ['mailStoreUser', 'user1'],
['mailStorePassword', 'password'], ['mailStoreHost', 'user1'], ['mailStorePort', 1000], ['mailTransportUser', 'user2'],
['mailTransportPassword', 'password'], ['mailTransportHost', 'test2'], ['mailTransportPort', 1001], ['strict', 'true'],
['mailFrom', 'test1@gmail.com']])
createMailProvider
This script creates a mail provider in your environment. The application server includes a default mail provider called the built-in provider. If you use the default mail provider you only have to configure the mail session. To use the customized mail provider you must first create the mail provider and session. The script returns the configuration ID of the created mail provider.
Argument | Description |
---|---|
nodeName | Specifies the name of the node on which to create the mail provider. |
serverName | Specifies the name of the server for which to create the mail provider. |
mailProviderName | Specifies the name to assign to the new mail provider. |
Syntax
AdminResources.createMailProvider(nodeName, serverName,
mailProviderName)
Example usage
AdminResources.createMailProvider("myNode", "myServer",
"myMailProvider")
createMailProviderAtScope
This script creates a mail provider in your environment at the scope that you specify. The application server includes a default mail provider called the built-in provider. If you use the default mail provider you only have to configure the mail session. To use the customized mail provider you must first create the mail provider and session. The script returns the configuration ID of the created mail provider for the specified scope.
Argument | Description |
---|---|
scope | Specifies a scope of cell, node, server, or cluster for the mail provider. |
mailProviderName | Specifies the name to assign to the new mail provider. |
otherAttributesList |
Optionally specifies additional attributes in a particular format:
|
Attributes | Description |
---|---|
classpath | Specifies a list of paths or Java archive (JAR) file names which together form the location for the resource provider classes. Use a semicolon (;) to separate class paths. |
description | Specifies a description of the mail provider. |
isolatedClassLoader | If set to true, specifies that the mail provider is loaded in its own class
loader. Attention: A provider cannot be isolated when a native library path is
specified.
|
nativepath | Specifies an optional path to any native libraries, such as *.dll and *.so. Use a semicolon (;) to separate native path entries. |
providerType | Specifies the mail provider type that this mail provider uses. |
Syntax
AdminResources.createMailProviderAtScope(scope, mailProviderName, otherAttributesList)
Example usage
The following example script contains required attributes only:
AdminResources.createMailProviderAtScope("myScope", "myMailProvider")
AdminResources.createMailProviderAtScope("Node=MY4Node09, server=server1", "myMailProvider", "classpath=c:/temp,
description='this is my mail', nativepath=c:/temp/nativepath, isolatedClassLoader=true")
The following example script includes optional attributes in a list format:
AdminResources.createMailProviderAtScope("/Cell:MY4Cell01/ServerCluster:c1/", "myMailProvider",
[['classpath', 'c:/temp'],
['description', 'this ismy mail'], ['nativepath', 'c:/temp/nativepath'], ['isolatedClassLoader', 'true']])
createMailSession
This script creates a new mail session for your mail provider. Mail sessions are represented by the javax.mail.Session class. A mail session object authenticates users, and controls user access to messaging systems. The script returns the configuration ID of the created mail session.
Argument | Description |
---|---|
nodeName | Specifies the name of the node of interest. |
serverName | Specifies the name of the server of interest. |
mailProviderName | Specifies the mail provider that the application server uses for this mail session. |
mailSessionName | Specifies the administrative name of the JavaMail session object. |
JNDIName | Specifies the JNDI name for the resource, including any naming subcontexts. This name provides the link between the platform binding information for resources defined in the client application deployment descriptor and the actual resources bound into JNDI by the platform. |
Syntax
AdminResources.createMailSession(nodeName, serverName,
mailProviderName, mailSessionName, JNDIName)
Example usage
AdminResources.createMailSession("myNode", "myServer", "myMailProvider",
"myMailSession", "myMailSession/jndi")
createMailSessionAtScope
This script creates a new mail session for your mail provider at the scope that you specify. Mail sessions are represented by the javax.mail.Session class. A mail session object authenticates users, and controls user access to messaging systems. The script returns the configuration ID of the created mail session for the specified scope.
Argument | Description |
---|---|
scope | Specifies a scope of cell, node, server, or cluster for the mail provider. |
mailProviderName | Specifies the mail provider that the application server uses for this mail session. |
mailSessionName | Specifies the administrative name of the JavaMail session object. |
JNDIName | Specifies the JNDI name for the resource, including any naming subcontexts. This name provides the link between the platform binding information for resources defined in the client application deployment descriptor and the actual resources bound into JNDI by the platform. |
otherAttributesList |
Optionally specifies additional attributes in a particular format:
|
Attributes | Description |
---|---|
category | Specifies the category that can be used to classify or group the resource. |
debug | Specifies whether debug mode is used for this mail session. The default value
is off . |
description | Specifies a description of the mail provider. |
mailFrom | Specifies the internet email address. If set to true, this mail provider is
loaded in its own class loader. CAUTION: A provider cannot be isolated when a native
library path is specified.
|
mailStoreHost | Specifies the server to connect to when receiving mail. |
mailStorePort | Specifies the port to connect to when receiving mail. |
mailStoreUser | Specifies the user of a mail account when an incoming mail server requires authentication. |
mailStorePassword | Specifies the password of a mail account when an incoming mail server requires authentication. |
mailStoreProtocol | Specifies the protocol to use when receiving mail. |
mailTransportHost | Specifies the server to connect to when sending mail. |
mailTransportPort | Specifies the port to connect to when sending mail. |
mailTransportUser | Specifies the user of a mail account when an outgoing mail server requires authentication. |
mailTransportPassword | Specifies the password of a mail account when an outgoing mail server requires authentication. |
mailTransportProtocol | Specifies the protocol to use when sending mail. |
strict | Specifies whether the recipient addresses is parsed in compliance with RFC
822. The default value is true . |
Syntax
AdminResources.createMailSessionAtScope(scope,
mailProviderName, mailSessionName, JNDIName, otherAttributesList)
Example usage
The following example script contains required attributes only:
AdminResources.createMailSessionAtScope("myScope", "myMailProvider",
"myMailSession", "myMailSession/jndi", attributes")
AdminResources.createMailSessionAtScope("Node=MY4Node09, server=server1", "myMailProvider", "myMailSession",
"myMailSession/jndi", "category=myCategory, debug=true, description='this is my mailsession', mailStoreUser=user1,
mailStorePassword=password, mailStoreHost=user1, mailStorePort=1000, mailTransportUser=user2, mailTransportPassword=password,
mailTransportHost=test2, mailTransportPort=1001, strict=true, mailFrom=test1@gmail.com")
The following example script includes optional attributes in a list format:
AdminResources.createMailSessionAtScope("/Cell:MY4Cell01/ServerClust
er:c1/", "myMailProvider", "myMailSession", "myMailSession/jndi",
[['category','myCategory'], ['description', 'this is mailsession'], ['debug', 'true'],
['mailTransportHost', 'test1'], ['mailTransportUser', 'user2'], ['mailTransportPassword', 'password'],
['mailStoreUser', 'user1'], ['mailStorePassword', 'password'], ['mailStoreHost', 'test2'], ['strict', 'true'],
['mailFrom', 'tester@mail.com']]))
createProtocolProvider
This script creates a protocol provider in your configuration, which provides the implementation class for a specific protocol to support communication between your JavaMail application and mail servers. The application server contains protocol providers for SMTP, IMAP and POP3. If you require custom providers for different protocols, install them in your application serving environment before configuring the providers. See the JavaMail API design specification for guidelines. After configuring your protocol providers, return to the mail provider page to find the link for configuring mail sessions. The script returns the configuration ID of the created protocol provider.
Argument | Description |
---|---|
nodeName | Specifies the name of the node of interest. |
serverName | Specifies the name of the server of interest. |
mailProviderName | Specifies the name of the mail provider that the application server uses in association with the protocol provider. |
protocolName | Specifies the name of the protocol provider. The application server contains protocol providers for SMTP, IMAP and POP3. |
className | Specifies the implementation class name of the protocol provider. |
type | Specifies the type of protocol provider. Valid options are STORE or TRANSPORT. |
Syntax
AdminResources.createProtocolProvider(nodeName,
serverName, mailProviderName, protocolName,
className, type)
Example usage
AdminResources.createProtocolProvider("myNode", "myServer", "myMailProvider",
"myMailProtocol", "com.ibm.mail.myMailProtocol.myMailStore",
"STORE")
createProtocolProviderAtScope
This script creates a protocol provider in your configuration at the scope that you specify. The protocol provider provides the implementation class for a specific protocol to support communication between your JavaMail application and mail servers at the scope that you specify. The application server contains protocol providers for SMTP, IMAP and POP3. If you require custom providers for different protocols, install them in your application serving environment before configuring the providers. See the JavaMail API design specification for guidelines. After configuring your protocol providers, return to the mail provider page to find the link for configuring mail sessions. The script returns the configuration ID of the created protocol provider for the specified scope.
Argument | Description |
---|---|
scope | Specifies a scope of cell, node, server, or cluster for the mail provider. |
mailProviderName | Specifies the name of the mail provider that the application server uses in association with the protocol provider. |
protocolName | Specifies the name of the protocol provider. The application server contains protocol providers for SMTP, IMAP and POP3. |
className | Specifies the implementation class name of the protocol provider. |
type | Specifies the type of protocol provider. Valid options are STORE or TRANSPORT. |
otherAttributesList |
Optionally specifies additional attributes in a particular format:
|
Attributes | Description |
---|---|
classpath | Specifies a list of paths or Java archive (JAR) file names which together form the location for the resource provider classes. Use a semicolon (;) to separate class paths. |
Syntax
AdminResources.createProtocolProviderAtScope(nodeName,
serverName, mailProviderName, protocolName,
className, type, otherAttributesList)
Example usage
The following example script contains required attributes only:
AdminResources.createProtocolProviderAtScope("myScope", "myMailProvider",
"myMailProtocol", "com.ibm.mail.myMailProtocol.myMailStore",
"STORE")
AdminResources.createProtocolProviderAtScope("Node=MY4Node09, server=server1", "myMailProvider", "myMailProtocol",
“com.ibm.mail.myMailProtocol.myMailStore", "STORE", "classpath=c:/temp")
The following example script includes optional attributes in a list format:
AdminResources.createProtocolProviderAtScope("/Cell:MY4Cell01/Server
Cluster:c1/", "myMailProvider", "myMailProtocol", "com.ibm.mail.myMailProtocol.m
yMailStore", "STORE", [['classpath', 'c:/temp']]))
createCompleteResourceEnvProvider
This script configures a resource environment provider, which encapsulate the referenceables that convert resource environment entry data into resource objects in your configuration. The script returns the configuration ID of the created resource environment provider.
Argument | Description |
---|---|
nodeName | Specifies the name of the node of interest. |
serverName | Specifies the name of the server of interest. |
resourceEnvProviderName | Specifies the name to assign to the resource environment provider. |
propName | Specifies the name of a custom property to set. |
propValue | Specifies the value of the custom property. |
factoryClass | Specifies the factory that converts resource environment entry data into a class instance for a physical resource. |
className | Specifies the class name for the referenceable. |
resourceEnvEntryName | Specifies the name of the resource environment entry. |
JNDIName | Specifies the JNDI name for the resource environment entry, including any naming subcontexts. This name is used as the linkage between the platform binding information for resources defined by a module deployment descriptor and actual resources bound into JNDI by the platform. |
Syntax
AdminResources.createCompleteResourceEnvProvider(nodeName,
serverName, resourceEnvProviderName, propName,
propValue, factoryClass, className,
resourceEnvEntryName, JNDIName)
Example usage
AdminResources.createCompleteResourceEnvProvider("myNode", "myServer",
"myResEnvProvider", "myProp", "myPropValue", "com.ibm.resource.res1", "java.lang.String",
"myResEnvEntry", "res1/myResEnv")
createCompleteResourceEnvProviderAtScope
This script configures a resource environment provider at the scope that you specify. The resource environment provider encapsulates the referenceables that convert resource environment entry data into resource objects in your configuration. The script returns the configuration ID of the created resource environment provider for the specified scope.
Argument | Description |
---|---|
scope | Specifies a scope of cell, node, server, or cluster for the mail provider. |
resourceEnvProviderName | Specifies the name to assign to the resource environment provider. |
propName | Specifies the name of a custom property to set. |
propValue | Specifies the value of the custom property. |
factoryClass | Specifies the factory that converts resource environment entry data into a class instance for a physical resource. |
className | Specifies the class name for the referenceable. |
resourceEnvEntryName | Specifies the name of the resource environment entry. |
jndiName | Specifies the JNDI name for the resource environment entry, including any naming subcontexts. This name is used as the linkage between the platform binding information for resources defined by a module deployment descriptor and actual resources bound into JNDI by the platform. |
otherAttributesList, resourceEnvProviderAttributesList, resourceEnvEntryAttributesList |
Optionally specifies additional attributes in a particular format:
|
Attributes | Description |
---|---|
classpath | Specifies a list of paths or Java archive (JAR) file names which together form the location for the resource provider classes. Use a semicolon (;) to separate class paths. |
description | Specifies a description of the resource environment provider. |
isolatedClassLoader | If set to true, specifies that this resource environment provider is loaded in
its own class loader. Attention: A provider cannot be isolated when a native library path
is specified.
|
nativepath | Specifies an optional path to any native libraries, such as *.dll and *.so. Use a semicolon (;) to separate native path entries. |
providerType | Specifies the resource provider type that this resource environment provider uses. |
Attributes | Description |
---|---|
category | Specifies the category that can be used to classify or group the resource. |
description | Specifies a description of the resource provider. |
providerType | Specifies the mail provider type that this resource environment provider uses. |
referenceable | Specifies the referenceable, which encapsulates the class name of the factory that converts resource environment entry data into a class instance for a physical resource. |
Syntax
AdminResources.createCompleteResourceEnvProviderAtScope(scope,
resourceEnvProviderName, propName,
propValue, factoryClass, className,
resourceEnvEntryName, JNDIName, otherAttributesList,
resourceEnvProviderAttributesList, resourceEnvProviderAttributesList)
Example usage
The following example script contains required attributes only:
AdminResources.createCompleteResourceEnvProviderAtScope("myScope",
"myResEnvProvider", "myProp", "myPropValue", "com.ibm.resource.res1", "java.lang.String",
"myResEnvEntry", "res1/myResEnv")
AdminResources.createCompleteResourceEnvProviderAtScope("Node=MY4Node09, server=server1", "myResEnvProvider", "myProp",
"myPropValue", "com.ibm.resource.res1", "java.lang.String", "myResEnvEntry", "res1/myResEnv", "classpath=c:/temp,
description='this is my resource provider', nativepath=c:/temp/nativepath,
isolatedClassLoader=false", "category=myCategory, description='this is my resource entry',
referenceable=(cells/MY4Cell01/nodes/MY4Node09|resources.xml#Referenceable_1238331401156)")
The following example script includes optional attributes in a list format:
AdminResources.createCompleteResourceEnvProviderAtScope("/Cell:MY4Cell01/ServerCluster:c1/", "myResEnvProvider",
"myProp", "myPropValue", "com.ibm.resource.res1", "java.lang.String", "myResEnvEntry", "res1/myResEnv", [['classpath', 'c:/temp'],
['description', 'this is my resource provider'], ['nativepath','c:/temp/nativepath'], ['isolatedClassLoader', 'false']]
[['category', 'myCategory'], ['description', 'this is my resource entry'],
['referenceable', '(cells/MY4Cell01/nodes/MY4Node09|resources.xml#Referenceable_1238331401156)']])
createResourceEnvEntries
This script creates a resource environment entry in your configuration. Within an application server name space, the data contained in a resource environment entry is converted into an object that represents a physical resource. This resource is frequently called an environment resource. The script returns the configuration ID of the created resource environment entry.
Argument | Description |
---|---|
nodeName | Specifies the name of the node of interest. |
serverName | Specifies the name of the server of interest. |
resourceEnvProviderName | Specifies the resource environment provider for this entry. The provider encapsulates the classes that, when implemented, convert resource environment entry data into resource objects. |
referenceable | Specifies the referenceable, which encapsulates the class name of the factory that converts resource environment entry data into a class instance for a physical resource. |
resourceEnvEntry | Specifies a name for the resource environment entry to create. |
JNDIName | Specifies the string to use to look up this environment resource using JNDI. This is the string to which you bind resource environment reference deployment descriptors. |
Syntax
AdminResources.createResourceEnvEntries(nodeName,
serverName, resourceEnvProviderName, referenceable,
resourceEnvEntry, JNDIName)
Example usage
AdminResources.createResourceEnvEntries("myNode", "myServer",
"myResEnvProvider", "com.ibm.resource.res1", "myResEnvEntry", "res1/myResEnv")
createResourceEnvEntriesAtScope
This script creates a resource environment entry in your configuration at the scope that you specify. Within an application server name space, the data contained in a resource environment entry is converted into an object that represents a physical resource. This resource is frequently called an environment resource. The script returns the configuration ID of the created resource environment entry for the specified scope.
Argument | Description |
---|---|
scope | Specifies a scope of cell, node, server, or cluster for the mail provider. |
resourceEnvProviderName | Specifies the resource environment provider for this entry. The provider encapsulates the classes that, when implemented, convert resource environment entry data into resource objects. |
resourceEnvEntry | Specifies a name for the resource environment entry to create. |
JNDIName | Specifies the string to use to look up this environment resource using JNDI. This is the string to which you bind resource environment reference deployment descriptors. |
otherAttributesList |
Optionally specifies additional attributes in a particular format:
|
Attributes | Description |
---|---|
category | Specifies the category that can be used to classify or group the resource. |
description | Specifies a description of the resource provider. |
providerType | Specifies the mail provider type that this resource environment provider uses. |
referenceable | Specifies the referenceable, which encapsulates the class name of the factory that converts resource environment entry data into a class instance for a physical resource. |
Syntax
AdminResources.createResourceEnvEntriesAtScope(scope,
resourceEnvProviderName,
resourceEnvEntry, JNDIName, otherAttributesList)
Example usage
The following example script contains required attributes only:
AdminResources.createResourceEnvEntriesAtScope("myScope",
"myResEnvProvider", "myResEnvEntry", "res1/myResEnv")
AdminResources.createResourceEnvEntriesAtScope("Node=MY4Node09, server=server1", "myResEnvProvider",
"myResEnvEntry", "res1/myResEnv", "category=myCategory, description='this is my resource entry',
referenceable=(cells/MY4Cell01/nodes/MY4Node09|resources.xml#Referenceable_1238331401156)")
The following example script includes optional attributes in a list format:
AdminResources.createResourceEnvEntriesAtScope("/Cell:MY4Cell01/ServerCluster:c1/", "myResEnvProvider",
"myResEnvEntry", "res1/myResEnv", [['category', 'myCategory'], ['description', 'this is my resource entry'],
['referenceable', '(cells/MY4Cell01/nodes/MY4Node09|resources.xml#Referenceable_1238331401156)']])
createResourceEnvProvider
This script creates a resource environment provider in your configuration. The resource environment provider encapsulates the classes that, when implemented, convert resource environment entry data into resource objects. The script returns the configuration ID of the created Resource environment provider.
Argument | Description |
---|---|
nodeName | Specifies the name of the node of interest. |
serverName | Specifies the name of the server of interest. |
resourceEnvProviderName | Specifies the resource environment provider to create. |
Syntax
AdminResources.createResourceEnvProvider(nodeName,
serverName, resourceEnvProviderName)
Example usage
AdminResources.createResEnvProvider("myNode", "myServer",
"myResEnvProvider")
createResourceEnvProviderAtScope
This script creates a resource environment provider in your configuration at the scope that you specify. The resource environment provider encapsulates the classes that, when implemented, convert resource environment entry data into resource objects. The script returns the configuration ID of the created Resource environment provider for the specified scope.
Argument | Description |
---|---|
scope | Specifies a scope of cell, node, server, or cluster for the mail provider. |
resourceEnvProviderName | Specifies the resource environment provider to create. |
otherAttributesList |
Optionally specifies additional attributes in a particular format:
|
Attributes | Description |
---|---|
classpath | Specifies a list of paths or Java archive (JAR) file names which together form the location for the resource provider classes. Use a semicolon (;) to separate class paths. |
description | Specifies a description of the resource environment provider. |
isolatedClassLoader | If set to true, specifies that this resource environment provider is loaded in
its own class loader. Attention: A provider cannot be isolated when a native library path
is specified.
|
nativepath | Specifies an optional path to any native libraries, such as *.dll and *.so. Use a semicolon (;) to separate native path entries. |
providerType | Specifies the resource provider type that this resource environment provider uses. |
Syntax
AdminResources.createResourceEnvProviderAtScope(scope,
resourceEnvProviderName, otherAttributesList)
Example usage
The following example script contains required attributes only:
AdminResources.createResEnvProviderAtScope("myScope",
"myResEnvProvider")
AdminResources.createResourceEnvProviderAtScope("Node=MY4Node09, server=server1", "myResEnvProvider",
"classpath=c:/temp, description='this is my resource provider', nativepath=c:/temp/nativepath, isolatedClassLoader=false")
The following example script includes optional attributes in a list format:
AdminResources.createResourceEnvProviderAtScope("/Cell:MY4Cell01/ServerCluster:c1/",
"myResEnvProvider", [['classpath', 'c:/temp'],
['description','this is my resource provider'], ['nativepath', 'c:/temp/nativepath'], ['isolatedClassLoader', 'false']])
createResourceEnvProviderRef
This script creates a resource environment provider reference in your configuration. Resource environment references are different than resource references. Resource environment references allow your application client to use a logical name to look up a resource bound into the server JNDI namespace. A resource reference allows your application to use a logical name to look up a local JEE resource. The JEE specification does not specify a particular implementation of a resource. The script returns the configuration ID of the created resource environment provider reference ID.
Argument | Description |
---|---|
nodeName | Specifies the name of the node of interest. |
serverName | Specifies the name of the server of interest. |
resourceEnvProviderName | Specifies the resource environment provider for this reference. The provider encapsulates the classes that, when implemented, convert resource environment entry data into resource objects. |
factoryClass | Specifies the class of the factory that converts resource environment entry data into a class instance for a physical resource. |
className | Specifies the class name to associate with the referenceable. |
Syntax
AdminResources.createResourceEnvProviderRef(nodeName,
serverName, resourceEnvProviderName, factoryClass,
className)
Example usage
AdminResources.createResourceEnvProviderRef("myNode", "myServer",
"myResEnvProvider", "com.ibm.resource.res1", "java.lang.String")
createResourceEnvProviderRefAtScope
This script creates a resource environment provider reference in your configuration at the scope you specify. Resource environment references are different than resource references. Resource environment references allow your application client to use a logical name to look up a resource bound into the server JNDI namespace. A resource reference allows your application to use a logical name to look up a local JEE resource. The JEE specification does not specify a particular implementation of a resource. The script returns the configuration ID of the created resource environment provider reference ID for the specified scope.
Argument | Description |
---|---|
scope | Specifies a scope of cell, node, server, or cluster for the mail provider. |
resourceEnvProviderName | Specifies the resource environment provider for this reference. The provider encapsulates the classes that, when implemented, convert resource environment entry data into resource objects. |
factoryClass | Specifies the class of the factory that converts resource environment entry data into a class instance for a physical resource. |
className | Specifies the class name to associate with the referenceable. |
Syntax
AdminResources.createResourceEnvProviderRefAtScope(scope,
resourceEnvProviderName, factoryClass,
className, otherAttributesList)
Example usage
AdminResources.createResourceEnvProviderRefAtScope("/Node:MY4Node09/Server:server1/",
"myResEnvProvider", "com.ibm.resource.res1", "java.lang.String")
configURLProvider
This script configures a URL provider, which supplies the implementation classes that are necessary for the application server to access a URL through a specific protocol. The default URL provider provides connectivity through protocols that are supported by the IBM® Developer Kit. These protocols include HTTP and File Transfer Protocol (FTP), which work for must URLs.
Argument | Description |
---|---|
nodeName | Specifies the name of the node of interest. |
serverName | Specifies the name of the server of interest. |
URLProviderName | Specifies the name of the URL provider to configure. |
URLStreamHandlerClass | Specifies fully qualified name of a user-defined Java class that extends the java.net.URLStreamHandler class for a particular URL protocol, such as FTP. |
URLProtocol | Specifies the protocol supported by this stream handler. For example, NNTP, SMTP, FTP. |
propName | Specifies the name of the custom property to set for the URL provider. |
propValue | Specifies the value of the custom property to set for the URL provider. |
URLName | Specifies the name of a Uniform Resource Locator (URL) name that points to an Internet or intranet resource. For example: https://www.ibm.com. |
JNDIName | Specifies the JNDI name. Do not assign duplicate JNDI names across different resource types, such as mail sessions versus URL configurations. Do not assign duplicate JNDI names for multiple resources of the same type in the same scope. |
URLSpec | Specifies the string from which to form a URL. |
Syntax
AdminResources.configURLProvider(nodeName, serverName,
URLProviderName, URLStreamHandlerClass, URLProtocol,
propName, propValue, URLName, JNDIName,
URLSpec)
Example usage
AdminResources.configURLProvider("myNode", "myServer", "myURLProvider",
"com.ibm.resource.url1", "ftp", "myProp", "myPropValue", "myURL", "url1/myURL",
"myURLSpec")
createCompleteURLProvider
This script creates a URL provider, which supplies the implementation classes that are necessary for the application server to access a URL through a specific protocol. The default URL provider provides connectivity through protocols that are supported by the IBM Developer Kit. These protocols include HTTP and File Transfer Protocol (FTP), which work for must URLs. The script returns the configuration ID of the created URL provider.
Argument | Description |
---|---|
nodeName | Specifies the name of the node of interest. |
serverName | Specifies the name of the server of interest. |
URLProviderName | Specifies the name of the URL provider to configure. |
URLStreamHandlerClass | Specifies fully qualified name of a user-defined Java class that extends the java.net.URLStreamHandler class for a particular URL protocol, such as FTP. |
URLProtocol | Specifies the protocol supported by this stream handler. For example, NNTP, SMTP, FTP. |
Syntax
AdminResources.createCompleteURLProvider(nodeName,
serverName, URLProviderName, URLStreamHandlerClass,
URLProtocol)
Example usage
AdminResources.createCompleteURLProvider("myNode", "myServer",
"myURLProvider", "com.ibm.resource.url1", "ftp")
createCompleteURLProviderAtScope
This script creates a URL provider at the scope specified. The URL provider supplies the implementation classes that are necessary for the application server to access a URL through a specific protocol. The default URL provider provides connectivity through protocols that are supported by the IBM Developer Kit. These protocols include HTTP and File Transfer Protocol (FTP), which work for must URLs. The script returns the configuration ID of the created URL provider for the specified scope.
Argument | Description |
---|---|
scope | Specifies a scope of cell, node, server, or cluster for the mail provider. |
URLProviderName | Specifies the name of the URL provider to configure. |
URLStreamHandlerClass | Specifies fully qualified name of a user-defined Java class that extends the java.net.URLStreamHandler class for a particular URL protocol, such as FTP. |
URLProtocol | Specifies the protocol supported by this stream handler. For example, NNTP, SMTP, FTP. |
propName | Specifies the name of the custom property to set for the URL provider. |
propValue | Specifies the value of the custom property to set for the URL provider. |
URLName | Specifies the name of a Uniform Resource Locator (URL) name that points to an Internet or intranet resource. For example: https://www.ibm.com. |
jndiName | Specifies the JNDI name. Do not assign duplicate JNDI names across different resource types, such as mail sessions versus URL configurations. Do not assign duplicate JNDI names for multiple resources of the same type in the same scope. |
URLSpec | Specifies the string from which to form a URL. |
otherAttributesList, urlProviderAttributesList, urlAttributesList |
Optionally specifies additional attributes in a particular format:
|
Attributes | Description |
---|---|
classpath | Specifies a list of paths or Java archive (JAR) file names which together form the location for the resource provider classes. Use a semicolon (;) to separate class paths. |
description | Specifies a description of the resource environment provider. |
isolatedClassLoader | If set to true, specifies that this URL provider is loaded in its own class
loader. Attention: A provider cannot be isolated when a native library path is
specified.
|
nativepath | Specifies an optional path to any native libraries, such as *.dll and *.so. Use a semicolon (;) to separate native path entries. |
providerType | Specifies the URL provider type that this resource environment provider uses. |
Attributes | Description |
---|---|
category | Specifies the category that can be used to classify or group the resource. |
description | Specifies a description of the resource provider. |
providerType | Specifies the mail provider type that this resource environment provider uses. |
referenceable | Specifies the referenceable, which encapsulates the class name of the factory that converts resource environment entry data into a class instance for a physical resource. |
Syntax
AdminResources.createCompleteURLProviderAtScope(Scope,
URLProviderName, URLStreamHandlerClass,
URLProtocol, propName, propValue,
URLName, JNDIName, URLSpec, otherAttributesList,
urlProviderAttributesList, urlAttributesList)
Example usage
The following example script contains required attributes only:
AdminResources.createCompleteURLProviderAtScope("Scope",
"myURLProvider", "com.ibm.resource.url1", "ftp", myProp", myPropValue",
"myURL", "url1/myURL", "myURLSpec")
AdminResources.createCompleteURLProviderAtScope("Node=MY4Node09, server=server1", "myURLProvider",
"com.ibm.resource.url1",
"ftp","myProp", "myPropValue", "myURL", "url1/myURL", "myURLSpec", "classpath=c:/temp, description='this
is my url provider',
nativepath=c:/temp/nativepath, isolatedClassLoader=true", "category=myCategory, description='this is my url'")
The following example script includes optional attributes in a list format:
AdminResources.createCompleteURLProviderAtScope("/Cell:MY4Cell01/ServerCluster:c1/",
"myURLProvider", "com.ibm.resource.url1",
"ftp","myProp", "myPropValue", "myURL", "url1/myURL", "myURLSpec", [['classpath', 'c:/temp'],
['description', 'this is my urlProvider'],
['nativepath', 'c:/temp/nativepath'], ['isolatedClassLoader', 'true']] [['category', 'myCategory'],
['description', 'this is my url']])
createURL
This script creates a URL provider, which supplies the implementation classes that are necessary for the application server to access a URL through a specific protocol. The default URL provider provides connectivity through protocols that are supported by the IBM Developer Kit. These protocols include HTTP and File Transfer Protocol (FTP), which work for must URLs. The script returns the configuration ID of the created URL.
Argument | Description |
---|---|
nodeName | Specifies the name of the node of interest. |
serverName | Specifies the name of the server of interest. |
URLProviderName | Specifies the name of the URL provider to assign the URL to. |
URLName | Specifies the name of the URL to create. |
JNDIName | Specifies the JNDI name. Do not assign duplicate JNDI names across different resource types, such as mail sessions versus URL configurations. Do not assign duplicate JNDI names for multiple resources of the same type in the same scope. |
URLSpec | Specifies the string from which to form a URL. |
Syntax
AdminResources.createURL(nodeName, serverName,
URLProviderName, URLName, JNDIName,
URLSpec)
Example usage
AdminResources.createURL("myNode", "myServer", "myURLProvider",
"myURL", "url1/myURL", "myURLSpec")
createURLAtScope
This script creates a URL provider at the scope that you specify. The URL provider supplies the implementation classes that are necessary for the application server to access a URL through a specific protocol. The default URL provider provides connectivity through protocols that are supported by the IBM Developer Kit. These protocols include HTTP and File Transfer Protocol (FTP), which work for must URLs. The script returns the configuration ID of the created URL for the specified scope.
Argument | Description |
---|---|
scope | Specifies a scope of cell, node, server, or cluster for the mail provider. |
URLProviderName | Specifies the name of the URL provider to assign the URL to. |
URLName | Specifies the name of the URL to create. |
JNDIName | Specifies the JNDI name. Do not assign duplicate JNDI names across different resource types, such as mail sessions versus URL configurations. Do not assign duplicate JNDI names for multiple resources of the same type in the same scope. |
URLSpec | Specifies the string from which to form a URL. |
otherAttributesList |
Optionally specifies additional attributes in a particular format:
|
Attributes | Description |
---|---|
category | Specifies the category that can be used to classify or group the resource. |
description | Specifies a description of the URL provider. |
providerType | Specifies the mail provider type that this URL provider uses. |
Syntax
AdminResources.createURLAtScope(scope,
URLProviderName, URLName, JNDIName,
URLSpec, otherAttributesList)
Example usage
The following example script contains required attributes only:
AdminResources.createURLAtScope("myScope", "myURLProvider",
"myURL", "url1/myURL", "myURLSpec")
AdminResources.createURLAtScope("Node=MY4Node09, server=server1", "myURLProvider", "myURL", "url1/myURL",
"myURLSpec", "category=myCategory, description='this is my url'")
The following example script includes optional attributes in a list format:
AdminResources.createURLAtScope("/Cell:MY4Cell01/ServerCluster:c1/",
"myURLProvider", "myURL", "url1/myURL", "myURLSpec", [['category', 'myCategory'], ['description', 'this is my url']])
createURLProvider
This script creates a URL provider, which supplies the implementation classes that are necessary for the application server to access a URL through a specific protocol. The default URL provider provides connectivity through protocols that are supported by the IBM Developer Kit. These protocols include HTTP and File Transfer Protocol (FTP), which work for must URLs. The script returns the configuration ID of the created URL provider.
Argument | Description |
---|---|
nodeName | Specifies the name of the node of interest. |
serverName | Specifies the name of the server of interest. |
URLProviderName | Specifies the name of the URL provider to configure. |
URLStreamHandlerClass | Specifies fully qualified name of a user-defined Java class that extends the java.net.URLStreamHandler class for a particular URL protocol, such as FTP. |
URLProtocol | Specifies the protocol supported by this stream handler. For example, NNTP, SMTP, FTP. |
Syntax
AdminResources.createURLProvider(nodeName,
serverName, URLProviderName, URLStreamHandlerClass,
URLProtocol)
Example usage
AdminResources.createURLProvider("myNode", "myServer",
"myURLProvider", "com.ibm.resource.url1", "ftp")
createURLProviderAtScope
This script creates a URL provider at the scope that you specify. The URL provider supplies the implementation classes that are necessary for the application server to access a URL through a specific protocol. The default URL provider provides connectivity through protocols that are supported by the IBM Developer Kit. These protocols include HTTP and File Transfer Protocol (FTP), which work for must URLs. The script returns the configuration ID of the created URL provider for the specified scope.
Argument | Description |
---|---|
scope | Specifies a scope of cell, node, server, or cluster for the mail provider. |
URLProviderName | Specifies the name of the URL provider to configure. |
URLStreamHandlerClass | Specifies fully qualified name of a user-defined Java class that extends the java.net.URLStreamHandler class for a particular URL protocol, such as FTP. |
URLProtocol | Specifies the protocol supported by this stream handler. For example, NNTP, SMTP, FTP. |
otherAttributesList |
Optionally specifies additional attributes in a particular format:
|
Attributes | Description |
---|---|
classpath | Specifies a list of paths or Java archive (JAR) file names which together form the location for the resource provider classes. Use a semicolon (;) to separate class paths. |
description | Specifies a description of the resource environment provider. |
isolatedClassLoader | If set to true, specifies that this URL provider is loaded in its own class
loader. Attention: A provider cannot be isolated when a native library path is
specified.
|
nativepath | Specifies an optional path to any native libraries, such as *.dll and *.so. Use a semicolon (;) to separate native path entries. |
providerType | Specifies the URL provider type that this resource environment provider uses. |
Syntax
AdminResources.createURLProviderAtScope(scope,
URLProviderName, URLStreamHandlerClass,
URLProtocol, otherAttributesList)
Example usage
The following example script contains required attributes only:
AdminResources.createURLProviderAtScope("myScope",
"myURLProvider", "com.ibm.resource.url1", "ftp")
AdminResources.createURLProviderAtScope("Node=MY4Node09, server=server1", "myURLProvider", "com.ibm.resource.url1",
"ftp", "classpath=c:/temp, description='this is my url provider', nativepath=c:/temp/nativepath, isolatedClassLoader=true")
The following example script includes optional attributes in a list format:
AdminResources.createURLProviderAtScope("/Cell:MY4Cell01/ServerCluster:c1/", "myURLProvider", "com.ibm.resource.url1",
"ftp", [['classpath', 'c:/temp'], ['description', 'this is my url provider'], ['nativepath', 'c:/temp/nativepath'],
['isolatedClassLoader', 'true']])
createJAASAuthenticationAlias
This script creates a Java Authentication and Authorization Service (JAAS) authentication alias. The alias identifies the authentication data entry. When configuring resource adapters or data sources, the administrator can specify which authentication data to choose using the corresponding alias. The script returns the configuration ID of the created DB2®Authentication and Authorization Service (JAAS) Authentication Alias.
Argument | Description |
---|---|
authAliasName | Specifies the name of the authentication alias to create. |
authAliasID | A user identity of the intended security domain. For example, if a particular authentication data entry is used to open a new connection to DB2, this entry contains a DB2 user identity. |
authAliasPW | Specifies the password of the user identity is encoded in the configuration repository. |
Syntax
AdminResources.createJAASAuthenticationAlias(authAliasName,
authAliasID, authAliasPW)
Example usage
AdminResources.createJAASAuthenticationAlias("myJAAS", "user01",
"password")
createLibraryRef
This script creates a library reference, which defines how to use global libraries. The first step for making a library file available to multiple applications deployed on a server is to create a shared library for each library file that your applications need. When you create the shared libraries, set variables for the library files. The script returns the configuration ID of the created library reference.
Argument | Description |
---|---|
libraryRefName | Specifies the name of the library reference to create. |
applicationName | Specifies the name of the application to associate with the library reference. |
Syntax
AdminResources.createLibraryRef(libraryRefName,
applicationName)
Example usage
AdminResources.createLibraryRef("myLibrary", "myApplication")
createSharedLibrary
This script creates a shared library in your configuration. The first step for making a library file available to multiple applications deployed on a server is to create a shared library for each library file that your applications need. When you create the shared libraries, set variables for the library files. The script returns the configuration ID of the created library.
Argument | Description |
---|---|
nodeName | Specifies the name of the node of interest. |
serverName | Specifies the name of the server of interest. |
sharedLibName | Specifies the name to assign to the shared library. |
sharedLibClassPath | Specifies the file path where the product searches for classes and resources of the shared library. If a path in the list is a file, the product searches the contents of that .jar or compressed .zip file. If a path in the list is a directory, then the product searches the contents of .jar and .zip files in that directory. For performance reasons, the product searches the directory itself only if the directory contains subdirectories or files other than .jar or .zip files. |
Syntax
AdminResources.createSharedLibrary(nodeName,
serverName, sharedLibName, sharedLibClassPath)
Example usage
AdminResources.createSharedLibrary("myNode", "myServer",
"myLibrary", "c:/myLibrary.zip")
AdminResources.createSharedLibrary("myNode", "myServer", "myLibrary",
"/myLibrary.zip")
createSharedLibraryAtScope
This script creates a shared library in your configuration at the scope that you specify. The first step for making a library file available to multiple applications deployed on a server is to create a shared library for each library file that your applications need. When you create the shared libraries, set variables for the library files. The script returns the configuration ID of the created library for the specified scope.
Argument | Description |
---|---|
scope | Specifies a scope of cell, node, server, or cluster for the mail provider. |
sharedLibName | Specifies the name to assign to the shared library. |
sharedLibClassPath | Specifies the file path where the product searches for classes and resources of the shared library. If a path in the list is a file, the product searches the contents of that .jar or compressed .zip file. If a path in the list is a directory, then the product searches the contents of .jar and .zip files in that directory. For performance reasons, the product searches the directory itself only if the directory contains subdirectories or files other than .jar or .zip files. |
otherAttributesList |
Optionally specifies additional attributes in a particular format:
|
Attributes | Description |
---|---|
description | Specifies a description of the shared library. |
isolatedClassLoader | If set to true, specifies that the URL provider is loaded in its own class
loader. The default value is false .Attention: A provider cannot be
isolated when a native library path is specified.
|
nativepath | Specifies an optional path to any native libraries, such as *.dll and *.so. Use a semicolon (;) to separate native path entries. |
Syntax
AdminResources.createSharedLibraryAtScope(scope,
sharedLibName, sharedLibClassPath, otherAttributesList)
Example usage
The following example scripts contains required attributes only:
AdminResources.createSharedLibraryAtScope("myScope",
"myLibrary", "c:/myLibrary.zip")
AdminResources.createSharedLibraryAtScope("myScope", "myLibrary",
"/myLibrary.zip")
The following example script includes optional attributes in a string format:
AdminResources.createSharedLibraryAtScope("Node=MY4Node09, server=server1", "myLibrary",
"c:/myLibrary.zip", "description='this is my library',
nativePath=c:/nativepath, isolatedClassLoader=true")
AdminResources.createSharedLibraryAtScope("Node=MY4Node09, server=server1", "myLibrary",
"c:/myLibrary.zip", "description='this is my library',
nativePath=/nativepath, isolatedClassLoader=true")
The following example script includes optional attributes in a list format:
AdminResources.createSharedLibraryAtScope("/Cell:MY4Cell01/ServerCluster:c1/", "myLibrary",
"c:/myLibrary.zip", [['description', 'this is my library'],
['nativePath', 'c:/nativepath'], ['isolatedClassLoader', 'true']])
AdminResources.createSharedLibraryAtScope("/Cell:MY4Cell01/ServerCluster:c1/", "myLibrary",
"c:/myLibrary.zip", [['description', 'this is my library'],
['nativePath', '/nativepath'], ['isolatedClassLoader', 'true']])
createScheduler
This script creates a scheduler in your configuration. Schedulers are persistent and transactional timer services that can run business logic. Each scheduler runs tasks independently and has a programming interface accessible from JEE applications using the Java Naming and Directory Interface (JNDI). You can also manage schedulers using a Java Management Extensions (JMX) MBean. See the scheduler documentation for details on how to configure and use schedulers. The script returns the configuration ID of the created scheduler.
Argument | Description |
---|---|
nodeName | Specifies the name of the node of interest. |
serverName | Specifies the name of the server of interest. |
schedulerName | Specifies the name by which this scheduler is known for administrative purposes. |
JNDIName | Specifies the JNDI name that determines where this scheduler instance is bound in the name space. Clients can look this name up directly, although the use of resource references is recommended. |
scheduleCategory | Specifies a string that can be used to classify or group this scheduler. |
datasourceJNDI | Specifies the name of the data source where persistent tasks are stored. Any data source available in the name space can be used with a scheduler. Multiple schedulers can share a single data source while using different tables by specifying a table prefix. |
tablePrefix | Specifies the string prefix to affix to the scheduler tables. Multiple independent schedulers can share the same database if each instance specifies a different prefix string. |
pollInterval | Specifies the interval, in seconds, that a scheduler polls the database. The default value is appropriate for most applications. Each poll operation can be consuming. If the interval is extremely small and there are many scheduled tasks, polling can consume a large portion of system resources. The default value is 30. |
workMgmtJNDI | Specifies the JNDI name of the work manager, which is used to manage the number of tasks that can run concurrently with the scheduler. The work manager also can limit the amount of Java EE context applied to the task. |
Syntax
AdminResources.createScheduler(nodeName, serverName,
schedulerName, JNDIName, scheduleCategory,
datasourceJNDI, tablePrefix, pollInterval, workMgmtJNDI)
Example usage
AdminResources.createScheduler("myNode", "myServer", "myScheduler",
"myScheduleJndi", "Default", "jdbc/MyDatasource", "sch1", "30",
"myWorkManager")
createSchedulerAtScope
This script creates a scheduler in your configuration at the scope that you specify. Schedulers are persistent and transactional timer services that can run business logic. Each scheduler runs tasks independently and has a programming interface accessible from Java EE applications using the Java Naming and Directory Interface (JNDI). You can also manage schedulers using a Java Management Extensions (JMX) MBean. See the scheduler documentation for details on how to configure and use schedulers. The script returns the configuration ID of the created scheduler for the specified scope.
Argument | Description |
---|---|
scope | Specifies a scope of cell, node, server, or cluster for the JMS provider. |
schedulerName | Specifies the name by which this scheduler is known for administrative purposes. |
JNDIName | Specifies the JNDI name that determines where this scheduler instance is bound in the name space. Clients can look this name up directly, although the use of resource references is recommended. |
datasourceJNDI | Specifies the name of the data source where persistent tasks are stored. Any data source available in the name space can be used with a scheduler. Multiple schedulers can share a single data source while using different tables by specifying a table prefix. |
tablePrefix | Specifies the string prefix to affix to the scheduler tables. Multiple independent schedulers can share the same database if each instance specifies a different prefix string. |
pollInterval | Specifies the interval, in seconds, that a scheduler polls the database. The default value is appropriate for most applications. Each poll operation can be consuming. If the interval is extremely small and there are many scheduled tasks, polling can consume a large portion of system resources. The default value is 30. |
workMgmtJNDI | Specifies the JNDI name of the work manager, which is used to manage the number of tasks that can run concurrently with the scheduler. The work manager also can limit the amount of Java EE context applied to the task. |
schedulerProviderID | Specifies the provider ID of this scheduler. |
otherAttributesList |
Optionally specifies additional attributes in a particular format:
|
Attributes | Description |
---|---|
category | Specifies the category that can be used to classify or group the resource. |
description | Specifies a description of the URL provider. |
providerType | Specifies the resource provider type that this URL provider uses. |
datasourceAlias | Specifies the alias for the user name and password that this URL provider uses to access the data source. |
loginConfigName | Specifies the login configuration name. |
securityRole | Specifies the security role. |
useAdminRoles | Specifies that when this option and administrative security are both enabled,
the user administration roles are enforced. For the user administrative roles to be enforced, you
must use the scheduler JMX commands or APIs to create and modify tasks. If this option is not
enabled, all the users can create and modify tasks. The default value is
false . |
referenceable | Specifies the referenceable, which encapsulates the class name of the factory that converts resource environment entry data into a class instance for a physical resource. |
Syntax
AdminResources.createSchedulerAtScope(scope,
schedulerName, JNDIName,
datasourceJNDI, tablePrefix, pollInterval, workMgmtJNDI,
ScheduleProviderID, otherAttributesList)
Example usage
The following example script contains required attributes only:
AdminResources.createSchedulerAtScope("myNode", "myScheduler",
"myScheduleJndi", "Default", "jdbc/MyDatasource", "sch1", "30",
"myWorkManager, "SchedulerProvider(cells/MY4Cell01/nodes/MY4Node09/servers/server1|resources-pme.xml#SchedulerProvider_1)")
AdminResources.createSchedulerAtScope("Node=MY4Node09, server=server1", "myScheduler",
"myScheduleJndi", "jdbc/MyDatasource", "sch1", "30",
"myWorkManager", "SchedulerProvider(cells/MY4Cell01/nodes/MY4Node09/servers/server1|
resources-pme.xml#SchedulerProvider_1)", "category=myCategory,
description='this is my scheduler', datasourceAlias=abc, useAdminRoles=false, loginConfigName=test,
securityRole=user1")
The following example script includes optional attributes in a list format:
AdminResources.createSchedulerAtScope("/Cell:MY4Cell01/ServerCluster:c1/", "myScheduler",
"myScheduleJndi", "jdbc/MyDatasource", "sch1", "30",
"myWorkManager", "SchedulerProvider(cells/MY4Cell01/clusters/c1|resources-pme.xml#SchedulerProvider_1)",
[['category', 'myCategory'],
['description', 'this is my scheduler'], ['datasourceAlias', 'abc'], ['useAdminRoles', 'false'],
['loginConfigName', 'test'], ['securityRole', 'user1']])
createWorkManager
This script creates a work manager in your configuration. Work managers contain a pool of threads that are bound into Java Naming and Directory Interface. The script returns the configuration ID of the created work manager.
Argument | Description |
---|---|
nodeName | Specifies the name of the node of interest. |
serverName | Specifies the name of the server of interest. |
workMgrName | Specifies the name by which this work manager is known for administrative purposes. |
JNDIName | Specifies the Java Naming and Directory Interface (JNDI) name used to look up the work manager in the namespace. |
workMgrCategory | Specifies a string that you can use to classify or group this work manager. |
alarmThreads | Specifies the desired maximum number of threads used for alarms. The default value is 2. |
minThreads | Specifies the minimum number of threads available in this work manager. |
maxThreads | Specifies the maximum number of threads available in this work manager. |
threadPriority | Specifies the priority of the threads available in this work manager. Every thread has a priority. Threads with higher priority are run before threads with lesser priority. For more information about how thread priorities are used, see the API documentation for the setPriority method of the java.lang.Thread class in the Java EE specification. |
isGrowable | Specifies whether the number of threads in this work manager can be increased. Specify a value of true to indicate that the number of threads can increase. |
serviceNames | Specifies a list of services to make available to this work manager. |
Syntax
AdminResources.createWorkManager(nodeName, serverName,
workMgrName, JNDIName, workMgrCategory,
alarmThreads, minThreads, maxThreads, threadPriority,
isGrowable, serviceNames)
Example usage
AdminResources.createWorkManager("myNode", "myServer", "myWorkManager",
"Work Manager", "wm/myWorkManager", "Default", 5, 1, 10, 5, "true",
"AppProfileService UserWorkArea com.ibm.ws.i18n security")
createWorkManagerAtScope
This script creates a work manager in your configuration at the scope that you specify. Work managers contain a pool of threads that are bound into Java Naming and Directory Interface. The script returns the configuration ID of the created work manager for the specified scope.
Argument | Description |
---|---|
scope | Specifies a scope of cell, node, server, or cluster for the JMS provider. |
workMgrName | Specifies the name by which this work manager is known for administrative purposes. |
JNDIName | Specifies the Java Naming and Directory Interface (JNDI) name used to look up the work manager in the namespace. |
alarmThreads | Specifies the desired maximum number of threads used for alarms. The default value is 2. |
minThreads | Specifies the minimum number of threads available in this work manager. |
maxThreads | Specifies the maximum number of threads available in this work manager. |
threadPriority | Specifies the priority of the threads available in this work manager. Every thread has a priority. Threads with higher priority are run before threads with lesser priority. For more information about how thread priorities are used, see the API documentation for the setPriority method of the java.lang.Thread class in the Java EE specification. |
workManagerProviderID | Specifies the configuration ID of the parent work manager provider. The work
manager is created at this ID. You can create a work manager under the existing work manager
provider or under a new work manager provider. The following wsadmin command is an example of how to
retrieve the configuration ID of the existing work manager provider from the server scope:
|
otherAttributesList |
Optionally specifies additional attributes in a particular format:
|
Attributes | Description |
---|---|
category | Specifies the category that can be used to classify or group the resource. |
description | Specifies a description of the URL provider. |
providerType | Specifies the resource provider type that this URL provider uses. |
daemonTranClass | Specifies the transaction class that is used for the workload classification of daemon work. The daemon work is for the workload manager service. |
defTranClass | Specifies the transaction class name used to classify work run by this work manager instance when the z/OS workload manager service class information is not contained in the work context information. |
isDistributable | Specifies whether this work manager is distributable. The default value is
false . |
isGrowable | Specifies whether the number of threads in this work manager can be increased.
The default value is true . |
serviceNames | Specifies a list of services to make available to this work manager. |
workReqQFullAction | Specifies the action taken when the thread pool is exhausted, and the work
request queue is full. The default value is 0 . |
workReqQSize | Specifies the size of the work request queue. The default value is
0 . |
workTimeout | Specifies the number of milliseconds to wait before attempting to release a
unit of work. The default value is 0 . |
referenceable | Specifies the referenceable, which encapsulates the class name of the factory that converts resource environment entry data into a class instance for a physical resource. |
otherAttributesList |
Optionally specifies additional attributes in a particular format:
|
Syntax
AdminResources.createWorkManagerAtScope(scope,
workMgrName, JNDIName,
alarmThreads, minThreads, maxThreads, threadPriority,
workManagerProviderID, otherAttributesList)
Example usage
The following example script contains required attributes only:
AdminResources.createWorkManagerAtScope("scope", "myWorkManager",
"Work Manager", "Default", 5, 1, 10,
"WorkManagerProvider(cells/MY4Cell01/nodes/MY4Node09/servers/server1|resources-pme.xml#WorkManagerProvider_1)")
AdminResources.createWorkManagerAtScope("Node=MY4Node09, server=server1", "myWorkManager",
"wm/myWorkManager", "5", "1", "10", "5",
"WorkManagerProvider(cells/MY4Cell01/nodes/MY4Node09/servers/server1|resources-pme.xml#WorkManagerProvider_1)")
The following example script includes optional attributes in a list format:
AdminResources.createWorkManagerAtScope("/Cell:MY4Cell01/ServerCluster:c1/", "myWorkManager",
"wm/myWorkManager", "5", "1", "10", "5",
WorkManagerProvider(cells/MY4Cell01/clusters/c1|resources-pme.xml#WorkManagerProvider_1)",
[['category', 'myCategory'], ['description', 'this is my workmanager'],
['daemonTranClass', ''], ['defTranClass', ''], ['isDistributable', 'false'], ['isGrowable', 'true'],
['serviceNames', 'security'], ['workReqQFullAction', 0],
['workReqQSize', 0], ['workTimeout', 10]])
help
Argument | Description |
---|---|
script | Specifies the name of the script of interest. |
Syntax
AdminResources.help(script)
Example usage
AdminResources.help("createWorkManager")