ComponentManager
142143144145146147148149150151152153154155156157158159160161162163164165166167168
{ // initialize super.init(config); // get jetspeed component manager configuration for decorations ComponentManager cm = Jetspeed.getComponentManager(); int count =0; while(cm == null) { try { Thread.sleep(200); } catch(InterruptedException ie) { } cm = Jetspeed.getComponentManager(); if( count > 5 ) { if (null == cm) throw new ServletException("Could not get Jetspeed Component Manager after "+count+"tries"); } count++; } decorationLocator = (TemplateLocator) cm.getComponent("DecorationLocator"); // initialize thread safe velocity engine cache int cacheSize = (int) getLongInitParameter(config, CACHE_SIZE_PARAMETER, DEFAULT_CACHE_SIZE); velocityEngineConfigCache = new LRUMap(cacheSize); velocityEngineCache = new LRUMap(cacheSize/2);