<commit_before><?xml version="1.0" encoding="UTF-8"?>
<!--
 - Copyright 2013 Red Hat Inc. and/or its affiliates and other 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.
 -->
<switchyard 
    xmlns="urn:switchyard-config:switchyard:1.0"
    xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912" 
    xmlns:jca="urn:switchyard-component-jca:config:1.0" 
    xmlns:bean="urn:switchyard-component-bean:config:1.0">

    <sca:composite name="JCAJMSTest" targetNamespace="urn:jca:test:1.0">
        <sca:service name="JCAJMSTransactionService" promote="TransactionComponent/JCAJMSTransactionService">
            <binding.jca xmlns="urn:switchyard-component-jca:config:1.0">
               <operationSelector.regex xmlns="urn:switchyard-config:switchyard:1.0" expression="onMessage.*"/>
               <inboundConnection>
                   <resourceAdapter name="hornetq-ra.rar"/>
                   <activationSpec>
                       <property name="destinationType" value="javax.jms.Queue"/>
                       <property name="destination" value="queue/TestQueue"/>
                   </activationSpec>
               </inboundConnection>
               <inboundInteraction>
                   <listener>javax.jms.MessageListener</listener>
                   <endpoint type="org.switchyard.component.jca.endpoint.JMSEndpoint" />
                   <transacted>true</transacted>
               </inboundInteraction>
            </binding.jca>
            <binding.jca xmlns="urn:switchyard-component-jca:config:1.0">
               <operationSelector.regex xmlns="urn:switchyard-config:switchyard:1.0" expression="onMessage.*"/>
               <inboundConnection>
                   <resourceAdapter name="hornetq-ra.rar"/>
                   <activationSpec>
                       <property name="destinationType" value="javax.jms.Queue"/>
                       <property name="destination" value="queue/NonTransactedTestQueue"/>
                   </activationSpec>
               </inboundConnection>
               <inboundInteraction>
                   <listener>javax.jms.MessageListener</listener>
                   <endpoint type="org.switchyard.component.jca.endpoint.JMSEndpoint" />
                   <transacted>false</transacted>
               </inboundInteraction>
            </binding.jca>
        </sca:service>
    
        <!-- Reference binding example -->
        <sca:reference name="JCAJMSReference" promote="JCAReferenceComponent/JCAJMSReference" multiplicity="1..1">
            <binding.jca xmlns="urn:switchyard-component-jca:config:1.0">
               <jca:contextMapper class="org.switchyard.test.jca.MyJMSContextMapper"/>
               <jca:messageComposer class="org.switchyard.test.jca.MyJMSMessageComposer"/>
               <outboundConnection>
                   <resourceAdapter name="hornetq-ra.rar"/>
                   <connection jndiName="java:/JmsXA"/>
               </outboundConnection>
               <outboundInteraction>
                   <processor type="org.switchyard.component.jca.processor.JMSProcessor">
                       <property name="destination" value="ResultQueue"/>
                   </processor>
               </outboundInteraction>
            </binding.jca>
        </sca:reference>
        <sca:reference name="JCAJMSReferenceText" promote="JCAReferenceComponent/JCAJMSReferenceText" multiplicity="1..1">
            <binding.jca xmlns="urn:switchyard-component-jca:config:1.0">
               <jca:contextMapper class="org.switchyard.test.jca.MyJMSContextMapper"/>
               <jca:messageComposer class="org.switchyard.test.jca.MyJMSMessageComposer"/>
               <outboundConnection>
                   <resourceAdapter name="hornetq-ra.rar"/>
                   <connection jndiName="java:/JmsXA"/>
               </outboundConnection>
               <outboundInteraction>
                   <processor type="org.switchyard.component.jca.processor.JMSProcessor">
                       <property name="destination" value="ResultQueue"/>
                       <property name="messageType" value="Text"/>
                       <property name="jndiPropertiesFileName" value="jndi.properties"/>
                       <property name="destinationJndiPropertiesFileName" value="destination-jndi.properties"/>
                   </processor>
               </outboundInteraction>
            </binding.jca>
        </sca:reference>
        <sca:reference name="CamelJCAJMSReference" promote="CamelComponent/CamelJCAJMSReference" multiplicity="1..1"><commit_msg>SWITCHYARD-2035 JCA JMS outbound causes rollback if transacted=true<commit_after><?xml version="1.0" encoding="UTF-8"?>
<!--
 - Copyright 2013 Red Hat Inc. and/or its affiliates and other 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.
 -->
<switchyard 
    xmlns="urn:switchyard-config:switchyard:1.0"
    xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912" 
    xmlns:jca="urn:switchyard-component-jca:config:1.0" 
    xmlns:bean="urn:switchyard-component-bean:config:1.0">

    <sca:composite name="JCAJMSTest" targetNamespace="urn:jca:test:1.0">
        <sca:service name="JCAJMSTransactionService" promote="TransactionComponent/JCAJMSTransactionService">
            <binding.jca xmlns="urn:switchyard-component-jca:config:1.0">
               <operationSelector.regex xmlns="urn:switchyard-config:switchyard:1.0" expression="onMessage.*"/>
               <inboundConnection>
                   <resourceAdapter name="hornetq-ra.rar"/>
                   <activationSpec>
                       <property name="destinationType" value="javax.jms.Queue"/>
                       <property name="destination" value="queue/TestQueue"/>
                   </activationSpec>
               </inboundConnection>
               <inboundInteraction>
                   <listener>javax.jms.MessageListener</listener>
                   <endpoint type="org.switchyard.component.jca.endpoint.JMSEndpoint" />
                   <transacted>true</transacted>
               </inboundInteraction>
            </binding.jca>
            <binding.jca xmlns="urn:switchyard-component-jca:config:1.0">
               <operationSelector.regex xmlns="urn:switchyard-config:switchyard:1.0" expression="onMessage.*"/>
               <inboundConnection>
                   <resourceAdapter name="hornetq-ra.rar"/>
                   <activationSpec>
                       <property name="destinationType" value="javax.jms.Queue"/>
                       <property name="destination" value="queue/NonTransactedTestQueue"/>
                   </activationSpec>
               </inboundConnection>
               <inboundInteraction>
                   <listener>javax.jms.MessageListener</listener>
                   <endpoint type="org.switchyard.component.jca.endpoint.JMSEndpoint" />
                   <transacted>false</transacted>
               </inboundInteraction>
            </binding.jca>
        </sca:service>
    
        <!-- Reference binding example -->
        <sca:reference name="JCAJMSReference" promote="JCAReferenceComponent/JCAJMSReference" multiplicity="1..1">
            <binding.jca xmlns="urn:switchyard-component-jca:config:1.0">
               <jca:contextMapper class="org.switchyard.test.jca.MyJMSContextMapper"/>
               <jca:messageComposer class="org.switchyard.test.jca.MyJMSMessageComposer"/>
               <outboundConnection>
                   <resourceAdapter name="hornetq-ra.rar"/>
                   <connection jndiName="java:/JmsXA"/>
               </outboundConnection>
               <outboundInteraction>
                   <processor type="org.switchyard.component.jca.processor.JMSProcessor">
                       <property name="destination" value="ResultQueue"/>
                       <jca:property name="transacted" value="true"/>
                   </processor>
               </outboundInteraction>
            </binding.jca>
        </sca:reference>
        <sca:reference name="JCAJMSReferenceText" promote="JCAReferenceComponent/JCAJMSReferenceText" multiplicity="1..1">
            <binding.jca xmlns="urn:switchyard-component-jca:config:1.0">
               <jca:contextMapper class="org.switchyard.test.jca.MyJMSContextMapper"/>
               <jca:messageComposer class="org.switchyard.test.jca.MyJMSMessageComposer"/>
               <outboundConnection>
                   <resourceAdapter name="hornetq-ra.rar"/>
                   <connection jndiName="java:/JmsXA"/>
               </outboundConnection>
               <outboundInteraction>
                   <processor type="org.switchyard.component.jca.processor.JMSProcessor">
                       <property name="destination" value="ResultQueue"/>
                       <property name="messageType" value="Text"/>
                       <property name="jndiPropertiesFileName" value="jndi.properties"/>
                       <property name="destinationJndiPropertiesFileName" value="destination-jndi.properties"/>
                   </processor>
               </outboundInteraction>
            </binding.jca>
        </sca:reference>
        <sca:reference name="CamelJCAJMSReference" promote="CamelComponent/CamelJCAJMSReference" multiplicity="1..1">
{'fraction_non_alphanumeric': 0.11662772585669783, 'fraction_numerical': 0.008761682242990653, 'mean_word_length': 2.2716560509554142, 'pattern_counts': {'":': 0, '<': 154, '<?xml version=': 2, '>': 154, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 22}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5048426', 'n_tokens_mistral': 2806, 'n_tokens_neox': 2659, 'n_words': 449}