<!--Arbortext, Inc., 1988-2007, v.4002-->
<!DOCTYPE REFENTRY PUBLIC "-//Sun Microsystems//DTD SolBook 3.5//EN" [
<!ENTITY options-common SYSTEM "options-common.sgm">
<!ENTITY synopsis-common SYSTEM "synopsis-common.sgm">
<!ENTITY % commonents SYSTEM "common.ent">
%commonents;
]>
<?Pub UDT _bookmark _target>
<?Pub CX solbook(>
<refentry id="create-custom-resource-1">
<!-- @(#)create-custom-resource.1 1.11 07/07/27 SMI; -->
<refmeta><refentrytitle>create-custom-resource</refentrytitle><manvolnum>1</manvolnum>
<refmiscinfo class="date">30 Jan 2007</refmiscinfo>
<refmiscinfo class="sectdesc">&man1;</refmiscinfo>
<refmiscinfo class="software">&software;</refmiscinfo>
<refmiscinfo class="arch">generic</refmiscinfo>
<refmiscinfo class="copyright">Copyright (c) 2007, Sun Microsystems, Inc.
All Rights Reserved</refmiscinfo>
</refmeta>
<refnamediv><indexterm><primary>create-custom-resource</primary></indexterm>
<indexterm><primary>creates a custom resource</primary></indexterm>
<refname>create-custom-resource</refname><refpurpose>creates a custom resouce</refpurpose>
</refnamediv>
<refsynopsisdiv><title></title>
<synopsis><command>create-custom-resource</command> &synopsis-common; <option
role="double-dash">restype</option> <replaceable>type</replaceable>
 <option role="double-dash">factoryclassname</option> <replaceable>classname</replaceable> [<literal>
--enabled=<replaceable>true</replaceable></literal>]
 [<option role="double-dash">description</option> <replaceable>text</replaceable>] [<option
role="double-dash">property</option> (<replaceable>name</replaceable>=<replaceable>
value</replaceable>)[:<replaceable>name</replaceable>=<replaceable>value</replaceable>]*]
 <replaceable>jndi_name</replaceable></synopsis>
</refsynopsisdiv>
<refsect1 role="description"><title></title>
<para>The <command>create-custom-resource</command> command creates a custom
resource. A custom resource specifies a custom server-wide resource object
factory that implements the <classname>javax.naming.spi.ObjectFactory</classname> interface.
This command is supported in remote mode only.</para>
</refsect1>
<refsect1 role="options"><title></title>
<variablelist termlength="medium">&options-common;
<varlistentry><term><option role="double-dash">target</option></term>
<listitem><para>This option helps specify the target to which you are deploying.
Valid values are: </para>
<itemizedlist>
<listitem><para><literal>server</literal>&hyphen; Specifies the default server
instance as the target for deploying the component. <literal>server</literal> is
the name of the default server instance and is the default value for this
option.</para></listitem>
<listitem><para><literal>domain</literal>&hyphen; Specifies a particular domain
as the target for deploying the component. </para></listitem>
<listitem><para><replaceable>cluster_name</replaceable>&hyphen; Specifies
a particular cluster as the target for deploying the component. </para>
</listitem>
<listitem><para><replaceable>instance_name</replaceable>&hyphen; Specifies
a particular instance as the target<?Pub Caret> for deploying the component. </para>
</listitem>
</itemizedlist>
</listitem>
</varlistentry>
<varlistentry><term><option role="double-dash">resourcetype</option></term>
<listitem><para>The <option role="double-dash">resourcetype</option> option
is deprecated. Use <option role="double-dash">restype</option> instead.</para>
</listitem>
</varlistentry>
<varlistentry><term><option role="double-dash">restype</option></term>
<listitem><para>The type of custom resource to be created. Specify a fully
qualified type definition, for example <classname>javax.naming.spi.ObjectFactory</classname>.
The resource type definition follows the format, xxx.xxx.</para>
</listitem>
</varlistentry>
<varlistentry><term><option role="double-dash">factoryclass</option></term>
<listitem><para>Factory class name for the custom resource. This class implements
the <literal>javax.naming.spi.ObjectFactory</literal> interface.</para>
</listitem>
</varlistentry>
<varlistentry><term><option role="double-dash">enabled</option></term>
<listitem><para>Determines whether the custom resource is enable at runtime.
The default value is true.</para>
</listitem>
</varlistentry>
<varlistentry><term><option role="double-dash">description</option></term>
<listitem><para>Text providing details about the custom resource. This description
is a string value and can include a maximum of 250 characters.</para>
</listitem>
</varlistentry>
<varlistentry><term><option role="double-dash">property</option></term>
<listitem><para>Optional attribute name/value pairs for configuring the resource. 
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="operands"><title></title>
<variablelist termlength="medium">
<varlistentry><term><replaceable>jndi_name</replaceable></term>
<listitem><para>the JNDI name of this resource.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="examples"><title></title>
<example><title>Using the create-custom-resource command</title>
<screen>asadmin> <userinput>create-custom-resource --user admin --passwordfile passwords.txt 
--restype topic --factoryclass com.imq.topic sample_custom_resource</userinput>
Command create-custom-resource executed successfully.

</screen>
</example>
</refsect1>
<refsect1 role="exit-status"><title></title>
<variablelist termlength="medium">
<varlistentry><term>0</term>
<listitem><para>command executed successfully</para>
</listitem>
</varlistentry>
<varlistentry><term>1</term>
<listitem><para>error in executing the command</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="see-also"><title></title>
<para><olink targetdoc="asrefman" targetptr="delete-custom-resource-1">delete-custom-resource(1)
</olink>, <olink targetdoc="asrefman" targetptr="list-custom-resources-1">list-custom-resources(1)
</olink></para>
</refsect1>
</refentry>
<?Pub *0000005674 0>
