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

commerce.broadleaf-framework.3.1.13-GA.source-code.bl-framework-applicationContext-persistence.xml Maven / Gradle / Ivy

There is a newer version: 3.1.15-GA
Show newest version
<?xml version="1.0" encoding="UTF-8"?>
<!--
  #%L
  BroadleafCommerce Framework
  %%
  Copyright (C) 2009 - 2013 Broadleaf Commerce
  %%
  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.
  #L%
  -->

<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:tx="http://www.springframework.org/schema/tx"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
           http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.2.xsd
           http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.2.xsd">

    <bean id="blMergedEntityContexts" class="org.springframework.beans.factory.config.ListFactoryBean">
        <property name="sourceList">
            <list>
                <value>classpath:bl-framework-applicationContext-entity.xml</value>
            </list>
        </property>
    </bean>

    <bean id="blMergedPersistenceXmlLocations" class="org.springframework.beans.factory.config.ListFactoryBean">
        <property name="sourceList">
            <list>
                <value>classpath*:/META-INF/persistence-framework.xml</value>
            </list>
        </property>
    </bean>
    
    <bean id="blEntityManagerFactorySecureInfo" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean" depends-on="blCacheManager">
        <property name="jpaVendorAdapter" ref="blJpaVendorAdapter"/>
        <property name="persistenceUnitManager" ref="blPersistenceUnitManager" />
        <property name="persistenceUnitName" value="blSecurePU"/>
    </bean>

    <bean id="blTransactionManagerSecureInfo" class="org.springframework.orm.jpa.JpaTransactionManager">
        <property name="entityManagerFactory" ref="blEntityManagerFactorySecureInfo" />
    </bean>

    <tx:advice id="blTxAdviceSecureInfo" transaction-manager="blTransactionManagerSecureInfo">
        <tx:attributes>
          <tx:method name="*" propagation="REQUIRED"/>
        </tx:attributes>
    </tx:advice>

    <!-- Not modifying, legacy stuff so doesn't really matter -->
    <aop:config>
        <aop:pointcut id="blLegacyOrderServiceOperation" expression="execution(* org.broadleafcommerce.core.order.service.legacy.LegacyOrderService.*(..))"/>
        <aop:advisor advice-ref="blTxAdvice" pointcut-ref="blLegacyOrderServiceOperation" order="1"/>
    </aop:config>
    
    <aop:config>
        <aop:pointcut id="blLegacyCartServiceOperation" expression="execution(* org.broadleafcommerce.core.order.service.legacy.LegacyCartService.*(..))"/>
        <aop:advisor advice-ref="blTxAdvice" pointcut-ref="blLegacyCartServiceOperation" order="1"/>
    </aop:config>

</beans>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy