<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE resources PUBLIC "-//Sun Microsystems Inc.//DTD Application Server 9.0 Domain//EN" "*<install directory>/lib/dtds/sun-resources_1_3.dtd*">
<!--

    Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved.

    This program and the accompanying materials are made available under the
    terms of the Eclipse Public License v. 2.0, which is available at
    http://www.eclipse.org/legal/epl-2.0.

    This Source Code may also be made available under the following Secondary
    Licenses when the conditions for such availability set forth in the
    Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
    version 2 with the GNU Classpath Exception, which is available at
    https://www.gnu.org/software/classpath/license.html.

    SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0

-->

<!--

    Template file to create Primitive Types or String Object provider custom resources.
    By specifying the built-in "factory-class" as
    org.glassfish.resources.custom.factory.PrimitivesAndStringFactory,
    "res-type" (short/int/long/float/double/char/byte/String)
    and a property named "value" with the required value, a custom-resource can be created
    that can be used by applications.

    To learn more on custom resources,refer :

    http://docs.sun.com/app/docs/doc/819-2554/ablld?l=en&a=view

    http://docs.sun.com/app/docs/doc/820-4332/create-custom-resource-1?a=view

    http://docs.sun.com/app/docs/doc/820-4332/delete-custom-resource-1?a=view

    http://docs.sun.com/app/docs/doc/820-4332/list-custom-resources-1?a=view

    For detailed explanation of attributes and elements of this resources xml
    pl. refer to sun-resources_1_3.dtd


    =========================================SAMPLE============================================


    In the sample configuration below,
    custom-resource will provide a long (java.lang.Long) upon lookup

    Applications can do  :

    (java.lang.Long)initialContext.lookup("custom/my-primitive-long")


    Following command will create a resource using this template :

    GLASSFISH_INSTALL_DIR/bin/asadmin add-resources <ABSOLUTE_PATH_TO_TEMPLATE_FILE>


    <resources>
        <custom-resource res-type="long" jndi-name="custom/my-primitive-long"
         factory-class="org.glassfish.resources.custom.factory.PrimitivesAndStringFactory">
          <property name="value" value="2008" />
        </custom-resource>
    </resources>


    =========================================SAMPLE============================================

-->

<resources>
    <custom-resource res-type="<TYPE_OF_PRIMITIVE>" jndi-name="<RESOURCE_NAME>"
     factory-class="org.glassfish.resources.custom.factory.PrimitivesAndStringFactory">
      <property name="value" value="<VALUE>" />
    </custom-resource>
</resources>
