All Downloads are FREE. Search and download functionalities are using the official Maven repository.

dent.lum.ks-lum-ui.1.1.source-code.database-context.xml Maven / Gradle / Ivy

There is a newer version: 2.0.3-cm
Show newest version
<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright 2010 The Kuali Foundation Licensed under the
    Educational Community 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.osedu.org/licenses/ECL-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"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:simple="http://cxf.apache.org/simple"
    xmlns:aop="http://www.springframework.org/schema/aop"
    xmlns:tx="http://www.springframework.org/schema/tx" 
    xsi:schemaLocation="
          http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
          http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
          http://cxf.apache.org/simple http://cxf.apache.org/schemas/simple.xsd
          http://www.springframework.org/schema/tx
          http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
          http://www.springframework.org/schema/aop
          http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">

    <bean id="propertyConfigurer"
        class="org.kuali.student.common.util.ModPropertyPlaceholderConfigurer">
        <property name="locations">
            <list>
                <value>classpath:lum-ui.properties</value>
            </list>
        </property>
        <property name="customConfigSystemProperty" value="ks.config.location"/>
        <property name="customConfigFileLocation" value="file:${user.home}/kuali/main/dev/ks-lum-web.properties" />
    </bean> 

    <!-- Datasources -->
    <bean id="defaultDataSource" abstract="true" class="com.atomikos.jdbc.AtomikosDataSourceBean" init-method="init"
        destroy-method="close">
        <property name="xaDataSourceClassName" value="${jdbc.xaDataSourceClassName}" />
        <property name="maxPoolSize" value="${jdbc.maxPoolSize}" />
        <property name="testQuery" value="${jdbc.validationQuery}"/>
        <property name="xaProperties" value="${propertiesPrefix.jdbc.xaDataSourceProperties}"/>
    </bean>
    
    <bean id="applicationStateDataSource" parent="defaultDataSource">
        <property name="uniqueResourceName" value="applicationStateDataSource" />
    </bean>

    <!-- JPA EntityManagerFactory -->
    <bean id="defaultEntityManagerFactory" abstract="true" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
        <property name="jpaVendorAdapter">
            <bean class="${jpa.vendorAdapter}">
                <property name="databasePlatform"
                    value="${jpa.databasePlatform}" />
                <property name="showSql" value="${jpa.showSql}" />
                <property name="generateDdl" value="${jpa.generateDdl}" />
            </bean>
        </property>
        <property name="jpaPropertyMap" value="${propertiesPrefix.jpa.properties}"/>
    </bean>
    
    <bean id="applicationStateEntityManagerFactory" parent="defaultEntityManagerFactory">
        <property name="persistenceUnitName" value="ApplicationState"/>
        <property name="persistenceXmlLocation"
            value="classpath:META-INF/application-state-persistence.xml" />
        <property name="dataSource" ref="applicationStateDataSource" />
    </bean>

    <!-- JPA annotation processor (injects entity managers using @PersistenceUnit) -->
    <bean
        class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor" />
    
    <!--  Atomikos Transaction Configurations -->
    <bean id="userTransactionService" class="com.atomikos.icatch.config.UserTransactionServiceImp"
        init-method="init" destroy-method="shutdownForce">
        <constructor-arg value="${propertiesPrefix.atomikos.properties}"/>
    </bean>

    <bean id="AtomikosTxMgr"
        class="com.atomikos.icatch.jta.UserTransactionManager"
        init-method="init" destroy-method="close" depends-on="userTransactionService">
        <property name="forceShutdown" value="true" />
        <property name="startupTransactionService" value="true" />
        <property name="transactionTimeout" value="60" />
    </bean>

    <bean id="AtomikosUsrTx"
        class="com.atomikos.icatch.jta.UserTransactionImp" depends-on="userTransactionService"/>

    <bean id="JtaTxManager"
        class="org.springframework.transaction.jta.JtaTransactionManager" depends-on="userTransactionService">
        <property name="transactionManager" ref="AtomikosTxMgr" />
        <property name="userTransaction" ref="AtomikosUsrTx" />
        <property name="transactionSynchronizationName"
            value="SYNCHRONIZATION_ON_ACTUAL_TRANSACTION" />
    </bean>

    <aop:aspectj-autoproxy proxy-target-class="true" />

    <tx:annotation-driven transaction-manager="JtaTxManager" />

</beans>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy