Hi,
I am maintaining an application that has been configured to use declarative transactions, with the following basic elements in the context file:
The application also uses log4j. How do I configure the system so that it tells me in the log output when and where transactions have begun, been committed, or been rolled back?Code:<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> <description>Hibernate session factory definition</description> <property name="dataSource" ref="dataSource"/> <property name="hibernateProperties"> <props> <prop key="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</prop> <prop key="hibernate.jdbc.batch_size">100</prop> </props> </property> </bean> <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"> <property name="sessionFactory" ref="sessionFactory"/> </bean> <bean id="matchRecordDAO" class="infrastructure.match.HibernateMatchRecordDAO"> <property name="sessionFactory" ref="sessionFactory"/> </bean> <bean id="matchService" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean"> <property name="transactionManager" ref="transactionManager"/> <property name="target"> <bean class="service.match.MatchService" init-method="init" destroy-method="shutdown"> <property name="matchRecordDAO" ref="matchRecordDAO"/> </bean> </property> <property name="transactionAttributes"> <props> <prop key="*">PROPAGATION_REQUIRED</prop> </props> </property> </bean>
Thanks,
Ben


Reply With Quote

