Package org.jboss.util

Examples of org.jboss.util.TimedCachePolicy.start()


      public Object invoke(Object obj, Method method, Object[] args) throws Throwable
      {
         TimedCachePolicy cachePolicy = new TimedCachePolicy(defaultCacheTimeout,
            true, defaultCacheResolution);
         cachePolicy.create();
         cachePolicy.start();
         return cachePolicy;
      }
   }

   static ClassLoader getContextClassLoader()
View Full Code Here


      TimedCachePolicy cachePolicy =
          new AuthenticationTimedCachePolicy(SecurityConstantsBridge.defaultCacheTimeout,
                               true,
                               SecurityConstantsBridge.defaultCacheResolution);
      cachePolicy.create();
      cachePolicy.start();
      return cachePolicy;
   }
  
   /**
    * Since the maps are transient, initialize them
View Full Code Here

      JBossSecurityContext context = new JBossSecurityContext("TestApp");
      JBossAuthenticationManager authenticationManager = (JBossAuthenticationManager) context.getAuthenticationManager();
      TimedCachePolicy domainCache = new TimedCachePolicy();
      domainCache.create();
      domainCache.start();
      authenticationManager.setCachePolicy(domainCache);
      NonSerializableFactory.rebind(ctx, "java:AuthenticationManager", authenticationManager);
   }

   @Test
View Full Code Here

      public Object invoke(Object obj, Method method, Object[] args) throws Throwable
      {
         TimedCachePolicy cachePolicy = new TimedCachePolicy(defaultCacheTimeout,
            true, defaultCacheResolution);
         cachePolicy.create();
         cachePolicy.start();
         return cachePolicy;
      }
   }
}
View Full Code Here

      TimedCachePolicy cachePolicy =
          new TimedCachePolicy(SecurityConstantsBridge.defaultCacheTimeout,
                               true,
                               SecurityConstantsBridge.defaultCacheResolution);
      cachePolicy.create();
      cachePolicy.start();
      return cachePolicy;
   }
  
   /**
    * Since the maps are transient, initialize them
View Full Code Here

      public Object invoke(Object obj, Method method, Object[] args) throws Throwable
      {
         TimedCachePolicy cachePolicy = new TimedCachePolicy(defaultCacheTimeout,
            true, defaultCacheResolution);
         cachePolicy.create();
         cachePolicy.start();
         return cachePolicy;
      }
   }
}
View Full Code Here

          new SubjectPolicyContextHandler(), false);
      AuthorizationManager am = new JBossAuthorizationManager("testIdentity");
      JaasSecurityManager secMgr = new JaasSecurityManager("testIdentity", new SecurityAssociationHandler());
      TimedCachePolicy cache = new TimedCachePolicy(3, false, 100);
      cache.create();
      cache.start();
      secMgr.setCachePolicy(cache);
      Thread[] testThreads = new Thread[count];
      AuthTester[] testers = new AuthTester[count];
      for(int t = 0; t < count; t ++)
      {
View Full Code Here

      SimplePrincipal jduke = new SimplePrincipal("jduke");
      CallbackHandler handler = new SecurityAssociationHandler(jduke, "theduke".toCharArray());
      JaasSecurityManager sm = new JaasSecurityManager("testStringCharArrayCredential", handler);
      TimedCachePolicy cache = new TimedCachePolicy(600, true, 10);
      cache.create();
      cache.start();
      sm.setCachePolicy(cache);

      // Initial validation to populate the cache
      assertTrue(sm.isValid(jduke, "theduke"));
      // Validate that the String credential form uses the cache
View Full Code Here

      SimplePrincipal jduke = new SimplePrincipal("jduke");
      CallbackHandler handler = new SecurityAssociationHandler(jduke, "theduke".toCharArray());
      JaasSecurityManager sm = new JaasSecurityManager("testStringCharArrayCredential", handler);
      TimedCachePolicy cache = new TimedCachePolicy(600, true, 10);
      cache.create();
      cache.start();
      sm.setCachePolicy(cache);

      // Reset the validation count
      CountedLoginModule.validateCount = 0;
      // Initial validation to populate the cache
View Full Code Here

    */
   public void testSetResolution() throws Exception
   {
      TimedCachePolicy tcp = new TimedCachePolicy(5, true, 1);
      tcp.create();
      tcp.start();
      tcp.insert("key", "value");
      tcp.setResolution(2);
      Object value = tcp.get("key");
      assertTrue("key has a value", value != null);
      Thread.sleep(8000);
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.