Please keep in mind that what we PUT in the cahce is a HashMap and we hold the reference to it (activate the GET method) in the system startup as a static memeber.
Here is the code we are using: | | private static HashMap map; | private static final Fqn fqn = new Fqn("OGCache"); | | public static void init() | { | try { | TreeCacheAop cache = new TreeCacheAop(); | PropertyConfigurator config = new PropertyConfigurator(); | config.configure(cache, "replSync-service.xml"); | cache.startService(); | //if the cache is empty --> init it | if ( cache.getObject(fqn) == null){ | cache.putObject(fqn, new HashMap()); | } | map = (HashMap)cache.getObject(fqn); | } | catch (Exception e) { | Debugger.error("error while init cache: " ,e); | } | } | | public static HashMap getCache(){ return map; } | | The init() method is called once just when the servers starts and then we have a reference to the proxy HashMap class. Now, the question is... why when we activate the getCache().get(id) method there is a network trigger? Can we prevent it from going to the network? how? Regards, Yossi View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3881413#3881413 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3881413 ------------------------------------------------------- This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput a projector? How fast can you ride your desk chair down the office luge track? If you want to score the big prize, get to know the little guy. Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20 _______________________________________________ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user