Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?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:p="http://www.springframework.org/schema/p"
- xmlns:aop="http://www.springframework.org/schema/aop"
- xmlns:tx="http://www.springframework.org/schema/tx"
- xmlns:context="http://www.springframework.org/schema/context"
- xmlns:jee="http://www.springframework.org/schema/jee"
- xmlns:mvc="http://www.springframework.org/schema/mvc"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
- http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
- http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd
- http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee.xsd
- http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd
- http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">
- <context:component-scan base-package="admin.mangedbean" use-default-filters="false">
- <context:include-filter expression="org.springframework.stereotype.Controller" type="annotation"/>
- <context:include-filter expression="org.springframework.web.bind.annotation.ControllerAdvice" type="annotation"/>
- </context:component-scan>
- <mvc:annotation-driven/>
- <context:annotation-config/>
- <!-- <bean class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
- <property name="targetClass" value="org.springframework.security.core.context.SecurityContextHolder"/>
- <property name="targetMethod" value="setStrategyName"/>
- <property name="arguments"><list><value>MODE_INHERITABLETHREADLOCAL</value></list></property>
- </bean>-->
- <bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor"/>
- <jee:jndi-lookup jndi-name="jdbc/social_networking" id="dataSourceJNDI" lookup-on-startup="false" proxy-interface="javax.sql.DataSource" cache="true" resource-ref="true" />
- <bean class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean" id="entityManagerFactory" >
- <property name="jpaProperties">
- <props>
- <prop key="hibernate.enable_lazy_load_no_trans">true</prop>
- </props>
- </property>
- <property name="jpaPropertyMap">
- <map>
- <entry key="eclipselink.weaving" value="false"/>
- </map>
- </property>
- <property name="loadTimeWeaver">
- <bean class="org.springframework.instrument.classloading.InstrumentationLoadTimeWeaver"/>
- </property>
- <!--The above activates the weaving, since it's a great improve in performance.
- add this option to your JVM :
- javaagent:/path-to-your-javaagent/org.springframework.instrument-3.2.2.RELEASE.jar
- In Spring 3.x the javaagent is localized in the org.springframework.instrument jar.
- You need the org.springframework.instrument library together with aspectjrj.jar & aspectjweaver.jar librairies.
- -->
- </bean>
- <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
- <property name="entityManagerFactory" ref="entityManagerFactory"/>
- </bean>
- <bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean" lazy-init="true">
- <property name="dataSource" ref="dataSourceJNDI" />
- </bean>
- <tx:annotation-driven transaction-manager="transactionManager"/>
- <bean id="testService" class="admin.dao.TestDAO"/>
- <bean id="stateService" class="admin.dao.StateDAO"/>
- <bean id="sharableService" class="admin.dao.SharableDAO"/>
- </beans>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement