Package com.caucho.config.gen

Examples of com.caucho.config.gen.ApiMethod


  }

  protected BusinessMethodGenerator
    createMethod(ApiMethod apiMethod, int index)
  {
    ApiMethod implMethod = findImplMethod(apiMethod);

    if (implMethod == null)
      return null;

    SingletonMethod bizMethod
View Full Code Here


  {
  }

  protected ApiMethod findImplMethod(ApiMethod apiMethod)
  {
    ApiMethod implMethod = getBeanClass().getMethod(apiMethod);

    if (implMethod != null)
      return implMethod;

    throw new ConfigException(L.l("'{0}' method '{1}' has no corresponding implementation in '{2}'",
View Full Code Here

  }

  protected BusinessMethodGenerator
    createMethod(ApiMethod apiMethod, int index)
  {
    ApiMethod implMethod = findImplMethod(apiMethod);

    if (implMethod == null)
      return null;

    StatefulMethod bizMethod
View Full Code Here

  {
  }

  protected ApiMethod findImplMethod(ApiMethod apiMethod)
  {
    ApiMethod implMethod = getBeanClass().getMethod(apiMethod);

    if (implMethod != null)
      return implMethod;

    throw new ConfigException(L.l("'{0}' method '{1}' has no corresponding implementation in '{2}'",
View Full Code Here

  {
    for (View view : bean.getViews()) {
      // XXX: check for type
     
      for (BusinessMethodGenerator bizMethod : view.getMethods()) {
  ApiMethod apiMethod = bizMethod.getApiMethod();
 
  if (_beanMethod.isMatch(apiMethod)) {
    bizMethod.setRemove(true);
    bizMethod.setRemoveRetainIfException(_retainIfException);
  }
View Full Code Here

   
    if (javaMethod.getDeclaringClass().getName().startsWith("javax.ejb.")) {
      return null;
    }
   
    ApiMethod implMethod = findImplMethod(apiMethod);

    if (implMethod == null) {
      throw new ConfigException(L.l("'{0}' method '{1}' has no corresponding implementation in '{2}'",
                                    apiMethod.getMethod().getDeclaringClass().getSimpleName(),
                                    apiMethod.getFullName(),
View Full Code Here

                      getEJBClass().getName(),
                      isAllowPOJO() ? "messaging-type" : "messageListenerInterface"));

    super.init();

    ApiMethod ejbCreate
      = getEJBClassWrapper().getMethod("ejbCreate", new Class[0]);

    if (ejbCreate != null) {
      if (! ejbCreate.isPublic() && ! ejbCreate.isProtected())
        throw error(L.l("{0}: ejbCreate method must be public or protected.",
                        getEJBClass().getName()));
    }

    // J2EEManagedObject.register(new com.caucho.management.j2ee.MessageDrivenBean(this));
View Full Code Here

      if (! RuntimeException.class.isAssignableFrom(exn)) {
        throw error(L.l("{0}: constructor must not throw '{1}'.  Bean constructors must not throw checked exceptions.", ejbClass.getName(), exn.getName()));
      }
    }

    ApiMethod method = ejbClass.getMethod("finalize", new Class[0]);

    if (method != null
  && ! method.getMethod().getDeclaringClass().equals(Object.class)) {
      throw error(L.l("'{0}' may not implement finalize().  Bean implementations may not implement finalize().", method.getMethod().getDeclaringClass().getName()));
    }

    if (_annotatedType == null) {
      InjectManager manager = InjectManager.create();
View Full Code Here

      InterceptorBinding interceptor
  = getConfig().getInterceptorBinding(getEJBName(), false);

      if (_aroundInvokeMethodName != null) {
  ApiMethod method = getMethod(_aroundInvokeMethodName,
             new Class[] { InvocationContext.class });

  if (method == null)
    throw error(L.l("'{0}' is an unknown around-invoke method",
        _aroundInvokeMethodName));
 
  // XXX: _bean.setAroundInvokeMethod(method.getMethod());
      }

      /* XXX:
      if (interceptor != null) {
  for (Class cl : interceptor.getInterceptors()) {
    _bean.addInterceptor(cl);
  }
      }
      */

      /*
      if (_interceptors != null) {
        for (Interceptor i : _interceptors) {
          _bean.addInterceptor(i.getInterceptorJClass().getJavaClass());
        }
      }
      */

      for (View view : _bean.getViews()) {
    /*
  for (BusinessMethodGenerator bizMethod : view.getMethods()) {
    if (! isContainerTransaction())
      bizMethod.getXa().setContainerManaged(false);
  }
    */
      }

      /*
      for (EjbMethodPattern method : _methodList) {
  method.configure(_bean);
      }
      */

      for (RemoveMethod method : _removeMethods) {
  method.configure(_bean);
      }

      // assembleBeanMethods();

      // createViews();
View Full Code Here

                        getFullMethodName(method),
                        getShortClassName(returnType),
                        objectClass.getName()));
      }

      ApiMethod implMethod =
        validateRemoteImplMethod(method.getName(), param,
                                 method, objectClass);

      if (! returnType.equals(implMethod.getReturnType())) {
        throw error(L.l("{0}: '{1}' must return {2} to match {3}.{4}.  Business methods must return the same type as the interface.",
                        method.getDeclaringClass().getName(),
                        getFullMethodName(method),
                        implMethod.getReturnType().getName(),
                        implMethod.getDeclaringClass().getSimpleName(),
                        getFullMethodName(implMethod)));
      }

      validateExceptions(method, implMethod.getExceptionTypes());
    }
  }
View Full Code Here

TOP

Related Classes of com.caucho.config.gen.ApiMethod

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.