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

Re: [xmlblaster-devel] subscription bug with 2 objects and same key



Juergen Freidling wrote:
Hi

I've a major Problem with xmlBlaster.

I'm using one XmlBlasterConnection and want to subscribe 2 different objects
(from 2 different classes) on the same key.

Both objects got different subscriptionID, e.g.:
ConnectionAdapter:  subscriptionId =
'Subscription-192.168.10.218-null-1011966992775-636785329-7-192.168.10.218-7
609-1011966993101-43'
ProxyServiceDriver: subscriptionId =
'Subscription-192.168.10.218-null-1011966992775-636785329-7-192.168.10.218-7
609-1011966994035-44'

They differ only at the last 6 positions, but that should make no trouble.

My problem now is, that only the last subscribed object get the call for
update, if only ConnectionAdapter is subscribed on the key this object get
the update() call, if both objects are subscribed only ProxyServiceDriver
get a call to update().

I took a look at the XmlBlasterConnection class and found that all
subscriptions are put into a HashMap, and because of 2 different
subsrciptionIDs both should exist. The subscriptionID is used as key to this
HashMap. When update in XmlBlasterConnection is called, only one(!)
subscriptionID is transfered by QoS, because of this only one subscribed
object is called.

Does this behaviour make sense??
I think this is a bug, not a feature ;-)

Hello Juergen,

in fact it was a feature and not a bug.
When coding this i a had the use case in mind that
a client does not have to take care about multiple
subscriptions (e.g. when reentering its initialize()
or a user clicking nervously many time on a subscribe button).

I have changed the xmlBlaster behavior now to return multi subscribed
message multiple as well (as you desired). It is available
in cvs.

If anybody is interested in the old behaviour, i could add
a subscribe QoS tag which allows switching the setting.

regards,

Marcel



If someone (hi Marcel :-)) please could check this out and maybe could fix this problem it would be great!

regards Juergen Freidling







-- Marcel Ruff mailto:ruff at swand.lake.de http://www.lake.de/home/lake/swand/ http://www.xmlBlaster.org