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:jee="http://www.springframework.org/schema/jee"
- xmlns:aop="http://www.springframework.org/schema/aop"
- xmlns:tx="http://www.springframework.org/schema/tx"
- xmlns:context="http://www.springframework.org/schema/context"
- xsi:schemaLocation=" http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/context
- http://www.springframework.org/schema/context/spring-context-3.0.xsd
- http://www.springframework.org/schema/jee
- http://www.springframework.org/schema/jee/spring-jee-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/aop
- http://www.springframework.org/schema/aop/spring-aop-3.0.xsd">
- <context:annotation-config />
- <tx:annotation-driven transaction-manager="txManager" />
- <bean id="transactionManager"
- class="org.springframework.jdbc.datasource.DataSourceTransactionManager" >
- <property name="DataSource" ref="DataSource" />
- </bean>
- <tx:advice id="txAdvice" transaction-manager="transactionManager">
- <tx:attributes>
- <tx:method name="add*" propagation="REQUIRED" />
- </tx:attributes>
- </tx:advice>
- <aop:config>
- <aop:advisor
- id="advisor"
- pointcut-ref="pointcut"
- advice-ref="txAdvice" />
- </aop:config>
- <aop:config>
- <aop:pointcut
- id="pointcut"
- expression="execution(* com.example.JdbcJobDAO.*(..))" />
- </aop:config>
- <bean id="DataSource"
- class="org.springframework.jdbc.datasource.DriverManagerDataSource">
- <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver" />
- <property name="url" value="jdbc:oracle:thin:@localhost:1521:xe" />
- <property name="username" value="system" />
- <property name="password" value="1234" />
- </bean>
- <bean id="jdbcTemplate"
- class="org.springframework.jdbc.core.JdbcTemplate">
- <constructor-arg ref="DataSource" />
- </bean>
- <bean id="jdbcJobDAOImpl" class="com.example.JdbcJobDAOImpl">
- <property name="jdbcTemplate" ref="jdbcTemplate" />
- </bean>
Add Comment
Please, Sign In to add comment