Yeah. It sounds like there is no way to hide
methods, so all public methods are exposed as operations :-(
On 5/25/07, Eduardo Burgos <[EMAIL PROTECTED]> wrote:
Hi, I've been looking at servicemix-bean and I noticed this in
org.apache.servicemix.bean.support.BeanInfo line 103 in the following
method
"protected void introspect(Class clazz, Method method)"
I'm quoting lines 121-130
121- // now lets add the method to the repository
String opName = method.getName();
if (method.getAnnotation(Operation.class) != null) {
String name = method.getAnnotation(Operation.class
).name();
if (name != null && name.length() > 0) {
opName = name;
}
}
Expression parametersExpression =
createMethodParametersExpression(parameterExpressions);
130- operations.put(opName, new MethodInfo(clazz, method,
parametersExpression));
According to this, every method of my bean is an operation whose name is
defined at least by the method's name. Is this intended? I thought that
only
the methods that had the Operation attribute would be listed as
operations.
For example, I have a "setSessionTimeout" method that I wouldn't want it
to
be an operation :).
Any ideas?
Eduardo Burgos
--
Cheers,
Guillaume Nodet
------------------------
Principal Engineer, IONA
Blog: http://gnodet.blogspot.com/