Examples of CachePolicy


Examples of org.jboss.util.CachePolicy

         Constructor ctor = securityMgrClass.getConstructor(parameterTypes);
         CallbackHandler handler = (CallbackHandler) callbackHandlerClass.newInstance();
         Object[] args = {securityDomain, handler};
         AuthenticationManager securityMgr = (AuthenticationManager) ctor.newInstance(args);
         log.debug("Created securityMgr="+securityMgr);
         CachePolicy cachePolicy = lookupCachePolicy(securityDomain);
         sdc = new SecurityDomainContext(securityMgr, cachePolicy);
         // See if the security mgr supports an externalized cache policy
         setSecurityDomainCache(securityMgr, cachePolicy);
         if(deepCopySubjectMode)
            setDeepCopySubjectOption(securityMgr, true);
View Full Code Here

Examples of org.jboss.util.CachePolicy

      byte[] clientChallenge = (byte[]) args[1];

      try
      {
         InitialContext iniCtx = new InitialContext();
         CachePolicy cache = (CachePolicy) iniCtx.lookup(cacheJndiName);
         SRPSessionKey key;
         if (userPrincipal instanceof SRPPrincipal)
         {
            SRPPrincipal srpPrincpal = (SRPPrincipal) userPrincipal;
            key = new SRPSessionKey(username, srpPrincpal.getSessionID());
         }
         else
         {
            key = new SRPSessionKey(username);
         }
         Object cacheCredential = cache.get(key);
         if (cacheCredential == null)
         {
            throw new SecurityException("No SRP session found for: " + key);
         }
         log.debug("Found SRP cache credential: " + cacheCredential);
View Full Code Here

Examples of org.jboss.util.CachePolicy

      return initializer;
   }
  
   public CtClassCache createCache()
   {
      CachePolicy policy = null;
      if (policyClass == TimedCachePolicy.class)
         policy = new TimedCachePolicy(lifetime, true, resolution);
      else if (policyClass == LRUCachePolicy.class)
         policy = new LRUCachePolicy(min, max);
      else
      {
         try
         {
            policy = policyClass.newInstance();
         }
         catch(Exception e)
         {
            throw new IllegalStateException("Could not instantiate " + policyClass.getName(), e);
         }
      }
   
      try
      {
         policy.create();
         policy.start();
      }
      catch(Exception e)
      {
         throw new IllegalStateException("Error starting domain cache", e);
      }
View Full Code Here

Examples of org.jboss.util.CachePolicy

      synchronized (getCacheLock())
      {
         BeanCacheSnapshot snapshot = (BeanCacheSnapshot)s;
         snapshot.m_passivatingBeans = 0;
         CachePolicy policy = getCache();
         if (policy instanceof Monitorable)
         {
            ((Monitorable)policy).sample(s);
         }
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.