<?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:aop="http://www.springframework.org/schema/aop"
	xmlns:p="http://www.springframework.org/schema/p" xmlns:tx="http://www.springframework.org/schema/tx"
	xmlns:context="http://www.springframework.org/schema/context"
	xmlns:util="http://www.springframework.org/schema/util" xmlns:jee="http://www.springframework.org/schema/jee"
	xsi:schemaLocation="
		   http://www.springframework.org/schema/beans    http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
		   http://www.springframework.org/schema/tx       http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
		   http://www.springframework.org/schema/context  http://www.springframework.org/schema/context/spring-context-3.0.xsd
		   http://www.springframework.org/schema/util     http://www.springframework.org/schema/util/spring-util-3.0.xsd
		   http://www.springframework.org/schema/aop      http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
           http://www.springframework.org/schema/jee      http://www.springframework.org/schema/jee/spring-jee-3.0.xsd ">

	<!-- indica donde spring va a buscar e instanciar las interfaces -->
	<bean id="myBatisScanner" class="org.mybatis.spring.mapper.MapperScannerConfigurer">
		<property name="basePackage" value="com.mx.dla" />
	</bean>		
		
	<!-- * Para crear el factory de los beans, ( factory es la encargada de crear todos los beans ) -->
	<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
		<property name="dataSource" ref="dsDLA" />		
		<property name="configLocation"     value="classpath:mybatis-config.xml" />
		<property name="mapperLocations"    value="classpath:mappers/**/*.xml" />
		<property name="typeAliasesPackage" value="com.mx.dla"/>				
	</bean>

	<!-- Configuramos el transaction manager -->
	<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
		<property name="dataSource" ref="dsDLA" />
	</bean>
	
	<!-- * Para habilitar las transacciones basadas en anotaciones -->
	<tx:annotation-driven transaction-manager="transactionManager" />		

</beans>