use of org.apache.openejb.server.ServiceException in project tomee by apache.
the class ServerServlet method service.
protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
if (!activated) {
response.getWriter().write("");
return;
}
ServletInputStream in = request.getInputStream();
ServletOutputStream out = response.getOutputStream();
try {
RequestInfos.initRequestInfo(request);
ejbServer.service(in, out);
} catch (ServiceException e) {
throw new ServletException("ServerService error: " + ejbServer.getClass().getName() + " -- " + e.getMessage(), e);
} finally {
RequestInfos.clearRequestInfo();
}
}
use of org.apache.openejb.server.ServiceException in project tomee by apache.
the class DerbyNetworkService method start.
@Override
public void start() throws ServiceException {
if (this.disabled) {
return;
}
try {
this.serverControl = new NetworkServerControl(host, port);
this.serverControl.start(new LoggingPrintWriter("Derby"));
if (verbose) {
LOGGER.info("Starting openejb-derbynet with derby " + serverControl.getRuntimeInfo() + " " + serverControl.getSysinfo());
}
} catch (Exception e) {
throw new ServiceException(e);
}
}
Aggregations