[
https://issues.apache.org/jira/browse/MUSE-153?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12462605
]
Dan Jemiolo commented on MUSE-153:
----------------------------------
I've removed the TopicSet loading from SimpleNotificationProducer in favor of
using the RMD doc for initial/static values for the TopicExpression property.
SimpleNP now has code in initializeCompleted() that looks through the RMD and
adds topics to its internal data structures for each TopicExpression it finds.
wsnt:TopicSet is still not serialized completely, which is a known issue.
Now, TopicExpression does not have a MessagePattern element, only wst:Topic
does, but wst:Topic is not a property or even referenced by wsnt:TopicSet.
Which is very confusing. Makes it seem like wst:Topic is just around for
documentation purposes. Since wsnt:TopicExpression has a xsd:any under it, I
could be persuaded to change the parsing code so that it looks for a
MessagePattern elemetn under the TopicExpressions it loads from the RMD doc;
this would make it so you don't have to set the message pattern
programmatically (see MUSE-151). Does this sound acceptable to you?
> Child topics in topic set documents are being parsed as root topics by
> notification producer
> --------------------------------------------------------------------------------------------
>
> Key: MUSE-153
> URL: https://issues.apache.org/jira/browse/MUSE-153
> Project: Muse
> Issue Type: Bug
> Components: WSN Topics
> Affects Versions: 2.0.0
> Environment: any
> Reporter: Mohammad Fakhar
> Assigned To: Dan Jemiolo
> Fix For: 2.2.0
>
>
> The addTopic routines in SimpleNotificationProducer, which parse topic set
> documents to TopicNameSpace objects, are treating child topics in the topic
> set document as root topics.
> Lets say I have this topic set doucment (root and children belong to same
> namespace):
> <root1>
> <child1/>
> <child2/>
> </root1>
> Here is the sequence of events which leads to the erroneous behavior:
> 1) createTopicSetDocument in SimpleNotificationProducer calls addTopics on
> all root topics in document.
> 2) addTopics calls addTopic to add root1, and then recursively calls itself
> for all children of root.
> 3) Now, when addTopic is called with child1, the following code is executed
> (in the addTopic method):
> Topic topic = new SimpleTopic(localName, topicSpace);
> topicSpace.addTopic(topic);
> This causes the child1 to be added as a root topic as this code is executed
> in SimpleTopicSpace.addTopic: "_rootTopics.put(name, topic);"
> where the name is child1. Same applies to child2.
> The problem was exposed when I tried to evaluate a concrete topic expression
> against this topic set document; it was treating child1 and child2 as root
> topics in the namespace, instead of child topics of root1.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]