Examples of ExoContainer


Examples of org.exoplatform.container.ExoContainer

      public WSRPSessionLifeCycle()
      {
         try
         {
            ExoContainer container = ExoContainerContext.getCurrentContainer();
            RepositoryService repoService = (RepositoryService)container.getComponentInstanceOfType(RepositoryService.class);
            repository = repoService.getRepository(REPOSITORY_NAME);
         }
         catch (Exception e)
         {
            throw new RuntimeException(e);
View Full Code Here

Examples of org.exoplatform.container.ExoContainer

      public PortletStatesSessionLifeCycle()
      {
         try
         {
            ExoContainer container = ExoContainerContext.getCurrentContainer();
            RepositoryService repoService = (RepositoryService)container.getComponentInstanceOfType(RepositoryService.class);
            repository = repoService.getRepository(REPOSITORY_NAME);
         }
         catch (Exception e)
         {
            throw new RuntimeException(e);
View Full Code Here

Examples of org.exoplatform.container.ExoContainer

    * 4) Flush the {@link ThreadLocal} for the PortalContainer
    */
   public void contextDestroyed(ServletContextEvent event)
   {
      boolean hasBeenSet = false;
      final ExoContainer oldContainer = ExoContainerContext.getCurrentContainer();
      try
      {
         PortalContainer portalContainer = PortalContainer.getInstanceIfPresent();
         if (portalContainer == null)
         {
View Full Code Here

Examples of org.exoplatform.container.ExoContainer

         log.debug("Servlet Path: " + req.getServletPath());
         log.debug("Handler used for this path: " + handler);
      }
      if (handler != null)
      {
         ExoContainer portalContainer = ExoContainerContext.getCurrentContainer();
         RequestLifeCycle.begin(portalContainer);
         try
         {
            handler.execute(this, req, res);
         }
View Full Code Here

Examples of org.exoplatform.container.ExoContainer

    * the current eXo container if it cans be found otherwise it releases filter
    */
   public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException,
      ServletException
   {
      ExoContainer container = getContainer();
      ExtensibleFilter filter = (ExtensibleFilter)container.getComponentInstanceOfType(ExtensibleFilter.class);
      if (filter == null)
      {
         chain.doFilter(request, response);
      }
      else
View Full Code Here

Examples of org.exoplatform.container.ExoContainer

      if (urlPref.startsWith(LOCAL_STRING))
      {
         try
         {
            String gadgetName = urlPref.replaceFirst(LOCAL_STRING, "");
            ExoContainer container = ExoContainerContext.getCurrentContainer();
            GadgetRegistryService gadgetService =
               (GadgetRegistryService)container.getComponentInstanceOfType(GadgetRegistryService.class);
            Gadget gadget = gadgetService.getGadget(gadgetName);
            if (gadget != null)
            {
               return GadgetUtil.reproduceUrl(gadget.getUrl(), gadget.isLocal());
            }
View Full Code Here

Examples of org.exoplatform.container.ExoContainer

         // The cache is not shareable        
         // Avoid potential naming collision by changing the cluster name
         cache.getConfiguration().setClusterName(cache.getConfiguration().getClusterName() + rootFqn.toString().replace('/', '-'));
         return cache;
      }
      ExoContainer container = ExoContainerContext.getCurrentContainer();
      Map<CacheType, Map<ConfigurationKey, Cache>> allCacheTypes = CACHES.get(container);
      if (allCacheTypes == null)
      {
         allCacheTypes = new HashMap<CacheType, Map<ConfigurationKey, Cache>>();
         CACHES.put(container, allCacheTypes);
      }
      Map<ConfigurationKey, Cache> caches = allCacheTypes.get(cacheType);
      if (caches == null)
      {
         caches = new HashMap<ConfigurationKey, Cache>();
         allCacheTypes.put(cacheType, caches);
      }
      Configuration cfg = cache.getConfiguration();
      ConfigurationKey key;
      try
      {
         key = new ConfigurationKey(cfg);
      }
      catch (CloneNotSupportedException e)
      {
         throw new RepositoryConfigurationException("Cannot clone the configuration.", e);
      }
      if (caches.containsKey(key))
      {
         cache = caches.get(key);
      }
      else
      {
         caches.put(key, cache);
         if (log.isInfoEnabled())
            log.info("A new JBoss Cache instance has been registered for the region " + rootFqn + ", a cache of type " + cacheType
               + " and the container " + container.getContext().getName());
      }
      addEvictionRegion(rootFqn, cache, cfg);
      if (log.isInfoEnabled())
         log.info("The region " + rootFqn + " has been registered for a cache of type " + cacheType
            + " and the container " + container.getContext().getName());
      return cache;
   }
View Full Code Here

Examples of org.exoplatform.container.ExoContainer

   public void start()
   {
      try
      {
         ExoContainer container = null;
         if (containerContext == null)
         {
            container = PortalContainer.getInstance();
         }
         else
View Full Code Here

Examples of org.exoplatform.container.ExoContainer

      }
   }

   public void beforeInvoke(Object managedResource)
   {
      ExoContainer container = findContainer();
      if (container != null)
      {
         RequestLifeCycle.begin(container);
      }
   }
View Full Code Here

Examples of org.exoplatform.container.ExoContainer

   /**
    * @see javax.servlet.http.HttpServlet#service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
    */
   public final void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
   {
      final ExoContainer oldContainer = ExoContainerContext.getCurrentContainer();
      // Keep the old ClassLoader
      final ClassLoader currentClassLoader = Thread.currentThread().getContextClassLoader();
      ExoContainer container = null;
      boolean hasBeenSet = false;
      try
      {
         container = getContainer();
         if (!container.equals(oldContainer))
         {
            if (container instanceof PortalContainer)
            {
               PortalContainer.setInstance((PortalContainer)container);
            }
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.