<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util"
	xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
	xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd">
	<!--
		This bean sets up property replacement so that variables can be
		externalized to system properties
	-->
	<bean
		class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
		<property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE" />
	</bean>
	
	<bean id="aop-proxy" class="gov.va.med.cds.log4j.RuntimeConfigurableJmsAppender">
		<property name="initialContextFactoryName" value="weblogic.jndi.WLInitialContextFactory" />
		<!--
			This is the default value and can be over-ridden by the system
			property 'cds.jndi.provider.url'
		-->
		
		<property name="providerURL" value="t3://localhost:7000" />
		<!-- <property name="providerURL" value="${cds.jndi.provider.url}" /> -->
		<property name="queueConnectionFactoryBindingName" value="jms/cds/LoggerConnectionFactory" />
		<property name="queueBindingName" value="jms/cds/LoggerQueue" />
	</bean>
	
	<bean id="appenderTransactionManager" class="org.springframework.transaction.jta.WebLogicJtaTransactionManager" />
	<aop:config>
		<aop:pointcut id="appenderTxMethods" expression="execution(* org.apache.logging.log4j.core.Appender.*(..))" />
		<aop:advisor advice-ref="appenderTxAdvice" pointcut-ref="appenderTxMethods" order="1" />
	</aop:config>
	
	<tx:advice id="appenderTxAdvice" transaction-manager="appenderTransactionManager">
		<tx:attributes>
			<tx:method name="append" propagation="REQUIRES_NEW" isolation="READ_COMMITTED" />
		</tx:attributes>
	</tx:advice>
	
</beans>