I got the same situation. I use Spring 2.5 and Tomcat as web server.
Does any one know about this ?
Session Factory
Code:
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean" singleton="true">
<property name="dataSource">
<ref bean="dataSource"/>
</property>
<property name="hibernateProperties">
<ref bean="hibernateConf"/>
</property>
<property name="annotatedClasses">
<list>
<value>au.com.auscript.template.domain.Message</value>
</list>
</property>
</bean>
hibernateConf
Code:
public class HibernateConfig extends Properties implements HibernateConfigMBean{
private static final String SHOW_SQL = "hibernate.show_sql";
public HibernateConfig() {
setProperty(SHOW_SQL, "true");
}
public void noshowSQL() {
setProperty(SHOW_SQL, "false");
System.out.println(this.getProperty(SHOW_SQL));
}
public void showSQL() {
setProperty(SHOW_SQL, "true");
System.out.println(this.getProperty(SHOW_SQL));
}
}
Thanks
Tony