I'm using the new spring declarative transaction management with hibernate3 in my application.
I've a little doubt about the right transaction manager to choose.
For the instance I'm using
I have a single hibernate session factory for all my daos.Code:org.springframework.orm.hibernate3.HibernateTransactionManager
Every things work fine (or seem to work fine). I'm just a little bit troubled by the SQL WARNING below:
I would like to know if it's "normal" to have this warning.Code:0:33:18,296 WARN [JDBCExceptionReporter] SQL Warning: 0, SQLState: 010SK 10:33:18,296 WARN [JDBCExceptionReporter] 010SK: La base de données ne peut pas définir l'option de connexion SET_READONLY_TRUE. 10:33:18,296 WARN [JDBCExceptionReporter] SQL Warning: 0, SQLState: 010SK 10:33:18,296 WARN [JDBCExceptionReporter] 010SK: La base de données ne peut pas définir l'option de connexion SET_READONLY_FALSE. 10:33:18,343 WARN [JDBCExceptionReporter] SQL Warning: 0, SQLState: 010SK 10:33:18,343 WARN [JDBCExceptionReporter] 010SK: La base de données ne peut pas définir l'option de connexion SET_READONLY_TRUE. 10:33:18,343 WARN [JDBCExceptionReporter] SQL Warning: 0, SQLState: 010SK 10:33:18,343 WARN [JDBCExceptionReporter] 010SK: La base de données ne peut pas définir l'option de connexion SET_READONLY_FALSE.
I'd also like to have an advice about the right transaction manager to choose
between
org.springframework.transaction.jta.JtaTransaction Manager and org.springframework.orm.hibernate3.HibernateTransa ctionManager
here is my spring config file:
any help is appreciated.Code:<?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: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-2.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd"> <bean id="mediaTxManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"> <property name="sessionFactory" ref="mediaSessionFactory"/> </bean> <aop:config> <aop:pointcut id="service" expression="execution(* com.natixis.media.services.*.*(..))"/> <aop:advisor advice-ref="txAdvice" pointcut-ref="service"/> </aop:config> <tx:advice id="txAdvice" transaction-manager="mediaTxManager"> <tx:attributes> <tx:method name="find*" read-only="true"/> <tx:method name="*" propagation="REQUIRED"/> </tx:attributes> </tx:advice> <bean id="articleService" class="com.natixis.media.services.ArticleServiceImpl"> <property name="articleDao" ref="articleDAOHibernate"/> <property name="supportDao" ref="supportDAOHibernate"/> <property name="categorieDao" ref="categorieDAOHibernate"/> </bean> </beans>
Meissa


Reply With Quote