public void invokePreDestroy() { boolean accessible = false; for (Method method : getPreDestroyMethods()) { PreDestroy pd = method.getAnnotation(PreDestroy.class); if (pd != null) { try { ReflectionUtil.setAccessible(method); method.invoke(target); } catch (IllegalAccessException e) { LOG.log(Level.WARNING, "PRE_DESTROY_NOT_VISIBLE", method); } catch (InvocationTargetException e) { LOG.log(Level.WARNING, "PRE_DESTROY_THREW_EXCEPTION", e); } finally { ReflectionUtil.setAccessible(method, accessible); } } } }
public void invokePreDestroy() { boolean accessible = false; for (Method method : getPreDestroyMethods()) { PreDestroy pd = method.getAnnotation(PreDestroy.class); if (pd != null) { try { ReflectionUtil.setAccessible(method); method.invoke(target); } catch (IllegalAccessException e) { LOG.log(Level.WARNING, "PRE_DESTROY_NOT_VISIBLE", method); } catch (InvocationTargetException e) { LOG.log(Level.WARNING, "PRE_DESTROY_THREW_EXCEPTION", e); } finally { ReflectionUtil.setAccessible(method, accessible); } } } }
public void invokePreDestroy() { boolean accessible = false; for (Method method : getPreDestroyMethods()) { PreDestroy pd = method.getAnnotation(PreDestroy.class); if (pd != null) { try { ReflectionUtil.setAccessible(method); method.invoke(target); } catch (IllegalAccessException e) { LOG.log(Level.WARNING, "PRE_DESTROY_NOT_VISIBLE", method); } catch (InvocationTargetException e) { LOG.log(Level.WARNING, "PRE_DESTROY_THREW_EXCEPTION", e); } finally { ReflectionUtil.setAccessible(method, accessible); } } } }
public void invokePreDestroy() { boolean accessible = false; for (Method method : getPreDestroyMethods()) { PreDestroy pd = method.getAnnotation(PreDestroy.class); if (pd != null) { try { ReflectionUtil.setAccessible(method); method.invoke(target); } catch (IllegalAccessException e) { LOG.log(Level.WARNING, "PRE_DESTROY_NOT_VISIBLE", method); } catch (InvocationTargetException e) { LOG.log(Level.WARNING, "PRE_DESTROY_THREW_EXCEPTION", e); } finally { ReflectionUtil.setAccessible(method, accessible); } } } }
public void invokePreDestroy() { boolean accessible = false; for (Method method : getPreDestroyMethods()) { PreDestroy pd = method.getAnnotation(PreDestroy.class); if (pd != null) { try { ReflectionUtil.setAccessible(method); method.invoke(target); } catch (IllegalAccessException e) { LOG.log(Level.WARNING, "PRE_DESTROY_NOT_VISIBLE", method); } catch (InvocationTargetException e) { LOG.log(Level.WARNING, "PRE_DESTROY_THREW_EXCEPTION", e); } finally { ReflectionUtil.setAccessible(method, accessible); } } } }