[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [xmlblaster] HelloWorld2 and repeated messages



Mark Murphy wrote:

Using 0.79f, if I run the HelloWorld2 demo once, it
works fine. If I run it a second time without
stopping/restarting the server, the HelloWorld2 demo
receives the message twice:

[Aug 17, 2002 5:51:14 PM INFO  HelloWorld2] Received
asynchronous message 'Hello World2' from xmlBlaster
[Aug 17, 2002 5:51:14 PM INFO  HelloWorld2] Received
asynchronous message 'Hello World2' from xmlBlaster

If I continue to re-execute HelloWorld2, I
consistently get the message twice, until I
stop/restart the server.

The first receipt arrives before HelloWorld2 does its
send. My best guess is that the server is holding onto
the other message and is sending it once HelloWorld2
subscribes.

Yes you are probably right with your guess.

If you kill HelloWorld2 with Ctrl-C or destroy it abnormally
the 'erase()' is not invoked (see HelloWorld2.java:40)

To avoid it there are three possibilities:

1. Exit HelloWorld2 by typing enter (or any other key stroke
which does not kill the process abnormaly).
This way, earse() will be invoked.
See: http://www.xmlblaster.org/xmlBlaster/doc/requirements/interface.erase.html


2. You could change the published message to be volatile.
This will destroy the message automatically after publish
See http://www.xmlblaster.org/xmlBlaster/doc/requirements/engine.qos.publish.isVolatile.html


3. You can supress on subscribe the initial message update
See http://www.xmlblaster.org/xmlBlaster/doc/requirements/engine.qos.subscribe.initialUpdate.html


regards,

Marcel


My environment is Windows 2000 Professional, Java version 1.4.0_01-ea.

Any idea what I or HelloWorld2 are doing wrong?

Thanks!

Mark Murphy
mmurphy000 at yahoo.com


__________________________________________________ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com