|
Marcelo, The framework is giving for free some support
for spec defined notifications. In the IntegrationServer case, the framework
is giving the support for Relationship notifications. Some conditions needs to be met to get free
support. 1. The resource needs to support MUWS
Relationships capability a.
The wsdl for the resource needs to expose Relationship
property. 2. Your resource needs to expose QueryRelationshipsByType
operation (wsdl). The implementation of QueryRelationshipsByType
is provided for you by the framework – you do not need to write any line
of the code for that – just uncomment the QueryRelationshipsByType operation
entries in wsdl. Look for inline comments, Kinga -----Original Message----- Hello all! I’m newbie in the Muse Framework and I'm try to implement a
service that use the set of WS-* implemented in Muse. I got a traditional simple service that implement a Calculator. I'll
now add ws-notification features. To reach this goal, I studied the muse's example to help my efforts. In the example, IntegrationserverResource has this piece of code: … TopicSpaceSet aSet = getTopicSpaceSet(); MuwsUtils.addRelationshipTopics(aSet); This line adds the RelationshipCapability
topic and RelationshipCreated/RelationshipDeleted subtiopics. Because of that, if the new relationship is
added/removed from the resource the appropriate events will be automatically generated
and associated with the appropriate topic. All subscribers to such topics will
get the notifications. It will happens automatically, for free, you do not need
to write any more code that the line above (and wsdl change mentioned at the
beginning). This utility operation is provided for easy the relationship events
as they are fundamental for dynamic model discovery. Other topics defined by NSURI_MUWS_PART2_TOPICS
require your attention. //MUWS TopicSpace TopicSpace muwsTopicSpace = new TopicSpaceImpl( MuwsConstants.NSURI_MUWS_PART2_TOPICS ); aSet.addTopicSpace( muwsTopicSpace ); There are more topics defined by NSURI_MUWS_PART2_TOPICS,
and in order to support them you need to add them. For ex. The lines below will add the OperationalStatusCapability
topic. ManagementEventTopic
operationalStatusCapability = new
XmlBeansManagementEventTopicImpl(OperationalStatusCapability.TOPIC_NAME );
muwsTopicSpace.addTopic( operationalStatusCapability ); Then you will want to associate the OperationalStatus
property change with this topic by doing: resourceProperty =
resourcePropertySet.get(IntegrationserverPropertyQNames.OPERATIONALSTATUS); …. resourceProperty.addChangeListener(operationalStatusCapability); The framework will provide the
implementations and will handle the underlying publishing mechanisms. When you support specific spec capability and
your resource supports ManageabilityCharacteristics (wsdl - uncomment ManageabilityCharacteristics
property - recommended), you need to add all capabilities to the list of supported
capabilities. In such case, when getProperty for ManageabilityCharacteristics is
send to the resource, the requestor will get all supported capabilities and
will better understand the resource and its behavior. I didn’t understand this. What are made in theses two
parts? Does framework implement Topic, TopicExpressionDialects and TopicExpressionDialects for us? Another doubt is who is announced about change events? Best regards, Marcelo Iury --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] |
- RE: Doubts about WS-Notification and Example Dziembowski, Kinga
- RE: Doubts about WS-Notification and Example Campana Jr., Salvatore J
