I enabled the log
log4j.logger.org.hibernate.cache=debug
log4j.logger.net.sf.ehcache=debug
But Still it seems that it is getting fetched from database due to the time difference value.
Code:
15:54:10,334 DEBUG ConfigurationFactory: Configuring ehcache from ehcache.xml found in the classpath: file:/C:/TestHiber
nateProject/bin/ehcache.xml
15:54:10,334 DEBUG ConfigurationFactory: Configuring ehcache from URL: file:/C:/TestHibernateProject/bin/ehcache.xml
15:54:10,350 DEBUG ConfigurationFactory: Configuring ehcache from InputStream
15:54:10,381 DEBUG DiskStoreConfiguration: Disk Store Path: C:\DOCUME~1\currentuser\LOCALS~1\Temp\
15:54:10,475 DEBUG PropertyUtil: propertiesString is null.
15:54:10,491 DEBUG ConfigurationHelper: No CacheManagerEventListenerFactory class specified. Skipping...
15:54:10,678 DEBUG Cache: No BootstrapCacheLoaderFactory class specified. Skipping...
15:54:10,678 DEBUG Cache: CacheWriter factory not configured. Skipping...
15:54:10,678 DEBUG ConfigurationHelper: No CacheExceptionHandlerFactory class specified. Skipping...
15:54:10,694 DEBUG Cache: No BootstrapCacheLoaderFactory class specified. Skipping...
15:54:10,694 DEBUG Cache: CacheWriter factory not configured. Skipping...
15:54:10,694 DEBUG ConfigurationHelper: No CacheExceptionHandlerFactory class specified. Skipping...
15:54:10,694 DEBUG Cache: No BootstrapCacheLoaderFactory class specified. Skipping...
15:54:10,694 DEBUG Cache: CacheWriter factory not configured. Skipping...
15:54:10,694 DEBUG ConfigurationHelper: No CacheExceptionHandlerFactory class specified. Skipping...
15:54:10,709 DEBUG DiskOverflowStorageFactory: Deleting data file WasteClassificationBean.data
15:54:10,772 DEBUG Cache: Initialised cache: WasteClassificationBean
15:54:10,772 DEBUG ConfigurationHelper: CacheDecoratorFactory not configured. Skipping for 'WasteClassificationBean'.
15:54:10,772 DEBUG ConfigurationHelper: CacheDecoratorFactory not configured for defaultCache. Skipping for 'WasteClassificationBean'.
15:54:10,772 DEBUG DiskOverflowStorageFactory: Deleting data file query.findRtsDetails.data
15:54:10,772 DEBUG Cache: Initialised cache: query.findRtsDetails
15:54:10,772 DEBUG ConfigurationHelper: CacheDecoratorFactory not configured. Skipping for 'query.findRtsDetails'.
15:54:10,772 DEBUG ConfigurationHelper: CacheDecoratorFactory not configured for defaultCache. Skipping for 'query.findRtsDetails'.
15:54:10,819 WARN EhcacheAccessStrategyFactoryImpl: read-only cache configured for mutable entity [WasteClassificationBean]
15:54:11,694 DEBUG UpdateChecker: Checking for update...
15:54:11,709 DEBUG UpdateChecker: Update check failed: java.net.UnknownHostException: www.terracotta.org
15:54:34,976 DEBUG ConfigurationFactory: Configuring ehcache from ehcache.xml found in the classpath: file:/C:/TestHibernateProject/bin/ehcache.xml
15:54:34,976 DEBUG ConfigurationFactory: Configuring ehcache from URL: file:/C:/TestHibernateProject/bin/ehcache.xml
15:54:35,008 DEBUG ConfigurationFactory: Configuring ehcache from InputStream
15:54:35,039 DEBUG DiskStoreConfiguration: Disk Store Path: C:\DOCUME~1\currentuser\LOCALS~1\Temp\
15:54:35,039 DEBUG PropertyUtil: propertiesString is null.
15:54:35,101 WARN CacheManager: Creating a new instance of CacheManager using the diskStorePath "C:\DOCUME~1\currentuser\LOCALS~1\Temp\" which is a
lready used by an existing CacheManager.
The source of the configuration was net.sf.ehcache.config.generator.ConfigurationSource$DefaultConfigurationSource@10deb5f.
The diskStore path for this CacheManager will be set to C:\DOCUME~1\currentuser\LOCALS~1\Temp\\ehcache_auto_created_1320056675101.
To avoid this warning consider using the CacheManager factory methods to create a singleton CacheManager or specifying a separate ehcache configu
ration (ehcache.xml) for each CacheManager instance.
15:54:35,101 DEBUG ConfigurationHelper: No CacheManagerEventListenerFactory class specified. Skipping...
15:54:35,101 DEBUG Cache: No BootstrapCacheLoaderFactory class specified. Skipping...
15:54:35,101 DEBUG Cache: CacheWriter factory not configured. Skipping...
15:54:35,101 DEBUG ConfigurationHelper: No CacheExceptionHandlerFactory class specified. Skipping...
15:54:35,117 DEBUG Cache: No BootstrapCacheLoaderFactory class specified. Skipping...
15:54:35,117 DEBUG Cache: CacheWriter factory not configured. Skipping...
15:54:35,117 DEBUG ConfigurationHelper: No CacheExceptionHandlerFactory class specified. Skipping...
15:54:35,117 DEBUG Cache: No BootstrapCacheLoaderFactory class specified. Skipping...
15:54:35,117 DEBUG Cache: CacheWriter factory not configured. Skipping...
15:54:35,117 DEBUG ConfigurationHelper: No CacheExceptionHandlerFactory class specified. Skipping...
15:54:35,117 DEBUG DiskOverflowStorageFactory: Deleting data file WasteClassificationBean.data
15:54:35,117 DEBUG Cache: Initialised cache: WasteClassificationBean
15:54:35,117 DEBUG ConfigurationHelper: CacheDecoratorFactory not configured. Skipping for 'WasteClassificationBean'.
15:54:35,117 DEBUG ConfigurationHelper: CacheDecoratorFactory not configured for defaultCache. Skipping for 'WasteClassificationBean'.
15:54:35,133 DEBUG DiskOverflowStorageFactory: Deleting data file query.findRtsDetails.data
15:54:35,133 DEBUG Cache: Initialised cache: query.findRtsDetails
15:54:35,133 DEBUG ConfigurationHelper: CacheDecoratorFactory not configured. Skipping for 'query.findRtsDetails'.
15:54:35,133 DEBUG ConfigurationHelper: CacheDecoratorFactory not configured for defaultCache. Skipping for 'query.findRtsDetails'.
15:54:35,133 WARN EhcacheAccessStrategyFactoryImpl: read-only cache configured for mutable entity [WasteClassificationBean]
15:54:36,117 DEBUG UpdateChecker: Checking for update...
15:54:36,133 DEBUG UpdateChecker: Update check failed: java.net.UnknownHostException: www.terracotta.org
Hibernate: select wasteclass0_.WASTE_CLSF_ID as WASTE1_2_, wasteclass0_.CHEMICAL_NAME as CHEMICAL3_2_, ......................{full query print}................where wasteclass0_.CHEMICAL_NA
ME like ?
Time Difference :: 19235
Hibernate: {repeat query as above}
Time Difference :: 17782
Hibernate: {repeat query as above}
Time Difference :: 16939
Hibernate: {repeat query as above}
Time Difference :: 18704
Hibernate: {repeat query as above}
Time Difference :: 18329
It seems that it is still fetching from database. :(