Quote:
Do you know how can I access the cache just to see what objects are being cached.
It depends on which implementation you choose for the second Level cache.
Several caches allow to access statistics via JMX,
so you can for example see regarding informations via jconsole on the MBeans tab folder.
JBosscache for example provides very good insight about cache data,
other implementations may rather provide only statistical data about cache usage.
Also the statistics of Hibernate are providing some informations about the second-level cache.
Also the statistics of Hibernate can be bound to JMX:
Code:
StatisticsService statsMBean = new StatisticsService();
statsMBean.setSessionFactory(mysessionfactory);
statsMBean.setStatisticsEnabled(true);