BeanLogger.LOG.methodHandlerProcessingReturningBeanInstance(self.getClass()); if (beanInstance == null) { throw BeanLogger.LOG.beanInstanceNotSetOnProxy(getBean()); if (thisMethod.getDeclaringClass().equals(TargetInstanceProxy.class)) { if (beanInstance == null) { throw BeanLogger.LOG.beanInstanceNotSetOnProxy(getBean()); return new ProxyMethodHandler(contextId, new TargetBeanInstance(args[0]), getBean()); } else { if (beanInstance == null) { throw BeanLogger.LOG.beanInstanceNotSetOnProxy(getBean());
BeanLogger.LOG.methodHandlerProcessingReturningBeanInstance(self.getClass()); if (beanInstance == null) { throw BeanLogger.LOG.beanInstanceNotSetOnProxy(getBean()); if (thisMethod.getDeclaringClass().equals(TargetInstanceProxy.class)) { if (beanInstance == null) { throw BeanLogger.LOG.beanInstanceNotSetOnProxy(getBean()); return new ProxyMethodHandler(contextId, new TargetBeanInstance(args[0]), getBean()); } else { if (beanInstance == null) { throw BeanLogger.LOG.beanInstanceNotSetOnProxy(getBean());
BeanLogger.LOG.methodHandlerProcessingReturningBeanInstance(self.getClass()); if (beanInstance == null) { throw BeanLogger.LOG.beanInstanceNotSetOnProxy(getBean()); if (thisMethod.getDeclaringClass().equals(TargetInstanceProxy.class)) { if (beanInstance == null) { throw BeanLogger.LOG.beanInstanceNotSetOnProxy(getBean()); return new ProxyMethodHandler(contextId, new TargetBeanInstance(args[0]), getBean()); } else { if (beanInstance == null) { throw BeanLogger.LOG.beanInstanceNotSetOnProxy(getBean());
BeanLogger.LOG.methodHandlerProcessingReturningBeanInstance(self.getClass()); if (beanInstance == null) { throw BeanLogger.LOG.beanInstanceNotSetOnProxy(getBean()); if (thisMethod.getDeclaringClass().equals(TargetInstanceProxy.class)) { if (beanInstance == null) { throw BeanLogger.LOG.beanInstanceNotSetOnProxy(getBean()); return new ProxyMethodHandler(contextId, new TargetBeanInstance(args[0]), getBean()); } else { if (beanInstance == null) { throw BeanLogger.LOG.beanInstanceNotSetOnProxy(getBean());
BeanLogger.LOG.methodHandlerProcessingReturningBeanInstance(self.getClass()); if (beanInstance == null) { throw BeanLogger.LOG.beanInstanceNotSetOnProxy(getBean()); if (thisMethod.getDeclaringClass().equals(TargetInstanceProxy.class)) { if (beanInstance == null) { throw BeanLogger.LOG.beanInstanceNotSetOnProxy(getBean()); return new ProxyMethodHandler(contextId, new TargetBeanInstance(args[0]), getBean()); } else { if (beanInstance == null) { throw BeanLogger.LOG.beanInstanceNotSetOnProxy(getBean());
BeanLogger.LOG.methodHandlerProcessingReturningBeanInstance(self.getClass()); if (beanInstance == null) { throw BeanLogger.LOG.beanInstanceNotSetOnProxy(getBean()); if (thisMethod.getDeclaringClass().equals(TargetInstanceProxy.class)) { if (beanInstance == null) { throw BeanLogger.LOG.beanInstanceNotSetOnProxy(getBean()); return new ProxyMethodHandler(contextId, new TargetBeanInstance(args[0]), getBean()); } else { if (beanInstance == null) { throw BeanLogger.LOG.beanInstanceNotSetOnProxy(getBean());
@Override public void destroy(T instance) { Preconditions.checkNotNull(instance); // Attempt to destroy instance which is either a client proxy or a dependent session bean proxy if (instance instanceof ProxyObject) { ProxyObject proxy = (ProxyObject) instance; if (proxy.getHandler() instanceof ProxyMethodHandler) { ProxyMethodHandler handler = (ProxyMethodHandler) proxy.getHandler(); Bean<?> bean = handler.getBean(); if (instance instanceof EnterpriseBeanInstance && Dependent.class.equals(bean.getScope())) { // Destroy internal reference to a dependent session bean destroyDependentInstance(instance); return; } else { // Destroy contextual instance of a normal-scoped bean Context context = getBeanManager().getContext(bean.getScope()); if (context instanceof AlterableContext) { AlterableContext alterableContext = (AlterableContext) context; alterableContext.destroy(bean); return; } else { throw BeanLogger.LOG.destroyUnsupported(context); } } } } // Attempt to destroy dependent instance which is neither a client proxy nor a dependent session bean proxy destroyDependentInstance(instance); }
@Override public void destroy(T instance) { checkNotNull(instance); // Attempt to destroy instance which is either a client proxy or a dependent session bean proxy if (instance instanceof ProxyObject) { ProxyObject proxy = (ProxyObject) instance; if (proxy.weld_getHandler() instanceof ProxyMethodHandler) { ProxyMethodHandler handler = (ProxyMethodHandler) proxy.weld_getHandler(); Bean<?> bean = handler.getBean(); if (isSessionBeanProxy(instance) && Dependent.class.equals(bean.getScope())) { // Destroy internal reference to a dependent session bean destroyDependentInstance(instance); return; } else { // Destroy contextual instance of a normal-scoped bean Context context = getBeanManager().getContext(bean.getScope()); if (context instanceof AlterableContext) { AlterableContext alterableContext = (AlterableContext) context; alterableContext.destroy(bean); return; } else { throw BeanLogger.LOG.destroyUnsupported(context); } } } } // Attempt to destroy dependent instance which is neither a client proxy nor a dependent session bean proxy destroyDependentInstance(instance); }
@Override public void destroy(T instance) { checkNotNull(instance); // Attempt to destroy instance which is either a client proxy or a dependent session bean proxy if (instance instanceof ProxyObject) { ProxyObject proxy = (ProxyObject) instance; if (proxy.weld_getHandler() instanceof ProxyMethodHandler) { ProxyMethodHandler handler = (ProxyMethodHandler) proxy.weld_getHandler(); Bean<?> bean = handler.getBean(); if (isSessionBeanProxy(instance) && Dependent.class.equals(bean.getScope())) { // Destroy internal reference to a dependent session bean destroyDependentInstance(instance); return; } else { // Destroy contextual instance of a normal-scoped bean Context context = getBeanManager().getContext(bean.getScope()); if (context instanceof AlterableContext) { AlterableContext alterableContext = (AlterableContext) context; alterableContext.destroy(bean); return; } else { throw BeanLogger.LOG.destroyUnsupported(context); } } } } // Attempt to destroy dependent instance which is neither a client proxy nor a dependent session bean proxy destroyDependentInstance(instance); }
@Override public void destroy(T instance) { checkNotNull(instance); // Attempt to destroy instance which is either a client proxy or a dependent session bean proxy if (instance instanceof ProxyObject) { ProxyObject proxy = (ProxyObject) instance; if (proxy.weld_getHandler() instanceof ProxyMethodHandler) { ProxyMethodHandler handler = (ProxyMethodHandler) proxy.weld_getHandler(); Bean<?> bean = handler.getBean(); if (isSessionBeanProxy(instance) && Dependent.class.equals(bean.getScope())) { // Destroy internal reference to a dependent session bean destroyDependentInstance(instance); return; } else { // Destroy contextual instance of a normal-scoped bean Context context = getBeanManager().getContext(bean.getScope()); if (context instanceof AlterableContext) { AlterableContext alterableContext = (AlterableContext) context; alterableContext.destroy(bean); return; } else { throw BeanLogger.LOG.destroyUnsupported(context); } } } } // Attempt to destroy dependent instance which is neither a client proxy nor a dependent session bean proxy destroyDependentInstance(instance); }
@Override public void destroy(T instance) { checkNotNull(instance); // Attempt to destroy instance which is either a client proxy or a dependent session bean proxy if (instance instanceof ProxyObject) { ProxyObject proxy = (ProxyObject) instance; if (proxy.weld_getHandler() instanceof ProxyMethodHandler) { ProxyMethodHandler handler = (ProxyMethodHandler) proxy.weld_getHandler(); Bean<?> bean = handler.getBean(); if (isSessionBeanProxy(instance) && Dependent.class.equals(bean.getScope())) { // Destroy internal reference to a dependent session bean destroyDependentInstance(instance); return; } else { // Destroy contextual instance of a normal-scoped bean Context context = getBeanManager().getContext(bean.getScope()); if (context instanceof AlterableContext) { AlterableContext alterableContext = (AlterableContext) context; alterableContext.destroy(bean); return; } else { throw BeanLogger.LOG.destroyUnsupported(context); } } } } // Attempt to destroy dependent instance which is neither a client proxy nor a dependent session bean proxy destroyDependentInstance(instance); }
@Override public void destroy(T instance) { checkNotNull(instance); // Attempt to destroy instance which is either a client proxy or a dependent session bean proxy if (instance instanceof ProxyObject) { ProxyObject proxy = (ProxyObject) instance; if (proxy.weld_getHandler() instanceof ProxyMethodHandler) { ProxyMethodHandler handler = (ProxyMethodHandler) proxy.weld_getHandler(); Bean<?> bean = handler.getBean(); if (isSessionBeanProxy(instance) && Dependent.class.equals(bean.getScope())) { // Destroy internal reference to a dependent session bean destroyDependentInstance(instance); return; } else { // Destroy contextual instance of a normal-scoped bean Context context = getBeanManager().getContext(bean.getScope()); if (context instanceof AlterableContext) { AlterableContext alterableContext = (AlterableContext) context; alterableContext.destroy(bean); return; } else { throw BeanLogger.LOG.destroyUnsupported(context); } } } } // Attempt to destroy dependent instance which is neither a client proxy nor a dependent session bean proxy destroyDependentInstance(instance); }