[CONF] Apache Qpid: WS-DM Interface Specification (page edited)
Page Edited : qpid : WS-DM Interface Specification WS-DM Interface Specification has been edited by Andrea Gazzarini (Feb 19, 2009). (View changes) Content: WS-DM Interface Specification This section contains QMan WS-DM Interface Specification. Each interface will be detailed using a dedicated subsection with the following template: Name Description Description A brief description of the interface purpose Request Analysis of a sample request that the interface expects Response Analysis of a sample response that the interface produces Faults Enumeration of all faults that are generated in error scenarios Quick links Useful external links about the interface (OASIS specs, etc...) QMan has three different kinds of resources : 1 WSDM Adapter resource, which is the a facade that handles lifecycle of all managed WS-Resource; 0...* QMan WS Resource, which is a web service representation of a managed resource; This is directly part of QMan / Qpid management domain model; 1 Subscription Manager : the WS-Resource that enables notifications and allows clients to register themselves as notification listeners. WS-DM Adapter WS-Resource A stateful web service facade that acts as a front-end resource from a requestor endpoint perspective. Name Description MetadataExchange Defines messages to retrieve metadata associated with the adapter endpoint. Connect Allows a requestor to connect QMan with a broker. GetResourceMembers Allows a requestor to retrieve the catalogue of all managed resources. Subscribe Allows a requestor to be registered as a notification listener. GetCurrentMessage Allows a requestor to retrieve the last notification published on a given topic. QMan WS-Resource A stateful Qpid entity (that is part of Qpid management domain model) represented as a web service (stateful) instance on QMan side and therefore exposed for management. Name Description MetadataExchange Defines messages to retrieve metadata associated with a resource. GetResourcePropertyDocument Allows a requestor to retrieve the values of all resource properties associated with the resource. PutResourcePropertyDocument Allows a requestor to completely replace the values of a resource's properties with an entirely new resource property document. GetResourceProperty Allows a requestor to retrieve the value of a single resource property of a resource. SetResourceProperties Allows a requestor to modify the values of multiple resource properties of a resource. GetMultipleResourceProperties Allows a requestor to retrieve the values of multiple resource properties of a resource. QueryResourceProperties Allows arequestor to query the resource properties document of a resource using a query _expression_. Subscription Manager WS-Resource A web service endpoint that provides operations that allow a service requestor to manage subscription resources. Name Description MetadataExchange Defines messages to retrieve metadata associated with the subscription manager. PauseSubscription Allows a requestor to suspend the production of notifications on the given subscription. ResumeSubscription Allows a requestor to resume a previously suspended subscription. Powered by Atlassian Confluence (Version: 2.2.9 Build:#527 Sep 07, 2006) - Bug/feature request Unsubscribe or edit your notifications preferences - Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:commits-subscr...@qpid.apache.org
[CONF] Apache Qpid: WS-DM Interface Specification (page edited)
Page Edited : qpid : WS-DM Interface Specification WS-DM Interface Specification has been edited by Andrea Gazzarini (Feb 19, 2009). (View changes) Content: WS-DM Interface Specification This section contains QMan WS-DM Interface Specification. Each interface will be detailed using a dedicated subsection with the following template: Name Description Description A brief description of the interface purpose Request Analysis of a sample request that the interface expects Response Analysis of a sample response that the interface produces Faults Enumeration of all faults that are generated in error scenarios Quick links Useful external links about the interface (OASIS specs, etc...) QMan has three different kinds of resources : 1 WSDM Adapter resource, which is the a facade that handles lifecycle of all managed WS-Resource; 0...* QMan WS Resource, which is a web service representation of a managed resource; This is directly part of QMan / Qpid management domain model; 1 Subscription Manager : the WS-Resource that enables notifications and allows clients to register themselves as notification listeners. WS-DM Adapter WS-Resource A facade Web service stateful resource that acts as a front-end resource from a requestor endpoint perspective. Name Description MetadataExchange Defines messages to retrieve metadata associated with the adapter endpoint. Connect Allows a requestor to connect QMan with a broker. GetResourceMembers Allows a requestor to retrieve the catalogue of all managed resources. Subscribe Allows a requestor to be registered as a notification listener. GetCurrentMessage Allows a requestor to retrieve the last notification published on a given topic. QMan WS-Resource A stateful Qpid entity (that is part of Qpid management domain model) represented as a web service (stateful) instance on QMan side and therefore exposed for management. Name Description MetadataExchange Defines messages to retrieve metadata associated with a resource. GetResourcePropertyDocument Allows a requestor to retrieve the values of all resource properties associated with the resource. PutResourcePropertyDocument Allows a requestor to completely replace the values of a resource's properties with an entirely new resource property document. GetResourceProperty Allows a requestor to retrieve the value of a single resource property of a resource. SetResourceProperties Allows a requestor to modify the values of multiple resource properties of a resource. GetMultipleResourceProperties Allows a requestor to retrieve the values of multiple resource properties of a resource. QueryResourceProperties Allows arequestor to query the resource properties document of a resource using a query _expression_. Subscription Manager WS-Resource A web service endpoint that provides operations that allow a service requestor to manage subscription resources. Name Description MetadataExchange Defines messages to retrieve metadata associated with the subscription manager. PauseSubscription Allows a requestor to suspend the production of notifications on the given subscription. ResumeSubscription Allows a requestor to resume a previously suspended subscription. Powered by Atlassian Confluence (Version: 2.2.9 Build:#527 Sep 07, 2006) - Bug/feature request Unsubscribe or edit your notifications preferences - Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:commits-subscr...@qpid.apache.org
[CONF] Apache Qpid: SetResourceProperties (page edited)
Page Edited : qpid : SetResourceProperties SetResourceProperties has been edited by Andrea Gazzarini (Feb 19, 2009). (View changes) Content: SetResourceProperties Description Request Response Faults Quick links Description This interface allows a requestor to change the state of a WS-Resource, modifying the values of multiple resource properties. There are two types of changes that can be done on a resource property : Insert: wherein a new resource property element is inserted into the resource properties document; before of that the property was null and therefore wasn't part of the resource property document; Update: wherein existing resource property element(s) are udpated; that is, the property was already part of the resource property document; In order to be fully WSRF compliant, there should be a third type of change : Delete. It will be implemented sooner but keep in mind that at the moment is not supported. Request 01. xmlns:soap="http://www.w3.org/2003/05/soap-envelope"> 02. 03. xmlns:wsa="http://www.w3.org/2005/08/addressing"> 04.http://localhost:8080/qman/services/QManWsResource 05. 06. xmlns:wsa="http://www.w3.org/2005/08/addressing"> 07.http://docs.oasis-open.org/wsrf/rpw-2/SetResourceProperties/SetResourcePropertiesRequest 08. 09. xmlns:wsa="http://www.w3.org/2005/08/addressing"> 10.uuid:0cdb5112-09e0-ac39-06ba-393843f06e42 11. 12. xmlns:wsa="http://www.w3.org/2005/08/addressing"> 13. 14. http://www.w3.org/2005/08/addressing/role/anonymous 15. 16. 17. xmlns:wsa="http://www.w3.org/2005/08/addressing" wsa:IsReferenceParameter="true" xmlns:qman="http://amqp.apache.org/qpid/management/qman"> 18.781f4ad7-4c96-4caa-b69d-291461cdb1fc 19. xmlns:qman="http://amqp.apache.org/qpid/management/qman"> 21. xmlns:wsrf-rp="http://docs.oasis-open.org/wsrf/rp-2"> 22. This is a value for a string property. 23. 24. 12 25. Line(s) Description 01 The SOAP is the root element in every SOAP message, and contains two child elements, and . 02 The SOAP Header will contain all metadata used for identifying the conversation participants (requestor and provider). 03 - 05 Convey the target endpoint also known (in the request phase) as service provider. 06 - 08 Indicate this is a SetResourceProperties request. 09 - 11 Convey a unique identifier associated with the current message. This will be used for request / response messages correlation. 12 - 15 Provide the address of the source endpoint also known (in the request phase) as service requestor. 17 - 19 This indicates the target resource of this request. Specifically the line 18 contains the resource identifier. 20 - 22 The SetResourceProperties request. Change types are specified using nested children. 21 - 23 This is an Insert change type. The property "Type" (specified using the nested child) is null on the target resource and therefore is not yet part of the resource property document. After that request, that property will be inserted on the property document and will have a value of "This is a value for a string property." 24 - 25 This is an Update change type. The property "MgmtPubInterval" is not null on the target resource and therefore is already part of its property document. After the request will be processed, that property will have a value of 12. Response xmlns:soap="http://www.w3.org/2003/05/soap-envelope"> 01. xmlns:wsa="http://www.w3.org/2005/08/addressing"> 02.http://www.w3.org/2005/08/addressing/role/anonymous 03. 04. xmlns:wsa="http://www.w3.org/2005/08/addressing"> 05.http://docs.oasis-open.org/wsrf/rpw-2/SetResourceProperties/SetResourcePropertiesResponse 06. 07. xmlns:wsa="http://www.w3.org/2005/08/addressing"> 08.uuid:980617c8-e3a0-ebf1-8f5a-2b43d3d6d416 09. 10. "wsa:Reply" xmlns:wsa="http://www.w3.org/2005/08/addressing"> 11.uuid:0cdb5112-09e0-ac39-06ba-393843f06e42 12. 13. xmlns:wsa="http://www.w3.org/2005/08/addressing"> 14. 15. http://localhost:8080/qman/services/QManWsResource 16. 17. xmlns:wsa="http://www.w3.org/2005/08/addressing" wsa:IsReferenceParameter="true" xmlns:qman="http://amqp.apache.org/qpid/management/qman"> 18. 781f4ad7-4c96-4caa-b69d-291461cdb1fc 19. 20. 21. xmlns:wsrf-rp="http://docs.oasis-open.org/wsrf/rp-2"/> Line(s) Description 01 - 03 Convey the recipient of the response message. Note that this time we are talking about the service requestor; The address matches the previously found in the corresponding request. 04 - 06 Indicate this is a SetResourceProperties respons
[CONF] Apache Qpid: GetMultipleResourceProperties (page edited)
Page Edited : qpid : GetMultipleResourceProperties GetMultipleResourceProperties has been edited by Andrea Gazzarini (Feb 19, 2009). (View changes) Content: GetMultipleResourceProperties Description Request Response Faults Quick links Description This interface allows a requestor to retrieve the values of multiple resource properties of a WS-Resource. Request 01. xmlns:soap="http://www.w3.org/2003/05/soap-envelope"> 02. 03. xmlns:wsa="http://www.w3.org/2005/08/addressing"> 04.http://localhost:8080/qman/services/QManWsResource 05. 06. xmlns:wsa="http://www.w3.org/2005/08/addressing"> 07.http://docs.oasis-open.org/wsrf/rpw-2/GetMultipleResourceProperties/GetMultipleResourcePropertiesRequest 08. 09. xmlns:wsa="http://www.w3.org/2005/08/addressing"> 10.uuid:0cdb5112-09e0-ac39-06ba-393843f06e42 11. 12. xmlns:wsa="http://www.w3.org/2005/08/addressing"> 13. 14. http://www.w3.org/2005/08/addressing/role/anonymous 15. 16. 17. xmlns:wsa="http://www.w3.org/2005/08/addressing" wsa:IsReferenceParameter="true" xmlns:qman="http://amqp.apache.org/qpid/management/qman"> 18.781f4ad7-4c96-4caa-b69d-291461cdb1fc 19. 20. xmlns:wsrf-rp="http://docs.oasis-open.org/wsrf/rp-2" xmlns:qman="http://amqp.apache.org/qpid/management/qman"> 21.qman:MgmtPubInterval 22.qman:Name 23.qman:MsgTotalEnqueues 24.qman:Arguments 25.qman:VhostRef 26.qman:ExpireTime 27.qman:Durable 28.qman:ConsumerCount 29.qman:Type 30. Line(s) Description 01 The SOAP is the root element in every SOAP message, and contains two child elements, and . 02 The SOAP Header will contain all metadata used for identifying the conversation participants (requestor and provider). 03 - 05 Convey the target endpoint also known (in the request phase) as service provider. 06 - 08 Indicate this is a GetMultipleResourceProperties request. 09 - 11 Convey a unique identifier associated with the current message. This will be used for request / response messages correlation. 12 - 15 Provide the address of the source endpoint also known (in the request phase) as service requestor. 17 - 19 This indicates the target resource of this request. Specifically the line 18 contains the resource identifier. 20 - 30 The GetMultipleResourceProperties request. As you can see requested properties are nested children (line 21 - 29). 21 - 29 Each wsrf-rp:ResourceProperty contains a resource property QName. Response xmlns:soap="http://www.w3.org/2003/05/soap-envelope"> 01. xmlns:wsa="http://www.w3.org/2005/08/addressing"> 02.http://www.w3.org/2005/08/addressing/role/anonymous 03. 04. xmlns:wsa="http://www.w3.org/2005/08/addressing"> 05.http://docs.oasis-open.org/wsrf/rpw-2/GetMultipleResourceProperties/GetMultipleResourcePropertiesResponse 06. 07. xmlns:wsa="http://www.w3.org/2005/08/addressing"> 08.uuid:980617c8-e3a0-ebf1-8f5a-2b43d3d6d416 09. 10. "wsa:Reply" xmlns:wsa="http://www.w3.org/2005/08/addressing"> 11.uuid:0cdb5112-09e0-ac39-06ba-393843f06e42 12. 13. xmlns:wsa="http://www.w3.org/2005/08/addressing"> 14. 15. http://localhost:8080/qman/services/QManWsResource 16. 17. xmlns:wsa="http://www.w3.org/2005/08/addressing" wsa:IsReferenceParameter="true" xmlns:qman="http://amqp.apache.org/qpid/management/qman"> 18. 781f4ad7-4c96-4caa-b69d-291461cdb1fc 19. 20. 21. xmlns:qman="http://amqp.apache.org/qpid/management/qman" xmlns:wsrf-rp="http://docs.oasis-open.org/wsrf/rp-2"> 22.32767 23.Initial Name 24.9223372036854775797 25.xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> Key3 "xsd:integer">2147483647 Key4 "xsd:float">3.4028235E38 Key1 "xsd:string">aStringValue Key2 "xsd:long">-9223372036854775808 26. 27.2deef1b3-d2c6-49f3-a8de-51f6a75a1a6b 28.9223372036854775807 29.true 30.-2147483638 31. Line(s) Description 01 - 03 Convey the recipient of the response message. Note that this time we are talking about the service requestor; The address matches the previously found in the corresponding request. 04 - 06 Indicate this is a GetMultipleResourceProperties response. This is done as usual using a wsa:Action that is part of WS-Addressing specification. 07 - 09 Convey a unique identifier associated with the current response message. 10 - 12 This element provides the identifier of the correlated (request) message. 13 The element (part of WS-Addressing specs too) identifies the source endpoint, the originator of this response me
[CONF] Apache Qpid: GetResourceProperty (page edited)
Page Edited : qpid : GetResourceProperty GetResourceProperty has been edited by Andrea Gazzarini (Feb 19, 2009). (View changes) Content: GetResourceProperty Description Request Response Faults Quick links Description This interface allows a requestor to retrieve the value of a property of a WS-Resource. Request 01. xmlns:soap="http://www.w3.org/2003/05/soap-envelope"> 02. 03. xmlns:wsa="http://www.w3.org/2005/08/addressing"> 04.http://localhost:8080/qman/services/QManWsResource 05. 06. xmlns:wsa="http://www.w3.org/2005/08/addressing"> 07.http://docs.oasis-open.org/wsrf/rpw-2/GetResourceProperty/GetResourcePropertyRequest 08. 09. xmlns:wsa="http://www.w3.org/2005/08/addressing"> 10.uuid:0cdb5112-09e0-ac39-06ba-393843f06e42 11. 12. xmlns:wsa="http://www.w3.org/2005/08/addressing"> 13. 14. http://www.w3.org/2005/08/addressing/role/anonymous 15. 16. 17. xmlns:wsa="http://www.w3.org/2005/08/addressing" wsa:IsReferenceParameter="true" xmlns:qman="http://amqp.apache.org/qpid/management/qman"> 18.781f4ad7-4c96-4caa-b69d-291461cdb1fc 19. 20. xmlns:wsrf-rp="http://docs.oasis-open.org/wsrf/rp-2" xmlns:qman="http://amqp.apache.org/qpid/management/qman"> 21.qman:MgmtPubInterval 22. Line(s) Description 01 The SOAP is the root element in every SOAP message, and contains two child elements, and . 02 The SOAP Header will contain all metadata used for identifying the conversation participants (requestor and provider). 03 - 05 Convey the target endpoint also known (in the request phase) as service provider. 06 - 08 Indicate this is a GetResourceProperty request. 09 - 11 Convey a unique identifier associated with the current message. This will be used for request / response messages correlation. 12 - 15 Provide the address of the source endpoint also known (in the request phase) as service requestor. 17 - 19 This indicates the target resource of this request. Specifically the line 18 contains the resource identifier. 20 - 22 The GetResourceProperty request. The name of the property is the text content of this element (line 21). 21 Indicates the name of the property. In the example above the requestor is asking for the value of the MgmtPubInterval property. Response xmlns:soap="http://www.w3.org/2003/05/soap-envelope"> 01. xmlns:wsa="http://www.w3.org/2005/08/addressing"> 02.http://www.w3.org/2005/08/addressing/role/anonymous 03. 04. xmlns:wsa="http://www.w3.org/2005/08/addressing"> 05.http://docs.oasis-open.org/wsrf/rpw-2/GetResourceProperty/GetResourcePropertyResponse 06. 07. xmlns:wsa="http://www.w3.org/2005/08/addressing"> 08.uuid:980617c8-e3a0-ebf1-8f5a-2b43d3d6d416 09. 10. "wsa:Reply" xmlns:wsa="http://www.w3.org/2005/08/addressing"> 11.uuid:0cdb5112-09e0-ac39-06ba-393843f06e42 12. 13. xmlns:wsa="http://www.w3.org/2005/08/addressing"> 14. 15. http://localhost:8080/qman/services/QManWsResource 16. 17. xmlns:wsa="http://www.w3.org/2005/08/addressing" wsa:IsReferenceParameter="true" xmlns:qman="http://amqp.apache.org/qpid/management/qman"> 18. 781f4ad7-4c96-4caa-b69d-291461cdb1fc 19. 20. 21. xmlns:wsrf-rp="http://docs.oasis-open.org/wsrf/rp-2"> 22.xmlns:qman="http://amqp.apache.org/qpid/management/qman"> 23. 32767 24. 25. Line(s) Description 01 - 03 Convey the recipient of the response message. Note that this time we are talking about the service requestor; The address matches the previously found in the corresponding request. 04 - 06 Indicate this is a GetResourceProperty response. This is done as usual using a wsa:Action that is part of WS-Addressing specification. 07 - 09 Convey a unique identifier associated with the current response message. 10 - 12 This element provides the identifier of the correlated (request) message. 13 The element (part of WS-Addressing specs too) identifies the source endpoint, the originator of this response message. 14 - 16 This is the address of the source service endpoint. As said for lines 01-03 this time this is referred to service provider (the message originator). 17 - 20 As part of wsa:From element, this contains (specifically on line 18) additional information needed for identifying the originator of this message. 21 - 25 This is the GetResourceProperty response element which contains the requested property as nested child. 22 - 24 This element represents the requested property. Note that the name of the element is the name of the property. 23 Here is the value of the requested property. Faults ResourceUnknownFault : Th
[CONF] Apache Qpid: PutResourcePropertyDocument (page edited)
Page Edited : qpid : PutResourcePropertyDocument PutResourcePropertyDocument has been edited by Andrea Gazzarini (Feb 19, 2009). (View changes) Content: PutResourcePropertyDocument Description Request Response Faults Quick links Description This interface allows to completely / partially replace the resource property document of a WS-Resource. So briefly, it allows requestor to change resource internal state using the resource property document. This is the main difference between this interface and the SetResourceProperties : it operates the change(s) directly on the resource property document. Note for response message (extract from WS-ResourceProperties specification) : "If, after processing the PutResourcePropertyDocument request, the XML Infoset of the WS-Resource's resource properties document is identical to the XML Infoset of the contents of the PutResourcePropertyDocument request itself, then the contents of the PutResourcePropertyDocumentResponse MUST be empty. If, after processing the PutResourcePropertyDocument request, the XML Infoset of the WS-Resource's resource properties document is not identical to the XML Infoset of the contents of the PutResourcePropertyDocument request itself, then the contents of the PutResourcePropertyDocumentResponse MUST contain the updated resource property document. If an implementation cannot return all of the resource property values associated with the request, due to, for example, security considerations, then it MUST fault." Briefly, that means that if the request message contains the whole state of the target resource, and that whole state is successfully applied, then the response message will be empty. If, the request message contains a subsection of the resource property document and this partial "state" is applied to the target resource, then the response message will return the new resource property document taht reflects the current resource state. Request 01. xmlns:soap="http://www.w3.org/2003/05/soap-envelope"> 02. 03. xmlns:wsa="http://www.w3.org/2005/08/addressing"> 04.http://localhost:8080/qman/services/QManWsResource 05. 06. xmlns:wsa="http://www.w3.org/2005/08/addressing"> 07.http://docs.oasis-open.org/wsrf/rpw-2/PutResourcePropertyDocument/PutResourcePropertyDocumentRequest 08. 09. xmlns:wsa="http://www.w3.org/2005/08/addressing"> 10.uuid:0cdb5112-09e0-ac39-06ba-393843f06e42 11. 12. xmlns:wsa="http://www.w3.org/2005/08/addressing"> 13. 14. http://www.w3.org/2005/08/addressing/role/anonymous 15. 16. 17. xmlns:wsa="http://www.w3.org/2005/08/addressing" wsa:IsReferenceParameter="true" xmlns:qman="http://amqp.apache.org/qpid/management/qman"> 18.781f4ad7-4c96-4caa-b69d-291461cdb1fc 19. xmlns:qman="http://amqp.apache.org/qpid/management/qman"> 21. xmlns:wsrf-rp="http://docs.oasis-open.org/wsrf/rp-2"> 22. 23. 24. 4321 25. 26. 27. 28. New Name 29. 30. Line(s) Description 01 The SOAP is the root element in every SOAP message, and contains two child elements, and . 02 The SOAP Header will contain all metadata used for identifying the conversation participants (requestor and provider). 03 - 05 Convey the target endpoint also known (in the request phase) as service provider. 06 - 08 Indicate this is a PutResourcePropertyDocument request. 09 - 11 Convey a unique identifier associated with the current message. This will be used for request / response messages correlation. 12 - 15 Provide the address of the source endpoint also known (in the request phase) as service requestor. 17 - 19 This indicates the target resource of this request. Specifically the line 18 contains the resource identifier. 21 - 30 The PutResourcePropertyDocument request. That will contain the new resource property document (total or partial). 22 - 29 This is the new resource property document. In this example it contains only two properties : MgmtPubInterval (23 - 25) and Name (27 - 29). Response xmlns:soap="http://www.w3.org/2003/05/soap-envelope"> 01. xmlns:wsa="http://www.w3.org/2005/08/addressing"> 02.http://www.w3.org/2005/08/addressing/role/anonymous 03. 04. xmlns:wsa="http://www.w3.org/2005/08/addressing"> 05.http://docs.oasis-open.org/wsrf/rpw-2/SetResourceProperties/SetResourcePropertiesResponse 06. 07. xmlns:wsa="http://www.w3.org/2005/08/addressing"> 08.uuid:980617c8-e3a0-ebf1-8f5a-2b43d3d6d416 09. 10. "wsa:Reply" xmlns:wsa="http://www.w3.org/2005/08/addressing"> 11.uuid:0cdb5112-09e0-ac39-06ba-393843f06e42 12. 13. xmlns:wsa="http://www.w3.org/2005/08/addressing"> 14. 15. http://localhost:8080/qman/services/QManWsResource 16.
[CONF] Apache Qpid: Connect (page edited)
Page Edited : qpid : Connect Connect has been edited by Andrea Gazzarini (Feb 19, 2009). (View changes) Content: Connect Description Request Response Faults UnableToConnectFault Quick links Description The Connect interface allows to estabilish QMan with a Qpid broker. Two categories of parameters need to be sent in order to make a connect request : connection parameters : host, port, username, password and virtual host name; connection pool parameters : for each connected broker a dedicated connection pool is created too. Those parameters allows a requestor to configure that pool. Request 01. xmlns:soap="http://www.w3.org/2003/05/soap-envelope"> 02. 03. xmlns:wsa="http://www.w3.org/2005/08/addressing"> 04.http://localhost:8080/qman/services/adapter 05. 06. xmlns:wsa="http://www.w3.org/2005/08/addressing"> 07.http://amqp.apache.org/qpid/management/qman/Connect 08. 09. xmlns:wsa="http://www.w3.org/2005/08/addressing"> 10.uuid:0cdb5112-09e0-ac39-06ba-393843f06e42 11. 12. xmlns:wsa="http://www.w3.org/2005/08/addressing"> 13. 14. http://www.w3.org/2005/08/addressing/role/anonymous 15. 16. 17. xmlns:qman="http://amqp.apache.org/qpid/management/qman"> 18.sofia.gazzax.com 19.5672 20.a.gazzarini 21.p1ssw9rd 22.test 23.1 24.4 25.2000 26. Line(s) Description 01 The SOAP is the root element in every SOAP message, and contains two child elements, and . 02 The SOAP Header will contain all metadata used for identifying the conversation participants (requestor and provider). 03 - 05 Convey the target endpoint also known (in the request phase) as service provider. 06 - 08 Indicate this is a Connect request. This is done using a wsa:Action that is part of WS-Addressing specification. 09 - 11 Convey a unique identifier associated with the current message. This will be used for request / response messages correlation. 12 - 15 Provide the address of the source endpoint also known (in the request phase) as service requestor. 17 - 26 The connect request. Subsequent children specify connection parameters. 18 The host name / IP address where the broker is running. 19 The port number on which the broker is listening. 20 Username used for estabilishing the connection. 21 Password used for estabilishing the connection. 22 The virtual host name. 23 The initial size of broker dedicated connection pool. That means the number of connections that will be immediately created. 24 The maximum allowed size of broker dedicated connection pool. 25 The maximum wait timeout for retrieving connections from connection pool. A value of -1 means "Waits forever!" Response xmlns:soap="http://www.w3.org/2003/05/soap-envelope"> 01. xmlns:wsa="http://www.w3.org/2005/08/addressing"> 02.http://www.w3.org/2005/08/addressing/role/anonymous 03. 04. xmlns:wsa="http://www.w3.org/2005/08/addressing"> 05.http://amqp.apache.org/qpid/management/qman/ConnectResponse 06. 07. xmlns:wsa="http://www.w3.org/2005/08/addressing"> 08.uuid:980617c8-e3a0-ebf1-8f5a-2b43d3d6d416 09. 10. "wsa:Reply" xmlns:wsa="http://www.w3.org/2005/08/addressing"> 11.uuid:0cdb5112-09e0-ac39-06ba-393843f06e42 12. 13. xmlns:wsa="http://www.w3.org/2005/08/addressing"> 14. 15. http://localhost:8080/qman/services/adapter 16. 17. xmlns:qman="http://amqp.apache.org/qpid/management/qman"/> Line(s) Description 01 - 03 Convey the recipient of the response message. Note that this time we are talking about the service requestor; The address matches the previously found in the corresponding request 04 - 06 Indicate this is a Connect response. This is done as usual using a wsa:Action that is part of WS-Addressing specification 07 - 09 Convey a unique identifier associated with the current response message 10 - 12 This element provides the identifier of the correlated (request) message 13 The element (part of WS-Addressing specs too) identifies the source endpoint, the originator of this response message 14 - 16 This is the address of the source service endpoint. As said for lines 01-03 this time this is referred to service provider (the message originator) 17 This is the connect response. Note that this is an empty element because this operation is void. Faults UnableToConnectFault This is the only fault that could be returned as conseguence of a connect request. That means QMan was unable to connect with the requested broker. xmlns:soap="http://www.w3.org/2003/05/soap-envelope"> xmlns:wsa="http://www.w3.org/2005/08/addressing"> http://www.w3.org
[CONF] Apache Qpid: MetadataExchange (page edited)
Page Edited : qpid : MetadataExchange MetadataExchange has been edited by Andrea Gazzarini (Feb 19, 2009). (View changes) Content: Metadata Exchange (WS-MetadataExchange) Description Request Response WSDL Dialect RMD Dialect Faults Quick links Description QMan WS-Resources are basically web services. Web Services use metadata to describe what other endpoints need to know in order to interact with them. The MetadataExchange interface allows a requestor to query a specific WS-Resource for its metadata. Request 01. xmlns:soap="http://www.w3.org/2003/05/soap-envelope"> 02. 03. xmlns:wsa="http://www.w3.org/2005/08/addressing"> 04.http://localhost:8080/qman/services/QManWsResource 05. 06. xmlns:wsa="http://www.w3.org/2005/08/addressing"> 07.http://schemas.xmlsoap.org/ws/2004/09/mex/GetMetadata 08. 09. xmlns:wsa="http://www.w3.org/2005/08/addressing"> 10.uuid:0cdb5112-09e0-ac39-06ba-393843f06e42 11. 12. xmlns:wsa="http://www.w3.org/2005/08/addressing"> 13. 14. http://www.w3.org/2005/08/addressing/role/anonymous 15. 16. 17. xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:qman-wsa="http://amqp.apache.org/qpid/management/qman/addressing" wsa:IsReferenceParameter="true"> 18.a3759467-bede-476d-8dde-169f1a652191 19. 20. 21. xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex"> 22. 23.http://schemas.xmlsoap.org/wsdl/ 24. Line(s) Description 01 The SOAP is the root element in every SOAP message, and contains two child elements, and 02 The SOAP Header will contain all metadata used for identifying the conversation participants (requestor and provider) 03 - 05 Convey the target endpoint also known (in the request phase) as service provider. Note that an additional information (ResourceId) needs to be supplied in order to correctly identify the target WS-Resource 06 - 08 Indicate this is a Get Metadata request. This is done using a wsa:Action that is part of WS-Addressing specification 09 - 11 Convey a unique identifier associated with the current message. This will be used for request / response messages correlation 12 - 15 Provide the address of the source endpoint also known (in the request phase) as service requestor 17 - 19 Provide the WS-Resource identifier. That allows to correctly identify the requested instance 20 The SOAP is a mandatory sub-element of the Envelope, which contains information intended for the recipient of the current message; 21 The GetMetadata request; 22 Dialect associated with the requested metadata. We could say that it identifies a specific kind of metadata. As MetadataExchange specs says : "When this element is present, the response MUST include only Metadata Sections with the indicated dialect; if the receiver does not have any Metadata Sections of the indicated dialect, the response MUST include zero Metadata Sections. When this element is not present, the implied value is any dialect." At the moment there are two supported dialects : Web Service Description Language (WSDL) : dialect in this case is : _http://schemas.xmlsoap.org/wsdl/_ Resource Metadata Descriptor (RMD) : dialect in this case is : _http://docs.oasis-open.org/wsrf/rmd-1_ Response MetadataExchange supports two dialects and therefore there could be two different responses depending on the requested dialect. WSDL Dialect The following illustrates an example response of a GetMetadata request with WSDL dialect. For simplicity only the top level element has been reported. You can find a complete metadata exchange conversation under the example directory. xmlns:soap="http://www.w3.org/2003/05/soap-envelope"> 01. xmlns:wsa="http://www.w3.org/2005/08/addressing"> 02. http://www.w3.org/2005/08/addressing/role/anonymous 03. 04. xmlns:wsa="http://www.w3.org/2005/08/addressing"> 05. http://schemas.xmlsoap.org/ws/2004/09/mex/GetMetadataResponse 06. 07. xmlns:wsa="http://www.w3.org/2005/08/addressing"> 08. uuid:980617c8-e3a0-ebf1-8f5a-2b43d3d6d416 09. 10. "wsa:Reply" xmlns:wsa="http://www.w3.org/2005/08/addressing"> 11. uuid:0cdb5112-09e0-ac39-06ba-393843f06e42 12. 13. xmlns:wsa="http://www.w3.org/2005/08/addressing"> 14. 15.http://localhost:8080/qman/services/QManWsResource 16. 17. 18."true" xmlns:qman-wsa="http://amqp.apache.org/qpid/management/qman/addressing" xmlns:wsa="http://www.w3.org/2005/08/addressing"> 19. a3759467-bede-476d-8dde-169f1a652191 20. 21. xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex"> 22. 23. ..
[CONF] Apache Qpid: QueryResourceProperties (page created)
Page Created : qpid : QueryResourceProperties QueryResourceProperties has been created by Andrea Gazzarini (Feb 19, 2009). Content: QueryResourceProperties Description Request Response Faults Quick links Description This interface allows a requestor to query the resource properties document of a managed resource using a query _expression_. The given _expression_ is evaluated against the resource properties document of the target resource. Note that although this request allows to declare a dialect for the given _expression_, only the XPath 1.0 dialect is supported at the moment. Request 01. xmlns:soap="http://www.w3.org/2003/05/soap-envelope"> 02. 03. xmlns:wsa="http://www.w3.org/2005/08/addressing"> 04.http://localhost:8080/qman/services/QManWsResource 05. 06. xmlns:wsa="http://www.w3.org/2005/08/addressing"> 07.http://docs.oasis-open.org/wsrf/rpw-2/QueryResourceProperties/QueryResourcePropertiesRequest 08. 09. xmlns:wsa="http://www.w3.org/2005/08/addressing"> 10.uuid:0cdb5112-09e0-ac39-06ba-393843f06e42 11. 12. xmlns:wsa="http://www.w3.org/2005/08/addressing"> 13. 14. http://www.w3.org/2005/08/addressing/role/anonymous 15. 16. 17. xmlns:wsa="http://www.w3.org/2005/08/addressing" wsa:IsReferenceParameter="true" xmlns:qman="http://amqp.apache.org/qpid/management/qman"> 18.781f4ad7-4c96-4caa-b69d-291461cdb1fc 19. 20. 21."http://www.w3.org/TR/1999/REC-xpath-19991116" > 22. boolean(/*/MgtPubInterval > 100 and /*/MsgTotalEnqueues > 56272) 23. 24. Line(s) Description 01 The SOAP is the root element in every SOAP message, and contains two child elements, and . 02 The SOAP Header will contain all metadata used for identifying the conversation participants (requestor and provider). 03 - 05 Convey the target endpoint also known (in the request phase) as service provider. 06 - 08 Indicate this is a QueryResourceProperties request. 09 - 11 Convey a unique identifier associated with the current message. This will be used for request / response messages correlation. 12 - 15 Provide the address of the source endpoint also known (in the request phase) as service requestor. 17 - 19 This indicates the target resource of this request. Specifically the line 18 contains the resource identifier. 20 - 22 The QueryResourceProperties request. 22 The XPath _expression_ that will be evaluated against the resource properties document of the target resource. In this example we want to know if the property "MgmtPubInterval" is greater than 100 and the property MsgTotalEnqueues is greater than 56272. Response xmlns:soap="http://www.w3.org/2003/05/soap-envelope"> 01. xmlns:wsa="http://www.w3.org/2005/08/addressing"> 02.http://www.w3.org/2005/08/addressing/role/anonymous 03. 04. xmlns:wsa="http://www.w3.org/2005/08/addressing"> 05.http://docs.oasis-open.org/wsrf/rpw-2/QueryResourceProperties/QueryResourcePropertiesResponse 06. 07. xmlns:wsa="http://www.w3.org/2005/08/addressing"> 08.uuid:980617c8-e3a0-ebf1-8f5a-2b43d3d6d416 09. 10. "wsa:Reply" xmlns:wsa="http://www.w3.org/2005/08/addressing"> 11.uuid:0cdb5112-09e0-ac39-06ba-393843f06e42 12. 13. xmlns:wsa="http://www.w3.org/2005/08/addressing"> 14. 15. http://localhost:8080/qman/services/QManWsResource 16. 17. xmlns:wsa="http://www.w3.org/2005/08/addressing" wsa:IsReferenceParameter="true" xmlns:qman="http://amqp.apache.org/qpid/management/qman"> 18. 781f4ad7-4c96-4caa-b69d-291461cdb1fc 19. 20. 21. xmlns:wsrf-rp="http://docs.oasis-open.org/wsrf/rp-2"> 22.true 23. Line(s) Description 01 - 03 Convey the recipient of the response message. Note that this time we are talking about the service requestor; The address matches the previously found in the corresponding request. 04 - 06 Indicate this is a QueryResourceProperties response. This is done as usual using a wsa:Action that is part of WS-Addressing specification. 07 - 09 Convey a unique identifier associated with the current response message. 10 - 12 This element provides the identifier of the correlated (request) message. 13 The element (part of WS-Addressing specs too) identifies the source endpoint, the originator of this response message. 14 - 16 This is the address of the source service endpoint. As said for lines 01-03 this time this is referred to service provider (the message originator). 17 - 20 As part of wsa:From element, this contains (specifically on line 18) additional information needed for identifying the originator of this message. 21 - 23 This is the QuertyResourceProperties response element which contains the result
svn commit: r746061 [2/2] - in /qpid/trunk/qpid/cpp/src: ./ qpid/sys/ qpid/sys/posix/ qpid/sys/windows/ tests/
Modified: qpid/trunk/qpid/cpp/src/qpid/sys/posix/PollableCondition.cpp URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/sys/posix/PollableCondition.cpp?rev=746061&r1=746060&r2=746061&view=diff == --- qpid/trunk/qpid/cpp/src/qpid/sys/posix/PollableCondition.cpp (original) +++ qpid/trunk/qpid/cpp/src/qpid/sys/posix/PollableCondition.cpp Fri Feb 20 00:04:37 2009 @@ -22,17 +22,46 @@ * */ -#include "PollableCondition.h" +#include "qpid/sys/PollableCondition.h" +#include "qpid/sys/DispatchHandle.h" +#include "qpid/sys/IOHandle.h" #include "qpid/sys/posix/PrivatePosix.h" #include "qpid/Exception.h" +#include + #include #include namespace qpid { namespace sys { -PollableCondition::PollableCondition() : IOHandle(new sys::IOHandlePrivate) { +class PollableConditionPrivate : public sys::IOHandle { +friend class PollableCondition; + +private: +PollableConditionPrivate(const sys::PollableCondition::Callback& cb, + sys::PollableCondition& parent, + const boost::shared_ptr& poller); +~PollableConditionPrivate(); + +void dispatch(sys::DispatchHandle& h); +void rewatch(); +void unwatch(); + +private: +PollableCondition::Callback cb; +PollableCondition& parent; +boost::shared_ptr poller; +int writeFd; +std::auto_ptr handle; +}; + +PollableConditionPrivate::PollableConditionPrivate(const sys::PollableCondition::Callback& cb, + sys::PollableCondition& parent, + const boost::shared_ptr& poller) + : IOHandle(new sys::IOHandlePrivate), cb(cb), parent(parent) +{ int fds[2]; if (::pipe(fds) == -1) throw ErrnoException(QPID_MSG("Can't create PollableCondition")); @@ -42,22 +71,71 @@ throw ErrnoException(QPID_MSG("Can't create PollableCondition")); if (::fcntl(writeFd, F_SETFL, O_NONBLOCK) == -1) throw ErrnoException(QPID_MSG("Can't create PollableCondition")); +handle.reset (new DispatchHandleRef(*this, + boost::bind(&sys::PollableConditionPrivate::dispatch, this, _1), +0, 0)); +handle->startWatch(poller); +handle->unwatch(); +} + +PollableConditionPrivate::~PollableConditionPrivate() +{ +handle->stopWatch(); +close(writeFd); +} + +void PollableConditionPrivate::dispatch(sys::DispatchHandle& /*h*/) +{ +cb(parent); +} + +void PollableConditionPrivate::rewatch() +{ +handle->rewatch(); +} + +void PollableConditionPrivate::unwatch() +{ +handle->unwatch(); +} + + /* PollableCondition */ + +PollableCondition::PollableCondition(const Callback& cb, + const boost::shared_ptr& poller) + : impl(new PollableConditionPrivate(cb, *this, poller)) +{ +} + +PollableCondition::~PollableCondition() +{ +delete impl; +} + +void PollableCondition::set() { +static const char dummy=0; +ssize_t n = ::write(impl->writeFd, &dummy, 1); +if (n == -1 && errno != EAGAIN) +throw ErrnoException("Error setting PollableCondition"); } bool PollableCondition::clear() { char buf[256]; ssize_t n; bool wasSet = false; -while ((n = ::read(impl->fd, buf, sizeof(buf))) > 0) +while ((n = ::read(impl->impl->fd, buf, sizeof(buf))) > 0) wasSet = true; -if (n == -1 && errno != EAGAIN) throw ErrnoException(QPID_MSG("Error clearing PollableCondition")); +if (n == -1 && errno != EAGAIN) +throw ErrnoException(QPID_MSG("Error clearing PollableCondition")); return wasSet; } -void PollableCondition::set() { -static const char dummy=0; -ssize_t n = ::write(writeFd, &dummy, 1); -if (n == -1 && errno != EAGAIN) throw ErrnoException("Error setting PollableCondition"); +void PollableCondition::disarm() { +impl->unwatch(); +} + +void PollableCondition::rearm() { +impl->rewatch(); } @@ -71,22 +149,35 @@ namespace qpid { namespace sys { -PollableCondition::PollableCondition() : IOHandle(new sys::IOHandlePrivate) { +PollableConditionPrivate::PollableConditionPrivate(const PollableCondition::Callback& cb, + sys::PollableCondition& parent, + const boost::shared_ptr& poller) + : cb(cb), parent(parent), poller(poller), +IOHandle(new sys::IOHandlePrivate) { impl->fd = ::eventfd(0, 0); if (impl->fd < 0) throw ErrnoException("conditionfd() failed"); } +void PollableCondition::set() { +static const uint64_t value=1; +ssize_t n = ::write(impl->impl->fd, +reinterpret_cast(&value), 8); +if (n != 8) throw ErrnoException("write failed on conditionfd"); +} + bool PollableCondition::clear() { char buf[8]; -ssize_t n = ::read(impl-
svn commit: r746054 - in /qpid/branches/win-pollable-condition/qpid/cpp/src: Makefile.am common.vcproj
Author: shuston Date: Thu Feb 19 23:30:48 2009 New Revision: 746054 URL: http://svn.apache.org/viewvc?rev=746054&view=rev Log: Add new windows/PollableCondition.cpp Modified: qpid/branches/win-pollable-condition/qpid/cpp/src/Makefile.am qpid/branches/win-pollable-condition/qpid/cpp/src/common.vcproj Modified: qpid/branches/win-pollable-condition/qpid/cpp/src/Makefile.am URL: http://svn.apache.org/viewvc/qpid/branches/win-pollable-condition/qpid/cpp/src/Makefile.am?rev=746054&r1=746053&r2=746054&view=diff == --- qpid/branches/win-pollable-condition/qpid/cpp/src/Makefile.am (original) +++ qpid/branches/win-pollable-condition/qpid/cpp/src/Makefile.am Thu Feb 19 23:30:48 2009 @@ -41,6 +41,7 @@ qpid/sys/windows/IOHandle.cpp \ qpid/sys/windows/IoHandlePrivate.h \ qpid/sys/windows/LockFile.cpp \ + qpid/sys/windows/PollableCondition.cpp \ qpid/sys/windows/Mutex.h \ qpid/sys/windows/Shlib.cpp \ qpid/sys/windows/Socket.cpp \ Modified: qpid/branches/win-pollable-condition/qpid/cpp/src/common.vcproj URL: http://svn.apache.org/viewvc/qpid/branches/win-pollable-condition/qpid/cpp/src/common.vcproj?rev=746054&r1=746053&r2=746054&view=diff == --- qpid/branches/win-pollable-condition/qpid/cpp/src/common.vcproj (original) +++ qpid/branches/win-pollable-condition/qpid/cpp/src/common.vcproj Thu Feb 19 23:30:48 2009 @@ -894,7 +894,7 @@ > http://qpid.apache.org Use/Interact: mailto:commits-subscr...@qpid.apache.org
svn commit: r746052 - /qpid/branches/win-pollable-condition/qpid/cpp/src/qpid/sys/windows/PollableCondition.cpp
Author: shuston Date: Thu Feb 19 23:13:37 2009 New Revision: 746052 URL: http://svn.apache.org/viewvc?rev=746052&view=rev Log: Tweaks Modified: qpid/branches/win-pollable-condition/qpid/cpp/src/qpid/sys/windows/PollableCondition.cpp Modified: qpid/branches/win-pollable-condition/qpid/cpp/src/qpid/sys/windows/PollableCondition.cpp URL: http://svn.apache.org/viewvc/qpid/branches/win-pollable-condition/qpid/cpp/src/qpid/sys/windows/PollableCondition.cpp?rev=746052&r1=746051&r2=746052&view=diff == --- qpid/branches/win-pollable-condition/qpid/cpp/src/qpid/sys/windows/PollableCondition.cpp (original) +++ qpid/branches/win-pollable-condition/qpid/cpp/src/qpid/sys/windows/PollableCondition.cpp Thu Feb 19 23:13:37 2009 @@ -76,6 +76,8 @@ if (!armed) return; +// addFd will queue a completion for the IOCP; when it's handled, a +// poller thread will call back to dispatch() below. PollerHandle ph(*this); poller->addFd(ph, Poller::INPUT); } - Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:commits-subscr...@qpid.apache.org
svn commit: r745900 - /qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java
Author: rhs Date: Thu Feb 19 15:33:14 2009 New Revision: 745900 URL: http://svn.apache.org/viewvc?rev=745900&view=rev Log: QPID-1665: turn off ack delay if qpid.session.max_ack_delay is set to a non-positive value Modified: qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java Modified: qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java?rev=745900&r1=745899&r2=745900&view=diff == --- qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java (original) +++ qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java Thu Feb 19 15:33:14 2009 @@ -88,20 +88,8 @@ // a ref on the qpid connection protected org.apache.qpid.transport.Connection _qpidConnection; -private TimerTask flushTask = new TimerTask() -{ -public void run() -{ -try -{ -flushAcknowledgments(); -} -catch (Throwable t) -{ -_logger.error("error flushing acks", t); -} -} -}; +private long maxAckDelay = Long.getLong("qpid.session.max_ack_delay", 1000); +private TimerTask flushTask = null; private RangeSet unacked = new RangeSet(); private int unackedCount = 0; @@ -138,7 +126,25 @@ { _qpidSession.txSelect(); } -timer.schedule(flushTask, new Date(), Long.getLong("qpid.session.max_ack_delay", 1000)); + +if (maxAckDelay > 0) +{ +flushTask = new TimerTask() +{ +public void run() +{ +try +{ +flushAcknowledgments(); +} +catch (Throwable t) +{ +_logger.error("error flushing acks", t); +} +} +}; +timer.schedule(flushTask, new Date(), maxAckDelay); +} } /** @@ -222,7 +228,7 @@ long prefetch = getAMQConnection().getMaxPrefetch(); -if (unackedCount >= prefetch/2) +if (unackedCount >= prefetch/2 || maxAckDelay <= 0) { flushAcknowledgments(); } @@ -296,7 +302,10 @@ */ public void sendClose(long timeout) throws AMQException, FailoverException { -flushTask.cancel(); +if (flushTask != null) +{ +flushTask.cancel(); +} flushAcknowledgments(); getQpidSession().sync(); getQpidSession().close(); - Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:commits-subscr...@qpid.apache.org
svn commit: r745892 - in /qpid/trunk/qpid/java: client/src/main/java/org/apache/qpid/client/ common/ common/src/main/java/org/apache/qpid/transport/
Author: rhs Date: Thu Feb 19 15:09:26 2009 New Revision: 745892 URL: http://svn.apache.org/viewvc?rev=745892&view=rev Log: QPID-1665: add a timer to ensure message acking is never delayed more than 1000 ms by default, this is configurable by qpid.session.max_ack_delay Modified: qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java qpid/trunk/qpid/java/common/Composite.tpl qpid/trunk/qpid/java/common/Option.tpl qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/transport/Method.java qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/transport/Session.java Modified: qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java?rev=745892&r1=745891&r2=745892&view=diff == --- qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java (original) +++ qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java Thu Feb 19 15:09:26 2009 @@ -52,9 +52,12 @@ import javax.jms.*; import javax.jms.IllegalStateException; +import java.util.Date; import java.util.HashMap; import java.util.UUID; import java.util.Map; +import java.util.Timer; +import java.util.TimerTask; /** * This is a 0.10 Session @@ -68,6 +71,8 @@ */ private static final Logger _logger = LoggerFactory.getLogger(AMQSession_0_10.class); +private static Timer timer = new Timer("ack-flusher", true); + /** * The underlying QpidSession @@ -83,6 +88,20 @@ // a ref on the qpid connection protected org.apache.qpid.transport.Connection _qpidConnection; +private TimerTask flushTask = new TimerTask() +{ +public void run() +{ +try +{ +flushAcknowledgments(); +} +catch (Throwable t) +{ +_logger.error("error flushing acks", t); +} +} +}; private RangeSet unacked = new RangeSet(); private int unackedCount = 0; @@ -119,6 +138,7 @@ { _qpidSession.txSelect(); } +timer.schedule(flushTask, new Date(), Long.getLong("qpid.session.max_ack_delay", 1000)); } /** @@ -142,14 +162,20 @@ private void addUnacked(int id) { -unacked.add(id); -unackedCount++; +synchronized (unacked) +{ +unacked.add(id); +unackedCount++; +} } private void clearUnacked() { -unacked.clear(); -unackedCount = 0; +synchronized (unacked) +{ +unacked.clear(); +unackedCount = 0; +} } //--- overwritten methods of class AMQSession @@ -196,19 +222,22 @@ long prefetch = getAMQConnection().getMaxPrefetch(); -if (unackedCount >= prefetch/2 || _acknowledgeMode != org.apache.qpid.jms.Session.NO_ACKNOWLEDGE) +if (unackedCount >= prefetch/2) { flushAcknowledgments(); -} +} } void flushAcknowledgments() { -if (unackedCount > 0) +synchronized (unacked) { -messageAcknowledge -(unacked, _acknowledgeMode != org.apache.qpid.jms.Session.NO_ACKNOWLEDGE); -clearUnacked(); +if (unackedCount > 0) +{ +messageAcknowledge +(unacked, _acknowledgeMode != org.apache.qpid.jms.Session.NO_ACKNOWLEDGE); +clearUnacked(); +} } } @@ -222,7 +251,7 @@ ssn.flushProcessed(accept ? BATCH : NONE); if (accept) { -ssn.messageAccept(ranges); +ssn.messageAccept(ranges, UNRELIABLE); } } @@ -267,6 +296,7 @@ */ public void sendClose(long timeout) throws AMQException, FailoverException { +flushTask.cancel(); flushAcknowledgments(); getQpidSession().sync(); getQpidSession().close(); @@ -692,7 +722,7 @@ String binddingKey = ""; for(AMQShortString key : amqd.getBindingKeys()) { - binddingKey = binddingKey + "_" + key.toString(); + binddingKey = binddingKey + "_" + key.toString(); } amqd.setQueueName(new AMQShortString( binddingKey + "@" + amqd.getExchangeName().toString() + "_" + UUID.randomUUID())); @@ -722,7 +752,7 @@ } } - + public TopicSubscriber createDurableSubscriber(Topic topic, String name) throws JMSException @@ -800,14 +830,14 @@ /**
svn commit: r745834 - /qpid/trunk/qpid/cpp/src/tests/federated_cluster_test
Author: gsim Date: Thu Feb 19 12:19:15 2009 New Revision: 745834 URL: http://svn.apache.org/viewvc?rev=745834&view=rev Log: Ensure pythonpath is set correctly Modified: qpid/trunk/qpid/cpp/src/tests/federated_cluster_test Modified: qpid/trunk/qpid/cpp/src/tests/federated_cluster_test URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/federated_cluster_test?rev=745834&r1=745833&r2=745834&view=diff == --- qpid/trunk/qpid/cpp/src/tests/federated_cluster_test (original) +++ qpid/trunk/qpid/cpp/src/tests/federated_cluster_test Thu Feb 19 12:19:15 2009 @@ -54,6 +54,7 @@ } setup() { +export PYTHONPATH=$PYTHON_DIR #create exchange on both cluster and single broker $PYTHON_DIR/commands/qpid-config -a "localhost:$BROKER_A" add exchange direct test-exchange $PYTHON_DIR/commands/qpid-config -a "localhost:$NODE_1" add exchange direct test-exchange - Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:commits-subscr...@qpid.apache.org
svn commit: r745832 - in /qpid/trunk/qpid/python: commands/qpid-cluster qmf/console.py
Author: tross Date: Thu Feb 19 12:00:46 2009 New Revision: 745832 URL: http://svn.apache.org/viewvc?rev=745832&view=rev Log: QPID-1669 - Added client connection management to qpid-cluster. Also added better session-id discrimination in the qmf.console library. Modified: qpid/trunk/qpid/python/commands/qpid-cluster qpid/trunk/qpid/python/qmf/console.py Modified: qpid/trunk/qpid/python/commands/qpid-cluster URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/python/commands/qpid-cluster?rev=745832&r1=745831&r2=745832&view=diff == --- qpid/trunk/qpid/python/commands/qpid-cluster (original) +++ qpid/trunk/qpid/python/commands/qpid-cluster Thu Feb 19 12:00:46 2009 @@ -23,12 +23,17 @@ import getopt import sys import locale +import socket +import re from qmf.console import Session _host = "localhost" _stopId = None _stopAll = False _force = False +_numeric = False +_showConn = False +_delConn = None def Usage (): print "Usage: qpid-cluster [OPTIONS] [broker-addr]" @@ -37,12 +42,40 @@ print " ex: localhost, 10.1.1.7:1, broker-host:1, guest/gu...@localhost" print print "Options:" -print " -s [--stop] ID Stop one member of the cluster by its ID" -print " -k [--all-stop] Shut down the whole cluster" -print " -f [--force] Suppress the 'are-you-sure?' prompt" +print " -C [--all-connections] View client connections to all cluster members" +print " -c [--connections] ID View client connections to specified member" +print " -d [--del-connection] HOST:PORT" +print " Disconnect a client connection" +print " -s [--stop] ID Stop one member of the cluster by its ID" +print " -k [--all-stop] Shut down the whole cluster" +print " -f [--force]Suppress the 'are-you-sure?' prompt" +print " -n [--numeric] Don't resolve names" print sys.exit (1) + +class IpAddr: +def __init__(self, text): +if text.find(":") != -1: +tokens = text.split(":") +text = tokens[0] +self.port = int(tokens[1]) +else: +self.port = 5672 +self.dottedQuad = socket.gethostbyname(text) +nums = self.dottedQuad.split(".") +self.addr = (int(nums[0]) << 24) + (int(nums[1]) << 16) + (int(nums[2]) << 8) + int(nums[3]) + +def bestAddr(self, addrPortList): +bestDiff = 0x +bestAddr = None +for addrPort in addrPortList: +diff = IpAddr(addrPort[0]).addr ^ self.addr +if diff < bestDiff: +bestDiff = diff +bestAddr = addrPort +return bestAddr + class BrokerManager: def __init__(self): self.brokerName = None @@ -62,7 +95,7 @@ if self.broker: self.qmf.delBroker(self.broker) -def overview(self): +def _getClusters(self): packages = self.qmf.getPackages() if "org.apache.qpid.cluster" not in packages: print "Clustering is not installed on the broker." @@ -73,8 +106,35 @@ print "Clustering is installed but not enabled on the broker." sys.exit(0) +return clusters + +def _getHostList(self, urlList): +hosts = [] +hostAddr = IpAddr(_host) +for url in urlList: +if url.find("amqp:") != 0: +raise Exception("Invalid URL 1") +url = url[5:] +addrs = str(url).split(",") +addrList = [] +for addr in addrs: +tokens = addr.split(":") +if len(tokens) != 3: +raise Exception("Invalid URL 2") +addrList.append((tokens[1], tokens[2])) + +# Find the address in the list that is most likely to be in the same subnet as the address +# with which we made the original QMF connection. This increases the probability that we will +# be able to reach the cluster member. + +best = hostAddr.bestAddr(addrList) +bestUrl = best[0] + ":" + best[1] +hosts.append(bestUrl) +return hosts + +def overview(self): +clusters = self._getClusters() cluster = clusters[0] -myUrl = cluster.publishedURL memberList = cluster.members.split(";") idList = cluster.memberIDs.split(";") @@ -86,11 +146,7 @@ print " : ID=%s URL=%s" % (idList[idx], memberList[idx]) def stopMember(self, id): -clusters = self.qmf.getObjects(_class="cluster", _agent=self.brokerAgent) -if len(clusters) == 0: -print "Clustering is installed but not enabled on the broker." -sys.exit(0) - +clusters = self._getClusters()
svn commit: r745799 [3/3] - in /qpid/trunk/qpid/java: broker/src/main/java/org/apache/qpid/server/ broker/src/main/java/org/apache/qpid/server/configuration/ broker/src/main/java/org/apache/qpid/serve
Modified: qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/client/timeouts/SyncWaitDelayTest.java URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/client/timeouts/SyncWaitDelayTest.java?rev=745799&r1=745798&r2=745799&view=diff == --- qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/client/timeouts/SyncWaitDelayTest.java (original) +++ qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/client/timeouts/SyncWaitDelayTest.java Thu Feb 19 10:03:18 2009 @@ -20,13 +20,7 @@ */ package org.apache.qpid.test.client.timeouts; -import org.apache.commons.configuration.Configuration; -import org.apache.qpid.server.registry.ConfigurationFileApplicationRegistry; -import org.apache.qpid.server.registry.ApplicationRegistry; -import org.apache.qpid.test.utils.QpidTestCase; -import org.apache.qpid.client.transport.TransportConnection; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import java.io.File; import javax.jms.Connection; import javax.jms.JMSException; @@ -35,7 +29,13 @@ import javax.jms.MessageProducer; import javax.jms.Queue; import javax.jms.Session; -import java.io.File; + +import org.apache.commons.configuration.XMLConfiguration; +import org.apache.qpid.server.registry.ApplicationRegistry; +import org.apache.qpid.server.registry.ConfigurationFileApplicationRegistry; +import org.apache.qpid.test.utils.QpidTestCase; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * This tests that when the commit takes a long time(due to POST_COMMIT_DELAY) that the commit does not timeout @@ -67,16 +67,17 @@ fail("Unable to test without config file:" + _configFile); } -ConfigurationFileApplicationRegistry config = new ConfigurationFileApplicationRegistry(_configFile); - -//Disable management on broker. -config.getConfiguration().setProperty("management.enabled", "false"); - -Configuration testVirtualhost = config.getConfiguration().subset("virtualhosts.virtualhost." + VIRTUALHOST); -testVirtualhost.setProperty("store.class", "org.apache.qpid.server.store.SlowMessageStore"); -testVirtualhost.setProperty("store.delays.commitTran.post", POST_COMMIT_DELAY); - -startBroker(1, config); +XMLConfiguration configuration = new XMLConfiguration(_configFile); +configuration.setProperty("virtualhosts.virtualhost." + VIRTUALHOST+".store.class", "org.apache.qpid.server.store.SlowMessageStore"); +configuration.setProperty("virtualhosts.virtualhost." + VIRTUALHOST+".store.delays.commitTran.post", POST_COMMIT_DELAY); + +File tmpFile = File.createTempFile("configFile", "test"); +tmpFile.deleteOnExit(); +configuration.save(tmpFile); + +ApplicationRegistry reg = new ConfigurationFileApplicationRegistry(tmpFile); + +startBroker(1, reg); //Set the syncWrite timeout to be just larger than the delay on the commitTran. setSystemProperty("amqj.default_syncwrite_timeout", String.valueOf(SYNC_WRITE_TIMEOUT)); Modified: qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java?rev=745799&r1=745798&r2=745799&view=diff == --- qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java (original) +++ qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java Thu Feb 19 10:03:18 2009 @@ -290,7 +290,7 @@ } } -public void startBroker(int port, ConfigurationFileApplicationRegistry config) throws Exception +public void startBroker(int port, ApplicationRegistry config) throws Exception { ApplicationRegistry.initialise(config, port); startBroker(port); - Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:commits-subscr...@qpid.apache.org