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

<!--
  ~ Copyright (c) 2004 - 2007, Tranql project contributors
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  ~
  -->

<connector xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd"
    version="1.5">

    <description>
        A resource adaptor that provides access to an embedded Apache Derby database with XA support.
    </description>
    <display-name>TranQL Embedded XA Resource Adapter for Apache Derby</display-name>

    <vendor-name>tranql.codehaus.org</vendor-name>
    <eis-type>JDBC</eis-type>
    <resourceadapter-version>1.0</resourceadapter-version>
    <license>
        <description>
            Licensed under the Apache License, Version 2.0 (the "License");
            you may not use this file except in compliance with the License.
            You may obtain a copy of the License at

               http://www.apache.org/licenses/LICENSE-2.0

            Unless required by applicable law or agreed to in writing, software
            distributed under the License is distributed on an "AS IS" BASIS,
            WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
            See the License for the specific language governing permissions and
            limitations under the License.
        </description>
        <license-required>true</license-required>
    </license>
    <resourceadapter>
        <outbound-resourceadapter>
            <connection-definition>
                <managedconnectionfactory-class>org.tranql.connector.derby.EmbeddedXAMCF</managedconnectionfactory-class>
                <config-property>
                    <description>
                        Username used to establish the physical connection.
                        This also establishes the default schema; if omitted the engine defaults to 'APP'.
                    </description>
                    <config-property-name>UserName</config-property-name>
                    <config-property-type>java.lang.String</config-property-type>
                </config-property>
                <config-property>
                    <description>Password credential used to establish the physical connection.</description>
                    <config-property-name>Password</config-property-name>
                    <config-property-type>java.lang.String</config-property-type>
                </config-property>
                <config-property>
                    <description>Name of the database to connect to.</description>
                    <config-property-name>DatabaseName</config-property-name>
                    <config-property-type>java.lang.String</config-property-type>
                </config-property>
                <config-property>
                    <description>Flag indicating that the database should be created if it does not exist.  This is a boolean value.</description>
                    <config-property-name>CreateDatabase</config-property-name>
                    <config-property-type>java.lang.Boolean</config-property-type>
                    <config-property-value>true</config-property-value>
                </config-property>
                <config-property>
                    <description>
                        This config-property is currently ignored by Derby.
                    </description>
                    <config-property-name>LoginTimeout</config-property-name>
                    <config-property-type>java.lang.Integer</config-property-type>
                </config-property>

                <connectionfactory-interface>javax.sql.DataSource</connectionfactory-interface>
                <connectionfactory-impl-class>org.tranql.connector.jdbc.TranqlDataSource</connectionfactory-impl-class>
                <connection-interface>java.sql.Connection</connection-interface>
                <connection-impl-class>org.tranql.connector.jdbc.ConnectionHandle</connection-impl-class>

            </connection-definition>
            <transaction-support>XATransaction</transaction-support>
            <authentication-mechanism>
                <description>Uses JDBC user/password authentication based on properties supplied to connect</description>
                <authentication-mechanism-type>BasicPassword</authentication-mechanism-type>
                <credential-interface>javax.resource.spi.security.PasswordCredential</credential-interface>
            </authentication-mechanism>
            <reauthentication-support>false</reauthentication-support>
        </outbound-resourceadapter>
    </resourceadapter>
</connector>
