tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Preißer <verlag.preis...@t-online.de>
Subject Websocket Questions
Date Fri, 27 Apr 2012 14:51:58 GMT
Hi all,

I'm using Tomcat 7.0.27 with Native 1.1.23 on Windows Server 2008 32-bit with Java 1.7.0_03.

Recently I started a project which uses Websockets. It is a simple app where the clients submit
the current mouse position to the server, and the server then broadcasts the position of that
user to all other connected users.

To see how the Websocket Implementation in Tomcat works, I read the Chat example (http://svn.apache.org/repos/asf/tomcat/tc7.0.x/tags/TOMCAT_7_0_27/webapps/examples/WEB-INF/classes/websocket/chat/ChatWebSocketServlet.java)
from Johno Crawford.

1.
It seems that the connector's "connectionTimeout" attribute is used to determine when the
Websocket connection should be closed after inactivity. Is this intended? At first, I wondered
why Tomcat closes the Websocket connection after a relative short time of about 20 seconds,
until I realized that the default server.xhml has a connectionTimeout of 20000.

2. Is there experience of using the HTTP APR connector with Websockets? When I tried to use
Websockets with that connector, the JVM crashed in tcnative-1.dll some minutes after Tomcat
was started:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x1000476d, pid=3144, tid=9820
#
# JRE version: 7.0_03-b05
# Java VM: Java HotSpot(TM) Client VM (22.1-b02 mixed mode, sharing windows-x86 )
# Problematic frame:
# C  [tcnative-1.dll+0x476d]
#
# Core dump written. Default location: C:\Users\AdminKP\Desktop\apache-tomcat-7.0.27\bin\hs_err_pid3144.mdmp
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.sun.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

When I switched to HTTP BIO however, everything worked fine.


Thanks!

Regards,
Konstantin Preißer


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


Mime
View raw message