-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Accessing TreeCache object
PostPosted: Thu Dec 01, 2005 10:36 am 
Newbie

Joined: Wed Nov 30, 2005 5:29 am
Posts: 4
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");

Is it possible to get the employee object that have employeeID-- 100 from this cache....?

In hibernate.cfg.xml
Code:
<property name="hibernate.cache.provider_class">org.hibernate.cache.JndiBoundTreeCacheProvider</property>
  <property name="hibernate.cache.jndi">jbosscache</property>
 


pls urgent...

Thanks in advance.

Regards,
Bala.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 01, 2005 3:21 pm 
Contributor
Contributor

Joined: Thu Nov 06, 2003 9:49 pm
Posts: 104
Location: New York, NY
Why don't you issue a query to a Hibernate session?
Accessing the 2nd level cache directly sounds like a bad idea.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.