Package com.caucho.ejb.util

Examples of com.caucho.ejb.util.AppExceptionItem


   * Returns the application exceptions.
   */
  public AppExceptionItem getApplicationException(Class<?> exn,
                                                  boolean isSystem)
  {
    AppExceptionItem appExn = _appExceptionMap.get(exn);
   
    if (appExn == null) {
      appExn = createApplicationException(exn, isSystem);
     
      _appExceptionMap.put(exn, appExn);
View Full Code Here


 
  private AppExceptionItem createApplicationException(Class<?> exn,
                                                      boolean isSystem)
  {
    if (exn == Error.class || exn == RuntimeException.class)
      return new AppExceptionItem(false, true, true);
    else if (exn == Exception.class)
      return new AppExceptionItem(true, false, true);
   
    ApplicationExceptionConfig cfg = _appExceptionConfig.get(exn);
   
    if (cfg != null) {
      return new AppExceptionItem(true, cfg.isRollback(), cfg.isInherited());
    }
   
    ApplicationException appExn = exn.getAnnotation(ApplicationException.class);
   
    if (appExn != null) {
      // ejb/1276
      return new AppExceptionItem(true, appExn.rollback(), appExn.inherited());
    }
   
    AppExceptionItem parentItem = getApplicationException(exn.getSuperclass(),
                                                          isSystem);

    if (parentItem.isInherited())
      return parentItem;
    else if (isSystem)
      return new AppExceptionItem(false, true, true);
    else
      return new AppExceptionItem(true, false, true);
   
  }
View Full Code Here

TOP

Related Classes of com.caucho.ejb.util.AppExceptionItem

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.