sage-dao.1.0.25.source-code.message-ds-xa.xml Maven / Gradle / Ivy
<?xml version="1.0" encoding="UTF-8"?> <!-- Copyright 2013-2018 butor.com 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. --> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> <bean name="messageDs" class="org.butor.dao.DataSourceProxy"> <!-- NON XA DataSource --> <property name="dataSource"> <bean parent="baseDs"> <property name="poolName" value="messageCP" /> <property name="maximumPoolSize" value="${message.cp.maxPoolSize:10}" /> <!-- Hikari default 10 connections --> <property name="idleTimeout" value="${message.cp.idleTimeoutMS:600000}" /> <!-- Hikari default 10 minutes --> <property name="maxLifetime" value="${message.cp.maxLifetimeMS:1800000}" /> <!-- Hikari default 30 minutes --> <property name="jdbcUrl" value="${db.message.jdbcUrl}" /> <property name="username" value="${db.message.username}" /> <property name="password"> <bean class="org.butor.spring.StringResourceFactoryBean"> <constructor-arg value="${db.message.passwordFile}" /> </bean> </property> <property name="metricRegistry" ref="messageCPMetricRegistry"/> </bean> </property> <!-- XA DataSource --> <property name="xaDataSource"> <bean parent="baseXaDs"> <property name="uniqueResourceName" value="messageXaCP" /> <property name="xaDataSource"> <bean class="com.mysql.jdbc.jdbc2.optional.MysqlXADataSource"> <property name="pinGlobalTxToPhysicalConnection" value="true" /> <property name="URL" value="${db.message.jdbcUrl}" /> <property name="user" value="${db.message.username}" /> <property name="password"> <bean class="org.butor.spring.StringResourceFactoryBean"> <constructor-arg value="${db.message.passwordFile}" /> </bean> </property> </bean> </property> </bean> </property> </bean> </beans>