RE: openjms tunnel - normal behaviour?

"Tim Anderson" <[email protected]>
Newsgroups gmane.comp.java.openjms.user
Message-ID <[email protected]>
In 0.7.7, the http connector is implemented using polling,
which is why you are seeing frequent connections to the
http server. 
The 1 second poll interval is probably a just a tad too frequent.

I'm a little surprised your seeing multiple sockets open. 
My (limited) understanding of the URLConnection implementation
for http was that it would set Keep-Alive to avoid
this.

If you're interested, the source for the http connector
is available in the source distrbution under:
.  modules/net/src/main/java/org/exolab/jms/net/http
.  modules/tunnel/src/main/java/org/exolab/jms/net/tunnel
  
or online:
.
http://cvs.sourceforge.net/viewcvs.py/openjms/openjms/modules/net/src/main/j
ava/org/exolab/jms/net/http/
.
http://cvs.sourceforge.net/viewcvs.py/openjms/openjms/modules/tunnel/src/mai
n/java/org/exolab/jms/net/tunnel

-Tim

> -----Original Message-----
> From: openjms-user-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org 
> [mailto:openjms-user-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org] On Behalf 
> Of chris lau
> Sent: Wednesday, 8 March 2006 10:30 AM
> To: [email protected]
> Subject: [openjms-user] openjms tunnel - normal behaviour?
> 
> I don't know how to explain this, so here is basically what I did:
> 
> 1. Created a simple client that basically subscribes to 
> topic1 using the HTTP protocol.
> 2. openjms-tunnel installed in Tomcat 5.5 3. Client is at 
> work, openjms is at home. Communication over Internet.
> 
> The client successfully connects and subscribes. I can 
> publish messages using the Sender example and the client 
> receives them asynchronously. then I notice that there is 
> network traffic when there shouldn't be (ie. no program 
> accessing the internet and no messages are published). So I 
> open up TCPVIEW and notice that the client program has a 
> connection to the server.. then about every second or so, the 
> client establishes a new connection to the server and then 
> disconnects. So for about a second, there are two connections 
> the client has with the server. Plus, each time it connects, 
> it uses a new port on the client machine. So for example, it 
> connects initially using port 1775, then a second later is 
> connects using port 1776, and so on. And if I leave the 
> client running for about 30 seconds, it will have used up 
> ports 1775-1800 or so. All the previous connections are in a 
> TIME_WAIT state. After about 30 seconds, it starts closing 
> the previous connections a couple of them at a time.
> 
> Just wondering if this is normal and if so, why every second?
> 
> Thanks.
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection 
> around http://mail.yahoo.com 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking 
> scripting language
> that extends applications into web and mobile media. Attend 
> the live webcast
> and join the prime developer group breaking into this new 
> coding territory!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&
> dat=121642
> _______________________________________________
> openjms-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/openjms-user
> 


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.