When I check hibernate statistics service in jconsole for my Spring MVC application I only have statistics for one entity that implements UserDetails and when I run queries for other entities nothing changes in statistics.
In my config file I have
Code:
<context:mbean-server />
    
<context:mbean-export registration="ignoreExisting"/>

<bean id="statisticsService" class="org.hibernate.jmx.StatisticsService">
        <property name="statisticsEnabled" value="true" />
    
    	<property name="sessionFactory" ref="sessionFactory"/>
</bean>
	
<bean id="sessionFactory"
		class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
		<property name="dataSource" ref="dataSource" />
		<property name="packagesToScan" value="com.abc.def.db">

		</property>
		<property name="hibernateProperties">
			<value>						  
				hibernate.format_sql=true
				hibernate.show_sql=true
				hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
				hibernate.generate_statistics=true
			</value>
		</property>
</bean>

I tried to add implements Serializable to some entities because UserDetails implements Serializable but still nothing.

How can I get statistics for other entities?