1. How JNDI cache works? coderanch.comHere is what I have done meanwhile. Hashtable env = new Hashtable(); env.put(Context.INITIAL_CONTEXT_FACTORY, "com.ibm.websphere.naming.WsnInitialContextFactory"); env.put(Context.PROVIDER_URL, "iiop://localhost:2810"); Context initialContext = new InitialContext(env); long lookupStartTime = System.currentTimeMillis(); java.lang.Object ejbHome = initialContext .lookup("ejb/com/MyEJBHome"); long lookupEndTime = System.currentTimeMillis(); System.out.println("Lookup for "+"MyEJBHome"+" took "+(lookupEndTime-lookupStartTime) +" ms."); System.out.println("The object is "+ejbHome); I used above code twice. Once inside a servlet and once inside a standalone java app. ... |
2. Use of cache through JNDI coderanch.comI have a webapplication(simple jsp,servlets). There are some desktop applications running on same servers using same database. To increase the performance, i thought of using any caching framework(Oscache,ehcache). Jsp can retrieve some data from database and some other data from cache. A background application can put data into cache and update data at appropriate time. I can put cache in jndi ... |
3. caching the jndi call coderanch.com |