+

Search Tips   |   Advanced Search

JavaEEDefaultResources

Use the Jython scripting language to configure resource providers with the wsadmin tool.

New feature:

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

The JavaEEDefaultResources commands include:


getDefaultDataSource

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

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

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

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

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

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

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. We 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

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

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. We 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

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

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. We 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

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

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. We 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

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

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. We 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

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

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. We 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

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:

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

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

  • wsadmin AdminTask
  • Configure Java EE default resources
  • Commands for the AdminTask object