<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved.
    Copyright (c) 2025 Contributors to the Eclipse Foundation. 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

-->

<!DOCTYPE resources PUBLIC "-//Sun Microsystems Inc.//DTD Application Server 9.0 Domain//EN" "*<install directory>/lib/dtds/sun-resources_1_3.dtd*">

<!--
    Java DB Type 4 Driver
    The JAR file for the Java DB driver is derbyclient.jar.

    The Java DB database is based on the Derby database from Apache.
    http://db.apache.org/derby/manuals

    The Java DB JDBC driver is included with the Application Server by default.

    To learn more on JDBC resources, pl. refer to JDBC resources chapter of admin guide.
    Administration Guide >> JDBC Resources  >> Configurations for Specific JDBC Drivers
    http://docs.sun.com/app/docs/doc/819-3658/6n5s5nklk?a=view

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

    Datasource classnames for Derby's Network mode:
    =================================================================================================
    |  res-type                             datasource-classname                                    |
    =================================================================================================
    |  javax.sql.DataSource                 org.apache.derby.jdbc.ClientDataSource                  |
    |  javax.sql.ConnectionPoolDataSource   org.apache.derby.jdbc.ClientConnectionPoolDataSource    |
    |  javax.sql.XADataSource               org.apache.derby.jdbc.ClientXADataSource                |
    =================================================================================================

    Datasource classnames for Derby's Embedded mode:
    =================================================================================================
    |  res-type                             datasource-classname                                    |
    =================================================================================================
    |  javax.sql.DataSource                 org.apache.derby.jdbc.EmbeddedDataSource                |
    |  javax.sql.ConnectionPoolDataSource   org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource  |
    |  javax.sql.XADataSource               org.apache.derby.jdbc.EmbeddedXADataSource              |
    =================================================================================================
-->

<resources>
    <jdbc-connection-pool
        name="javadb_type4_pool"
        datasource-classname="org.apache.derby.jdbc.ClientDataSource"
        res-type="javax.sql.DataSource">
        <property name="user" value="DB_USER"/>
        <property name="password" value="DB_PASSWORD"/>
        <property name="databaseName" value="DATABASE_NAME"/>
        <property name="serverName" value="DB_HOSTNAME"/>
        <property name="portNumber" value="1527"/>
        <property name="connectionAttributes" value=";create=true"/>
    </jdbc-connection-pool>

    <jdbc-resource
        enabled="true"
        jndi-name="jdbc/javadb_type4"
        object-type="user"
        pool-name="javadb_type4_pool"/>
</resources>
