Benjamin Deininger created ARIES-1436:
-----------------------------------------

             Summary: cm:managed-component destroy-method will only be called 
when it has a single integer argument
                 Key: ARIES-1436
                 URL: https://issues.apache.org/jira/browse/ARIES-1436
             Project: Aries
          Issue Type: Improvement
          Components: Blueprint
    Affects Versions: blueprint-cm-1.0.7
            Reporter: Benjamin Deininger
            Priority: Minor


The destroy-method for cm:managed-components is only considered a compatible 
method if it contains a single integer argument.  This requires the use of a 
placeholder integer when no argument is required, and can lead to confusion 
during use of blueprint-cm. 

{code:title=CmManagedServiceFactory.java|borderStyle=solid}
private Method findDestroyMethod(Class clazz) {
        Method method = null;
        if (componentDestroyMethod != null && componentDestroyMethod.length() > 
0) {
            List<Method> methods = ReflectionUtils.findCompatibleMethods(clazz, 
componentDestroyMethod, new Class [] { int.class });
            if (methods != null && !methods.isEmpty()) {
                method = methods.get(0);
            }
        }
        return method;
    }
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to