Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[jersey][0.9.0.RC2] The WebSocketProtocol.configure() method is never call if custom WebSocketProtocol is assigned in the web.xml #260

Closed
ekochnev opened this issue Mar 30, 2012 · 1 comment

Comments

@ekochnev
Copy link

if I assign my WebSocketProtocol


<init-param>
            <param-name>org.atmosphere.websocket.WebSocketProtocol</param-name>
            <param-value>org.atmosphere.tictactoe42a9x.JerseyWebSocketProtocol</param-value>
</init-param>

when WebSocketProtocol.configure(AtmosphereConfig config) method is not called.

Please see following code:

AtmosphereFramework.initWebSocketProtocol():


protected void initWebSocketProtocol() {
!!!       if (webSocketProtocol != null) return;
        try {
            webSocketProtocol = (WebSocketProtocol) AtmosphereFramework.class.getClassLoader()
                    .loadClass(webSocketProtocolClassName).newInstance();
            logger.info("Installed WebSocketProtocol {} ", webSocketProtocolClassName );
        } catch (Exception ex) {
            logger.error("Cannot load the WebSocketProtocol {}", getWebSocketProtocolClassName(), ex);
            webSocketProtocol = new SimpleHttpProtocol();
        }
!!!       webSocketProtocol.configure(config); // if webSocketProtocol is not null this method will be never call
    }
jfarcand added a commit that referenced this issue Apr 2, 2012
…thod is never call if custom WebSocketProtocol is assigned in the web.xml
@jfarcand
Copy link
Member

jfarcand commented Apr 2, 2012

Fixed thanks!

@jfarcand jfarcand closed this as completed Apr 2, 2012
jfarcand added a commit that referenced this issue May 30, 2012
…thod is never call if custom WebSocketProtocol is assigned in the web.xml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants