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

RE: Two questions

> I'm using the xmlBlaster, but I have two questions:
> 1. If the client is offline(ISDN and is disconnect) there are any manner
of store the
> message in local and when he connect send the messages. The cache mecanism
that is
> implemented I think that is in server part, when the receiver is

I think that this would be up to you to implement.  Every time a client
publishes a message, I'd do this: (in pseudoJava whatever..)

class ClientTest
	private LinkedList offlineQueue;
	public ClientTest( ... )
		offlineQueue = new LinkedList();


	public publish(MessageUnit mesgUnit)
		if (! this.isConnected() )
		else { as normal... }

	public connect()
		do all your normal connection stuff...

		while (offlineQueue.getElementCount() > 0)
			publish( (MessageUnit)offlineQueue.removeFirst() );

>  2. There are any form of receive ackermans of the message that I publish
to the server?

By "ackermans" I'm guessing you mean an acknowledgement message that the
publish went okay.  The way I see it, you'd get an exception thrown if
anything went wrong, so if you don't catch an exception, then you should
assume it was published okay.

What you can also do is subscribe to your own messages.  Create some tag
within a publish key that you will subscribe to... for example:

Subscribe to this key:
<key oid='' queryType='XPATH'>
    /xmlBlaster/key/Sender[ at name='yourNameHere']

And when you publish, be sure to add the <Sender name='yourNameHere' /> tag
to the key, like this:

<key oid='' contentMime='text/xml'>
   < ... all your normal key tags and info ... />
   <Sender name='yourNameHere' />

Hope this helps...!  I know I've used this list for a million questions, I'd
like to be able to help when and if I can.  =)