Package com.sun.ejb.containers

Examples of com.sun.ejb.containers.BaseContainer$BeanContext


/*     */   private void freeAll()
/*     */   {
/* 267 */     LinkedList clone = (LinkedList)this.pool.clone();
/* 268 */     for (int i = 0; i < clone.size(); i++)
/*     */     {
/* 270 */       BeanContext bc = (BeanContext)clone.get(i);
/*     */
/* 272 */       discard(bc);
/*     */     }
/* 274 */     this.pool.clear();
/* 275 */     this.inUse = 0;
View Full Code Here


/*  73 */     return create(null, null);
/*     */   }
/*     */
/*     */   protected BeanContext<?> create(Class[] initTypes, Object[] initValues)
/*     */   {
/*  79 */     BeanContext ctx = createBeanContext();
/*     */
/*  93 */     this.container.pushContext(ctx);
/*     */     try
/*     */     {
/*  96 */       if (this.injectors != null)
/*     */       {
/*  98 */         for (int i = 0; i < this.injectors.length; i++)
/*     */         {
/* 100 */           this.injectors[i].inject(ctx);
/*     */         }
/*     */       }
/*     */
/* 104 */       ctx.initialiseInterceptorInstances();
/*     */     }
/*     */     finally
/*     */     {
/* 109 */       this.container.popContext();
/*     */     }
/*     */
/* 118 */     this.container.invokePostConstruct(ctx, initValues);
/*     */
/* 121 */     this.container.invokeInit(ctx.getInstance(), initTypes, initValues);
/*     */
/* 123 */     this.createCount += 1;
/*     */
/* 125 */     return ctx;
/*     */   }
View Full Code Here

/*  76 */     this.inUse = 0;
/*     */   }
/*     */
/*     */   public BeanContext get()
/*     */   {
/*  81 */     BeanContext ctx = null;
/*     */
/*  83 */     synchronized (this.pool)
/*     */     {
/*  85 */       ctx = (BeanContext)this.currentBeanContext.get();
/*  86 */       if (ctx != null)
View Full Code Here

/*  97 */     return ctx;
/*     */   }
/*     */
/*     */   public BeanContext get(Class[] initTypes, Object[] initValues)
/*     */   {
/* 102 */     BeanContext ctx = null;
/* 103 */     synchronized (this.pool)
/*     */     {
/* 105 */       ctx = (BeanContext)this.currentBeanContext.get();
/* 106 */       if (ctx != null)
/*     */       {
View Full Code Here

      ThreadlocalPool pool = new ThreadlocalPool();
      Container container = new MockContainer();
      int maxSize = -1;
      int timeout = -1;
      pool.initialize(container, maxSize, timeout);
      BeanContext ctx = pool.get();
      pool.release(ctx);
     
      ctx = null;
     
      gc();
View Full Code Here

     
      Runnable r = new Runnable()
      {
         public void run()
         {
            BeanContext ctx = pool.get();
            pool.release(ctx);
           
            ctx = null;
            used++;
         }
View Full Code Here

      {
         public void run()
         {
            for(int i = 0; i < 10; i++)
            {
               BeanContext ctx = pool.get();
               pool.release(ctx);
              
               ctx = null;
               used++;
            }
View Full Code Here

      {
         public void run()
         {
            for(int i = 0; i < 10; i++)
            {
               BeanContext ctx = pool.get();
               BeanContext ctx2 = pool.get();
              
               pool.release(ctx2);
               ctx2 = null;
               used ++;
              
View Full Code Here

      inUse.getAndSet(0);
   }
  
   public BeanContext get()
   {
      BeanContext ctx = currentBeanContext.get();
      if (ctx != null)
         currentBeanContext.set(null);
      else
         ctx = create();
View Full Code Here

      return ctx;
   }

   public BeanContext get(Class[] initTypes, Object[] initValues)
   {
      BeanContext ctx = currentBeanContext.get();
      if (ctx != null)
         currentBeanContext.set(null);
      else
         ctx = create(initTypes, initValues);
View Full Code Here

TOP

Related Classes of com.sun.ejb.containers.BaseContainer$BeanContext

Copyright © 2018 www.massapicom. 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.