Hitachi

Hitachi Application Server V10 Command Reference Guide (For UNIX® Systems)


2.20.1 create-admin-object

Creates an administered object with the specified JNDI name for a resource adapter.

Synopsis

asadmin [asadmin-options] create-admin-object [--help]
    [--target target] --restype restype [--classname classname]
    --raname raname [--enabled={true|false}]
    [--description description] [--property name=value[:name=value]...]
    jndi_name

Storage location

Application Server installation directory/javaee/glassfish/bin

Function

The create-admin-object subcommand creates the administered object with the specified JNDI name and the interface definition for a resource adapter.

This command is supported in remote mode only.

Precondition

Arguments

--help | -?

Displays the help text for the subcommand.

--target target

Specifies the target on which you are creating the administered object.

The resource is always created for the domain as a whole, but the resource-ref for the resource is created only for the specified --target. This means that although the resource is defined at the domain level, it is only available at the specified target level. Use the create-resource-ref subcommand to refer to the resource in multiple targets if needed.

Type: String

The following values can be specified:

  • server

    Creates the administered object for the default server instance server. This is the default value.

  • configuration_name

    Creates the administered object for the named configuration.

  • cluster_name

    Creates the administered object for every server instance in the cluster.

  • instance_name

    Creates the administered object for a particular server instance.

Default value: server

--restype restype

Specifies the interface definition for the administered object. The resource type has to be an interface definition that is specified in the ra.xml file of the resource adapter.

Type: String

The following values can be specified:

  • Type of the resource, the resource type has to be an interface definition that is specified in the ra.xml file of the resource adapter

Default value: N/A

--classname classname

Specifies the class name of the administered object. Required if multiple administered objects use the same interface definition.

Type: String

The following values can be specified:

  • Class name of administered object

Default value: N/A

--raname raname

Specifies the name of the resource adapter associated with this administered object.

Type: String

The following values can be specified:

  • Name of the resource adapter

Default value: N/A

--enabled={true|false}

Specifies if this object is enabled. Default is true.

Type: Boolean

The following values can be specified:

  • true

  • false

Default value: true

--description description

Displays the text string describing the administered object.

Type: String

The following values can be specified:

  • Text describing the administered object to be created

Default value: N/A

--property name=value[:name=value]...

Describes the name or value pairs for configuring the resource. Dependent on the resource adapter.

After creating the admin object, some properties require a server restart. If required, restart the server.

The specification format is name=value. Use a colon (:) to separate property names. If you specify the same property name more than once, the property value specified last is valid.

Type: String

The following values can be specified:

  • name-value pairs of the properties supported by the resource adapter

Default value: N/A

jndi_name

Specifies the JNDI name of the administered object to be created.

Type: String

The following values can be specified:

  • JNDI name of the administered object to be created

Default value: N/A

Examples

In the following example, jmsra is a system resource adapter with the javax.jms.Queue and javax.jms.Topic admin object interfaces. This jmsra system resource adapter is created on the server instance instance1.

asadmin create-admin-object --target instance1 --restype javax.jms.Queue 
--raname jmsra --description "sample administered object" 
--property Name=sample_jmsqueue jms/samplequeue

Exit Status

Exit Status

Explanation

0

command executed successfully.

1

error in executing the command.