use of org.jboss.resteasy.plugins.server.tjws.TJWSEmbeddedJaxrsServer in project narayana by jbosstm.
the class BaseTest method startRestEasy.
protected static void startRestEasy(Class<?>... classes) throws Exception {
server = new TJWSEmbeddedJaxrsServer();
server.setPort(PORT);
server.start();
Registry registry = server.getDeployment().getRegistry();
ResteasyProviderFactory factory = server.getDeployment().getDispatcher().getProviderFactory();
if (classes != null)
for (Class<?> clazz : classes) registry.addPerRequestResource(clazz);
factory.registerProvider(TMUnavailableMapper.class);
factory.registerProvider(TransactionStatusMapper.class);
factory.registerProvider(HttpResponseMapper.class);
factory.registerProvider(NotFoundMapper.class);
}
use of org.jboss.resteasy.plugins.server.tjws.TJWSEmbeddedJaxrsServer in project jbpm by kiegroup.
the class RestService method start.
public static void start() {
server = new TJWSEmbeddedJaxrsServer();
server.setPort(PORT);
server.getDeployment().setResources(Arrays.asList(new Resource()));
server.start();
}
use of org.jboss.resteasy.plugins.server.tjws.TJWSEmbeddedJaxrsServer in project scheduling by ow2-proactive.
the class RestTestServer method startServer.
@BeforeClass
public static void startServer() throws IOException, NoSuchFieldException, IllegalAccessException, NoSuchMethodException, InvocationTargetException {
bypassProActiveLogger();
preventProActiveToChangeSecurityManager();
server = new TJWSEmbeddedJaxrsServer();
silentServerError();
port = findFreePort();
server.setPort(port);
server.setRootResourcePath("/");
server.start();
}
use of org.jboss.resteasy.plugins.server.tjws.TJWSEmbeddedJaxrsServer in project jbpm by kiegroup.
the class RestService method start.
public static void start() {
server = new TJWSEmbeddedJaxrsServer();
server.setPort(PORT);
server.getDeployment().setResources(Collections.singletonList((Object) new Resource()));
server.start();
}
Aggregations