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

samples.crud.crud-core.3.4.source-code.applicationContext.xml Maven / Gradle / Ivy

The newest version!
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated by: applicationContext.xml.vsl in andromda-spring-cartridge. -->
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:lang="http://www.springframework.org/schema/lang"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-3.0.xsd">

    <!-- ========================= GENERAL DEFINITIONS ========================= -->

    <!-- Message source for this context, loaded from localized "messages_xx" files -->
    <bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
        <property name="basename"><value>messages</value></property>
    </bean>

    <!-- applicationContext merge-point -->
    <bean id="hibernateMappingLocations" class="org.springframework.beans.factory.config.ListFactoryBean">
        <property name="sourceList">
            <list>
                <!-- applicationContext hibernateMappingLocations merge-point -->
                <value>classpath:org/andromda/samples/crud/home/Home.hbm.xml</value>
                <value>classpath:org/andromda/samples/crud/garden/Garden.hbm.xml</value>
                <value>classpath:org/andromda/samples/crud/flower/Flower.hbm.xml</value>
                <value>classpath:org/andromda/samples/crud/room/Room.hbm.xml</value>
                <value>classpath:org/andromda/samples/crud/color/Color.hbm.xml</value>
            </list>
         </property>
    </bean>

    <bean id="hibernateProperties" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
        <property name="properties">
            <props>
                <prop key="hibernate.show_sql">${hibernate.db.showSql}</prop>
                <prop key="hibernate.default_batch_fetch_size">16</prop>
                <prop key="hibernate.hbm2ddl.auto">update</prop>
                <prop key="hibernate.cache.provider_class">org.hibernate.cache.EhCacheProvider</prop>
                <prop key="hibernate.cache.query_cache_factory">org.hibernate.cache.StandardQueryCacheFactory</prop>
                <!-- add specific (non-supported in the Spring cartridge) hibernate properties here -->
            </props>
        </property>
    </bean>

    <!-- Hibernate SessionFactory -->
    <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
        <property name="dataSource" ref="dataSource"/>
        <property name="mappingLocations" ref="hibernateMappingLocations"/>
        <property name="hibernateProperties" ref="hibernateProperties"/>
        <!-- applicationContext sessionFactory merge-point -->
    </bean>

    <!-- The Hibernate interceptor -->
    <bean id="hibernateInterceptor" class="org.springframework.orm.hibernate3.HibernateInterceptor">
        <property name="sessionFactory" ref="sessionFactory"/>
        <!-- applicationContext hibernateInterceptor merge-point -->
    </bean>

    <bean id="org.andromda.samples.crud.home.HomeDaoImpl" class="org.andromda.samples.crud.home.HomeDaoImpl">
        <property name="sessionFactory" ref="sessionFactory"/>
        <!-- Home entity property merge-point -->
    </bean>

    <!-- Home Entity Proxy with inner Home Entity implementation -->
    <bean id="homeDao" class="org.springframework.aop.framework.ProxyFactoryBean">
        <property name="target" ref="org.andromda.samples.crud.home.HomeDaoImpl"/>
        <property name="proxyInterfaces" value="org.andromda.samples.crud.home.HomeDao"/>
        <property name="interceptorNames">
            <list>
                <value>hibernateInterceptor</value>
            </list>
        </property>
    </bean>

    <bean id="org.andromda.samples.crud.garden.GardenDaoImpl" class="org.andromda.samples.crud.garden.GardenDaoImpl">
        <property name="sessionFactory" ref="sessionFactory"/>
        <!-- Garden entity property merge-point -->
    </bean>

    <!-- Garden Entity Proxy with inner Garden Entity implementation -->
    <bean id="gardenDao" class="org.springframework.aop.framework.ProxyFactoryBean">
        <property name="target" ref="org.andromda.samples.crud.garden.GardenDaoImpl"/>
        <property name="proxyInterfaces" value="org.andromda.samples.crud.garden.GardenDao"/>
        <property name="interceptorNames">
            <list>
                <value>hibernateInterceptor</value>
            </list>
        </property>
    </bean>

    <bean id="org.andromda.samples.crud.flower.FlowerDaoImpl" class="org.andromda.samples.crud.flower.FlowerDaoImpl">
        <property name="sessionFactory" ref="sessionFactory"/>
        <!-- Flower entity property merge-point -->
    </bean>

    <!-- Flower Entity Proxy with inner Flower Entity implementation -->
    <bean id="flowerDao" class="org.springframework.aop.framework.ProxyFactoryBean">
        <property name="target" ref="org.andromda.samples.crud.flower.FlowerDaoImpl"/>
        <property name="proxyInterfaces" value="org.andromda.samples.crud.flower.FlowerDao"/>
        <property name="interceptorNames">
            <list>
                <value>hibernateInterceptor</value>
            </list>
        </property>
    </bean>

    <bean id="org.andromda.samples.crud.room.RoomDaoImpl" class="org.andromda.samples.crud.room.RoomDaoImpl">
        <property name="sessionFactory" ref="sessionFactory"/>
        <!-- Room entity property merge-point -->
    </bean>

    <!-- Room Entity Proxy with inner Room Entity implementation -->
    <bean id="roomDao" class="org.springframework.aop.framework.ProxyFactoryBean">
        <property name="target" ref="org.andromda.samples.crud.room.RoomDaoImpl"/>
        <property name="proxyInterfaces" value="org.andromda.samples.crud.room.RoomDao"/>
        <property name="interceptorNames">
            <list>
                <value>hibernateInterceptor</value>
            </list>
        </property>
    </bean>

    <bean id="org.andromda.samples.crud.color.ColorDaoImpl" class="org.andromda.samples.crud.color.ColorDaoImpl">
        <property name="sessionFactory" ref="sessionFactory"/>
        <!-- Color entity property merge-point -->
    </bean>

    <!-- Color Entity Proxy with inner Color Entity implementation -->
    <bean id="colorDao" class="org.springframework.aop.framework.ProxyFactoryBean">
        <property name="target" ref="org.andromda.samples.crud.color.ColorDaoImpl"/>
        <property name="proxyInterfaces" value="org.andromda.samples.crud.color.ColorDao"/>
        <property name="interceptorNames">
            <list>
                <value>hibernateInterceptor</value>
            </list>
        </property>
    </bean>

    <!-- ========================= Start of SERVICE DEFINITIONS ========================= -->

    <!-- ========================= End of SERVICE DEFINITIONS ========================= -->

</beans>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy