/** * Calls destroy methods on given BeanData. Destroy methods are called * without any order. */ public void callDestroyMethods() { for (final DestroyMethodPoint destroyMethodPoint : beanDefinition.destroyMethodPoints()) { try { destroyMethodPoint.method.invoke(bean); } catch (Exception ex) { throw new PetiteException("Invalid destroy method: " + destroyMethodPoint.method, ex); } } }
/** * Returns <code>true</code> if bean is destroyable. */ protected boolean isBeanDestroyable(final BeanData beanData) { DestroyMethodPoint[] dmp = beanData.definition().destroyMethodPoints(); return dmp != null && dmp.length != 0; }
/** * Returns <code>true</code> if bean is destroyable. */ protected boolean isBeanDestroyable(final BeanData beanData) { DestroyMethodPoint[] dmp = beanData.definition().destroyMethodPoints(); return dmp != null && dmp.length != 0; }
/** * Calls destroy methods on given BeanData. Destroy methods are called * without any order. */ public void callDestroyMethods() { for (final DestroyMethodPoint destroyMethodPoint : beanDefinition.destroyMethodPoints()) { try { destroyMethodPoint.method.invoke(bean); } catch (Exception ex) { throw new PetiteException("Invalid destroy method: " + destroyMethodPoint.method, ex); } } }