/** * Gets the name of the service. * Used for display purposes only */ public String getName() { return next.getName(); }
@Override public void service(final InputStream in, final OutputStream out) throws ServiceException, IOException { service.service(in, out); }
ServerService d = daemons[i]; try { d.start(); if (display && d.getPort() != -1) { printRow(d.getName(), d.getIP(), d.getPort() + ""); logger.fatal("Service Start Failed: "+d.getName() + " " + d.getIP() + " " + d.getPort() + ": " + e.getMessage()); if (display) { printRow(d.getName(), "----", "FAILED");
public static ProtocolMetaData protocolMetaData(final AppInfo info) { final org.apache.openejb.server.ServiceManager smp = org.apache.openejb.server.ServiceManager.get(); if (smp != null && SimpleServiceManager.class.isInstance(smp)) { final ServerService[] daemons = SimpleServiceManager.class.cast(smp).getDaemons(); for (final ServerService ss : daemons) { if ("httpejbd".equals(ss.getName())) { final HTTPContext httpContext = new HTTPContext(ss.getIP(), ss.getPort()); httpContext.add(new Servlet("ArquillianServletRunner", info.appId)); return new ProtocolMetaData().addContext(httpContext); } } } return null; } }
public void start() { try { server = initServer(name, description); } catch (IOException e) { logger.error("Error initializing " + name + " service.", e); } if (server != null) { try { server.start(); } catch (Exception e) { logger.error("Service Start Failed: " + name + " " + server.getIP() + " " + server.getPort() + ". Exception: " + e.getMessage(), e); } final BundleContext context = bundle.getBundleContext(); registration = context.registerService(ServerService.class.getName(), server, getServiceProperties()); } }
/** * Gets the ip number that the * daemon is listening on. */ public String getIP() { return next.getIP(); }
/** * Gets the port number that the * daemon is listening on. */ public int getPort() { return next.getPort(); }
public void start() throws ServiceException { // Do our stuff // Then call the next guy next.start(); }
for (final ServerService service : services) { if (LocalMBeanServer.isJMXActive()) { final ObjectName on = getObjectName(service.getName()); if (server.isRegistered(on)) { try { service.stop(); } catch (ServiceException e) { logger.fatal("Service Shutdown Failed: " + service.getName() + ". Exception: " + e.getMessage(), e);
public void stop() throws ServiceException { // Do our stuff // Then call the next guy next.stop(); }
/** * Pulls out the access log information * * @param props * @throws ServiceException */ public void init(Properties props) throws Exception { // Do our stuff // Then call the next guy next.init(props); }
d.start(); errors[i] = null; } catch (Exception e) { errors[i] = e; LOGGER.info("Can't start service " + d.getName(), e); final ServerService d = daemons[i]; if (errors[i] == null) { if (display && d.getPort() != -1) { printRow(d.getName(), d.getIP(), d.getPort() + ""); logger.fatal("Service Start Failed: " + d.getName() + " " + d.getIP() + " " + d.getPort() + ": " + errors[i].getMessage()); if (display) { printRow(d.getName(), "----", "FAILED");
public void start() { try { server = initServer(name, description); } catch (IOException e) { logger.error("Error initializing " + name + " service.", e); } if (server != null) { try { server.start(); } catch (Exception e) { logger.error("Service Start Failed: " + name + " " + server.getIP() + " " + server.getPort() + ". Exception: " + e.getMessage(), e); } BundleContext context = bundle.getBundleContext(); registration = context.registerService(ServerService.class.getName(), server, getServiceProperties()); } }
@Override public String getIP() { return this.service.getIP(); }
public int getPort() { return service.getPort(); }
@Override public void start() throws ServiceException { service.start(); }