You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2014/06/26 01:58:29 UTC

[Bug 56673] Tomcat Websocket 8.0.8 Java Standalone Client Session.getId() returns "0"

https://issues.apache.org/bugzilla/show_bug.cgi?id=56673

Konstantin Kolinko <kn...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID
                 OS|                            |All

--- Comment #1 from Konstantin Kolinko <kn...@gmail.com> ---
(In reply to John Teller from comment #0)
> 
> <dependency>
>     <groupId>javax.websocket</groupId>
>     <artifactId>javax.websocket-api</artifactId>
>     <version>1.0</version>
> </dependency>

1. You should use the API jar provided by Tomcat instead of the above one. That
would be

<dependency>
    <groupId>org.apache.tomcat</groupId>
    <artifactId>tomcat-websocket-api</artifactId>
    <version>8.0.8</version>
</dependency>


2. Your expectations are wrong. There is no error here.

There is no session in WebSocket protocol (RFC6455). A Session is just a way to
represent an established connection in Java API.

If both ends of the connection are implemented in Java, each end has its own
implementation of Session with its own ID. The Session ID is not transmitted
across the wire. Tomcat uses a counter that starts with "0".

// WsSession.java
> this.id = Long.toHexString(ids.getAndIncrement());

3. Bugzilla is not a support forum.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org