Questions tagged [grizzly]

The Grizzly NIO and Web framework leverage Java™ NIO API capabilities. Grizzly's helps developers to build scalable and robust servers using NIO and we are also offering extended framework components: Web Framework (HTTP/S), Bayeux Protocol, Servlet, HttpService OSGi and Comet.

The Grizzly NIO and Web framework leverage Java™ NIO API capabilities. Grizzly's helps developers to build scalable and robust servers using NIO and is also offering extended framework components: Web Framework (HTTP/S), Bayeux Protocol, Servlet, HttpService OSGi and Comet.

Resources:

482 questions
11
votes
2 answers

Java NIO2 AsynchronousSocketChannel/AsynchronousServerSocketChannel and TLS/SSL

All the sources/samples on the INTERNET that available on NIO2 are without TLS/SSL support, java.nio.channels.AsynchronousSocketChannel java.nio.channels.AsynchronousServerSocketChannel As I understand the SSLEngine life-cycle of connection differ…
user1740371
  • 131
  • 1
  • 3
10
votes
3 answers

java.lang.NoSuchMethodError: org.glassfish.jersey.server.ApplicationHandler.

I've been trying to debug this issue for a bit now, and searching SO and other websites I haven't been able to find a solution. I've checked all versions of the dependencies in my pom.xml and made sure they are compatible with grizzly2, and I've…
Stephen
  • 376
  • 1
  • 3
  • 13
10
votes
4 answers

Jersey throws NPE for each call after using ContainerRequestContext.abortWith()

I have a RESTful endpoint which I secured with a simple authorization check via a custom ContainerRequestFilter. The filter checks if all the information contained in the HTTP session is correct and if not it executes…
Alex
  • 459
  • 4
  • 16
10
votes
3 answers

Grizzly Standalone Logging

i have setup a standalone grizzly/jersey server using maven and referencing the following dependencies org.glassfish.grizzly grizzly-http-server
thuri
  • 302
  • 1
  • 2
  • 10
10
votes
3 answers

jersey and jax-rs RI2 - missing HttpServerFactory

I have a simple project to test JAX-RS services. Yesterday I downloaded jersey-1.7.1 and used com.sun.jersey.api.container.httpserver.HttpServerFactory and com.sun.net.httpserver.HttpServer to create a http server to test my services from inside…
rjha94
  • 4,292
  • 3
  • 30
  • 37
10
votes
3 answers

Basic HTTP authentication with Jersey / Grizzly

I've written a simple REST server using JAX-RS, Jersey and Grizzly. This is how I start the server: URI baseUri = UriBuilder.fromUri("http://localhost/api") .port(8081) .build(); ResourceConfig rc =…
aioobe
  • 413,195
  • 112
  • 811
  • 826
9
votes
3 answers

Grizzly and Jersey standalone jar

I am trying to package Grizzly with Jersey as a single jar using Maven shade plugin. But I always get the message No container provider supports the type class org.glassfish.grizzly.http.server.HttpHandler The code works fine in Eclipse, but not in…
André Ricardo
  • 3,051
  • 7
  • 23
  • 32
9
votes
2 answers

Grizzly + Jersey Listening ONLY on Localhost

I'm using Jersey with an embedded version of Grizzly and I'd like to bind/listen on localhost ONLY. I'm creating the ThreadSelector using the GrizzlyWebContainerFactory with the create call: threadSelector =…
Bill
  • 91
  • 1
  • 3
9
votes
2 answers

jersey + grizzly + hk2: Dependency injection, but not into resource

Following up on Jersey + HK2 + Grizzly: Proper way to inject EntityManager?, I would like to understand how it is possible use dependency injection in classes which are not jersey resources. As an example, I might have background tasks running in…
Hank
  • 4,597
  • 5
  • 42
  • 84
9
votes
2 answers

Jersey Client non-blocking

Spawning lots of threads is never a good idea (and when you create too many, you may run out of memory anyway). Usually, Jersey needs to create one thread per request. And this seems to be the case, whether I use async() (where Jersey creates the…
Chris Lercher
  • 37,264
  • 20
  • 99
  • 131
9
votes
2 answers

GZIP encoding in Jersey 2 / Grizzly

I can't activate gzip-encoding in my Jersey service. This is what I've tried: Started out with the jersey-quickstart-grizzly2 archetype from the Getting Started Guide. Added rc.register(org.glassfish.grizzly.http.GZipContentEncoding.class); (have…
aioobe
  • 413,195
  • 112
  • 811
  • 826
8
votes
1 answer

request-response synchronization/matching in nio context

I have a server client application (Java EE & Android), communication via websockets. Communication works and also the protocol itself for sending objects as json, which will be correctly wrapped, serialized, sent, deserialized, unwrapped and…
Aitch
  • 1,617
  • 13
  • 24
8
votes
2 answers

Grizzly Jersey swallowing exceptions

I'm building a Jersey Moxy service using the quickstart archetype at the end. My code works fine and I can get some JSON returned. However as I'm developing, if I make a mistake, say the request handler has an unsupported type, I will get an empty…
Paul
  • 1,874
  • 1
  • 19
  • 26
8
votes
4 answers

Grizzly and ServletContainerContext

I'm trying to get hold of some injected context (for example Session or HttpServletRequest) in a Servlet I've written, running on Grizzly, but nothing I do seems to work. The whole process seems to stall rather prematurely with the following…
Mic
  • 6,741
  • 3
  • 24
  • 25
7
votes
2 answers

Grizzly pipe leak - what am i doing wrong?

I've written the following test code: @Test public void testLeakWithGrizzly() throws Throwable { ExecutorService executor = Executors.newFixedThreadPool(N_THREADS); Set> futures = new HashSet<>(); InetSocketAddress…
radai
  • 23,949
  • 10
  • 71
  • 115
1
2
3
32 33