Permalink
Browse files

reverts - commited by accident :-/

Revert "special j1 version"
Revert "create container with external Grizzly server"

This reverts commit 6a1c05f.
This reverts commit 2a3038b.
  • Loading branch information...
pavelbucek committed Oct 5, 2015
1 parent 2a3038b commit aa899a9af62c7135d667ff70fb7d60e92cbe0409
Showing with 70 additions and 209 deletions.
  1. +1 −1 archetypes/echo/pom.xml
  2. +1 −1 archetypes/pom.xml
  3. +1 −1 bom/pom.xml
  4. +1 −1 bundles/client-jdk/pom.xml
  5. +1 −1 bundles/client/pom.xml
  6. +1 −1 bundles/pom.xml
  7. +1 −1 bundles/samples/pom.xml
  8. +1 −1 bundles/websocket-ri-archive/pom.xml
  9. +1 −1 bundles/websocket-ri-bundle/pom.xml
  10. +1 −1 client/pom.xml
  11. +1 −1 containers/glassfish/cdi/pom.xml
  12. +1 −1 containers/glassfish/ejb/pom.xml
  13. +1 −1 containers/glassfish/pom.xml
  14. +1 −1 containers/grizzly-client/pom.xml
  15. +1 −1 containers/grizzly-server/pom.xml
  16. +0 −139 ...zly-server/src/main/java/org/glassfish/tyrus/container/grizzly/server/GrizzlyServerContainer.java
  17. +1 −1 containers/inmemory/pom.xml
  18. +1 −1 containers/jdk-client/pom.xml
  19. +1 −1 containers/pom.xml
  20. +1 −1 containers/servlet/pom.xml
  21. +1 −1 core/pom.xml
  22. +1 −1 docs/pom.xml
  23. +1 −1 ext/client-cli/pom.xml
  24. +1 −1 ext/client-java8/pom.xml
  25. +1 −1 ext/extension-deflate/pom.xml
  26. +1 −1 ext/monitoring-jmx/pom.xml
  27. +1 −1 ext/pom.xml
  28. +1 −1 pom.xml
  29. +1 −1 samples/auction/pom.xml
  30. +1 −1 samples/btc-xchange/pom.xml
  31. +1 −1 samples/cdi/pom.xml
  32. +1 −1 samples/chat/pom.xml
  33. +1 −1 samples/draw/pom.xml
  34. +1 −1 samples/echo-basic-auth/pom.xml
  35. +1 −1 samples/echo-dart/pom.xml
  36. +1 −1 samples/echo-https/pom.xml
  37. +1 −1 samples/echo/pom.xml
  38. +1 −1 samples/pom.xml
  39. +1 −1 samples/programmatic-echo/pom.xml
  40. +1 −1 samples/shared-collection/pom.xml
  41. +1 −1 samples/simplelife/pom.xml
  42. +1 −1 server/pom.xml
  43. +1 −1 spi/pom.xml
  44. +1 −1 tests/e2e/application-config/pom.xml
  45. +1 −1 tests/e2e/jdk8/pom.xml
  46. +1 −1 tests/e2e/jetty/auth-basic/pom.xml
  47. +1 −1 tests/e2e/jetty/auth-digest/pom.xml
  48. +1 −1 tests/e2e/jetty/pom.xml
  49. +1 −1 tests/e2e/non-deployable/pom.xml
  50. +1 −1 tests/e2e/pom.xml
  51. +1 −1 tests/e2e/standard-config/pom.xml
  52. +1 −1 tests/pom.xml
  53. +1 −1 tests/qa/browser-test/pom.xml
  54. +1 −1 tests/qa/lifecycle-test/pom.xml
  55. +1 −1 tests/qa/pom.xml
  56. +1 −1 tests/servlet/async/pom.xml
  57. +1 −1 tests/servlet/autobahn-server/pom.xml
  58. +1 −1 tests/servlet/basic/pom.xml
  59. +1 −1 tests/servlet/debug/pom.xml
  60. +1 −1 tests/servlet/dynamic-deploy/pom.xml
  61. +1 −1 tests/servlet/inject/pom.xml
  62. +1 −1 tests/servlet/maxsessions-per-app/pom.xml
  63. +1 −1 tests/servlet/maxsessions-per-remoteaddr/pom.xml
  64. +1 −1 tests/servlet/mbean/pom.xml
  65. +1 −1 tests/servlet/noappconfig/pom.xml
  66. +1 −1 tests/servlet/oneappconfig/pom.xml
  67. +1 −1 tests/servlet/pom.xml
  68. +1 −1 tests/servlet/remote-endpoint-timeout/pom.xml
  69. +1 −1 tests/servlet/session/pom.xml
  70. +1 −1 tests/servlet/twoappconfig/pom.xml
  71. +1 −1 tests/tools/pom.xml
View
@@ -44,7 +44,7 @@
<parent>
<groupId>org.glassfish.tyrus.archetypes</groupId>
<artifactId>tyrus-archetypes-project</artifactId>
<version>2.0-J1-SNAPSHOT</version>
<version>2.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<description>
View
@@ -45,7 +45,7 @@
<parent>
<groupId>org.glassfish.tyrus</groupId>
<artifactId>tyrus-project</artifactId>
<version>2.0-J1-SNAPSHOT</version>
<version>2.0-SNAPSHOT</version>
</parent>
<groupId>org.glassfish.tyrus.archetypes</groupId>
View
@@ -52,7 +52,7 @@
<groupId>org.glassfish.tyrus</groupId>
<artifactId>tyrus-bom</artifactId>
<version>2.0-J1-SNAPSHOT</version>
<version>2.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Tyrus BOM</name>
@@ -44,7 +44,7 @@
<parent>
<groupId>org.glassfish.tyrus.bundles</groupId>
<artifactId>tyrus-bundles</artifactId>
<version>2.0-J1-SNAPSHOT</version>
<version>2.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
View
@@ -44,7 +44,7 @@
<parent>
<groupId>org.glassfish.tyrus.bundles</groupId>
<artifactId>tyrus-bundles</artifactId>
<version>2.0-J1-SNAPSHOT</version>
<version>2.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
View
@@ -47,7 +47,7 @@
<parent>
<groupId>org.glassfish.tyrus</groupId>
<artifactId>tyrus-project</artifactId>
<version>2.0-J1-SNAPSHOT</version>
<version>2.0-SNAPSHOT</version>
</parent>
<groupId>org.glassfish.tyrus.bundles</groupId>
View
@@ -45,7 +45,7 @@
<parent>
<groupId>org.glassfish.tyrus.bundles</groupId>
<artifactId>tyrus-bundles</artifactId>
<version>2.0-J1-SNAPSHOT</version>
<version>2.0-SNAPSHOT</version>
</parent>
<artifactId>tyrus-samples</artifactId>
@@ -45,7 +45,7 @@
<parent>
<groupId>org.glassfish.tyrus.bundles</groupId>
<artifactId>tyrus-bundles</artifactId>
<version>2.0-J1-SNAPSHOT</version>
<version>2.0-SNAPSHOT</version>
</parent>
<artifactId>websocket-ri-archive</artifactId>
@@ -45,7 +45,7 @@
<parent>
<groupId>org.glassfish.tyrus.bundles</groupId>
<artifactId>tyrus-bundles</artifactId>
<version>2.0-J1-SNAPSHOT</version>
<version>2.0-SNAPSHOT</version>
</parent>
<artifactId>websocket-ri-bundle</artifactId>
View
@@ -44,7 +44,7 @@
<parent>
<groupId>org.glassfish.tyrus</groupId>
<artifactId>tyrus-project</artifactId>
<version>2.0-J1-SNAPSHOT</version>
<version>2.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -46,7 +46,7 @@
<parent>
<groupId>org.glassfish.tyrus</groupId>
<artifactId>tyrus-containers-glassfish-project</artifactId>
<version>2.0-J1-SNAPSHOT</version>
<version>2.0-SNAPSHOT</version>
</parent>
<packaging>bundle</packaging>
@@ -46,7 +46,7 @@
<parent>
<groupId>org.glassfish.tyrus</groupId>
<artifactId>tyrus-containers-glassfish-project</artifactId>
<version>2.0-J1-SNAPSHOT</version>
<version>2.0-SNAPSHOT</version>
</parent>
<packaging>bundle</packaging>
@@ -44,7 +44,7 @@
<parent>
<groupId>org.glassfish.tyrus</groupId>
<artifactId>tyrus-containers-project</artifactId>
<version>2.0-J1-SNAPSHOT</version>
<version>2.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -46,7 +46,7 @@
<parent>
<groupId>org.glassfish.tyrus</groupId>
<artifactId>tyrus-containers-project</artifactId>
<version>2.0-J1-SNAPSHOT</version>
<version>2.0-SNAPSHOT</version>
</parent>
<packaging>bundle</packaging>
@@ -46,7 +46,7 @@
<parent>
<groupId>org.glassfish.tyrus</groupId>
<artifactId>tyrus-containers-project</artifactId>
<version>2.0-J1-SNAPSHOT</version>
<version>2.0-SNAPSHOT</version>
</parent>
<packaging>bundle</packaging>
@@ -233,145 +233,6 @@ public void stop() {
};
}
/**
* Create container - user provided HttpServer.
*
* @param server server.
* @param properties properties.
* @return new ServerContainer.
* @see #createContainer(java.util.Map)
*/
public ServerContainer createContainer(final HttpServer server, Map<String, Object> properties) {
final Map<String, Object> localProperties;
// defensive copy
if (properties == null) {
localProperties = Collections.emptyMap();
} else {
localProperties = new HashMap<String, Object>(properties);
}
final Integer incomingBufferSize =
Utils.getProperty(localProperties, TyrusWebSocketEngine.INCOMING_BUFFER_SIZE, Integer.class);
final ClusterContext clusterContext =
Utils.getProperty(localProperties, ClusterContext.CLUSTER_CONTEXT, ClusterContext.class);
final ApplicationEventListener applicationEventListener =
Utils.getProperty(localProperties, ApplicationEventListener.APPLICATION_EVENT_LISTENER,
ApplicationEventListener.class);
final Integer maxSessionsPerApp =
Utils.getProperty(localProperties, TyrusWebSocketEngine.MAX_SESSIONS_PER_APP, Integer.class);
final Integer maxSessionsPerRemoteAddr =
Utils.getProperty(localProperties, TyrusWebSocketEngine.MAX_SESSIONS_PER_REMOTE_ADDR, Integer.class);
final Boolean parallelBroadcastEnabled =
Utils.getProperty(localProperties, TyrusWebSocketEngine.PARALLEL_BROADCAST_ENABLED, Boolean.class);
final DebugContext.TracingType tracingType =
Utils.getProperty(localProperties, TyrusWebSocketEngine.TRACING_TYPE, DebugContext.TracingType.class,
DebugContext.TracingType.OFF);
final DebugContext.TracingThreshold tracingThreshold =
Utils.getProperty(localProperties, TyrusWebSocketEngine.TRACING_THRESHOLD,
DebugContext.TracingThreshold.class, DebugContext.TracingThreshold.TRACE);
return new TyrusServerContainer((Set<Class<?>>) null) {
private final WebSocketEngine engine =
TyrusWebSocketEngine.builder(this)
.incomingBufferSize(incomingBufferSize)
.clusterContext(clusterContext)
.applicationEventListener(applicationEventListener)
.maxSessionsPerApp(maxSessionsPerApp)
.maxSessionsPerRemoteAddr(maxSessionsPerRemoteAddr)
.parallelBroadcastEnabled(parallelBroadcastEnabled)
.tracingType(tracingType)
.tracingThreshold(tracingThreshold)
.build();
private String contextPath;
@Override
public void register(Class<?> endpointClass) throws DeploymentException {
engine.register(endpointClass, contextPath);
}
@Override
public void register(ServerEndpointConfig serverEndpointConfig) throws DeploymentException {
engine.register(serverEndpointConfig, contextPath);
}
@Override
public WebSocketEngine getWebSocketEngine() {
return engine;
}
@Override
public void start(final String rootPath, int port) throws IOException, DeploymentException {
contextPath = rootPath;
final ServerConfiguration config = server.getServerConfiguration();
final NetworkListener listener = new NetworkListener("grizzly", "0.0.0.0", port);
server.addListener(listener);
// server = HttpServer.createSimpleServer(rootPath, port);
ThreadPoolConfig workerThreadPoolConfig =
Utils.getProperty(localProperties, WORKER_THREAD_POOL_CONFIG, ThreadPoolConfig.class);
ThreadPoolConfig selectorThreadPoolConfig =
Utils.getProperty(localProperties, SELECTOR_THREAD_POOL_CONFIG, ThreadPoolConfig.class);
// TYRUS-287: configurable server thread pools
if (workerThreadPoolConfig != null || selectorThreadPoolConfig != null) {
TCPNIOTransportBuilder transportBuilder = TCPNIOTransportBuilder.newInstance();
if (workerThreadPoolConfig != null) {
transportBuilder.setWorkerThreadPoolConfig(workerThreadPoolConfig);
}
if (selectorThreadPoolConfig != null) {
transportBuilder.setSelectorThreadPoolConfig(selectorThreadPoolConfig);
}
transportBuilder.setIOStrategy(WorkerThreadIOStrategy.getInstance());
server.getListener("grizzly").setTransport(transportBuilder.build());
} else {
// if no configuration is set, just update IO Strategy to worker thread strat.
server.getListener("grizzly").getTransport().setIOStrategy(WorkerThreadIOStrategy.getInstance());
}
// idle timeout set to indefinite.
server.getListener("grizzly").getKeepAlive().setIdleTimeoutInSeconds(-1);
server.getListener("grizzly").registerAddOn(new WebSocketAddOn(this, contextPath));
final WebSocketEngine webSocketEngine = getWebSocketEngine();
final Object staticContentPath = localProperties.get(Server.STATIC_CONTENT_ROOT);
HttpHandler staticHandler = null;
if (staticContentPath != null && !staticContentPath.toString().isEmpty()) {
staticHandler = new StaticHttpHandler(staticContentPath.toString());
}
final Object wsadl = localProperties.get(TyrusWebSocketEngine.WSADL_SUPPORT);
if (wsadl != null && wsadl.toString().equalsIgnoreCase("true")) { // wsadl enabled
config.addHttpHandler(new WsadlHttpHandler((TyrusWebSocketEngine) webSocketEngine, staticHandler));
} else if (staticHandler != null) { // wsadl disabled
config.addHttpHandler(staticHandler);
}
if (applicationEventListener != null) {
applicationEventListener.onApplicationInitialized(rootPath);
}
// server.start();
super.start(rootPath, port);
}
@Override
public void stop() {
super.stop();
// server.shutdownNow();
if (applicationEventListener != null) {
applicationEventListener.onApplicationDestroyed();
}
}
};
}
private static class WsadlHttpHandler extends HttpHandler {
private final TyrusWebSocketEngine engine;
@@ -46,7 +46,7 @@
<parent>
<groupId>org.glassfish.tyrus</groupId>
<artifactId>tyrus-containers-project</artifactId>
<version>2.0-J1-SNAPSHOT</version>
<version>2.0-SNAPSHOT</version>
</parent>
<packaging>bundle</packaging>
@@ -46,7 +46,7 @@
<parent>
<groupId>org.glassfish.tyrus</groupId>
<artifactId>tyrus-containers-project</artifactId>
<version>2.0-J1-SNAPSHOT</version>
<version>2.0-SNAPSHOT</version>
</parent>
<packaging>bundle</packaging>
View
@@ -44,7 +44,7 @@
<parent>
<groupId>org.glassfish.tyrus</groupId>
<artifactId>tyrus-project</artifactId>
<version>2.0-J1-SNAPSHOT</version>
<version>2.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -45,7 +45,7 @@
<parent>
<groupId>org.glassfish.tyrus</groupId>
<artifactId>tyrus-containers-project</artifactId>
<version>2.0-J1-SNAPSHOT</version>
<version>2.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
View
@@ -44,7 +44,7 @@
<parent>
<groupId>org.glassfish.tyrus</groupId>
<artifactId>tyrus-project</artifactId>
<version>2.0-J1-SNAPSHOT</version>
<version>2.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
View
@@ -45,7 +45,7 @@
<parent>
<groupId>org.glassfish.tyrus</groupId>
<artifactId>tyrus-project</artifactId>
<version>2.0-J1-SNAPSHOT</version>
<version>2.0-SNAPSHOT</version>
</parent>
<artifactId>tyrus-documentation</artifactId>
View
@@ -44,7 +44,7 @@
<parent>
<groupId>org.glassfish.tyrus.ext</groupId>
<artifactId>tyrus-extensions-project</artifactId>
<version>2.0-J1-SNAPSHOT</version>
<version>2.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
View
@@ -44,7 +44,7 @@
<parent>
<groupId>org.glassfish.tyrus.ext</groupId>
<artifactId>tyrus-extensions-project</artifactId>
<version>2.0-J1-SNAPSHOT</version>
<version>2.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -44,7 +44,7 @@
<parent>
<groupId>org.glassfish.tyrus.ext</groupId>
<artifactId>tyrus-extensions-project</artifactId>
<version>2.0-J1-SNAPSHOT</version>
<version>2.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -46,7 +46,7 @@
<parent>
<groupId>org.glassfish.tyrus.ext</groupId>
<artifactId>tyrus-extensions-project</artifactId>
<version>2.0-J1-SNAPSHOT</version>
<version>2.0-SNAPSHOT</version>
</parent>
<artifactId>tyrus-monitoring-jmx</artifactId>
View
@@ -44,7 +44,7 @@
<parent>
<groupId>org.glassfish.tyrus</groupId>
<artifactId>tyrus-project</artifactId>
<version>2.0-J1-SNAPSHOT</version>
<version>2.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
View
@@ -51,7 +51,7 @@
<groupId>org.glassfish.tyrus</groupId>
<artifactId>tyrus-project</artifactId>
<version>2.0-J1-SNAPSHOT</version>
<version>2.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>tyrus</name>
<description>Tyrus is the reference implementation of Java API for WebSocket (JSR-356).</description>
View
@@ -46,7 +46,7 @@
<parent>
<groupId>org.glassfish.tyrus.samples</groupId>
<artifactId>tyrus-samples-project</artifactId>
<version>2.0-J1-SNAPSHOT</version>
<version>2.0-SNAPSHOT</version>
</parent>
<packaging>war</packaging>
Oops, something went wrong.

0 comments on commit aa899a9

Please sign in to comment.