title: Dropwizard and Jersey SSE (Server side events)
body: <p>Does anyone used this <a href="https://jersey.java.net/documentation/latest/sse.html" rel="nofollow">Jersey SSE feature</a> already in a Dropwizard application? I tried it with DW 0.9.1 but all I get is this Exception at startup:</p>
  
  <pre><code>[main]: /:?:?- unavailable
  org.glassfish.jersey.server.model.ModelValidationException: Validation of the application resource model has failed during application initialization.
  [[FATAL] No injection source found for a parameter of type public org.glassfish.jersey.media.sse.EventOutput .......
  </code></pre>
  
  <p>Authentication and Authorization is also done like <a href="http://www.dropwizard.io/0.9.1/docs/manual/auth.html" rel="nofollow">here</a> with SecurityContext. I tried also a very simple no authentication/authorization app and there is the same problem. Perhaps I have to register SSE, but I dont know how if this solves my problem, because Jersey documentation says that there is a automated registering since version 2.8.x.</p>
  
  <p>What i tried, but does not help:</p>
  
  <pre><code>    environment.jersey().register(SseFeature.class);
      environment.jersey().getResourceConfig().register(SseFeature.class);
      System.out.println("sse feature:" + environment.jersey().getResourceConfig().getConfiguration().isRegistered(SseFeature.class));
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>...
  sse feature:true
  WARN  [2015-11-11 10:12:58,845] [main]: org.glassfish.jersey.internal.Errors:?:?- The following warnings have been detected: WARNING: Cannot create new registration for component type class org.glassfish.jersey.media.sse.SseFeature: Existing previous registration found for the type.
  ...
  </code></pre>
  
  <p>Does anyone know how to solve this problem or have any ideas?</p>