[
https://issues.apache.org/jira/browse/ARIES-1436?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16345960#comment-16345960
]
ASF subversion and git services commented on ARIES-1436:
--------------------------------------------------------
Commit 1822715 from [~gnt] in branch 'aries/trunk'
[ https://svn.apache.org/r1822715 ]
[ARIES-1436] cm:managed-component destroy-method will only be called when it
has a single integer argument
> 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
> Fix For: blueprint-cm-1.2.0
>
>
> 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
(v7.6.3#76005)