OpenJMS w/RMI - lots of PingThreads??

  • Thread starter Jean-Francois Theoret
  • Start date
J

Jean-Francois Theoret

I have an application that is using OpenJMS in RMI mode - I have
multiple PingThreads running in the background and I was wondering if
it was because I was not closing the publishers/subscribers correctly
(TopicPublisher.close).

I noticed that there is a way not to have these threads by specifying
clientPingInterval="0" in the openjms.xml file, but what is the use of
these threads?

jf
 
I

iksrazal

I have an application that is using OpenJMS in RMI mode - I have
multiple PingThreads running in the background and I was wondering if
it was because I was not closing the publishers/subscribers correctly
(TopicPublisher.close).

I noticed that there is a way not to have these threads by specifying
clientPingInterval="0" in the openjms.xml file, but what is the use of
these threads?

jf

Since I use openjms and never really thought about it, I decided to
poke around and I found this:

http://216.239.41.104/search?q=cach...er_guide.pdf+clientPingInterval+openjms&hl=en

This optional attribute is used by the RMI-based server to detect
abnormal client disconnections. The value is specified in seconds.
Other server types do not require this attribute. If the server does
not receive a client ping within the specified interval then it
assumes that it has abnormally terminated.

Incidently, I do some threading with topics, which is tricky because
you must have seperate threads - with a seperate session - for every
listener. And since the listener implements MessageListener and
Runnable, calling onMessage, you wouldn't really close the connection.
Actually I run this as a daemon. I say all this because I'm curious,
how did you notice the PingThreads? Under Linux for example, each Java
Thread appears in the process list (ps) as a separate
process.

HTH

Outsource to an American programmer living in brazil!
http://www.braziloutsource.com/
iksrazal
 
J

Jean-Francois Theoret

Re:> how did you notice the PingThreads? Under Linux for example, each
Java
Thread appears in the process list (ps) as a separate
process.

I am presently using Eclipse (on Windows) - but you might give it a
try on Linux also. In debugging mode, you can see all the threads, and
suspend them individually. Excellent tool.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,436
Messages
2,571,696
Members
48,796
Latest member
Greg L.
Top