Re: @ServerEndpoint Guice

2013-11-11 Thread Marko Sanković
Nick, Thank you once again. In a servlet injector can be accessed through getServletContext.getAttribute("Injector") As you said, I had to implement static method that returns instance of injector and use it in my EndpointConfiguration to instantiate ServerEndpoint. This is what I have done: //

Re: @ServerEndpoint Guice

2013-11-07 Thread Nick Williams
On Nov 6, 2013, at 4:24 PM, Marko Sanković wrote: > Nick, thanks for your quick response. > > Unfortunately, specifying javax.websocket.server.ServerEndpointConfig. > Configurator is still not enough. This is what I have tried so far: > > @ServerEndpoint(value = "/wsendpoint", configurator = >

Re: @ServerEndpoint Guice

2013-11-06 Thread Marko Sanković
Nick, thanks for your quick response. Unfortunately, specifying javax.websocket.server.ServerEndpointConfig. Configurator is still not enough. This is what I have tried so far: @ServerEndpoint(value = "/wsendpoint", configurator = WsEndpointConfigurator.class) public class WsEndpoint { @Injec

Re: @ServerEndpoint Guice

2013-11-06 Thread Nick Williams
On Nov 6, 2013, at 7:55 AM, Marko Sanković wrote: > Hi, > > For the last couple of hours I've been trying to inject a simple object > into the class that is @ServerEndpoint annotated. > > As stated: Tomcat implements the Java WebSocket 1.0 API defined by JSR-356. > > I'm using Guice as depende

@ServerEndpoint Guice

2013-11-06 Thread Marko Sanković
Hi, For the last couple of hours I've been trying to inject a simple object into the class that is @ServerEndpoint annotated. As stated: Tomcat implements the Java WebSocket 1.0 API defined by JSR-356. I'm using Guice as dependency injection framework and Tomcat 7.0.47. This is how my websocket