Package org.jboss.cache

Examples of org.jboss.cache.Region.activate()


   protected void createAndActivateRegion(CacheSPI<Object, Object> c, Fqn f)
   {
      Region r = c.getRegion(f, true);
      r.registerContextClassLoader(getClass().getClassLoader());
      r.activate();
   }

   /**
    * Provides a hook for multiplexer integration. This default implementation
    * is a no-op; subclasses that test mux integration would override
View Full Code Here


      if (useRegionBased)
      {
         Region r = cache.getRegion(Fqn.ROOT, true);
         r.registerContextClassLoader(loader);
         r.activate();
      }

      Class clazz = loader.loadFoo();
      Object obj = clazz.newInstance();
View Full Code Here

                  // We don't want a state transfer for a shared region,
                  // as it can include classes from multiple scoped classloaders
                  if (shared)
                     cfg.setFetchInMemoryState(false);

                  jbcRegion.activate();
               }
               finally
               {
                  // Restore the normal state transfer setting
                  if (shared)
View Full Code Here

               plainCache_.getInvocationContext().getOptionOverrides().setCacheModeLocal(true);
               root.addChild(pathFqn);
            }
            Region region = plainCache_.getRegion(pathFqn, true);
            region.registerContextClassLoader(webAppClassLoader_);
            region.activate();
         }
         catch (Exception ex)
         {
            throw new RuntimeException("Can't register class loader", ex);
         }
View Full Code Here

               plainCache_.getInvocationContext().getOptionOverrides().setCacheModeLocal(true);
               root.addChild(pathFqn);
            }
            Region region = plainCache_.getRegion(pathFqn, true);
            region.registerContextClassLoader(webAppClassLoader_);
            region.activate();
         }
         catch (Exception ex)
         {
            throw new RuntimeException("Can't register class loader", ex);
         }
View Full Code Here

               plainCache_.getInvocationContext().getOptionOverrides().setCacheModeLocal(true);
               root.addChild(pathFqn);
            }
            Region region = plainCache_.getRegion(pathFqn, true);
            region.registerContextClassLoader(webAppClassLoader_);
            region.activate();
         }
         catch (Exception ex)
         {
            throw new RuntimeException("Can't register class loader", ex);
         }
View Full Code Here

/*     */       {
/* 317 */         if (!SecondLevelCacheUtil.isSharedClassLoaderRegion(regionName))
/*     */         {
/* 319 */           region.registerContextClassLoader(Thread.currentThread().getContextClassLoader());
/*     */         }
/* 321 */         region.activate();
/*     */       }
/*     */       catch (Exception e)
/*     */       {
/* 325 */         throw SecondLevelCacheUtil.convertToHibernateException(e);
/*     */       }
View Full Code Here

/*     */       {
/* 355 */         if (!isSharedClassLoaderRegion(regionName))
/*     */         {
/* 357 */           region.registerContextClassLoader(Thread.currentThread().getContextClassLoader());
/*     */         }
/* 359 */         region.activate();
/*     */       }
/*     */       catch (Exception e)
/*     */       {
/* 363 */         throw SecondLevelCacheUtil.convertToHibernateException(e);
/*     */       }
View Full Code Here

             // If it's shared, no single classloader is valid
             if (!isSharedClassLoaderRegion(regionName))
             {
                region.registerContextClassLoader(Thread.currentThread().getContextClassLoader());
             }
             region.activate();
          }
          catch (Exception e)
          {
             throw SecondLevelCacheUtil.convertToHibernateException(e);
          }
View Full Code Here

             // If it's shared, no single classloader is valid
             if (!SecondLevelCacheUtil.isSharedClassLoaderRegion(regionName))
             {
                region.registerContextClassLoader(Thread.currentThread().getContextClassLoader());
             }
             region.activate();
          }
          catch (Exception e)
          {
             throw SecondLevelCacheUtil.convertToHibernateException(e);
          }
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.