Package javango.http

Examples of javango.http.Http500


  public HttpResponse processRequest(HttpRequest req) throws HttpException {
    try {
      hibernateUtil.beginTransaction();   
    } catch (HibernateException e) {
      log.error(e,e);
      throw new Http500(e);     
    }
    return super.processRequest(req);
  }
View Full Code Here


      log.debug("Attempting commit");
      hibernateUtil.commitTransaction();
    } catch (HibernateException e) {
      log.error(e,e);
      log.error(e.getCause(),e.getCause());
      throw new Http500("Unable to write to database: " + e, e);
    }
    return super.processResponse(req, response);
  }
View Full Code Here

      if (log.isWarnEnabled()) log.warn("Attempting rollback due to " + t);
      hibernateUtil.rollbackTransaction();   
    } catch (HibernateException e) {
      log.error(e,e);
      if (response == null) {
        throw new Http500("Unable to rollback the database: " + e, e);
      } else {
        return response; // basically someone else has already done something,  no need to muck it up.
      }
    }
    return super.processException(request, response, t);
View Full Code Here

    try {
      log.debug("Closing session");
      hibernateUtil.closeSession();
    } catch (HibernateException e) {
      log.error(e,e);
      throw new Http500("Unable to close database session: " + e, e);
    }   
  }
View Full Code Here

        //   TODO Make the error message a little cleaner,  maybe don't use the full class name.
        throw new Http404(String.format("Unable to find '%s' instance with key '%s'", model.getName(), key));     
      }
      return object;
    } catch (ManagerException e) {
      throw new Http500(e.getMessage());
    }
   
  }
View Full Code Here

        //   TODO Make the error message a little cleaner,  maybe don't use the full class name.
        throw new Http404(String.format("Unable to find '%s' instance with '%s' of '%s'", model.getName(), field, value));     
      }
      return object;
    } catch (ManagerException e) {
      throw new Http500(e.getMessage());
    }
  }
View Full Code Here

TOP

Related Classes of javango.http.Http500

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.