public HttpListener addWrappedHttpListener(final HttpListener httpListener, final ClassLoader classLoader, final String regex) { final HttpListener listener = new ClassLoaderHttpListener(httpListener, classLoader); registry.addHttpListener(listener, regex); return listener; }
public HttpListener addWrappedHttpListener(HttpListener httpListener, ClassLoader classLoader, String regex) { HttpListener listener = new ClassLoaderHttpListener(httpListener, classLoader); registry.addHttpListener(listener, regex); return listener; }
public List<String> addWsContainer(String path, HttpListener httpListener, String virtualHost, // ignored String realmName, // ignored String transportGuarantee, // ignored String authMethod, // ignored ClassLoader classLoader) throws Exception { if (path == null) throw new NullPointerException("contextRoot is null"); if (httpListener == null) throw new NullPointerException("httpListener is null"); if ("BASIC".equals(authMethod)) { httpListener = new BasicAuthHttpListenerWrapper(httpListener, realmName); } // assure context root with a leading slash if (!path.startsWith("/")) path = "/" + path; httpListener = new ClassLoaderHttpListener(httpListener, classLoader); registry.addHttpListener(httpListener, path); // register wsdl locations for service-ref resolution List<String> addresses = new ArrayList<String>(); for (URI baseUri : baseUris) { URI address = baseUri.resolve(path); addresses.add(address.toString()); } return addresses; }
@Override public void init(final Properties props) throws Exception { name = props.getProperty("name"); final EjbServer ejbServer = new EjbServer(); final ServerServiceAdapter adapter = new ServerServiceAdapter(ejbServer); final SystemInstance systemInstance = SystemInstance.get(); HttpListenerRegistry registry = systemInstance.getComponent(HttpListenerRegistry.class); if (registry == null) { registry = new HttpListenerRegistry(); systemInstance.setComponent(HttpListenerRegistry.class, registry); } registry.addHttpListener(adapter, "/ejb/?.*"); // register the http server systemInstance.setComponent(HttpServer.class, httpServer); httpServer.init(props); ejbServer.init(props); }
@Override public void init(final Properties props) throws Exception { name = props.getProperty("name"); final EjbServer ejbServer = new EjbServer(); final ServerServiceAdapter adapter = new ServerServiceAdapter(ejbServer); final SystemInstance systemInstance = SystemInstance.get(); HttpListenerRegistry registry = systemInstance.getComponent(HttpListenerRegistry.class); if (registry == null) { registry = new HttpListenerRegistry(); systemInstance.setComponent(HttpListenerRegistry.class, registry); } registry.addHttpListener(adapter, "/ejb/?.*"); // register the http server systemInstance.setComponent(HttpServer.class, httpServer); httpServer.init(props); ejbServer.init(props); }
public void init(Properties props) throws Exception { name = props.getProperty("name"); EjbServer ejbServer = new EjbServer(); ServerServiceAdapter adapter = new ServerServiceAdapter(ejbServer); SystemInstance systemInstance = SystemInstance.get(); HttpListenerRegistry registry = systemInstance.getComponent(HttpListenerRegistry.class); if (registry == null){ registry = new HttpListenerRegistry(); systemInstance.setComponent(HttpListenerRegistry.class, registry); } registry.addHttpListener(adapter, "/ejb/?.*"); // register the http server systemInstance.setComponent(HttpServer.class, httpServer); httpServer.init(props); ejbServer.init(props); }
registry.addHttpListener(listener, pattern(wc.getContextRoot(), "/".equals(mapping) ? "/*" : mapping)); return true;
public static boolean addServlet(final String classname, final WebContext wc, final String mapping) { final HttpListenerRegistry registry = SystemInstance.get().getComponent(HttpListenerRegistry.class); if (registry == null || mapping == null) { return false; } final ServletListener listener; try { listener = new ServletListener((Servlet) wc.newInstance(wc.getClassLoader().loadClass(classname)), wc.getContextRoot()); listener.getDelegate().init(null); } catch (final Exception e) { throw new OpenEJBRuntimeException(e); } registry.addHttpListener(listener, pattern(wc.getContextRoot(), mapping)); return true; }