1 23 24 29 30 package com.sun.enterprise.web; 31 32 import java.util.logging.Logger ; 33 import java.util.logging.Level ; 34 import java.util.ArrayList ; 35 import org.apache.catalina.Context; 36 import org.apache.catalina.Container; 37 import org.apache.catalina.core.StandardContext; 38 import org.apache.catalina.session.StandardManager; 39 import com.sun.enterprise.deployment.runtime.web.SessionManager; 42 43 44 public class MemoryStrategyBuilder extends BasePersistenceStrategyBuilder implements PersistenceStrategyBuilder{ 45 46 47 50 51 52 public void initializePersistenceStrategy(Context ctx, SessionManager smBean) { 53 super.initializePersistenceStrategy(ctx, smBean); 54 String persistenceType = "memory"; 55 String ctxPath = ctx.getPath(); 56 if(ctxPath != null && !ctxPath.equals("")) { 57 Object [] params = { ctx.getPath(), persistenceType }; 58 _logger.log(Level.FINE, "webcontainer.noPersistence", params); 59 } 60 StandardManager mgr = new StandardManager(); 61 69 if (sessionFilename == null) { 70 mgr.setPathname(sessionFilename); 71 } else { 72 mgr.setPathname(prependContextPathTo(sessionFilename, ctx)); 73 } 74 StandardContext sctx = (StandardContext) ctx; 75 sctx.restrictedSetPipeline(new WebPipeline(sctx)); 76 77 mgr.setMaxActiveSessions(maxSessions); 78 mgr.setSessionLocker(new PESessionLocker(ctx)); 80 ctx.setManager(mgr); 84 85 if(!sctx.isSessionTimeoutOveridden()) { 87 mgr.setMaxInactiveInterval(sessionMaxInactiveInterval); 88 } 89 } 90 91 } 92 | Popular Tags |