JavaEEDefaultResources command group for the AdminTask object

You can use the Jython scripting language to configure resource providers with the wsadmin tool.

新特性 新特性:
Use the wsadmin commands and parameters in the JavaEEDefaultResources group to get and set bindings for Java EE default resources. For example, you can bind java:comp/DefaultDataSource to a data source that is configured in the server.newfeat

The JavaEEDefaultResources command group for the AdminTask object includes the following commands:

getDefaultDataSource

Use the getDefaultDataSource command to get the JNDI name to which java:comp/DefaultDataSource is bound.

Target object

The containment path of the target scope.

Required parameters

None.

Return value

The command returns the JNDI name, or an empty string if the binding is not set at the specified scope.

getDefaultJMSConnectionFactory

Use the getDefaultJMSConnectionFactory command to get the JNDI name to which java:comp/DefaultJMSConnectionFactory is bound.

Target object

The containment path of the target scope.

Required parameters

None.

Return value

The command returns the JNDI name, or an empty string if the binding is not set at the specified scope.

getDefaultContextService

Use the getDefaultContextService command to get the JNDI name to which java:comp/DefaultContextService is bound.

Target object

The containment path of the target scope.

Required parameters

None.

Return value

The command returns the JNDI name, or an empty string if the binding is not set at the specified scope.

getDefaultManagedExecutor

Use the getDefaultManagedExecutor command to get the JNDI name to which java:comp/DefaultManagedExecutorService is bound.

Target object

The containment path of the target scope.

Required parameters

None.

Return value

The command returns the JNDI name, or an empty string if the binding is not set at the specified scope.

getDefaultManagedScheduledExecutor

Use the getDefaultManagedScheduledExecutor command to get the JNDI name to which java:comp/DefaultManagedScheduledExecutorService is bound.

Target object

The containment path of the target scope.

Required parameters

None.

Return value

The command returns the JNDI name, or an empty string if the binding is not set at the specified scope.

getDefaultManagedThreadFactory

Use the getDefaultManagedThreadFactory command to get the JNDI name to which java:comp/DefaultManagedThreadFactory is bound.

Target object

The containment path of the target scope.

Required parameters

None.

Return value

The command returns the JNDI name, or an empty string if the binding is not set at the specified scope.

setDefaultDataSource

Use the setDefaultDataSource command to set the JNDI name to which java:comp/DefaultDataSource is bound. Omitting the targetJndiName parameter or setting its value to an empty string causes the binding to be unset at the specified scope. You can configure bindings for java:comp/DefaultDataSource at cell, node, or server scope.

Target object

The containment path of the target scope.

Optional parameters

-targetJndiName
Specifies the JNDI name to which java:comp/DefaultDataSource is bound at the targeted scope. The specified JNDI name must correspond to a data source resource. If this parameter is an empty string, the binding is unset. (String, optional)

Return value

The command returns a string indicating the new JNDI name to which java:comp/DefaultDataSource is bound at the targeted scope.

setDefaultJMSConnectionFactory

Use the setDefaultJMSConnectionFactory command to set the JNDI name to which java:comp/DefaultJMSConnectionFactory is bound. Omitting the targetJndiName parameter or setting its value to an empty string causes the binding to be unset at the specified scope. You can configure bindings for java:comp/DefaultJMSConnectionFactory at cell, node, or server scope.

Target object

The containment path of the target scope.

Optional parameters

-targetJndiName
Specifies the JNDI name to which java:comp/DefaultJMSConnectionFactory is bound at the targeted scope. The specified JNDI name must correspond to a JMS ConnectionFactory resource. If this parameter is an empty string, the binding is unset. (String, optional)

Return value

The command returns a string indicating the new JNDI name to which java:comp/DefaultJMSConnectionFactory is bound at the targeted scope.

setDefaultContextService

Use the setDefaultContextService command to set the JNDI name to which java:comp/DefaultContextService is bound. Omitting the targetJndiName parameter or setting its value to an empty string causes the binding to be unset at the specified scope. You can configure bindings for java:comp/DefaultContextService at cell, node, or server scope.

Target object

The containment path of the target scope.

Optional parameters

-targetJndiName
Specifies the JNDI name to which java:comp/DefaultContextService is bound at the targeted scope. The specified JNDI name must correspond to a WorkManager resource. If this parameter is an empty string, the binding is unset. (String, optional)

Return value

The command returns a string indicating the new JNDI name to which java:comp/DefaultContextService is bound at the targeted scope.

setDefaultManagedExecutor

Use the setDefaultManagedExecutor command to set the JNDI name to which java:comp/DefaultManagedExecutorService is bound. Omitting the targetJndiName parameter or setting its value to an empty string causes the binding to be unset at the specified scope. You can configure bindings for java:comp/DefaultManagedExecutorService at cell, node, or server scope.

Target object

The containment path of the target scope.

Optional parameters

-targetJndiName
Specifies the JNDI name to which java:comp/DefaultManagedExecutorService is bound at the targeted scope. The specified JNDI name must correspond to a WorkManager resource. If this parameter is an empty string, the binding is unset. (String, optional)

Return value

The command returns a string indicating the new JNDI name to which java:comp/DefaultManagedExecutorService is bound at the targeted scope.

setDefaultManagedScheduledExecutor

Use the setDefaultManagedScheduledExecutor command to set the JNDI name to which java:comp/DefaultManagedScheduledExecutorService is bound. Omitting the targetJndiName parameter or setting its value to an empty string causes the binding to be unset at the specified scope. You can configure bindings for java:comp/DefaultManagedScheduledExecutorService at cell, node, or server scope.

Target object

The containment path of the target scope.

Optional parameters

-targetJndiName
Specifies the JNDI name to which java:comp/DefaultManagedScheduledExecutorService is bound at the targeted scope. The specified JNDI name must correspond to a WorkManager resource. If this parameter is an empty string, the binding is unset. (String, optional)

Return value

The command returns a string indicating the new JNDI name to which java:comp/DefaultManagedScheduledExecutorService is bound at the targeted scope.

setDefaultManagedThreadFactory

Use the setDefaultManagedThreadFactory command to set the JNDI name to which java:comp/DefaultManagedThreadFactory is bound. Omitting the targetJndiName parameter or setting its value to an empty string causes the binding to be unset at the specified scope. You can configure bindings for java:comp/DefaultManagedThreadFactory at cell, node, or server scope.

Target object

The containment path of the target scope.

Optional parameters

-targetJndiName
Specifies the JNDI name to which java:comp/DefaultManagedThreadFactory is bound at the targeted scope. The specified JNDI name must correspond to a WorkManager resource. If this parameter is an empty string, the binding is unset. (String, optional)

Return value

The command returns a string indicating the new JNDI name to which java:comp/DefaultManagedThreadFactory is bound at the targeted scope.

Examples

Get the JNDI name to which the default data source is bound at the cell scope of the myCell cell using Jython:

print AdminTask.getDefaultDataSource('/Cell:myCell/') 

jdbc/built-in-derby-datasource

Set the JNDI name to which the default data source is bound at the server scope of the server1 server using Jython:

AdminTask.setDefaultDataSource('/Cell:myCell/Node:myNode/Server:server1/', '[-targetJndiName jdbc/myDataSource]')

'jdbc/myDataSource'

Remove the default data source binding at the node scope of the myNode node using Jython:

AdminTask.setDefaultDataSource('/Cell:myCell/Node:myNode/', '[-targetJndiName]')

''

指出主題類型的圖示 參照主題



時間戳記圖示 前次更新: July 9, 2016 11:14
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=rxml_atjeedefaultres
檔名:rxml_atjeedefaultres.html