<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright The WildFly Authors
  ~ SPDX-License-Identifier: Apache-2.0
  -->

<connector xmlns="https://jakarta.ee/xml/ns/jakartaee"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee
           https://jakarta.ee/xml/ns/jakartaee/connector_2_1.xsd"
           version="2.1">

    <description>JBoss Generic JMS JCA Resource Adapter</description>
    <display-name>Generic JMS Adapter</display-name>

    <vendor-name>Red Hat Middleware LLC</vendor-name>
    <eis-type>JMS 1.1 Server</eis-type>
    <resourceadapter-version>5.0</resourceadapter-version>

    <license>
        <description>
            Copyright The WildFly Authors

            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>
        <resourceadapter-class>org.jboss.resource.adapter.jms.JmsResourceAdapter</resourceadapter-class>

        <outbound-resourceadapter>
            <connection-definition>
                <managedconnectionfactory-class>org.jboss.resource.adapter.jms.JmsManagedConnectionFactory
                </managedconnectionfactory-class>
                <config-property>
                    <description>The jndi name of the connection factory</description>
                    <config-property-name>ConnectionFactory</config-property-name>
                    <config-property-type>java.lang.String</config-property-type>
                    <config-property-value>XAConnectionFactory</config-property-value>
                </config-property>
                <config-property>
                    <description>A comma-separated list of JNDI parameters</description>
                    <config-property-name>JndiParameters</config-property-name>
                    <config-property-type>java.lang.String</config-property-type>
                    <config-property-value></config-property-value>
                </config-property>
                <config-property>
                    <description>The default session type</description>
                    <config-property-name>SessionDefaultType</config-property-name>
                    <config-property-type>java.lang.String</config-property-type>
                    <config-property-value>agnostic</config-property-value>
                </config-property>
                <config-property>
                    <description>The user name used to login to the jms server</description>
                    <config-property-name>UserName</config-property-name>
                    <config-property-type>java.lang.String</config-property-type>
                    <config-property-value></config-property-value>
                </config-property>
                <config-property>
                    <description>The password used to login to the jms server</description>
                    <config-property-name>Password</config-property-name>
                    <config-property-type>java.lang.String</config-property-type>
                    <config-property-value></config-property-value>
                </config-property>
                <config-property>
                    <description>The client id for this connection factory</description>
                    <config-property-name>ClientID</config-property-name>
                    <config-property-type>java.lang.String</config-property-type>
                    <config-property-value></config-property-value>
                </config-property>
                <config-property>
                    <config-property-name>Strict</config-property-name>
                    <config-property-type>java.lang.Boolean</config-property-type>
                    <config-property-value>true</config-property-value>
                </config-property>
                <config-property>
                    <description>Maximum wait for a lock</description>
                    <config-property-name>UseTryLock</config-property-name>
                    <config-property-type>java.lang.Integer</config-property-type>
                    <config-property-value>60</config-property-value>
                </config-property>
                <config-property>
                    <description>Whether temporary destinations are deleted when a session is closed.</description>
                    <config-property-name>DeleteTemporaryDestinations</config-property-name>
                    <config-property-type>java.lang.Boolean</config-property-type>
                    <config-property-value>true</config-property-value>
                </config-property>
                <connectionfactory-interface>org.jboss.resource.adapter.jms.JmsConnectionFactory
                </connectionfactory-interface>
                <connectionfactory-impl-class>org.jboss.resource.adapter.jms.JmsConnectionFactoryImpl
                </connectionfactory-impl-class>
                <connection-interface>jakarta.jms.Session</connection-interface>
                <connection-impl-class>org.jboss.resource.adapter.jms.JmsSession</connection-impl-class>
            </connection-definition>
            <transaction-support>XATransaction</transaction-support>
            <authentication-mechanism>
                <authentication-mechanism-type>BasicPassword</authentication-mechanism-type>
                <credential-interface>jakarta.resource.spi.security.PasswordCredential</credential-interface>
            </authentication-mechanism>
            <reauthentication-support>false</reauthentication-support>
        </outbound-resourceadapter>

        <inbound-resourceadapter>
            <messageadapter>
                <messagelistener>
                    <messagelistener-type>jakarta.jms.MessageListener</messagelistener-type>
                    <activationspec>
                        <activationspec-class>org.jboss.resource.adapter.jms.inflow.JmsActivationSpec
                        </activationspec-class>
                        <required-config-property>
                            <config-property-name>destination</config-property-name>
                        </required-config-property>
                        <required-config-property>
                            <config-property-name>connectionFactory</config-property-name>
                        </required-config-property>
                    </activationspec>
                </messagelistener>
            </messageadapter>
        </inbound-resourceadapter>

    </resourceadapter>
</connector>
