Hai,
I am using JndiBoundTreeCacheProvider for second level cache with jndi name "jbosscache". I have table called Employee there i have configure cache usage as "read".At very first time i get the employee details its fetching from database, then its fetching from the cache. i can view this by Cachelistener added to the TreeCache object.
I am able to get the cache object as .,
[code]
Environment env = new Environment();
Context ctx = env.getInitialContext();
TreeCache cache = (TreeCache) ctx.lookup("jbosscache");
[/code]
[color=red] Is it possible to get the employee object that have employeeID-- 100 from this cache....?[/color]
In hibernate.cfg.xml
[code]
<property name="hibernate.cache.provider_class">org.hibernate.cache.JndiBoundTreeCacheProvider</property>
<property name="hibernate.cache.jndi">jbosscache</property>
[/code]
pls urgent...
Thanks in advance.
Regards,
Bala.[/code]
|