Beispiel #1
0
  private MethodInfo getMethodInfo(final Method method, final Map ejbds) {
    final MethodInfo methodInfo = new MethodInfo();

    final EjbDeployment d = (EjbDeployment) ejbds.get(method.getEjbName());

    methodInfo.description = method.getDescription();
    methodInfo.ejbDeploymentId = d == null ? null : d.getDeploymentId();
    methodInfo.ejbName = method.getEjbName();
    methodInfo.methodIntf =
        method.getMethodIntf() == null ? null : method.getMethodIntf().toString();
    methodInfo.methodName = method.getMethodName();
    if (methodInfo.methodName == null || methodInfo.methodName.equals("")) {
      methodInfo.methodName = "*";
    }
    methodInfo.className = method.getClassName();
    if (methodInfo.className == null || methodInfo.className.equals("")) {
      methodInfo.className = "*";
    }

    final MethodParams mp = method.getMethodParams();
    if (mp != null) {
      methodInfo.methodParams = mp.getMethodParam();
    }
    return methodInfo;
  }
 private Method getMethod(Class<?> clazz, AsyncMethod asyncMethod) {
   try {
     MethodParams methodParams = asyncMethod.getMethodParams();
     Class<?>[] parameterTypes;
     if (methodParams != null) {
       parameterTypes = new Class[methodParams.getMethodParam().size()];
       int arrayIndex = 0;
       for (String parameterType : methodParams.getMethodParam()) {
         parameterTypes[arrayIndex++] = loadClass(parameterType);
       }
     } else {
       parameterTypes = new Class[0];
     }
     return clazz.getMethod(asyncMethod.getMethodName(), parameterTypes);
   } catch (NoSuchMethodException e) {
     return null;
   } catch (OpenEJBException e) {
     throw new OpenEJBRuntimeException(e);
   }
 }