public static ResteasyDeployment start(String bindPath, SecurityDomain domain) throws Exception { ResteasyDeployment deployment = new ResteasyDeploymentImpl(); deployment.setSecurityEnabled(true); return start(bindPath, domain, deployment); }
@Override public VertxRegistry getRegistry() { Registry registry = super.getRegistry(); if (!(registry instanceof VertxRegistry)) { registry = new VertxRegistry(registry, getProviderFactory().getResourceBuilder()); } return (VertxRegistry) registry; }
private void registerJndiComponentResource(String resource) { String[] config = resource.trim().split(";"); if (config.length < 3) { throw new RuntimeException(Messages.MESSAGES.jndiComponentResourceNotSetCorrectly()); } String jndiName = config[0]; Class clazz = null; try { clazz = Thread.currentThread().getContextClassLoader().loadClass(config[1]); } catch (ClassNotFoundException e) { throw new RuntimeException(Messages.MESSAGES.couldNotFindClassJndi(config[1]), e); } boolean cacheRefrence = Boolean.valueOf(config[2].trim()); JndiComponentResourceFactory factory = new JndiComponentResourceFactory(jndiName, clazz, cacheRefrence); getResourceFactories().add(factory); }
Object context = getDefaultContextObjects().get(ResteasyConfiguration.class); Object obj = createFromInjectorFactory(entry.getValue(), providerFactory); LogMessages.LOGGER.creatingContextObject(entry.getKey(), entry.getValue()); defaultContextObjects.put(key, obj); application = createApplication(applicationClass, dispatcher, providerFactory); registration();
Application app = ResteasyDeploymentImpl.createApplication(application.trim(), dispatcher, providerFactory);
Object context = getDefaultContextObjects().get(ResteasyConfiguration.class); Object obj = createFromInjectorFactory(entry.getValue(), providerFactory); LogMessages.LOGGER.creatingContextObject(entry.getKey(), entry.getValue()); defaultContextObjects.put(key, obj); application = createApplication(applicationClass, dispatcher, providerFactory); registration();
Application app = ResteasyDeploymentImpl.createApplication(application.trim(), dispatcher, providerFactory);
public static ResteasyDeployment start(String bindPath, SecurityDomain domain, Hashtable<String,String> initParams, Hashtable<String,String> contextParams) throws Exception { ResteasyDeployment deployment = new ResteasyDeploymentImpl(); deployment.setSecurityEnabled(true); return start(bindPath, domain, deployment, initParams, contextParams); }
private void registerJndiComponentResource(String resource) { String[] config = resource.trim().split(";"); if (config.length < 3) { throw new RuntimeException(Messages.MESSAGES.jndiComponentResourceNotSetCorrectly()); } String jndiName = config[0]; Class clazz = null; try { clazz = Thread.currentThread().getContextClassLoader().loadClass(config[1]); } catch (ClassNotFoundException e) { throw new RuntimeException(Messages.MESSAGES.couldNotFindClassJndi(config[1]), e); } boolean cacheRefrence = Boolean.valueOf(config[2].trim()); JndiComponentResourceFactory factory = new JndiComponentResourceFactory(jndiName, clazz, cacheRefrence); getResourceFactories().add(factory); }
public static ResteasyDeployment start(String bindPath, SecurityDomain domain) throws Exception { ResteasyDeployment deployment = new ResteasyDeploymentImpl(); deployment.setSecurityEnabled(true); return start(bindPath, domain, deployment); }
/** * Creates a web deployment for the jaxrs Application. Will ignore any @ApplicationPath annotation. * * @param application * @param mapping resteasy.servlet.mapping.prefix * @return */ public DeploymentInfo undertowDeployment(Class<? extends Application> application, String mapping) { ResteasyDeployment deployment = new ResteasyDeploymentImpl(); deployment.setApplicationClass(application.getName()); DeploymentInfo di = undertowDeployment(deployment, mapping); di.setClassLoader(application.getClassLoader()); return di; }
/** * Creates a web deployment for the jaxrs Application. Will ignore any @ApplicationPath annotation. * * @param application * @param contextPath * @return */ public UndertowJaxrsServer deploy(Class<? extends Application> application, String contextPath) { if (contextPath == null) contextPath = "/"; if (!contextPath.startsWith("/")) contextPath = "/" + contextPath; ResteasyDeployment deployment = new ResteasyDeploymentImpl(); deployment.setApplicationClass(application.getName()); DeploymentInfo di = undertowDeployment(deployment); di.setClassLoader(application.getClassLoader()); di.setContextPath(contextPath); di.setDeploymentName("Resteasy" + contextPath); return deploy(di); }
public UndertowJaxrsServer deployToServer(UndertowJaxrsServer server, Class<? extends Application> application, String contextPath) { ResteasyDeployment deployment = new ResteasyDeploymentImpl(); deployment.setApplicationClass(application.getName()); DeploymentInfo di = server.undertowDeployment(deployment); di.setClassLoader(application.getClassLoader()); di.setContextPath(contextPath); di.setDeploymentName("Resteasy" + contextPath); return server.deploy(di); } }
/** * Creates a web deployment for the jaxrs Application. Will ignore any @ApplicationPath annotation. * * @param application * @param contextPath * @return */ public UndertowJaxrsServer deploy(Application application, String contextPath) { if (contextPath == null) contextPath = "/"; if (!contextPath.startsWith("/")) contextPath = "/" + contextPath; ResteasyDeployment deployment = new ResteasyDeploymentImpl(); deployment.setApplication(application); DeploymentInfo di = undertowDeployment(deployment); di.setClassLoader(application.getClass().getClassLoader()); di.setContextPath(contextPath); di.setDeploymentName("Resteasy" + contextPath); return deploy(di); }