org.openeai.jms.producer
Class PointToPointProducer.MonitorProducer
java.lang.Object
org.openeai.jms.producer.PointToPointProducer.MonitorProducer
- All Implemented Interfaces:
- java.lang.Runnable
- Enclosing class:
- PointToPointProducer
protected class PointToPointProducer.MonitorProducer
- extends java.lang.Object
- implements java.lang.Runnable
This Thread will sleep for 30 seconds and then wake up
and check the status of the producer by attempting to create/delete a TemporaryQueue.
If the creation of the TemporaryQueue fails, it assumes there is something wrong
with the producer's connection to the broker and it will therefore not be able to produce
any messages. When that happens, it attempts to do a "clean" shutdown on the producer and
then restarts the producer which will re-establish its connection to the broker
and it will be able to produce messages again. This means, if we have to take down
a broker for any reason (on purpose or not), we will NOT have to restart all our
"long running" producers when the broker comes back up, rather, they will do that themselves.
The thread is started when the producer is started the first time and continues
this process for the life of the producer.
- Author:
- Tod Jackson
|
Method Summary |
void |
run()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PointToPointProducer.MonitorProducer
public PointToPointProducer.MonitorProducer(int sleepInterval)
run
public void run()
- Specified by:
run in interface java.lang.Runnable
Copyright © 2002,2003 OpenEAI Software Foundation