Results 1 to 4 of 4

Thread: Debugging Declarative Transactions

  1. #1
    Join Date
    Nov 2006
    Posts
    12

    Default Debugging Declarative Transactions

    Hi,

    I am maintaining an application that has been configured to use declarative transactions, with the following basic elements in the context file:

    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>
    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?

    Thanks,
    Ben

  2. #2
    Join Date
    Nov 2005
    Location
    Reutlingen, Germany
    Posts
    2,098

    Default

    Just raise the log level. It should be sufficient to do this for the transaction package.

    Joerg
    This post can contain insufficient information.

  3. #3
    Join Date
    Nov 2006
    Posts
    12

    Default

    Thanks!
    There is stacks of other information now, but the transaction indicators are in there.

  4. #4
    Join Date
    Nov 2005
    Location
    Reutlingen, Germany
    Posts
    2,098

    Default

    Quote Originally Posted by pokeefb View Post
    There is stacks of other information now, but the transaction indicators are in there.
    That's why I recommended to limit it to org.springframework.transaction

    Joerg
    This post can contain insufficient information.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •