Java Viewer

W. Brian Blevins brian "at" tridia.com
Thu, 26 Oct 2000 14:22:24 +0000


Steve, Jonathan and Joseph,

> Re: Java Viewer
> 
> 
> >Also, in relation to this and my last post, Is there anything that can be 
> >done about the java server? If you use a browser to control a computer, 
> >then browse to another site, it will leave the previous connection open on 
> >the server. This consumes resources. If you finally close the browser 
> >window, the connection will be dropped on the server. Maybe a timeout 
> >setting on the server or an option for a timeout? 

This depends in the current implementation on the browser's "pruning"
behavior.  I know of no way to directly influence this.  However,
Joseph Carter's recommendation for a viewer modification would likely
work for your requirements (see below).

> 
> This is a problem with Micro$oft Internet Explorer for Windows, 
> particularly versions 4 and later. I have not heard reports of problems on 
> any other browser or operating system. For timeouts, what could we use in 
> such a situation as a timeout? User interaction is a likely solution, but 
> that assumes everyone uses the viewer constantly and doesn't, for example, 
> use it to monitor system parameters on a passive basis. One could argue 
> that if one is using the Java viewer, they are unlikely to use it in a 
> 'passive' manner. 

On the contrary, this *problem* is actually the expected behavior
and not confined to certain implementations of MSIE.  There may have
been a bug in the earlier versions of MSIE.

I posted a related email back in May:

http://www.tridiavnc.com/list-mailist/2000/May/0067.html

The original poster there *wanted* the connection to be
left open when the browser went to another page (and it
was not or not guaranteed).  This is the opposite of
Steve's request...

As Joseph Carter mentioned:

> The stop() method in the Applet can be overridden to close the socket there. 
> This method is called when the applet is replaced by another page. 
> I have a suspicion however that some browsers (probably Netscape) 
> may not call this properly, in which case you've had it. (or use the Java 
> Plug-in). 

This is correct.  An option in the Java viewer could be added
to cause the connection to be closed when the stop() method is
called.  Of course, corresponding logic would be needed in the
start() method to reopen the connection.  AFAIK, both netscape
and MSIE reliably implemented the life cycle methods (init(),
start(), stop() and destroy()).

> 
> In any case, since this is only a problem on one specific viewer and on one 
> specific platform, the workaround should only be built into that viewer, 
> and if possible limited to that platform. (are applets allowed to detect 
> the browser version in use?) 

Yes the fix belongs in the Java viewer.  More control is
needed over the closing of the connection.

Although I do not think this is limited to a specific browser,
applets can detect the java vendor, OS and platform.

-- 
Brian 
----------------------------------------------------------------------------
TridiaVNC, the cross-platform, open source, remote control solution.
http://www.TridiaVNC.com/   and   http://www.developVNC.org/
Java VNC Server Demo:
http://www.developVNC.org/logged-in/jVNC-info.html
---------------------------------------------------------------------
To unsubscribe, send a message with the line: unsubscribe vnc-list
to majordomo "at" uk.research.att.com
See also: http://www.uk.research.att.com/vnc/intouch.html
---------------------------------------------------------------------