Implementation of WS-Notifications (QPID-1582)

2009-02-11 Thread Andrea Gazzarini
Hi all,
the last step (at the moment) of QMan is here : I just submitted code for
QPID-1582 (implementation on QMan of WS-Notification).

As first version there are only two topics : one for lifecycle events of
object instances (create  remove) and one for lifecycle events (only
create) of events.
That means:

1) There are two topics : qman:ObjectsLifeCycleTopic and
qman:EventsLifeCycleTopic
2) QMan will publish on the first one the following message when (for
example) a connection is created :

wsnt:NotificationMessage
xmlns:wsnt=http://docs.oasis-open.org/wsn/b-2;
xmlns:qman=http://amqp.apache.org/qpid/management/qman;
xmlns:qman-wsa=http://amqp.apache.org/qpid/management/qman/addressing;
xmlns:wsa=http://www.w3.org/2005/08/addressing; xmlns:wsnt=
http://docs.oasis-open.org/wsn/b-2;
wsnt:SubscriptionReference
wsa:Address xmlns:wsa=http://www.w3.org/2005/08/addressing;
http://romagazzarini:8080/qman/services/SubscriptionManager/wsa:Address
wsa:ReferenceParameters xmlns:wsa=
http://www.w3.org/2005/08/addressing;
qman-wsa:ResourceId xmlns:qman-wsa=
http://amqp.apache.org/qpid/management/qman/addressing
09c45414-1adf-4bf1-b855-71c9597176e0/qman-wsa:ResourceId
/wsa:ReferenceParameters
/wsnt:SubscriptionReference
wsnt:Topic
Dialect=http://docs.oasis-open.org/wsn/t-1/TopicExpression/Concrete;
xmlns:qman=http://amqp.apache.org/qpid/management/qman
qman:EventsLifeCycleTopic/wsnt:Topic
wsnt:ProducerReference
wsa:ReferenceParameters xmlns:wsa=
http://www.w3.org/2005/08/addressing/
wsa:Address xmlns:wsa=http://www.w3.org/2005/08/addressing;
http://romagazzarini:8080/qman/services/adapter/wsa:Address
/wsnt:ProducerReference
wsnt:Message
qman:LifeCycleEvent TimeMillis=1234295015000 Type=CREATED
xmlns:qman=http://amqp.apache.org/qpid/management/qman;
qman:Resource
qman-wsa:ResourceId xmlns:qman-wsa=
http://amqp.apache.org/qpid/management/qman/addressing
aff2f6ec-2e5c-4768-ae87-6da2c8a005ff/qman-wsa:ResourceId
qman:PackageNameorg.apache.qpid.broker/qman:PackageName
qman:Nameconnection/qman:Name
/qman:Resource
/qman:LifeCycleEvent
/wsnt:Message
/wsnt:NotificationMessage

3) A similar notification (but with type=REMOVED) will be published when
an object instance (a connection for example) is removed

4) For events there are only CREATE notification. So on the second mentioned
topic a message will be published each time an event (for example a
subscribe event) is created on QMan (and therefore on Qpid)

Management clients will be able to subscribe to a topic and eventually can
specify a filter and the duration of the subscription.
This is a sample subscribe request :

soap:Envelope xmlns:soap=http://www.w3.org/2003/05/soap-envelope;
soap:Header
wsa:To xmlns:wsa=http://www.w3.org/2005/08/addressing;
http://romagazzarini:8080/qman/services/adapter/wsa:To
wsa:Action xmlns:wsa=http://www.w3.org/2005/08/addressing;
http://docs.oasis-open.org/wsn/bw-2/NotificationProducer/SubscribeRequest
/wsa:Action
wsa:MessageID xmlns:wsa=http://www.w3.org/2005/08/addressing
uuid:d0e13e13-63ee-5302-7b41-a1109776d168/wsa:MessageID
wsa:From xmlns:wsa=http://www.w3.org/2005/08/addressing;
wsa:Addresshttp://www.w3.org/2005/08/addressing/role/anonymous
/wsa:Address
/wsa:From
/soap:Header
soap:Body
wsnt:Subscribe xmlns:wsnt=http://docs.oasis-open.org/wsn/b-2;
wsnt:ConsumerReference
wsa:Address xmlns:wsa=http://www.w3.org/2005/08/addressing
http://romagazzarini:8080/qman/services/consumer/wsa:Address
/wsnt:ConsumerReference
wsnt:Filter
wsnt:TopicExpression
Dialect=
http://docs.oasis-open.org/wsn/t-1/TopicExpression/Concrete; xmlns:qman=
http://amqp.apache.org/qpid/management/qman;qman:ObjectsLifeCycleTopic/wsnt:TopicExpression
*-- The client is interested on qman:ObjectsLifeCycleTopic*. *If this
filter is omitted client will receive all messages of all topics*
/wsnt:Filter

wsnt:TerminationTime2009-02-10T20:56:09+01:00/wsnt:TerminationTime* --
Subscription will end on this date*. *If this is omitted the subscription
won't never end.*
/wsnt:Subscribe
/soap:Body
/soap:Envelope


Further improvement will be made in order to meet (eventual) management
client needs.

I believe now It's time to write documentation... :) Let's start!

Best regards,
Andrea


RE: Implementation of WS-Notifications (QPID-1582)

2009-02-11 Thread Robbie Gemmell
Oddness, works here:

[junit] Running org.apache.qpid.management.wsdm.WsDmAdapterTest
[junit] Tests run: 12, Failures: 0, Errors: 0, Time elapsed: 8.445 sec


-Original Message-
From: aidan.skin...@gmail.com [mailto:aidan.skin...@gmail.com] On Behalf Of
Aidan Skinner
Sent: 11 February 2009 15:16
To: dev@qpid.apache.org
Subject: Re: Implementation of WS-Notifications (QPID-1582)[MESSAGE NOT
SCANNED]

On Wed, Feb 11, 2009 at 2:34 PM, Andrea Gazzarini a.gazzar...@gmail.com
wrote:

 the last step (at the moment) of QMan is here : I just submitted code for
 QPID-1582 (implementation on QMan of WS-Notification).

I just updated and 12 tests in WsDmAdapterTest now fail for me with
the following stack:


java.lang.NullPointerException
at org.apache.muse.util.xml.XmlUtils.getAllElements(XmlUtils.java:872)
at org.apache.muse.util.xml.XmlUtils.getAllElements(XmlUtils.java:815)
at org.apache.muse.util.xml.XmlUtils.getAllElements(XmlUtils.java:791)
at
org.apache.muse.ws.addressing.soap.SimpleSoapClient.send(SimpleSoapClient.ja
va:312)
at
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClient.ja
va:285)
at
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClient.ja
va:254)
at
org.apache.muse.ws.resource.remote.WsResourceClient.getResourceProperty(WsRe
sourceClient.java:138)
at
org.apache.muse.ws.resource.sg.remote.ServiceGroupClient.getMembers(ServiceG
roupClient.java:110)
at
org.apache.qpid.management.wsdm.WsDmAdapterTest.setUp(WsDmAdapterTest.java:1
60)
at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
at junit.extensions.TestSetup.run(TestSetup.java:23)

:(

- Aidan

-- 
Apache Qpid - World Domination through Advanced Message Queueing
http://qpid.apache.org

-
Apache Qpid - AMQP Messaging Implementation
Project:  http://qpid.apache.org
Use/Interact: mailto:dev-subscr...@qpid.apache.org



-
Apache Qpid - AMQP Messaging Implementation
Project:  http://qpid.apache.org
Use/Interact: mailto:dev-subscr...@qpid.apache.org



Re: Implementation of WS-Notifications (QPID-1582)

2009-02-11 Thread Andrea Gazzarini
Sorry the tests were failing because I forgot to change a little thing
on a class.
I immediately made another submit for that.
That's the reason why now should be ok

Regards
Andrea

On 2/11/09, Aidan Skinner ai...@apache.org wrote:
 On Wed, Feb 11, 2009 at 3:40 PM, Robbie Gemmell gemme...@dcs.gla.ac.uk
 wrote:

 Oddness, works here:

[junit] Running org.apache.qpid.management.wsdm.WsDmAdapterTest
[junit] Tests run: 12, Failures: 0, Errors: 0, Time elapsed: 8.445 sec

 It just passed for me, although it had been failing consistently
 before that.  Weird..

 - Aidan
 --
 Apache Qpid - World Domination through Advanced Message Queueing
 http://qpid.apache.org

 -
 Apache Qpid - AMQP Messaging Implementation
 Project:  http://qpid.apache.org
 Use/Interact: mailto:dev-subscr...@qpid.apache.org



-- 
Sent from my mobile device

-
Apache Qpid - AMQP Messaging Implementation
Project:  http://qpid.apache.org
Use/Interact: mailto:dev-subscr...@qpid.apache.org



Re: Implementation of WS-Notifications (QPID-1582)

2009-02-11 Thread Aidan Skinner
On Wed, Feb 11, 2009 at 4:00 PM, Andrea Gazzarini a.gazzar...@gmail.com wrote:

 Sorry the tests were failing because I forgot to change a little thing
 on a class.
 I immediately made another submit for that.
 That's the reason why now should be ok

Ah, awesome. Thanks dude.

- Aidan
-- 
Apache Qpid - World Domination through Advanced Message Queueing
http://qpid.apache.org

-
Apache Qpid - AMQP Messaging Implementation
Project:  http://qpid.apache.org
Use/Interact: mailto:dev-subscr...@qpid.apache.org