Examples of Pool


Examples of org.apache.provisionr.api.pool.Pool

            Rule.builder().anySource().port(53).udp().createRule()
        );

        final Network network = Network.builder().ingress(ingressRules).createNetwork();

        Pool pool = mock(Pool.class);

        when(pool.getProvider()).thenReturn(provider);
        when(pool.getNetwork()).thenReturn(network);

        when(execution.getVariable(CoreProcessVariables.POOL)).thenReturn(pool);
        when(execution.getProcessBusinessKey()).thenReturn(BUSINESS_KEY);

        activity.execute(execution);
View Full Code Here

Examples of org.apache.tapestry.util.pool.Pool

     *
     **/

    protected Pool createPool(RequestContext context)
    {
        Pool result = new Pool();

        result.registerAdaptor(BSFManager.class, new BSFManagerPoolableAdaptor());

        return result;
    }
View Full Code Here

Examples of org.apache.tapestry.util.pool.Pool

    }

    private BSFManager obtainBSFManager(IRequestCycle cycle)
    {
        IEngine engine = cycle.getEngine();
        Pool pool = engine.getPool();

        BSFManager result = (BSFManager) pool.retrieve(BSF_POOL_KEY);

        if (result == null)
        {
            LOG.debug("Creating new BSFManager instance.");
View Full Code Here

Examples of org.apache.tapestry.util.pool.Pool

     *
     **/

    protected Pool createPool(RequestContext context)
    {
        Pool result = new Pool();

        result.registerAdaptor(BSFManager.class, new BSFManagerPoolableAdaptor());

        return result;
    }
View Full Code Here

Examples of org.apache.tapestry.util.pool.Pool

    }

    private BSFManager obtainBSFManager(IRequestCycle cycle)
    {
        IEngine engine = cycle.getEngine();
        Pool pool = engine.getPool();

        BSFManager result = (BSFManager) pool.retrieve(BSF_POOL_KEY);

        if (result == null)
        {
            LOG.debug("Creating new BSFManager instance.");
View Full Code Here

Examples of org.apache.tapestry.util.pool.Pool

     *
     **/

    protected Pool createPool(RequestContext context)
    {
        Pool result = new Pool();

        result.registerAdaptor(BSFManager.class, new BSFManagerPoolableAdaptor());

        return result;
    }
View Full Code Here

Examples of org.apache.tapestry.util.pool.Pool

     *
     **/

    protected Pool createPool(RequestContext context)
    {
        Pool result = new Pool();

        result.registerAdaptor(BSFManager.class, new BSFManagerPoolableAdaptor());

        return result;
    }
View Full Code Here

Examples of org.candlepin.model.Pool

    private Set<String> processPoolUpdates(
        Map<String, EventBuilder> poolEvents, List<PoolUpdate> updatedPools) {
        Set<String> entitlementsToRegen = Util.newSet();
        for (PoolUpdate updatedPool : updatedPools) {

            Pool existingPool = updatedPool.getPool();
            log.info("Pool changed: " + updatedPool.toString());

            // Delete pools the rules signal needed to be cleaned up:
            if (existingPool.isMarkedForDelete()) {
                log.warn("Deleting pool as requested by rules: " +
                    existingPool.getId());
                deletePool(existingPool);
                continue;
            }

            // save changes for the pool
            this.poolCurator.merge(existingPool);

            // Explicitly call flush to avoid issues with how we sync up the attributes.
            // This prevents "instance does not yet exist as a row in the database" errors
            // when we later try to lock the pool if we need to revoke entitlements:
            this.poolCurator.flush();

            // quantity has changed. delete any excess entitlements from pool
            if (updatedPool.getQuantityChanged()) {
                this.deleteExcessEntitlements(existingPool);
            }

            // dates changed. regenerate all entitlement certificates
            if (updatedPool.getDatesChanged() ||
                updatedPool.getProductsChanged() ||
                updatedPool.getBrandingChanged()) {
                List<String> entitlements = poolCurator
                    .retrieveFreeEntitlementIdsOfPool(existingPool, true);
                entitlementsToRegen.addAll(entitlements);
            }
            Event event = poolEvents.get(existingPool.getId())
                    .setNewEntity(existingPool)
                    .buildEvent();
            sink.queueEvent(event);
        }
View Full Code Here

Examples of org.jboss.ejb3.annotation.Pool

      super(finder);
   }

   public void process(JBossEnterpriseBeanMetaData metaData, Class<?> type)
   {
      Pool annotation = finder.getAnnotation(type, Pool.class);
      if(annotation == null)
         return;
     
      PoolConfigMetaData poolConfig = new PoolConfigMetaData();
      poolConfig.setMaxSize(Integer.valueOf(annotation.maxSize()));
      poolConfig.setTimeout(Integer.valueOf((int) annotation.timeout()));
      poolConfig.setValue(annotation.value());
      metaData.setPoolConfig(poolConfig);
   }
View Full Code Here

Examples of org.jboss.ejb3.pool.Pool

   public Object invoke(Invocation invocation) throws Throwable
   {
      EJBContainerInvocation ejb = (EJBContainerInvocation) invocation;
      EJBContainer container = (EJBContainer)ejb.getAdvisor();
      Pool pool = container.getPool();
      BeanContext<?> ctx = pool.get();
      ejb.setTargetObject(ctx.getInstance());
      ejb.setBeanContext(ctx);
      container.pushContext(ctx);

      boolean discard = false;

      try
      {
         return ejb.invokeNext();
      }
      catch (Exception ex)
      {
         discard = (ex instanceof EJBException) ||
                 ((ex instanceof RuntimeException || ex instanceof RemoteException) && !StatefulInstanceInterceptor.isApplicationException(ex.getClass(), container));
         throw ex;
      }
      finally
      {
         container.popContext();
         ejb.setTargetObject(null);
         ejb.setBeanContext(null);
         if (discard) pool.discard(ctx);
         else pool.release(ctx);
      }
   }
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.