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

    Copyright (c) 2000, 2020 Oracle and/or its affiliates. All rights reserved.
    Copyright (c) 2022 Contributors to 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

-->

<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>Eclipse OpenMQ(tm) JMS Resource Adapter</description>
    <display-name>Eclipse OpenMQ(tm) Jakarta EE Resource Adapter for JMS</display-name>
    <vendor-name>Eclipse Foundation</vendor-name>
    <eis-type>Jakarta Messaging v 3.1</eis-type>
    <resourceadapter-version>6.7.0</resourceadapter-version>

    <resourceadapter>
        <resourceadapter-class>
            com.sun.messaging.jms.ra.ResourceAdapter
        </resourceadapter-class>
        <config-property>
                <config-property-name>
                ConnectionURL
                </config-property-name>
                <config-property-type>
                java.lang.String
                </config-property-type>
                <config-property-value>
                mq://localhost:7676/
                </config-property-value>
        </config-property>
        <config-property>
                <config-property-name>
                UserName
                </config-property-name>
                <config-property-type>
                java.lang.String
                </config-property-type>
                <config-property-value>
                guest
                </config-property-value>
        </config-property>
        <config-property>
                <config-property-name>
                Password
                </config-property-name>
                <config-property-type>
                java.lang.String
                </config-property-type>
                <config-property-value>
                guest
                </config-property-value>
        </config-property>
        <outbound-resourceadapter>
            <connection-definition>
                <managedconnectionfactory-class>
                    com.sun.messaging.jms.ra.ManagedConnectionFactory
                </managedconnectionfactory-class>
                <config-property>
                    <config-property-name>AddressList</config-property-name>
                    <config-property-type>java.lang.String</config-property-type>
                    <config-property-value>localhost</config-property-value>
                </config-property>                
                <config-property>
                    <config-property-name>UserName</config-property-name>
                    <config-property-type>java.lang.String</config-property-type>
                    <config-property-value>guest</config-property-value>
                </config-property>
                <config-property>
                    <config-property-name>Password</config-property-name>
                    <config-property-type>java.lang.String</config-property-type>
                    <config-property-value>guest</config-property-value>
                </config-property>
                <connectionfactory-interface> 
                    jakarta.jms.ConnectionFactory
                </connectionfactory-interface>
                <connectionfactory-impl-class>
                    com.sun.messaging.jms.ra.ConnectionFactoryAdapter
                </connectionfactory-impl-class>
                <connection-interface> 
                    jakarta.jms.QueueConnection
                </connection-interface>
                <connection-impl-class>
                    com.sun.messaging.jms.ra.ConnectionAdapter
                </connection-impl-class>
            </connection-definition>
            <connection-definition>
                <managedconnectionfactory-class>
                    com.sun.messaging.jms.ra.ManagedConnectionFactory
                </managedconnectionfactory-class>
                <config-property>
                    <config-property-name>AddressList</config-property-name>
                    <config-property-type>java.lang.String</config-property-type>
                    <config-property-value>localhost</config-property-value>
                </config-property>                
                <config-property>
                    <config-property-name>UserName</config-property-name>
                    <config-property-type>java.lang.String</config-property-type>
                    <config-property-value>guest</config-property-value>
                </config-property>
                <config-property>
                    <config-property-name>Password</config-property-name>
                    <config-property-type>java.lang.String</config-property-type>
                    <config-property-value>guest</config-property-value>
                </config-property>
                <connectionfactory-interface> 
                    jakarta.jms.QueueConnectionFactory
                </connectionfactory-interface>
                <connectionfactory-impl-class>
                    com.sun.messaging.jms.ra.ConnectionFactoryAdapter
                </connectionfactory-impl-class>
                <connection-interface> 
                    jakarta.jms.QueueConnection
                </connection-interface>
                <connection-impl-class>
                    com.sun.messaging.jms.ra.ConnectionAdapter
                </connection-impl-class>
            </connection-definition>
            <connection-definition>
                <managedconnectionfactory-class>
                    com.sun.messaging.jms.ra.ManagedConnectionFactory
                </managedconnectionfactory-class>
                <config-property>
                    <config-property-name>AddressList</config-property-name>
                    <config-property-type>java.lang.String</config-property-type>
                    <config-property-value>localhost</config-property-value>
                </config-property>
                <config-property>
                    <config-property-name>UserName</config-property-name>
                    <config-property-type>java.lang.String</config-property-type>
                    <config-property-value>guest</config-property-value>
                </config-property>
                <config-property>
                    <config-property-name>Password</config-property-name>
                    <config-property-type>java.lang.String</config-property-type>
                    <config-property-value>guest</config-property-value>
                </config-property>
                <connectionfactory-interface> 
                    jakarta.jms.TopicConnectionFactory
                </connectionfactory-interface>
                <connectionfactory-impl-class>
                    com.sun.messaging.jms.ra.ConnectionFactoryAdapter
                </connectionfactory-impl-class>
                <connection-interface> 
                    jakarta.jms.TopicConnection
                </connection-interface>
                <connection-impl-class>
                    com.sun.messaging.jms.ra.ConnectionAdapter
                </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>
                            com.sun.messaging.jms.ra.ActivationSpec
                        </activationspec-class> 
                        <required-config-property>
                            <config-property-name>
                                destination
                            </config-property-name>
                        </required-config-property>
                        <required-config-property>
                            <config-property-name>
                                destinationType
                            </config-property-name>
                        </required-config-property>
                    </activationspec>
                </messagelistener>
            </messageadapter>          
        </inbound-resourceadapter>
        <adminobject>
            <adminobject-interface>jakarta.jms.Queue
            </adminobject-interface>
            <adminobject-class>
            com.sun.messaging.Queue
            </adminobject-class>
            <config-property>
                <config-property-name>
                Name
                </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>
                Description
                </config-property-name>
                <config-property-type>
                java.lang.String
                </config-property-type>
                <config-property-value>
                </config-property-value>
            </config-property>
        </adminobject>
        <adminobject>
            <adminobject-interface>
            jakarta.jms.Topic
            </adminobject-interface>
            <adminobject-class>
            com.sun.messaging.Topic
            </adminobject-class>
            <config-property>
                <config-property-name>
                Name
                </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>
                Description
                </config-property-name>
                <config-property-type>
                java.lang.String
                </config-property-type>
                <config-property-value>
                </config-property-value>
            </config-property>
        </adminobject>
    </resourceadapter>
</connector>

