Resource configuration scripts
The scripting library provides multiple script procedures to automate the application server configurations. Use the mail, URL, and resource environment configuration scripts to create and configure resources in the environment. We 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.
Beginning with Version 7, the Jython script library provides script functions for JDBC providers, JMS resources, and resource providers at the server scope. We can write our own custom scripts to configure resources at the cell, node, or cluster level.
Avoid trouble: Do not edit the script procedures in the script library. To write custom script library procedures, use the scripts in the app_server_root/scriptLibraries directory as Jython syntax samples. Save the custom scripts to a new subdirectory to avoid overwriting the library.gotcha
Fast path: Beginning with Fix Pack 5, the Jython script library provides script functions for JDBC providers, JMS resources, and resource providers at the cell, node, server, or cluster scope. Resource providers include mail providers, URL providers, and resource environment providers. You do not have to write custom scripts to configure resources at a particular scope.
The example usage scripts and the script syntax are split on multiple lines for printing purposes.
Use the following script procedures to configure the mail settings:
- createCompleteMailProvider
- createCompleteMailProviderAtScope
- createMailProvider
- createMailProviderAtScope
- createMailSession
- createMailSessionAtScope
- createProtocolProvider
- createProtocolProviderAtScope
Use the following script procedures to configure your resource environment settings:
- createCompleteResourceEnvProvider
- createCompleteResourceEnvProviderAtScope
- createResourceEnvEntries
- createResourceEnvEntriesAtScope
- createResourceEnvProvider
- createResourceEnvProviderAtScope
- createResourceEnvProviderRef
- createResourceEnvProviderRefAtScope
Use the following script procedures to configure your URL provider settings:
- createCompleteURLProvider
- createCompleteURLProviderAtScope
- createURL
- createURLAtScope
- createURLProvider
- createURLProviderAtScope
Use the following script procedures to configure additional Java Enterprise Edition (Java EE) resources:
- createJAASAuthenticationAlias
- createLibraryRef
- createSharedLibrary
- createSharedLibraryAtScope
- createScheduler
- createSchedulerAtScope
- createWorkManager
- createWorkManagerAtScope
- help
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.
We can delimit the type by using a comma (,) or a colon (:). We can use lower case for the type (cell=, node=, server=, or cluster=.)
The examples in the following table are split on multiple lines for publishing purposes.
path, configuration ID, and type for a particular scope. The
Scope Containment path Configuration ID Type Cell /Cell:myCell/ myCell(cells/myCell| cell.xml#Cell_1)Cell=myCell or cell=myCell Node /Cell:myCell/Node:myNode/ or /Node:myNode/ myNode(cells/myCell /nodes/myNode| node.xml#Node_1)Cell=myCell, Node=myNode
or
Cell=myCell: Node=myNodeorcell=myCell, node=myNode
Server /Cell:myCell/Node: myNode/ Server:myServer/or/Node:myNode/Server: myServer/ myServer(cells /myCell/ nodes/myNode/ servers/myServer| server.xml#Server_1)Cell=myCell, Node=myNode, Server=myServer
or
Node=myNode: Server=myServerorcell=myCell, Node=myNode, Server=myServer
Cluster /Cell:myCell/ ServerCluster: myCluster/or/ServerCluster: myCluster/ myCluster(cells /myCell/clusters/ myCluster| cluster.xml #ServerCluster_1)Cell=myCell, Cluster=myCluster
or
Cell=myCell: Cluster=myClusterorcell=myCell, Cluster=myCluster
createCompleteMailProvider
This script configures additional configuration attributes for the 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 our own mail providers and sessions to customize how JavaMail is handled. The script returns the configuration ID of the created mail provider.
To run the script, specify the following arguments:
Argument Description nodeName Name of the node of interest. serverName Name of the server of interest. mailProviderName Mail provider that the application server uses for this mail session. propName Name of the custom property. propValue Value of the custom property. protocolName Name of the protocol provider. The application server contains protocol providers for SMTP, IMAP and POP3. className Implementation class name of the protocol provider. mailSessionName 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. mailStoreHost 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 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 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 the mail provider for the scope specified. 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 our 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.
To run the script, specify the scope, mail provider name, property name, property value, protocol name, class name, type, mail session name, and JNDI name arguments. We can optionally specify attributes. The arguments and attributes are defined in the following tables:
Argument Description scope Specifies a scope of cell, node, server, or cluster for the mail provider. mailProviderName Mail provider that the application server uses for this mail session. propName Name of the custom property. propValue Value of the custom property. protocolName Name of the protocol provider. The application server contains protocol providers for SMTP, IMAP and POP3. className Implementation class name of the protocol provider. type Type of protocol provider. Valid options are STORE or TRANSPORT. mailSessionName 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, mailProviderAttributesList, mailSessionAttributesList Optionally specifies additional attributes in a particular format:
- List format
- [["attr1", "value1"], ["attr2", "value2"]]
- String format
- "attr1=value1, attr2=value2"
The following table contains optional attributes for a mail provider:
Attributes Description classpath List of paths or 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. 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 Mail provider type that this mail provider uses. The following table contains optional attributes for a mail session:
Attributes Description category Category that can be used to classify or group the resource. debug Whether debug mode is used for this mail session. The default value is off. description Specifies a description of the mail provider. mailFrom 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 Server to connect to when receiving mail. mailStorePort Port to connect to when receiving mail. mailStoreUser User of a mail account when an incoming mail server requires authentication. mailStorePassword Password of a mail account when an incoming mail server requires authentication. mailStoreProtocol Protocol to use when receiving mail. mailTransportHost Server to connect to when sending mail. mailTransportPort Port to connect to when sending mail. mailTransportUser User of a mail account when an outgoing mail server requires authentication. mailTransportPassword Password of a mail account when an outgoing mail server requires authentication. mailTransportProtocol Protocol to use when sending mail. strict 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")
The following example script includes optional attributes in a string format:
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=foo, mailStoreHost=user1, mailStorePort=1000, mailTransportUser=user2, mailTransportPassword=foo, 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 the environment. The application server includes a default mail provider called the built-in provider. If we use the default mail provider you only have to configure the mail session. To use the customized mail provider first create the mail provider and session. The script returns the configuration ID of the created mail provider.
To run the script, specify the node, server, and mail provider names as defined in the following table:
Argument Description nodeName Name of the node on which to create the mail provider. serverName Name of the server for which to create the mail provider. mailProviderName 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 the environment at the scope specified. The application server includes a default mail provider called the built-in provider. If we use the default mail provider you only have to configure the mail session. To use the customized mail provider first create the mail provider and session. The script returns the configuration ID of the created mail provider for the specified scope.
To run the script, specify the scope and mail provider name arguments. We can optionally specify attributes. The arguments and attributes are defined in the following tables:
Argument Description scope Specifies a scope of cell, node, server, or cluster for the mail provider. mailProviderName Name to assign to the new mail provider. otherAttributesList Optionally specifies additional attributes in a particular format:
- List format
- [["attr1", "value1"], ["attr2", "value2"]]
- String format
- "attr1=value1, attr2=value2"
Attributes Description classpath List of paths or 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. 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 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")
The following example script includes optional attributes in a string format:
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 the 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.
To run the script, specify the node name, server name, mail provider name, mail session name, and Java Naming and Directory Interface (JNDI) name arguments, as defined in the following table:
Argument Description nodeName Name of the node of interest. serverName Name of the server of interest. mailProviderName Mail provider that the application server uses for this mail session. mailSessionName 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 the mail provider at the scope specified. 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.
To run the script, specify the scope, mail provider name, mail session name, and Java Naming and Directory Interface (JNDI) name arguments. We can optionally specify attributes. The arguments and attributes are defined in the following tables:
Argument Description scope Specifies a scope of cell, node, server, or cluster for the mail provider. mailProviderName Mail provider that the application server uses for this mail session. mailSessionName 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:
- List format
- [["attr1", "value1"], ["attr2", "value2"]]
- String format
- "attr1=value1, attr2=value2"
Attributes Description category Category that can be used to classify or group the resource. debug Whether debug mode is used for this mail session. The default value is off. description Specifies a description of the mail provider. mailFrom 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 Server to connect to when receiving mail. mailStorePort Port to connect to when receiving mail. mailStoreUser User of a mail account when an incoming mail server requires authentication. mailStorePassword Password of a mail account when an incoming mail server requires authentication. mailStoreProtocol Protocol to use when receiving mail. mailTransportHost Server to connect to when sending mail. mailTransportPort Port to connect to when sending mail. mailTransportUser User of a mail account when an outgoing mail server requires authentication. mailTransportPassword Password of a mail account when an outgoing mail server requires authentication. mailTransportProtocol Protocol to use when sending mail. strict 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")
The following example script includes optional attributes in a string format:
AdminResources.createMailSessionAtScope("Node=MY4Node09, server=server1", "myMailProvider", "myMailSession", "myMailSession/jndi", "category=myCategory, debug=true, description='this is my mailsession', mailStoreUser=user1, mailStorePassword=foo, mailStoreHost=user1, mailStorePort=1000, mailTransportUser=user2, mailTransportPassword=foo, 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 the configuration, which provides the implementation class for a specific protocol to support communication between the JavaMail application and mail servers. The application server contains protocol providers for SMTP, IMAP and POP3. If we require custom providers for different protocols, install them in the 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.
To run the script, specify the following arguments:
Argument Description nodeName Name of the node of interest. serverName Name of the server of interest. mailProviderName Name of the mail provider that the application server uses in association with the protocol provider. protocolName Name of the protocol provider. The application server contains protocol providers for SMTP, IMAP and POP3. className Implementation class name of the protocol provider. type 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 the configuration at the scope specified. The protocol provider provides the implementation class for a specific protocol to support communication between your JavaMail application and mail servers at the scope specified. The application server contains protocol providers for SMTP, IMAP and POP3. If we require custom providers for different protocols, install them in the application serving environment before configuring the providers. See the JavaMail API design specification for guidelines. After configuring the 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.
To run the script, specify the scope mail provider name, protocol name, class name, and type arguments. We can optionally specify the classpath attribute. The arguments and attributes are defined in the following tables:
Argument Description scope Specifies a scope of cell, node, server, or cluster for the mail provider. mailProviderName Name of the mail provider that the application server uses in association with the protocol provider. protocolName Name of the protocol provider. The application server contains protocol providers for SMTP, IMAP and POP3. className Implementation class name of the protocol provider. type Type of protocol provider. Valid options are STORE or TRANSPORT. otherAttributesList Optionally specifies additional attributes in a particular format:
- List format
- [["attr1", "value1"], ["attr2", "value2"]]
- String format
- "attr1=value1, attr2=value2"
attributes. The classpath attribute is also available
Attributes Description classpath List of paths or 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")
The following example script includes optional attributes in a string format:
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 the configuration. The script returns the configuration ID of the created resource environment provider.
To run the script, specify the following arguments:
Argument Description nodeName Name of the node of interest. serverName Name of the server of interest. resourceEnvProviderName Name to assign to the resource environment provider. propName Name of a custom property to set. propValue Value of the custom property. factoryClass Factory that converts resource environment entry data into a class instance for a physical resource. className Class name for the referenceable. resourceEnvEntryName 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 specified. The resource environment provider encapsulates the referenceables that convert resource environment entry data into resource objects in the configuration. The script returns the configuration ID of the created resource environment provider for the specified scope.
To run the script, specify the scope, resource environment provider, custom property name, custom property value, factory class, class name, resoure environment entry, and JNDI name arguments. We can optionally specify attributes. The arguments and attributes are defined in the following tables:
arguments. Run the script to configure a resource environment
Argument Description scope Specifies a scope of cell, node, server, or cluster for the mail provider. resourceEnvProviderName Name to assign to the resource environment provider. propName Name of a custom property to set. propValue Value of the custom property. factoryClass Factory that converts resource environment entry data into a class instance for a physical resource. className Class name for the referenceable. resourceEnvEntryName 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:
- List format
- [["attr1", "value1"], ["attr2", "value2"]]
- String format
- "attr1=value1, attr2=value2"
The following table contains optional attributes for the resource environment provider:
Attributes Description classpath List of paths or 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. 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 Resource provider type that this resource environment provider uses. The following table contains optional attributes for the resource environment entry:
Attributes Description category Category that can be used to classify or group the resource. description Specifies a description of the resource provider. providerType Mail provider type that this resource environment provider uses. referenceable 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")
The following example script includes optional attributes in a string format:
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 the 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.
To run the script, specify the following arguments:
arguments. Run the script to create a resource environment
Argument Description nodeName Name of the node of interest. serverName Name of the server of interest. resourceEnvProviderName Resource environment provider for this entry. The provider encapsulates the classes that, when implemented, convert resource environment entry data into resource objects. referenceable Referenceable, which encapsulates the class name of the factory that converts resource environment entry data into a class instance for a physical resource. resourceEnvEntry Name for the resource environment entry to create. JNDIName 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 the configuration at the scope specified. 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.
To run the script, specify the scope the resource environment provider, resource environment entry, and JNDI name arguments. We can optionally specify attributes. The arguments and attributes are defined in the following tables:
arguments. Run the script to create a resource environment
Argument Description scope Specifies a scope of cell, node, server, or cluster for the mail provider. resourceEnvProviderName Resource environment provider for this entry. The provider encapsulates the classes that, when implemented, convert resource environment entry data into resource objects. resourceEnvEntry Name for the resource environment entry to create. JNDIName 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:
- List format
- [["attr1", "value1"], ["attr2", "value2"]]
- String format
- "attr1=value1, attr2=value2"
Attributes Description category Category that can be used to classify or group the resource. description Specifies a description of the resource provider. providerType Mail provider type that this resource environment provider uses. referenceable 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")
The following example script includes optional attributes in a string format:
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 the 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.
To run the script, specify the node name, server name, and resource environment provider name arguments, as defined in the following table:
arguments. Run the script to create a resource environment
Argument Description nodeName Name of the node of interest. serverName Name of the server of interest. resourceEnvProviderName 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 the configuration at the scope specified. 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.
To run the script, specify the scope, and resource environment provider name arguments. We can optionally specify attributes. The arguments and attributes are defined in the following tables:
arguments. Run the script to create a resource environment
Argument Description scope Specifies a scope of cell, node, server, or cluster for the mail provider. resourceEnvProviderName Resource environment provider to create. otherAttributesList Optionally specifies additional attributes in a particular format:
- List format
- [["attr1", "value1"], ["attr2", "value2"]]
- String format
- "attr1=value1, attr2=value2"
Attributes Description classpath List of paths or 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. 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 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")
The following example script includes optional attributes in a string format:
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 the configuration. Resource environment references are different than resource references. Resource environment references allow the application client to use a logical name to look up a resource bound into the server JNDI namespace. A resource reference allows the 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.
To run the script, specify the following arguments:
Argument Description nodeName Name of the node of interest. serverName Name of the server of interest. resourceEnvProviderName Resource environment provider for this reference. The provider encapsulates the classes that, when implemented, convert resource environment entry data into resource objects. factoryClass Class of the factory that converts resource environment entry data into a class instance for a physical resource. className 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 the configuration at the scope specified. Resource environment references are different than resource references. Resource environment references allow the application client to use a logical name to look up a resource bound into the server JNDI namespace. A resource reference allows the 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.
To run the script, specify the following arguments:
Argument Description scope Specifies a scope of cell, node, server, or cluster for the mail provider. resourceEnvProviderName Resource environment provider for this reference. The provider encapsulates the classes that, when implemented, convert resource environment entry data into resource objects. factoryClass Class of the factory that converts resource environment entry data into a class instance for a physical resource. className 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 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.
To run the script, specify the following arguments:
Argument Description nodeName Name of the node of interest. serverName Name of the server of interest. URLProviderName 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 Protocol supported by this stream handler. For example, NNTP, SMTP, FTP. propName Name of the custom property to set for the URL provider. propValue Value of the custom property to set for the URL provider. URLName Name of a Uniform Resource Locator (URL) name that points to an Internet or intranet resource. For example: http://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 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.
To run the script, specify the following arguments:
Argument Description nodeName Name of the node of interest. serverName Name of the server of interest. URLProviderName 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 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.
To run the script, specify the following arguments:
Argument Description scope Specifies a scope of cell, node, server, or cluster for the mail provider. URLProviderName 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 Protocol supported by this stream handler. For example, NNTP, SMTP, FTP. propName Name of the custom property to set for the URL provider. propValue Value of the custom property to set for the URL provider. URLName Name of a Uniform Resource Locator (URL) name that points to an Internet or intranet resource. For example: http://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 String from which to form a URL. otherAttributesList, urlProviderAttributesList, urlAttributesList Optionally specifies additional attributes in a particular format:
- List format
- [["attr1", "value1"], ["attr2", "value2"]]
- String format
- "attr1=value1, attr2=value2"
The following table contains optional attributes for the URL provider:
Attributes Description classpath List of paths or 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. 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. The following table contains optional attributes for the URL:
Attributes Description category Category that can be used to classify or group the resource. description Specifies a description of the resource provider. providerType Mail provider type that this resource environment provider uses. referenceable 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")
The following example script includes optional attributes in a string format:
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.
To run the script, specify the following arguments:
Argument Description nodeName Name of the node of interest. serverName Name of the server of interest. URLProviderName Name of the URL provider to assign the URL to. URLName 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 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 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 for the specified scope.
To run the script, specify the scope, URL provider name, URL name, JNDI name, and URL specification arguments. We can optionally specify attributes. The arguments and attributes are defined in the following tables:
Argument Description scope Specifies a scope of cell, node, server, or cluster for the mail provider. URLProviderName Name of the URL provider to assign the URL to. URLName 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 String from which to form a URL. otherAttributesList Optionally specifies additional attributes in a particular format:
- List format
- [["attr1", "value1"], ["attr2", "value2"]]
- String format
- "attr1=value1, attr2=value2"
Attributes Description category Category that can be used to classify or group the resource. description Specifies a description of the URL provider. providerType 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")
The following example script includes optional attributes in a string format:
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.
To run the script, specify the following arguments:
Argument Description nodeName Name of the node of interest. serverName Name of the server of interest. URLProviderName 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 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 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.
To run the script, specify the scope, URL provider name, URL stream handler class, and URL protocol arguments. We can optionally specify attributes. The arguments and attributes are defined in the following tables:
Argument Description scope Specifies a scope of cell, node, server, or cluster for the mail provider. URLProviderName 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 Protocol supported by this stream handler. For example, NNTP, SMTP, FTP. otherAttributesList Optionally specifies additional attributes in a particular format:
- List format
- [["attr1", "value1"], ["attr2", "value2"]]
- String format
- "attr1=value1, attr2=value2"
Attributes Description classpath List of paths or 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. 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")
The following example script includes optional attributes in a string format:
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 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.
To run the script, specify the following arguments:
arguments. Run the script to create a JAAS authentication
Argument Description authAliasName 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 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 the applications need. When we create the shared libraries, set variables for the library files. The script returns the configuration ID of the created library reference.
To run the script, specify the following arguments:
Argument Description libraryRefName Name of the library reference to create. applicationName 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 the 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 the applications need. When we create the shared libraries, set variables for the library files. The script returns the configuration ID of the created library.
To run the script, specify the following arguments:
Argument Description nodeName Name of the node of interest. serverName Name of the server of interest. sharedLibName Name to assign to the shared library. sharedLibClassPath 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 the configuration at the scope specified. 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 the applications need. When we create the shared libraries, set variables for the library files. The script returns the configuration ID of the created library for the specified scope.
To run the script, specify the scope shared library name and shared library class path arguments. We can optionally specify attributes. The arguments and attributes are defined in the following tables:
Argument Description scope Specifies a scope of cell, node, server, or cluster for the mail provider. sharedLibName Name to assign to the shared library. sharedLibClassPath 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:
- List format
- [["attr1", "value1"], ["attr2", "value2"]]
- String format
- "attr1=value1, attr2=value2"
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. 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 the 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 JNDI. We can also manage schedulers using a JMX MBean. See the scheduler documentation in the Information Center for details on how to configure and use schedulers. The script returns the configuration ID of the created scheduler.
To run the script, specify the following arguments:
Argument Description nodeName Name of the node of interest. serverName Name of the server of interest. schedulerName 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 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 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 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 the configuration at the scope specified. 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 JNDI. We can also manage schedulers using a JMX MBean. See the scheduler documentation in the Information Center for details on how to configure and use schedulers. The script returns the configuration ID of the created scheduler for the specified scope.
To run the script, specify the scope, scheduler name, JNDI name, JNDI datasource, table prefix, poll interval, JNDI name of the work manager, and scheduler provider ID arguments. We can optionally specify attributes. The arguments and attributes are defined in the following tables:
Argument Description scope Specifies a scope of cell, node, server, or cluster for the JMS provider. schedulerName 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 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 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 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 Provider ID of this scheduler. otherAttributesList Optionally specifies additional attributes in a particular format:
- List format
- [["attr1", "value1"], ["attr2", "value2"]]
- String format
- "attr1=value1, attr2=value2"
Attributes Description category Category that can be used to classify or group the resource. description Specifies a description of the URL provider. providerType Resource provider type that this URL provider uses. datasourceAlias Alias for the user name and password that this URL provider uses to access the data source. loginConfigName Login configuration name. securityRole 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, 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 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)")
The following example script includes optional attributes in a string format:
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 the 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.
To run the script, specify the following arguments:
Argument Description nodeName Name of the node of interest. serverName Name of the server of interest. workMgrName Name by which this work manager is known for administrative purposes. JNDIName Specifies the JNDI name used to look up the work manager in the namespace. workMgrCategory Specifies a string that we can use to classify or group this work manager. alarmThreads Desired maximum number of threads used for alarms. The default value is 2. minThreads Minimum number of threads available in this work manager. maxThreads Maximum number of threads available in this work manager. threadPriority Priority of the threads available in this work manager. Every thread has a priority. Threads with higher priority are run before threads with lower 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 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 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 the configuration at the scope specified. 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.
To run the script, specify the scope work manager name, JNDI name, alarm threads, minimum threads, maximum threads, thread priority, and work manager provider ID arguments. We can optionally specify attributes. The arguments and attributes are defined in the following tables:
Argument Description scope Specifies a scope of cell, node, server, or cluster for the JMS provider. workMgrName Name by which this work manager is known for administrative purposes. JNDIName Specifies the JNDI name used to look up the work manager in the namespace. alarmThreads Desired maximum number of threads used for alarms. The default value is 2. minThreads Minimum number of threads available in this work manager. maxThreads Maximum number of threads available in this work manager. threadPriority Priority of the threads available in this work manager. Every thread has a priority. Threads with higher priority are run before threads with lower 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 Configuration ID of the parent work manager provider. The work manager is created at this ID. We 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: workManagerProviderID = AdminConfig.getid(/Cell:myCell/Node:myNode/Server:myServer/WorkManagerProvider:/)
otherAttributesList Optionally specifies additional attributes in a particular format:
- List format
- [["attr1", "value1"], ["attr2", "value2"]]
- String format
- "attr1=value1, attr2=value2"
Attributes Description category Category that can be used to classify or group the resource. description Specifies a description of the URL provider. providerType Resource provider type that this URL provider uses. daemonTranClass Transaction class used for the workload classification of daemon work. The daemon work is for the workload manager service. defTranClass 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 Whether this work manager is distributable. The default value is false. isGrowable Whether the number of threads in this work manager can be increased. The default value is true. serviceNames List of services to make available to this work manager. workReqQFullAction Action taken when the thread pool is exhausted, and the work request queue is full. The default value is 0. workReqQSize Size of the work request queue. The default value is 0. workTimeout Number of milliseconds to wait before attempting to release a unit of work. The default value is 0. referenceable 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:
- List format
- [["attr1", "value1"], ["attr2", "value2"]]
- String format
- "attr1=value1, attr2=value2"
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)")
The following example script includes optional attributes in a string format:
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
This script displays the script procedures that the AdminResources script library supports. To display detailed help for a specific script, specify the name of the script of interest, as defined in the following table:
Argument Description script Name of the script of interest. Syntax
AdminResources.help(script)
Example usage
AdminResources.help("createWorkManager")
Related tasks
Use the script library to automate the application serving environment Configure mail providers and sessions Configure new resource environment providers for application clients Configure new URL providers for application clients
JDBC configuration scripts J2C configuration scripts JMS configuration scripts JavaMail system properties