Package javax.enterprise.context.spi

Examples of javax.enterprise.context.spi.Contextual.destroy()


               
                ViewScopeContextObject contextObject = entry.getValue();
                CreationalContext creationalContext = beanManager.createCreationalContext(contextual);
                // We can no longer get this from the contextObject. Instead we must call
                // beanManager.createCreationalContext(contextual)
                contextual.destroy(viewMap.get(contextObject.getName()), creationalContext);
                removalNameList.add(contextObject.getName());
            }

            Iterator<String> removalNames = removalNameList.iterator();
            while (removalNames.hasNext()) {
View Full Code Here


        if (contextMap != null) {
            for (Map.Entry<Contextual, ViewScopeContextObject> entry : contextMap.entrySet()) {
                Contextual contextual = entry.getKey();
                ViewScopeContextObject contextObject = entry.getValue();
                CreationalContext creationalContext = contextObject.getCreationalContext();
                contextual.destroy(viewMap.get(contextObject.getName()), creationalContext);
                removalNameList.add(contextObject.getName());
            }

            Iterator<String> removalNames = removalNameList.iterator();
            while (removalNames.hasNext()) {
View Full Code Here

        for (Entry<Contextual<?>, Object> entry : flowScopedBeanMap.entrySet()) {
            Contextual owner = entry.getKey();
            Object bean = entry.getValue();
            CreationalContext creational = creationalMap.get(owner);
           
            owner.destroy(bean, creational);
            flowScopedBeansToRemove.add(owner);
        }
       
        for (Contextual<?> cur : flowScopedBeansToRemove) {
            flowScopedBeanMap.remove(cur);
View Full Code Here

        Contextual contextual = getContextualStore().getContextual(id);
        Object instance = store.getInstance(id);
        CreationalContext creationalContext = store.getCreationalContext(id);
       
        if (contextual!=null && instance!=null){
          contextual.destroy(instance, creationalContext);
        }
      }
    }
  }
 
View Full Code Here

     
      if (ref != null) {
        value = ref.get();

        if (value != null)
          bean.destroy(value, null);
      }
    }
  }
}
View Full Code Here

      if (bean == null && id instanceof String)
        bean = _beanManager.getPassivationCapableBean((String) id);
     
      CreationalContext<?> env = entry.getEnv();

      bean.destroy(value, env);
     
      env.release();
    }
  }
 
View Full Code Here

     
      if (ref != null) {
        value = ref.get();

        if (value != null)
          bean.destroy(value, null);
      }
    }
  }
}
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.