[jira] [Updated] (QPID-3027) PHP binding of Qpid Messaging API

2012-11-06 Thread Paul Colby (JIRA)

 [ 
https://issues.apache.org/jira/browse/QPID-3027?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Paul Colby updated QPID-3027:
-

Description: 
Working on a PHP binding for the Qpid Messaging API via SWIG. There are several 
PHP-specific issues with C++ and SWIG which I've managed to workaround, so the 
binding is starting to take shape, but still very much a work in progress. 

The rough plan: 
1. report relevant bugs / feature requests to SWIG (done). 
2. clean-up Qpid php.i SWIG interface file (mostly done - just need to 
implement PHP namespaces). 
3. implement qpid::types::Variant - PHP typemapping (not started). 
4. implement printinfo pragma (should be easy, just need to choose what info to 
include). 
5. create relevant [auto]makefile. 

Of course, there's lots of things to discuss / decide along the way... so I'll 
post 'em here as they come up.

  was:  


 PHP binding of Qpid Messaging API
 -

 Key: QPID-3027
 URL: https://issues.apache.org/jira/browse/QPID-3027
 Project: Qpid
  Issue Type: New Feature
  Components: C++ Client
Affects Versions: 0.8
Reporter: Paul Colby
Assignee: Darryl L. Pierce
 Attachments: cqpid_php.20110220.diff, cqpid_php.20110301.diff, 
 cqpid_php.20110328.diff, cqpid_php.20110415.diff, cqpid_php.20120406.diff, 
 cqpid_php.20121105.diff, cqpid_php.20121105-qpid-0.19.diff, 
 cqpid_php.20121106.diff, cqpid_php.diff, FindPHPDev.cmake, Makefile


 Working on a PHP binding for the Qpid Messaging API via SWIG. There are 
 several PHP-specific issues with C++ and SWIG which I've managed to 
 workaround, so the binding is starting to take shape, but still very much a 
 work in progress. 
 The rough plan: 
 1. report relevant bugs / feature requests to SWIG (done). 
 2. clean-up Qpid php.i SWIG interface file (mostly done - just need to 
 implement PHP namespaces). 
 3. implement qpid::types::Variant - PHP typemapping (not started). 
 4. implement printinfo pragma (should be easy, just need to choose what info 
 to include). 
 5. create relevant [auto]makefile. 
 Of course, there's lots of things to discuss / decide along the way... so 
 I'll post 'em here as they come up.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (QPID-3027) PHP binding of Qpid Messaging API

2012-11-06 Thread Paul Colby (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-3027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13491939#comment-13491939
 ] 

Paul Colby commented on QPID-3027:
--

bq. No, that was a mistake. I must have selected the description by accident 
while adding my comment yesterday.

No problem.  I've very nearly done the same thing a few times.  I've restored 
the original description from the history tab (not that I would have been upset 
if you'd removed it intentionally either).

bq. Do you feel this is a work in progress or is the patch close to if not 
totally working at this point?

I'd say close to if not totally working at this point.

Both the cqpid and cqmf2 PHP modules should be fully working, there's just a 
few areas (particularly in cqmf2) that I've never used, thus never tested.  For 
example, while I have tested the QMF2 client support, I've never tried writing 
a QMF2 agent in PHP... _should_ work though.

 PHP binding of Qpid Messaging API
 -

 Key: QPID-3027
 URL: https://issues.apache.org/jira/browse/QPID-3027
 Project: Qpid
  Issue Type: New Feature
  Components: C++ Client
Affects Versions: 0.8
Reporter: Paul Colby
Assignee: Darryl L. Pierce
 Attachments: cqpid_php.20110220.diff, cqpid_php.20110301.diff, 
 cqpid_php.20110328.diff, cqpid_php.20110415.diff, cqpid_php.20120406.diff, 
 cqpid_php.20121105.diff, cqpid_php.20121105-qpid-0.19.diff, 
 cqpid_php.20121106.diff, cqpid_php.diff, FindPHPDev.cmake, Makefile


 Working on a PHP binding for the Qpid Messaging API via SWIG. There are 
 several PHP-specific issues with C++ and SWIG which I've managed to 
 workaround, so the binding is starting to take shape, but still very much a 
 work in progress. 
 The rough plan: 
 1. report relevant bugs / feature requests to SWIG (done). 
 2. clean-up Qpid php.i SWIG interface file (mostly done - just need to 
 implement PHP namespaces). 
 3. implement qpid::types::Variant - PHP typemapping (not started). 
 4. implement printinfo pragma (should be easy, just need to choose what info 
 to include). 
 5. create relevant [auto]makefile. 
 Of course, there's lots of things to discuss / decide along the way... so 
 I'll post 'em here as they come up.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (QPID-3027) PHP binding of Qpid Messaging API

2012-11-05 Thread Paul Colby (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-3027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13491096#comment-13491096
 ] 

Paul Colby commented on QPID-3027:
--

bq. Can you ping me in IRC

I tried that, but you were away... I suspect our timezone differences will make 
IRC tricky (I'm UTC+11 at the moment).  Let me know you're timezone and I'll 
see if I can workout a convenient time for chatting.

In the meantime, here's some basic ways you can test the PHP code.

h3. PHP Info
The first thing to check, is that the {{cqpid}} and {{cqmf2}} PHP modules are 
loaded by PHP.  The easiest way to do this is to run the following command: 

{{php -i}}

This will produce a whole lot of text output describing PHP's configuration and 
modules, etc.  If you pipe it to a command like {{less}}, and then search for 
{{cqmf2}}, you will see the following details that have been added by the 
{{cqmf2}} and {{cqpid}} modules:

{noformat}
cqmf2

SWIG Version = 2.0.8
Targeted PHP Version = 5.4.7 (5.4.7)
PHP Thread Safety = disabled
Compiler Version = gcc 4.7.2
Build Date = Nov  5 2012 02:53:38

cqpid

SWIG Version = 2.0.8
Targeted PHP Version = 5.4.7 (5.4.7)
PHP Thread Safety = disabled
Compiler Version = gcc 4.7.2
Build Date = Nov  5 2012 02:53:34
{noformat}

If that information is not present, then the module was not loaded (the 
{{install}} target should have created relevant {{/etc/php.d/cqpid.ini}} and 
{{/etc/php.d/cqmf2.ini}} files to load the module).  Such as:

{code:title=cqpid.ini}
; configuration for PHP Qpid module
extension=/usr/lib64/php/modules/cqpid.so
{code}

If you want some (slightly) prettier output, instead of running {{php -i}} you 
could setup a simple PHP webpage and run the {{phpinfo()}} function to see the 
same output as above, but in HTML tables instead.

h3. CLI Examples
Once the modules are loaded (should happen automatically if you do a {{make 
install}}), the next thing I do is run some of the PHP examples.

First, run a qpidd broker in one terminal:

{{qpidd --auth=no}}

Then, run some of the examples under 
{{qpid/cpp/bindings/qpid/examples/php/cli}} - these are PHP ports of the 
existing Qpid examples, so work the same way.

For example:

{code}
[paul@fepoch cli]$ php -f map_sender.php   # Will send a PHP associative array 
as a map message to the broker.
[paul@fepoch cli]$ php -f map_receiver.php # Will print_r the next message from 
the broker.
Array
(
[colours] = Array
(
[0] = red
[1] = green
[2] = white
)

[id] = 987654321
[name] = Widget
[percent] = 0.99
[uuid] = 773bb118-286c-435e-8948-71e57f9e2f97
)
[paul@fepoch cli]$
{code}

This example is particularly interesting since it shows the marshalling of 
different QVariant types from/to PHP types :)

h3. Web Example
There's also a very basic hello world web-based exmaple in 
{{qpid/cpp/bindings/qpid/examples/php/web}}.  To run that example, simply drop 
the PHP file into a directory being hosted by a webserver with PHP enabled.  It 
will present an HTML form allowing you to specify some basic broker parameters, 
and will then send/receive a message.

h3.  Unit Testing
I'm quite a fan of {{phpunit}} for PHP unit testing, so I'll create some PHP 
unit tests for this sometime.  Perhaps I'll create them as a separate diff 
though, since the above patch is already 70kB (and the PHP unit tests will not 
require any direct code linkage to the Qpid / PHP module source, so can be 
entirely independent).

h3. Other Issues
The other issue I see, is the requirement for a custom {{FindPHPDev}} CMake 
module.  I've begun talks on the CMake mailing list in hopes of getting the 
module included there.  Is this a blocker in the meantime?  There might 
(probably should) be a way to include the custom CMake module in the Qpid 
source / build tree for now, but this is not something I've looked into yet.

I look forward to chatting on IRC sometime.

 PHP binding of Qpid Messaging API
 -

 Key: QPID-3027
 URL: https://issues.apache.org/jira/browse/QPID-3027
 Project: Qpid
  Issue Type: New Feature
  Components: C++ Client
Affects Versions: 0.8
Reporter: Paul Colby
Assignee: Darryl L. Pierce
 Attachments: cqpid_php.20110220.diff, cqpid_php.20110301.diff, 
 cqpid_php.20110328.diff, cqpid_php.20110415.diff, cqpid_php.20120406.diff, 
 cqpid_php.20121105.diff, cqpid_php.20121105-qpid-0.19.diff, cqpid_php.diff, 
 FindPHPDev.cmake, Makefile


   

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org

[jira] [Commented] (QPID-3027) PHP binding of Qpid Messaging API

2012-11-05 Thread Paul Colby (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-3027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13491170#comment-13491170
 ] 

Paul Colby commented on QPID-3027:
--

Hey Darryl, it appears that you blanked the Description field this morning / 
last night... was that intentional?

Paul.

 PHP binding of Qpid Messaging API
 -

 Key: QPID-3027
 URL: https://issues.apache.org/jira/browse/QPID-3027
 Project: Qpid
  Issue Type: New Feature
  Components: C++ Client
Affects Versions: 0.8
Reporter: Paul Colby
Assignee: Darryl L. Pierce
 Attachments: cqpid_php.20110220.diff, cqpid_php.20110301.diff, 
 cqpid_php.20110328.diff, cqpid_php.20110415.diff, cqpid_php.20120406.diff, 
 cqpid_php.20121105.diff, cqpid_php.20121105-qpid-0.19.diff, cqpid_php.diff, 
 FindPHPDev.cmake, Makefile


   

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Updated] (QPID-3027) PHP binding of Qpid Messaging API

2012-11-05 Thread Paul Colby (JIRA)

 [ 
https://issues.apache.org/jira/browse/QPID-3027?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Paul Colby updated QPID-3027:
-

Attachment: cqpid_php.20121106.diff

Attached {{cqpid_php.20121106.diff}}

This version adds the {{FindPHPDev}} module as a custom project module under 
{{qpid/cpp/bindings/CMakeModules}}, so there's no longer any need to add the 
module under {{/usr/share/cmake*/Modules}} :)

 PHP binding of Qpid Messaging API
 -

 Key: QPID-3027
 URL: https://issues.apache.org/jira/browse/QPID-3027
 Project: Qpid
  Issue Type: New Feature
  Components: C++ Client
Affects Versions: 0.8
Reporter: Paul Colby
Assignee: Darryl L. Pierce
 Attachments: cqpid_php.20110220.diff, cqpid_php.20110301.diff, 
 cqpid_php.20110328.diff, cqpid_php.20110415.diff, cqpid_php.20120406.diff, 
 cqpid_php.20121105.diff, cqpid_php.20121105-qpid-0.19.diff, 
 cqpid_php.20121106.diff, cqpid_php.diff, FindPHPDev.cmake, Makefile


   

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (QPID-3027) PHP binding of Qpid Messaging API

2012-11-04 Thread Paul Colby (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-3027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13490165#comment-13490165
 ] 

Paul Colby commented on QPID-3027:
--

Ok, so the build error is the result of changes in the PHP development headers.

Somewhere between PHP 5.3.8 and 5.4.7, the signature of the following functions 
changed:
* {{zend_get_object_classname}}
* {{zend_rsrc_list_get_rsrc_type}}

Now to track down the exact PHP version that changed, and #ifdef some variable 
declarations...

 PHP binding of Qpid Messaging API
 -

 Key: QPID-3027
 URL: https://issues.apache.org/jira/browse/QPID-3027
 Project: Qpid
  Issue Type: New Feature
  Components: C++ Client
Affects Versions: 0.8
Reporter: Paul Colby
Assignee: Darryl L. Pierce
 Attachments: cqpid_php.20110220.diff, cqpid_php.20110301.diff, 
 cqpid_php.20110328.diff, cqpid_php.20110415.diff, cqpid_php.20120406.diff, 
 cqpid_php.diff, FindPHPDev.cmake, Makefile


 Working on a PHP binding for the Qpid Messaging API via SWIG.  There are 
 several PHP-specific issues with C++ and SWIG which I've managed to 
 workaround, so the binding is starting to take shape, but still very much a 
 work in progress.
 The rough plan:
 1. report relevant bugs / feature requests to SWIG (done).
 2. clean-up Qpid php.i SWIG interface file (mostly done - just need to 
 implement PHP namespaces).
 3. implement qpid::types::Variant - PHP typemapping (not started).
 4. implement printinfo pragma (should be easy, just need to choose what info 
 to include).
 5. create relevant [auto]makefile.
 Of course, there's lots of things to discuss / decide along the way... so 
 I'll post 'em here as they come up.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Comment Edited] (QPID-3027) PHP binding of Qpid Messaging API

2012-11-04 Thread Paul Colby (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-3027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13490165#comment-13490165
 ] 

Paul Colby edited comment on QPID-3027 at 11/4/12 11:43 AM:


Ok, so the build error is the result of changes in the PHP development headers.

Somewhere between PHP 5.3.8 and 5.4.7, the signature of the following functions 
changed:
* {{zend_get_object_classname}}
* {{zend_rsrc_list_get_rsrc_type}}

Now to track down the exact PHP version that changed, and {{#ifdef}} some 
variable declarations...

*Edit:* changes were in commit 
[aaa2f1c30b3ba3da3e0030804054ee9c70e80bc7|https://github.com/php/php-src/commit/aaa2f1c30b3ba3da3e0030804054ee9c70e80bc7]


  was (Author: pcolby):
Ok, so the build error is the result of changes in the PHP development 
headers.

Somewhere between PHP 5.3.8 and 5.4.7, the signature of the following functions 
changed:
* {{zend_get_object_classname}}
* {{zend_rsrc_list_get_rsrc_type}}

Now to track down the exact PHP version that changed, and #ifdef some variable 
declarations...
  
 PHP binding of Qpid Messaging API
 -

 Key: QPID-3027
 URL: https://issues.apache.org/jira/browse/QPID-3027
 Project: Qpid
  Issue Type: New Feature
  Components: C++ Client
Affects Versions: 0.8
Reporter: Paul Colby
Assignee: Darryl L. Pierce
 Attachments: cqpid_php.20110220.diff, cqpid_php.20110301.diff, 
 cqpid_php.20110328.diff, cqpid_php.20110415.diff, cqpid_php.20120406.diff, 
 cqpid_php.diff, FindPHPDev.cmake, Makefile


 Working on a PHP binding for the Qpid Messaging API via SWIG.  There are 
 several PHP-specific issues with C++ and SWIG which I've managed to 
 workaround, so the binding is starting to take shape, but still very much a 
 work in progress.
 The rough plan:
 1. report relevant bugs / feature requests to SWIG (done).
 2. clean-up Qpid php.i SWIG interface file (mostly done - just need to 
 implement PHP namespaces).
 3. implement qpid::types::Variant - PHP typemapping (not started).
 4. implement printinfo pragma (should be easy, just need to choose what info 
 to include).
 5. create relevant [auto]makefile.
 Of course, there's lots of things to discuss / decide along the way... so 
 I'll post 'em here as they come up.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Updated] (QPID-3027) PHP binding of Qpid Messaging API

2012-11-04 Thread Paul Colby (JIRA)

 [ 
https://issues.apache.org/jira/browse/QPID-3027?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Paul Colby updated QPID-3027:
-

Attachment: cqpid_php.20121105.diff

Attached cqpid_php.20121105.diff which adds support for PHP 5.4.0+

I note that for Qpid 0.19+ two relevant files 
({{qpid/cpp/bindings/qmf2/CMakeLists.txt}} and 
{{qpid/cpp/bindings/qpid/CMakeLists.txt}}) have been combined into a single 
{{qpid/cpp/bindings/CMakeLists.txt}} file.  

I'll make the relevant {{cqpid_php}} changes for that tomorrow, and upload a 
Qpid 0.19+ patch then.

 PHP binding of Qpid Messaging API
 -

 Key: QPID-3027
 URL: https://issues.apache.org/jira/browse/QPID-3027
 Project: Qpid
  Issue Type: New Feature
  Components: C++ Client
Affects Versions: 0.8
Reporter: Paul Colby
Assignee: Darryl L. Pierce
 Attachments: cqpid_php.20110220.diff, cqpid_php.20110301.diff, 
 cqpid_php.20110328.diff, cqpid_php.20110415.diff, cqpid_php.20120406.diff, 
 cqpid_php.20121105.diff, cqpid_php.diff, FindPHPDev.cmake, Makefile


 Working on a PHP binding for the Qpid Messaging API via SWIG.  There are 
 several PHP-specific issues with C++ and SWIG which I've managed to 
 workaround, so the binding is starting to take shape, but still very much a 
 work in progress.
 The rough plan:
 1. report relevant bugs / feature requests to SWIG (done).
 2. clean-up Qpid php.i SWIG interface file (mostly done - just need to 
 implement PHP namespaces).
 3. implement qpid::types::Variant - PHP typemapping (not started).
 4. implement printinfo pragma (should be easy, just need to choose what info 
 to include).
 5. create relevant [auto]makefile.
 Of course, there's lots of things to discuss / decide along the way... so 
 I'll post 'em here as they come up.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (QPID-3027) PHP binding of Qpid Messaging API

2012-11-04 Thread Paul Colby (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-3027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13490197#comment-13490197
 ] 

Paul Colby commented on QPID-3027:
--

Hmm... does (or will) the PHP work as part of [Apache Qpid 
Proton|http://qpid.apache.org/proton/] make this SWIG-based PHP binding 
redundant?

 PHP binding of Qpid Messaging API
 -

 Key: QPID-3027
 URL: https://issues.apache.org/jira/browse/QPID-3027
 Project: Qpid
  Issue Type: New Feature
  Components: C++ Client
Affects Versions: 0.8
Reporter: Paul Colby
Assignee: Darryl L. Pierce
 Attachments: cqpid_php.20110220.diff, cqpid_php.20110301.diff, 
 cqpid_php.20110328.diff, cqpid_php.20110415.diff, cqpid_php.20120406.diff, 
 cqpid_php.20121105.diff, cqpid_php.diff, FindPHPDev.cmake, Makefile


 Working on a PHP binding for the Qpid Messaging API via SWIG.  There are 
 several PHP-specific issues with C++ and SWIG which I've managed to 
 workaround, so the binding is starting to take shape, but still very much a 
 work in progress.
 The rough plan:
 1. report relevant bugs / feature requests to SWIG (done).
 2. clean-up Qpid php.i SWIG interface file (mostly done - just need to 
 implement PHP namespaces).
 3. implement qpid::types::Variant - PHP typemapping (not started).
 4. implement printinfo pragma (should be easy, just need to choose what info 
 to include).
 5. create relevant [auto]makefile.
 Of course, there's lots of things to discuss / decide along the way... so 
 I'll post 'em here as they come up.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Updated] (QPID-3027) PHP binding of Qpid Messaging API

2012-11-04 Thread Paul Colby (JIRA)

 [ 
https://issues.apache.org/jira/browse/QPID-3027?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Paul Colby updated QPID-3027:
-

Attachment: cqpid_php.20121105-qpid-0.19.diff

Attached cqpid_php.20121105-qpid-0.19.diff

This update:
* patches the combined {{bindings/CMakeLists.txt}} file added in r1400781 (ie 
Qpid 0.19+)
* fixes an error with the {{install}} target for out-of-tree {{cmake}} builds.

 PHP binding of Qpid Messaging API
 -

 Key: QPID-3027
 URL: https://issues.apache.org/jira/browse/QPID-3027
 Project: Qpid
  Issue Type: New Feature
  Components: C++ Client
Affects Versions: 0.8
Reporter: Paul Colby
Assignee: Darryl L. Pierce
 Attachments: cqpid_php.20110220.diff, cqpid_php.20110301.diff, 
 cqpid_php.20110328.diff, cqpid_php.20110415.diff, cqpid_php.20120406.diff, 
 cqpid_php.20121105.diff, cqpid_php.20121105-qpid-0.19.diff, cqpid_php.diff, 
 FindPHPDev.cmake, Makefile


 Working on a PHP binding for the Qpid Messaging API via SWIG.  There are 
 several PHP-specific issues with C++ and SWIG which I've managed to 
 workaround, so the binding is starting to take shape, but still very much a 
 work in progress.
 The rough plan:
 1. report relevant bugs / feature requests to SWIG (done).
 2. clean-up Qpid php.i SWIG interface file (mostly done - just need to 
 implement PHP namespaces).
 3. implement qpid::types::Variant - PHP typemapping (not started).
 4. implement printinfo pragma (should be easy, just need to choose what info 
 to include).
 5. create relevant [auto]makefile.
 Of course, there's lots of things to discuss / decide along the way... so 
 I'll post 'em here as they come up.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (QPID-3027) PHP binding of Qpid Messaging API

2012-10-01 Thread Paul Colby (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-3027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13466700#comment-13466700
 ] 

Paul Colby commented on QPID-3027:
--

Works fine on all of my existing test boxes.  I'll setup an FC17 VM to test.

 PHP binding of Qpid Messaging API
 -

 Key: QPID-3027
 URL: https://issues.apache.org/jira/browse/QPID-3027
 Project: Qpid
  Issue Type: New Feature
  Components: C++ Client
Affects Versions: 0.8
Reporter: Paul Colby
Assignee: Darryl L. Pierce
 Attachments: cqpid_php.20110220.diff, cqpid_php.20110301.diff, 
 cqpid_php.20110328.diff, cqpid_php.20110415.diff, cqpid_php.20120406.diff, 
 cqpid_php.diff, FindPHPDev.cmake, Makefile


 Working on a PHP binding for the Qpid Messaging API via SWIG.  There are 
 several PHP-specific issues with C++ and SWIG which I've managed to 
 workaround, so the binding is starting to take shape, but still very much a 
 work in progress.
 The rough plan:
 1. report relevant bugs / feature requests to SWIG (done).
 2. clean-up Qpid php.i SWIG interface file (mostly done - just need to 
 implement PHP namespaces).
 3. implement qpid::types::Variant - PHP typemapping (not started).
 4. implement printinfo pragma (should be easy, just need to choose what info 
 to include).
 5. create relevant [auto]makefile.
 Of course, there's lots of things to discuss / decide along the way... so 
 I'll post 'em here as they come up.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (QPID-3027) PHP binding of Qpid Messaging API

2012-09-28 Thread Paul Colby (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-3027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13466073#comment-13466073
 ] 

Paul Colby commented on QPID-3027:
--

Thanks Darryl.  I'll look into it :)

 PHP binding of Qpid Messaging API
 -

 Key: QPID-3027
 URL: https://issues.apache.org/jira/browse/QPID-3027
 Project: Qpid
  Issue Type: New Feature
  Components: C++ Client
Affects Versions: 0.8
Reporter: Paul Colby
Assignee: Darryl L. Pierce
 Attachments: cqpid_php.20110220.diff, cqpid_php.20110301.diff, 
 cqpid_php.20110328.diff, cqpid_php.20110415.diff, cqpid_php.20120406.diff, 
 cqpid_php.diff, FindPHPDev.cmake, Makefile


 Working on a PHP binding for the Qpid Messaging API via SWIG.  There are 
 several PHP-specific issues with C++ and SWIG which I've managed to 
 workaround, so the binding is starting to take shape, but still very much a 
 work in progress.
 The rough plan:
 1. report relevant bugs / feature requests to SWIG (done).
 2. clean-up Qpid php.i SWIG interface file (mostly done - just need to 
 implement PHP namespaces).
 3. implement qpid::types::Variant - PHP typemapping (not started).
 4. implement printinfo pragma (should be easy, just need to choose what info 
 to include).
 5. create relevant [auto]makefile.
 Of course, there's lots of things to discuss / decide along the way... so 
 I'll post 'em here as they come up.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (QPID-4036) Failed client connections permanently exhaust broker's max connections limit

2012-06-03 Thread Paul Colby (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-4036?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13288146#comment-13288146
 ] 

Paul Colby commented on QPID-4036:
--

I've done a quick review of the changes from r1215127 that have since been 
dropped, and it seems unlikely that the subsequent changes would have regresses 
QPID-3438.

Also, I've found a simpler test case:
# Compile and install 0.16 from source; make sure CPG is enabled (ie install 
openais or corosync).
# Configure SASL to allow only PLAIN (or at least disable ANONYMOUS).
# Run: {{qpidd --cluster-name=test}}
#* you'll probably need to run it as {{root}}, or some other user with 
permission to access the underlying cluster services.
# Run: {{for i in `seq 1 550`; do echo $i; qpid-stat -q; done}}

That's it... sit back and watch the broker become unusable ;)

Incidentally, the problem does not occur if the broker is not instructed to use 
clustering.

 Failed client connections permanently exhaust broker's max connections limit
 

 Key: QPID-4036
 URL: https://issues.apache.org/jira/browse/QPID-4036
 Project: Qpid
  Issue Type: Bug
  Components: C++ Broker
Affects Versions: 0.16
 Environment: CentOS release 5.5 (Final)
 Linux 2.6.18-194.32.1.el5 #1 SMP Wed Jan 5 17:52:25 EST 2011 x86_64 x86_64 
 x86_64 GNU/Linux
 gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-48)
Reporter: Paul Colby
Priority: Critical
  Labels: sasl, ssl

 I'm running a set of Qpid 0.16 C++ brokers with configuration like:
 {code}
 cluster-name=mm-queue-cluster
 cluster-cman=yes
 cluster-mechanism=PLAIN
 cluster-username=broker
 cluster-password=abc123
 cluster-url=ssl:gateway02:5671
 auth=yes
 ssl-cert-db=/etc/qpid/certs/broker
 ssl-cert-password-file=/etc/qpid/certs/pass.txt
 ssl-cert-name=broker.messagemedia.com.au
 require-encryption=yes
 {code}
 ie the broker is requiring both encryption and authentication (configured 
 SASL mech list is CRAM-MD5 DIGEST-MD5 EXTERNAL PLAIN).
 Now, if a client (let's use {{qpid-stat}} for example) connects via SSL 
 (amqps) and authenticates successfully, then everything is happy.
 However, if a client repeatedly fails to use SSL and/or fails to provide 
 credentials, then the broker loses one of it's configured max connections 
 every time!
 So, for example, if we start the broker using the configuration shown above, 
 then do this:
 {code}for i in `seq 1 550`; do echo $i; qpid-stat -q ; done{code}
 The above loop will report ~ 500 {{AuthenticationFailure}} errors, then 
 switch to {{ConnectionError}} errors.  Once the {{ConnectionError}} errors 
 begin, all further connections to the broker will be rejected - permanently 
 (until the broker is restarted), with the broker logging:
 {code}error Client max connection count limit exceeded: 500 connection 
 refused{code}
 From my testing, the following loops never cause an issue (with this 
 configuration):
 {code:none}
 for i in `seq 1 550`; do echo $i; qpid-stat -b amqps://guest/guest@localhost 
 -q ; done # Works as expected.
 for i in `seq 1 550`; do echo $i; qpid-stat -b amqps://guest/wrong@localhost 
 -q ; done # AuthenticationFailure as expected.
 {code}
 Whereas any of the following will break the broker:
 {code:none}
 for i in `seq 1 550`; do echo $i; qpid-stat -b amqp://guest/guest@localhost 
 -q ; done # AuthenticationFailure, then ConnectionError.
 for i in `seq 1 550`; do echo $i; qpid-stat -b amqp://guest/wrong@localhost 
 -q ; done # AuthenticationFailure, then ConnectionError.
 for i in `seq 1 550`; do echo $i; qpid-stat -b amqp://localhost -q ; done 
 # AuthenticationFailure, then ConnectionError.
 for i in `seq 1 550`; do echo $i; qpid-stat -b amqps://localhost -q ; done
 # AuthenticationFailure, then ConnectionError.
 {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (QPID-4032) Broker does not accept sub-groups in group declaration, contrary to wiki documentation

2012-05-31 Thread Paul Colby (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-4032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13286513#comment-13286513
 ] 

Paul Colby commented on QPID-4032:
--

Also looks (not tested) to be broken in 0.8 (and presumably 0.10).

I have a patch.  Just tracing the history in svn now, and will attach a patch 
soon...

 Broker does not accept sub-groups in group declaration, contrary to wiki 
 documentation
 --

 Key: QPID-4032
 URL: https://issues.apache.org/jira/browse/QPID-4032
 Project: Qpid
  Issue Type: Bug
  Components: C++ Broker
Affects Versions: 0.14, 0.16
 Environment: Linux 2.6.32-5-amd64 #1 SMP Thu Mar 22 17:26:33 UTC 2012 
 x86_64 GNU/Linux
 gcc (Debian 4.4.5-8) 4.4.5
Reporter: Paul Colby
  Labels: ACL

 The ACL wiki page ([https://cwiki.apache.org/qpid/acl.html]) indicates by at 
 least two examples, that group declarations can contain sub-groups.  However, 
 Qpid 0.16 does not (seem to) allow this.
 For example, given the following ACL file (cut down from the example at 
 [https://cwiki.apache.org/qpid/acl.html#ACL-Examplefile%253A]):
 {code}
 # Some groups
 group user-consume martin@QPID ted@QPID
 group group2 kim@QPID user-consume rob@QPID
 {code}
 Qpid 0.16 gives the following error:
 {{ACL format error: /home/paul/.qpidd/qpidd.acl:3: Line : 3, Username 
 'user-consume' must contain a realm}}
 It appears that the broker is requiring {{user-consume}} to be a qualified 
 user name such as {{user-consume@QPID}} and not realizing that it is a group 
 name instead.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (QPID-4032) Broker does not accept sub-groups in group declaration, contrary to wiki documentation

2012-05-31 Thread Paul Colby (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-4032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13286535#comment-13286535
 ] 

Paul Colby commented on QPID-4032:
--

Ok, it looks to me that this was broken way back before 0.6 was branched.

Specifically, it was broken in two separate commits (either of which were 
enough to break it) - the two commits are:
* r728880 This is a fix for QPID-1545
** it seems that this commit tried to fix an issue where an ACL group contained 
a recursive sub-group, eg: {{group admin admin}}  however, that solution was 
incorrect.  It actually turned an if condition into one that can never 
evaluate to true.  It incorrectly compares the name of a found group, with the 
very same name used to find that group, and insists that they don't match.  It 
seems that what they meant to do, was compare the name of the found group with 
name of the group being added to, however the latter group name is not 
available within the {{AclReader::addName}} function.
* r732466 This is related to QPID-1558. The test case 
test_group_and_user_with_same_name covers the error condition in QPID-1545
** this commit was intended to Reject ACL file if user names does not contain 
a realm.  However, it failed to allow for sub-group names (as documented as 
valid in the wiki), and so now sub-groups result in the current error message 
({{Username 'group' must contain a realm}}).

The patch I'll attach in a minute does two things:
# Revert r728880 - the {{AclReader::addName}} can't do what that commit wanted 
without extended the function signature to either include the name that the 
{{groupNameSet}} parameter came from, or upgrade the {{groupNameSet}} argument 
from a {{nameSetPtr}} to the {{gmCitr}} from which it was derived.  My patch 
(in step 2 below) performs equivalent work elsewhere.
# Add checks to the {{AclReader::processGroupLine}} for valid sub-group names, 
and if found, defends against:
## recursive sub-groups (eg: {{group admin admin}}) in which case a debug 
message is included, but otherwise the recursion is safely ignored.
## non-existent subgroups (eg: {{group admin this-group-does-not-exist-yet}}) 
in which case an error is returned, and the ACL file rejected.

I believe that my patch restores the original sub-group capability as described 
at https://cwiki.apache.org/qpid/acl.html, while protecting against the issues 
raised in both QPID-1545 and QPID-1558.

Let me know what you think :)

 Broker does not accept sub-groups in group declaration, contrary to wiki 
 documentation
 --

 Key: QPID-4032
 URL: https://issues.apache.org/jira/browse/QPID-4032
 Project: Qpid
  Issue Type: Bug
  Components: C++ Broker
Affects Versions: 0.14, 0.16
 Environment: Linux 2.6.32-5-amd64 #1 SMP Thu Mar 22 17:26:33 UTC 2012 
 x86_64 GNU/Linux
 gcc (Debian 4.4.5-8) 4.4.5
Reporter: Paul Colby
  Labels: ACL

 The ACL wiki page ([https://cwiki.apache.org/qpid/acl.html]) indicates by at 
 least two examples, that group declarations can contain sub-groups.  However, 
 Qpid 0.16 does not (seem to) allow this.
 For example, given the following ACL file (cut down from the example at 
 [https://cwiki.apache.org/qpid/acl.html#ACL-Examplefile%253A]):
 {code}
 # Some groups
 group user-consume martin@QPID ted@QPID
 group group2 kim@QPID user-consume rob@QPID
 {code}
 Qpid 0.16 gives the following error:
 {{ACL format error: /home/paul/.qpidd/qpidd.acl:3: Line : 3, Username 
 'user-consume' must contain a realm}}
 It appears that the broker is requiring {{user-consume}} to be a qualified 
 user name such as {{user-consume@QPID}} and not realizing that it is a group 
 name instead.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Updated] (QPID-4032) Broker does not accept sub-groups in group declaration, contrary to wiki documentation

2012-05-31 Thread Paul Colby (JIRA)

 [ 
https://issues.apache.org/jira/browse/QPID-4032?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Paul Colby updated QPID-4032:
-

Attachment: QPID-4032.diff

Patch - as described above.

 Broker does not accept sub-groups in group declaration, contrary to wiki 
 documentation
 --

 Key: QPID-4032
 URL: https://issues.apache.org/jira/browse/QPID-4032
 Project: Qpid
  Issue Type: Bug
  Components: C++ Broker
Affects Versions: 0.14, 0.16
 Environment: Linux 2.6.32-5-amd64 #1 SMP Thu Mar 22 17:26:33 UTC 2012 
 x86_64 GNU/Linux
 gcc (Debian 4.4.5-8) 4.4.5
Reporter: Paul Colby
  Labels: ACL
 Attachments: QPID-4032.diff


 The ACL wiki page ([https://cwiki.apache.org/qpid/acl.html]) indicates by at 
 least two examples, that group declarations can contain sub-groups.  However, 
 Qpid 0.16 does not (seem to) allow this.
 For example, given the following ACL file (cut down from the example at 
 [https://cwiki.apache.org/qpid/acl.html#ACL-Examplefile%253A]):
 {code}
 # Some groups
 group user-consume martin@QPID ted@QPID
 group group2 kim@QPID user-consume rob@QPID
 {code}
 Qpid 0.16 gives the following error:
 {{ACL format error: /home/paul/.qpidd/qpidd.acl:3: Line : 3, Username 
 'user-consume' must contain a realm}}
 It appears that the broker is requiring {{user-consume}} to be a qualified 
 user name such as {{user-consume@QPID}} and not realizing that it is a group 
 name instead.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Created] (QPID-4036) Failed client connections permanently exhausting broker's max connections limit

2012-05-31 Thread Paul Colby (JIRA)
Paul Colby created QPID-4036:


 Summary: Failed client connections permanently exhausting broker's 
max connections limit
 Key: QPID-4036
 URL: https://issues.apache.org/jira/browse/QPID-4036
 Project: Qpid
  Issue Type: Bug
  Components: C++ Broker
Affects Versions: 0.16
 Environment: CentOS release 5.5 (Final)
Linux 2.6.18-194.32.1.el5 #1 SMP Wed Jan 5 17:52:25 EST 2011 x86_64 x86_64 
x86_64 GNU/Linux
gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-48)
Reporter: Paul Colby
Priority: Critical


I'm running a set of Qpid 0.16 C++ brokers with configuration like:

{code}
cluster-name=mm-queue-cluster
cluster-cman=yes
cluster-mechanism=PLAIN
cluster-username=broker
cluster-password=abc123
cluster-url=ssl:gateway02:5671

auth=yes

ssl-cert-db=/etc/qpid/certs/broker
ssl-cert-password-file=/etc/qpid/certs/pass.txt
ssl-cert-name=broker.messagemedia.com.au
require-encryption=yes
{code}

ie the broker is requiring both encryption and authentication (configured SASL 
mech list is CRAM-MD5 DIGEST-MD5 EXTERNAL PLAIN).

Now, if a client (let's use {{qpid-stat}} for example) connects via SSL (amqps) 
and authenticates successfully, then everything is happy.

However, if a client repeatedly fails to use SSL and/or fails to provide 
credentials, then the broker loses one of it's configured max connections every 
time!

So, for example, if we start the broker using the configuration shown above, 
then do this:

{code}for i in `seq 1 550`; do echo $i; qpid-stat -q ; done{code}

The above loop will report ~ 500 {{AuthenticationFailure}} errors, then switch 
to {{ConnectionError}} errors.  Once the {{ConnectionError}} errors begin, all 
further connections to the broker will be rejected - permanently (until the 
broker is restarted), with the broker logging:

{code}error Client max connection count limit exceeded: 500 connection 
refused{code}

From my testing, the following loops never cause an issue (with this 
configuration):

{code:none}
for i in `seq 1 550`; do echo $i; qpid-stat -b amqps://guest/guest@localhost -q 
; done # Works as expected.
for i in `seq 1 550`; do echo $i; qpid-stat -b amqps://guest/wrong@localhost -q 
; done # AuthenticationFailure as expected.
{code}

Whereas any of the following will break the broker:
{code:none}
for i in `seq 1 550`; do echo $i; qpid-stat -b amqp://guest/guest@localhost -q 
; done # AuthenticationFailure, then ConnectionError.
for i in `seq 1 550`; do echo $i; qpid-stat -b amqp://guest/wrong@localhost -q 
; done # AuthenticationFailure, then ConnectionError.
for i in `seq 1 550`; do echo $i; qpid-stat -b amqp://localhost -q ; done   
  # AuthenticationFailure, then ConnectionError.
for i in `seq 1 550`; do echo $i; qpid-stat -b amqps://localhost -q ; done  
  # AuthenticationFailure, then ConnectionError.
{code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Updated] (QPID-4036) Failed client connections permanently exhaust broker's max connections limit

2012-05-31 Thread Paul Colby (JIRA)

 [ 
https://issues.apache.org/jira/browse/QPID-4036?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Paul Colby updated QPID-4036:
-

Summary: Failed client connections permanently exhaust broker's max 
connections limit  (was: Failed client connections permanently exhausting 
broker's max connections limit)

 Failed client connections permanently exhaust broker's max connections limit
 

 Key: QPID-4036
 URL: https://issues.apache.org/jira/browse/QPID-4036
 Project: Qpid
  Issue Type: Bug
  Components: C++ Broker
Affects Versions: 0.16
 Environment: CentOS release 5.5 (Final)
 Linux 2.6.18-194.32.1.el5 #1 SMP Wed Jan 5 17:52:25 EST 2011 x86_64 x86_64 
 x86_64 GNU/Linux
 gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-48)
Reporter: Paul Colby
Priority: Critical
  Labels: sasl, ssl

 I'm running a set of Qpid 0.16 C++ brokers with configuration like:
 {code}
 cluster-name=mm-queue-cluster
 cluster-cman=yes
 cluster-mechanism=PLAIN
 cluster-username=broker
 cluster-password=abc123
 cluster-url=ssl:gateway02:5671
 auth=yes
 ssl-cert-db=/etc/qpid/certs/broker
 ssl-cert-password-file=/etc/qpid/certs/pass.txt
 ssl-cert-name=broker.messagemedia.com.au
 require-encryption=yes
 {code}
 ie the broker is requiring both encryption and authentication (configured 
 SASL mech list is CRAM-MD5 DIGEST-MD5 EXTERNAL PLAIN).
 Now, if a client (let's use {{qpid-stat}} for example) connects via SSL 
 (amqps) and authenticates successfully, then everything is happy.
 However, if a client repeatedly fails to use SSL and/or fails to provide 
 credentials, then the broker loses one of it's configured max connections 
 every time!
 So, for example, if we start the broker using the configuration shown above, 
 then do this:
 {code}for i in `seq 1 550`; do echo $i; qpid-stat -q ; done{code}
 The above loop will report ~ 500 {{AuthenticationFailure}} errors, then 
 switch to {{ConnectionError}} errors.  Once the {{ConnectionError}} errors 
 begin, all further connections to the broker will be rejected - permanently 
 (until the broker is restarted), with the broker logging:
 {code}error Client max connection count limit exceeded: 500 connection 
 refused{code}
 From my testing, the following loops never cause an issue (with this 
 configuration):
 {code:none}
 for i in `seq 1 550`; do echo $i; qpid-stat -b amqps://guest/guest@localhost 
 -q ; done # Works as expected.
 for i in `seq 1 550`; do echo $i; qpid-stat -b amqps://guest/wrong@localhost 
 -q ; done # AuthenticationFailure as expected.
 {code}
 Whereas any of the following will break the broker:
 {code:none}
 for i in `seq 1 550`; do echo $i; qpid-stat -b amqp://guest/guest@localhost 
 -q ; done # AuthenticationFailure, then ConnectionError.
 for i in `seq 1 550`; do echo $i; qpid-stat -b amqp://guest/wrong@localhost 
 -q ; done # AuthenticationFailure, then ConnectionError.
 for i in `seq 1 550`; do echo $i; qpid-stat -b amqp://localhost -q ; done 
 # AuthenticationFailure, then ConnectionError.
 for i in `seq 1 550`; do echo $i; qpid-stat -b amqps://localhost -q ; done
 # AuthenticationFailure, then ConnectionError.
 {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Created] (QPID-4032) Broker does not accept sub-groups in group declaration, contrary to wiki documentation

2012-05-30 Thread Paul Colby (JIRA)
Paul Colby created QPID-4032:


 Summary: Broker does not accept sub-groups in group declaration, 
contrary to wiki documentation
 Key: QPID-4032
 URL: https://issues.apache.org/jira/browse/QPID-4032
 Project: Qpid
  Issue Type: Bug
  Components: C++ Broker
Affects Versions: 0.16
 Environment: Linux 2.6.32-5-amd64 #1 SMP Thu Mar 22 17:26:33 UTC 2012 
x86_64 GNU/Linux
gcc (Debian 4.4.5-8) 4.4.5
Reporter: Paul Colby


The ACL wiki page ([https://cwiki.apache.org/qpid/acl.html]) indicates by at 
least two examples, that group declarations can contain sub-groups.  However, 
Qpid 0.16 does not (seem to) allow this.

For example, given the following ACL file (cut down from the example at 
[https://cwiki.apache.org/qpid/acl.html#ACL-Examplefile%253A]):

{code}
# Some groups
group user-consume martin@QPID ted@QPID
group group2 kim@QPID user-consume rob@QPID
{code}

Qpid 0.16 gives the following error:

{{ACL format error: /home/paul/.qpidd/qpidd.acl:3: Line : 3, Username 
'user-consume' must contain a realm}}

It appears that the broker is requiring {{user-consume}} to be a qualified user 
name such as {{user-consume@QPID}} and not realizing that it is a group name 
instead.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Updated] (QPID-4032) Broker does not accept sub-groups in group declaration, contrary to wiki documentation

2012-05-30 Thread Paul Colby (JIRA)

 [ 
https://issues.apache.org/jira/browse/QPID-4032?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Paul Colby updated QPID-4032:
-

Affects Version/s: 0.14

Problem exists in 0.14 too.

 Broker does not accept sub-groups in group declaration, contrary to wiki 
 documentation
 --

 Key: QPID-4032
 URL: https://issues.apache.org/jira/browse/QPID-4032
 Project: Qpid
  Issue Type: Bug
  Components: C++ Broker
Affects Versions: 0.14, 0.16
 Environment: Linux 2.6.32-5-amd64 #1 SMP Thu Mar 22 17:26:33 UTC 2012 
 x86_64 GNU/Linux
 gcc (Debian 4.4.5-8) 4.4.5
Reporter: Paul Colby
  Labels: ACL

 The ACL wiki page ([https://cwiki.apache.org/qpid/acl.html]) indicates by at 
 least two examples, that group declarations can contain sub-groups.  However, 
 Qpid 0.16 does not (seem to) allow this.
 For example, given the following ACL file (cut down from the example at 
 [https://cwiki.apache.org/qpid/acl.html#ACL-Examplefile%253A]):
 {code}
 # Some groups
 group user-consume martin@QPID ted@QPID
 group group2 kim@QPID user-consume rob@QPID
 {code}
 Qpid 0.16 gives the following error:
 {{ACL format error: /home/paul/.qpidd/qpidd.acl:3: Line : 3, Username 
 'user-consume' must contain a realm}}
 It appears that the broker is requiring {{user-consume}} to be a qualified 
 user name such as {{user-consume@QPID}} and not realizing that it is a group 
 name instead.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Closed] (QPID-3737) Patch to make qpid-stat -L option work

2012-05-17 Thread Paul Colby (JIRA)

 [ 
https://issues.apache.org/jira/browse/QPID-3737?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Paul Colby closed QPID-3737.



Confirmed fixed in 0.16 release.

 Patch to make qpid-stat -L option work
 --

 Key: QPID-3737
 URL: https://issues.apache.org/jira/browse/QPID-3737
 Project: Qpid
  Issue Type: Bug
  Components: Python Tools
Affects Versions: 0.12
Reporter: Paul Colby
Assignee: Ted Ross
Priority: Minor
  Labels: patch
 Fix For: 0.15

 Attachments: qpid-stat.diff

   Original Estimate: 1h
  Remaining Estimate: 1h

 Current behaviour:
 {code}
 qpid -qIS queue // Shows up to 50 queues.
 qpid -qIS queue -L 0// Shows as many queues as possible (ie no limit).
 qpid -qIS queue -L 1// Shows as many queues as possible (ie no limit).
 qpid -qIS queue -L 10   // Shows as many queues as possible (ie no limit).
 qpid -qIS queue -L 100  // Shows as many queues as possible (ie no limit).
 qpid -qIS queue -L blah // Shows as many queues as possible (ie no limit).
 {code}
 This happens because:
 # the default limit is 50, and
 # the limit argument is read as a string, but compared to an int in the 
 Sorter constructor - a comparison that always fails.
 Behaviour after the near-trivial attached patch:
 {code}
 qpid -qIS queue // Shows up to 50 queues.
 qpid -qIS queue -L 0// Shows as many queues as possible (ie no limit).
 qpid -qIS queue -L 1// Shows up to 1 queue.
 qpid -qIS queue -L 10   // Shows up to 10 queues.
 qpid -qIS queue -L 100  // Shows up to 100 queues.
 qpid -qIS queue -L blah // qpid-stat: error: option -L: invalid integer 
 value: 'foo'
 {code}
 I'll attach the patch, but's for the impatient ;)
 {code}
 Index: qpid-stat
 ===
 --- qpid-stat   (revision 1229483)
 +++ qpid-stat   (working copy)
 @@ -70,7 +70,7 @@
help=Sort by column name)
  group2.add_option(-I, --increasing, action=store_true, 
 default=False,
help=Sort by increasing value (default = decreasing))
 -group2.add_option(-L, --limit, default=50, metavar=n,
 +group2.add_option(-L, --limit, type=int, default=50, metavar=n,
help=Limit output to n rows)
  group2.add_option(-C, --cluster, action=store_true, default=False,
help=Display per-broker cluster detail.)
 {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Updated] (QPID-3849) Client connection breaks broker-to-broker cluster SASL authentication

2012-05-15 Thread Paul Colby (JIRA)

 [ 
https://issues.apache.org/jira/browse/QPID-3849?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Paul Colby updated QPID-3849:
-

Affects Version/s: 0.16

 Client connection breaks broker-to-broker cluster SASL authentication
 -

 Key: QPID-3849
 URL: https://issues.apache.org/jira/browse/QPID-3849
 Project: Qpid
  Issue Type: Bug
  Components: C++ Clustering
Affects Versions: 0.14, 0.16
 Environment: CentOS release 5.5 (Final)
 Linux version 2.6.18-194.32.1.el5 (mockbu...@builder10.centos.org) (gcc 
 version 4.1.2 20080704 (Red Hat 4.1.2-48)) #1 SMP Wed Jan 5 17:52:25 EST 2011
Reporter: Paul Colby
Assignee: michael j. goulish
Priority: Critical
  Labels: SASL

 There is a very strange problem that causes ordinary C++ clients to break C++ 
 broker cluster authentication.
 I have two brokers, let's call them {{gateway03}} and {{gateway04}}.  They 
 are both configured to cluster using SSL and CRAM-MD5 (see their 
 configuration files / environment below).
 h3. Scenario 1
 This scenario works fine.  I'm simply reporting it to show that it does work.
 # I start the broker on {{gateway04}}.
 # I start the broker on {{gateway03}}.
 # {{gateway03}} discovers the cluster.
 # {{gateway03}} creates a new persistent store.
 # {{gateway03}} receives updates from {{gateway04}}
 # {{gateway03}} caught-up
 # {{gateway04}} marks store as dirty (no longer last man standing).
 # Start as many of my C++ clients as I want, and they all connect with no 
 issues (note, I've included a sample C++ client that I used to test below, 
 but the same happens with a number of fully-fledged C++ client applications 
 I've written too).
 This is all perfect! :)
 h3. Scenario 2
 This is the one that reveals a problem :(
 # I start the broker on {{gateway04}}.
 #* I *don't* start the broker on {{gateway03}} yet.
 # I start one or more C++ clients on {{gateway04}} (or {{gateway03}} telling 
 the client to connect to {{gateway04}}) (see sample C++ client code below).
 # C++ clients all connect correctly, with no issues.
 # I start the broker on {{gateway03}}.
 # {{gateway03}} discovers the cluster.
 # {{gateway03}} creates a new persistent store.
 #* Up to this point the results of the two scenarios is the same, just the 
 order is different.
 # The broker on {{gateway03}} reports warning Client closed connection with 
 501: Desired mechanism(s) not valid: CRAM-MD5 (supported: ANONYMOUS PLAIN) 
 then critical cluster(192.168.9.90:24784 UPDATEE) catch-up connection closed 
 prematurely.
 # At the same time {{gateway04}} reports warning Closing connection due to 
 Desired mechanism(s) not valid: CRAM-MD5 (supported: ANONYMOUS PLAIN)} then 
 error sending update: Desired mechanism(s) not valid: CRAM-MD5 (supported: 
 ANONYMOUS PLAIN)
 # Then, of course, the broker on {{gateway03}} shuts down.
 Note, more complete broker / client logs are included below.
 So, it seems that somehow once an ordinary C++ client (ie not another broker) 
 connects to the broker, the broker no longer accepts CRAM-MD5 authentication 
 from other joining brokers.  But already-joined brokers participating in the 
 cluster are not affected.
 This may be the result of some misconfiguration on my part, but looks like a 
 pretty serious clustering bug to me... ?
 Some further notes:
 * I don't know at this stage if the use of SSL has any affect (ie I haven't 
 tried these same tests with SSL turned off).
 * it doesn't matter which broker is started first - I can swap {{gateway03}} 
 and {{gateway04}} in every instance, and the result is the same.
 * I have a third broker that I use as part of this cluster, and it sees that 
 same affect.  If, for example, I have two brokers clustered, and a client 
 connects, then the third broker will not be able to join the cluster for the 
 same reason as above.
 h3. Broker Configuration
 The {{gateway03}} broker is configured as follows ({{gateway04}} config is 
 the same, but with {{03}} replaced with {{04}} where relevant).
 {code:title=/etc/qpidd.conf}
 cluster-name=mm-queue-cluster
 cluster-mechanism=CRAM-MD5
 cluster-username=guest
 cluster-password=guest
 cluster-size=0
 cluster-url=ssl:gateway03:5671
 auth=yes
 ssl-cert-db=/etc/qpid/certs/broker
 ssl-cert-password-file=/etc/qpid/certs/pass.txt
 ssl-cert-name=broker
 require-encryption=yes
 {code}
 {code:title=/etc/sasl2/qpidd.conf}
 pwcheck_method: auxprop
 auxprop_plugin: sasldb
 sasldb_path: /var/lib/qpidd/qpidd.sasldb
 mech_list: CRAM-MD5 DIGEST-MD5 PLAIN
 sql_select: dummy select
 {code}
 {code:title=broker environment}
 export QPID_SSL_CERT_DB=/etc/qpid/certs/broker
 export QPID_SSL_CERT_NAME=broker
 export QPID_SSL_CERT_PASSWORD_FILE=/etc/qpid/certs/pass.txt
 {code}
 h3. Sample Test Client
 {code:title=main.cpp}
 #include 

[jira] [Closed] (QPID-3441) Correct spelling error in C++ broker's QMF schema

2011-09-21 Thread Paul Colby (JIRA)

 [ 
https://issues.apache.org/jira/browse/QPID-3441?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Paul Colby closed QPID-3441.



Confirmed fixed. Thanks :)

 Correct spelling error in C++ broker's QMF schema
 -

 Key: QPID-3441
 URL: https://issues.apache.org/jira/browse/QPID-3441
 Project: Qpid
  Issue Type: Task
  Components: C++ Broker
Affects Versions: 0.10
Reporter: Paul Colby
Assignee: Ted Ross
Priority: Trivial
 Fix For: 0.13


 The word Infrastructure has been misspelled as Infrastucture (missing an 
 r) in cpp/src/qmf/org/apache/qpid/broker/Connection.cpp (line 150 for the 
 0.10 release).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] [Closed] (QPID-3419) qpid-config --file-size parameter's help text uses incorrect units

2011-09-21 Thread Paul Colby (JIRA)

 [ 
https://issues.apache.org/jira/browse/QPID-3419?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Paul Colby closed QPID-3419.



Confirmed fixed. Thanks :)

 qpid-config --file-size parameter's help text uses incorrect units
 --

 Key: QPID-3419
 URL: https://issues.apache.org/jira/browse/QPID-3419
 Project: Qpid
  Issue Type: Bug
  Components: Tools
Affects Versions: 0.10
Reporter: Paul Colby
Assignee: Ted Ross
Priority: Trivial
 Fix For: 0.13

 Attachments: QPID-3419.diff


 It seems to me, that the {{qpid-config --file-size}} parameter's help text 
 uses incorrect units.  It shows:
 bq. --file-size=n File size in pages (64Kib/page)
 which would indicate that 24-pages (the default) would yield 192KiB journal 
 files (24 * 64 / 8).  But instead, the journal files I get are ~1.6MiB, which 
 would suggest that the 64Kib is meant to be 64KiB (ie Kibibytes instead of 
 Kibibits).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] [Closed] (QPID-3442) qpid-tool schema descriptions repeated / duplicated

2011-09-21 Thread Paul Colby (JIRA)

 [ 
https://issues.apache.org/jira/browse/QPID-3442?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Paul Colby closed QPID-3442.



Confirmed fixed. Thanks :)

 qpid-tool schema descriptions repeated / duplicated
 ---

 Key: QPID-3442
 URL: https://issues.apache.org/jira/browse/QPID-3442
 Project: Qpid
  Issue Type: Bug
  Components: Tools
Affects Versions: 0.10
 Environment: Linux version 2.6.18-194.32.1.el5 
 (mockbu...@builder10.centos.org) (gcc version 4.1.2 20080704 (Red Hat 
 4.1.2-48)) #1 SMP Wed Jan 5 17:52:25 EST 2011
 Python 2.4.3
 Linux version 2.6.32-5-amd64 (Debian 2.6.32-35) (da...@debian.org) (gcc 
 version 4.3.5 (Debian 4.3.5-4) ) #1 SMP Tue Jun 14 09:42:28 UTC 2011
 Python 2.6.6
Reporter: Paul Colby
Assignee: Ted Ross
Priority: Minor
 Fix For: 0.13


 It seems that when qpid-tool displays a schema element with no description, 
 it repeats the previous element's description (if any) instead.
 For example:
 {code}
 qpid: schema connection
 Object Class: Table Class: 
 org.apache.qpid.broker:connection:_data(1cb21a64-b290-c47d-40bc-5ea42cffd7c7)
 ElementType  Access  Unit  Notes  Description
 
 =
 vhostRef   reference ReadCreateindex
 addressshort-string  ReadCreateindex
 incoming   boolean   ReadCreate
 SystemConnection   boolean   ReadCreate   
 Infrastucture/ Inter-system connection (Cluster, Federation, ...)
 federationLink boolean   ReadOnly Is this a 
 federation link
 authIdentity   short-string  ReadOnly authId of 
 connection if authentication enabled
 remoteProcessName  long-string   ReadOnly  optional   Name of 
 executable running as remote client
 remotePid  uint32ReadOnly  optional   Process ID 
 of remote client
 remoteParentPiduint32ReadOnly  optional   Parent 
 Process ID of remote client
 shadow boolean   ReadOnly True for 
 shadow connections
 closingbooleanTrue for 
 shadow connections
 framesFromClient   uint64 True for 
 shadow connections
 framesToClient uint64 True for 
 shadow connections
 bytesFromClientuint64 True for 
 shadow connections
 bytesToClient  uint64 True for 
 shadow connections
 msgsFromClient uint64 True for 
 shadow connections
 msgsToClient   uint64 True for 
 shadow connections
   Method: close
 qpid:
 {code}
 If this example, you can see that the {{shadow}} element's description 
 ({{True for shadow connections}}) has been repeated for all elements after 
 it.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] [Closed] (QPID-3420) Make C++ broker's help text use consistent kibibyte abbreviations

2011-08-25 Thread Paul Colby (JIRA)

 [ 
https://issues.apache.org/jira/browse/QPID-3420?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Paul Colby closed QPID-3420.


   Resolution: Fixed
Fix Version/s: 0.13

 Make C++ broker's help text use consistent kibibyte abbreviations
 -

 Key: QPID-3420
 URL: https://issues.apache.org/jira/browse/QPID-3420
 Project: Qpid
  Issue Type: Improvement
  Components: C++ Broker
Affects Versions: 0.10
Reporter: Paul Colby
Priority: Trivial
 Fix For: 0.13


 Currently, the qpidd C++ broker's help text uses _KiB_ in some places and 
 _kiB_ in others.  Would be nice it they were consistent.
 {noformat}
  qpidd --help | grep -i '[kmt]i\?b'
   --num-jfiles N (8)Default number of files for each journal
 of read pages (1 read page = 64kiB)
 KiB. Allowable values - powers of 2: 1, 2, 4,
   --tpl-num-jfiles N (8)Number of files for transaction prepared list
 64kiB)
 list write page cache in KiB. Allowable values
   --cluster-size N (1)   Wait for N cluster members before allowing 
 clients
 {noformat}
 Personally, I prefer _KiB_, but anything consistent would be good.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] [Commented] (QPID-3420) Make C++ broker's help text use consistent kibibyte abbreviations

2011-08-25 Thread Paul Colby (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-3420?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13091372#comment-13091372
 ] 

Paul Colby commented on QPID-3420:
--

Thanks! :)

 Make C++ broker's help text use consistent kibibyte abbreviations
 -

 Key: QPID-3420
 URL: https://issues.apache.org/jira/browse/QPID-3420
 Project: Qpid
  Issue Type: Improvement
  Components: C++ Broker
Affects Versions: 0.10
Reporter: Paul Colby
Priority: Trivial
 Fix For: 0.13


 Currently, the qpidd C++ broker's help text uses _KiB_ in some places and 
 _kiB_ in others.  Would be nice it they were consistent.
 {noformat}
  qpidd --help | grep -i '[kmt]i\?b'
   --num-jfiles N (8)Default number of files for each journal
 of read pages (1 read page = 64kiB)
 KiB. Allowable values - powers of 2: 1, 2, 4,
   --tpl-num-jfiles N (8)Number of files for transaction prepared list
 64kiB)
 list write page cache in KiB. Allowable values
   --cluster-size N (1)   Wait for N cluster members before allowing 
 clients
 {noformat}
 Personally, I prefer _KiB_, but anything consistent would be good.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] [Updated] (QPID-3419) qpid-config --file-size parameter's help text uses incorrect units

2011-08-23 Thread Paul Colby (JIRA)

 [ 
https://issues.apache.org/jira/browse/QPID-3419?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Paul Colby updated QPID-3419:
-

Attachment: QPID-3419.diff

Added a very small diff file to make the one (very minor) change.

 qpid-config --file-size parameter's help text uses incorrect units
 --

 Key: QPID-3419
 URL: https://issues.apache.org/jira/browse/QPID-3419
 Project: Qpid
  Issue Type: Bug
  Components: Tools
Affects Versions: 0.10
Reporter: Paul Colby
Priority: Trivial
 Attachments: QPID-3419.diff


 It seems to me, that the {{qpid-config --file-size}} parameter's help text 
 uses incorrect units.  It shows:
 bq. --file-size=n File size in pages (64Kib/page)
 which would indicate that 24-pages (the default) would yield 192KiB journal 
 files (24 * 64 / 8).  But instead, the journal files I get are ~1.6MiB, which 
 would suggest that the 64Kib is meant to be 64KiB (ie Kibibytes instead of 
 Kibibits).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] [Created] (QPID-3441) Correct spelling error in C++ broker's QMF schema

2011-08-22 Thread Paul Colby (JIRA)
Correct spelling error in C++ broker's QMF schema
-

 Key: QPID-3441
 URL: https://issues.apache.org/jira/browse/QPID-3441
 Project: Qpid
  Issue Type: Task
  Components: C++ Broker
Affects Versions: 0.10
Reporter: Paul Colby
Priority: Trivial


The word Infrastructure has been misspelled as Infrastucture (missing an 
r) in cpp/src/qmf/org/apache/qpid/broker/Connection.cpp (line 150 for the 
0.10 release).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] [Created] (QPID-3442) qpid-tool schema descriptions repeated / duplicated

2011-08-22 Thread Paul Colby (JIRA)
qpid-tool schema descriptions repeated / duplicated
---

 Key: QPID-3442
 URL: https://issues.apache.org/jira/browse/QPID-3442
 Project: Qpid
  Issue Type: Bug
  Components: Tools
Affects Versions: 0.10
 Environment: Linux version 2.6.18-194.32.1.el5 
(mockbu...@builder10.centos.org) (gcc version 4.1.2 20080704 (Red Hat 
4.1.2-48)) #1 SMP Wed Jan 5 17:52:25 EST 2011
Python 2.4.3


Linux version 2.6.32-5-amd64 (Debian 2.6.32-35) (da...@debian.org) (gcc version 
4.3.5 (Debian 4.3.5-4) ) #1 SMP Tue Jun 14 09:42:28 UTC 2011
Python 2.6.6
Reporter: Paul Colby
Priority: Minor


It seems that when qpid-tool displays a schema element with no description, it 
repeats the previous element's description (if any) instead.

For example:
{code}
qpid: schema connection
Object Class: Table Class: 
org.apache.qpid.broker:connection:_data(1cb21a64-b290-c47d-40bc-5ea42cffd7c7)
ElementType  Access  Unit  Notes  Description

=
vhostRef   reference ReadCreateindex
addressshort-string  ReadCreateindex
incoming   boolean   ReadCreate
SystemConnection   boolean   ReadCreate   
Infrastucture/ Inter-system connection (Cluster, Federation, ...)
federationLink boolean   ReadOnly Is this a 
federation link
authIdentity   short-string  ReadOnly authId of 
connection if authentication enabled
remoteProcessName  long-string   ReadOnly  optional   Name of 
executable running as remote client
remotePid  uint32ReadOnly  optional   Process ID of 
remote client
remoteParentPiduint32ReadOnly  optional   Parent 
Process ID of remote client
shadow boolean   ReadOnly True for 
shadow connections
closingbooleanTrue for 
shadow connections
framesFromClient   uint64 True for 
shadow connections
framesToClient uint64 True for 
shadow connections
bytesFromClientuint64 True for 
shadow connections
bytesToClient  uint64 True for 
shadow connections
msgsFromClient uint64 True for 
shadow connections
msgsToClient   uint64 True for 
shadow connections

  Method: close
qpid:
{code}

If this example, you can see that the {{shadow}} element's description ({{True 
for shadow connections}}) has been repeated for all elements after it.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] [Created] (QPID-3445) Assertion, and unexpected exception in qpid::messaging::decode

2011-08-22 Thread Paul Colby (JIRA)
Assertion, and unexpected exception in qpid::messaging::decode
--

 Key: QPID-3445
 URL: https://issues.apache.org/jira/browse/QPID-3445
 Project: Qpid
  Issue Type: Bug
  Components: C++ Client
Affects Versions: 0.10, Future
Reporter: Paul Colby


Although this is technically two different bug reports, they are very closely 
related, and should probably be tested / fixed together, so I'm reporting them 
both here... hope that's okay ;)

Both {{qpid::messaging::decode}} functions can assert, or throw an unexpected 
{{qpid::framing::IllegalArgumentException}} on invalid input.

Consider the following code fragment:
{code}
const qpid::messaging::Message message(foo);
try {
qpid::types::Variant::Map map;
qpid::messaging::decode(message, map); // asserts in 
qpid::framing::Buffer::getLong
} catch (const qpid::messaging::EncodingException ex) {
std::cout  qpid::messaging::EncodingException   ex.what()  
std::endl;
}
std::cout  done  std::endl; // never reached.
{code}

In that example, the {{qpid::messaging::decode}} function will result in an 
assertion in {{qpid::framing::Buffer::getLong}} as that function assumes / 
requires the buffer to be at least 4 bytes.  Clearly in this case the decode 
should fail, but ideally it should fail in a catchable way, not an assertion.

I would think the right solution would be to add a minimum size check to the 
{{qpid::framing::FieldTable::decode}} function.  But it could also be solved by 
adding the size check to the {{qpid::messaging::decode}} and/or  
{{qpid::framing::Buffer::getLong}} functions.

As a temporary workaround, client code can add a size check before the 
{{decode}} call, like:

{code}
const qpid::messaging::Message message(foo);
try {
if (message.getContent().size()  4)
throw qpid::messaging::EncodingException(message too small);
qpid::types::Variant::Map map;
qpid::messaging::decode(message, map);
} catch (const qpid::messaging::EncodingException ex) {
std::cout  qpid::messaging::EncodingException   ex.what()  
std::endl;
}
std::cout  done  std::endl;
{code}

But now if we extend the message a little, so that it is at least 4 bytes long 
like so:
{code}
const qpid::messaging::Message message(\0\0\0\7foo, 7);
try {
if (message.getContent().size()  4)
throw qpid::messaging::EncodingException(message too small);
qpid::types::Variant::Map map;
qpid::messaging::decode(message, map);
} catch (const qpid::messaging::EncodingException ex) {
std::cout  qpid::messaging::EncodingException   ex.what()  
std::endl;
}
std::cout  done  std::endl; // never reached.
{code}

Then we run into a second problem.  In that case, the {{done}} line is still 
not reached, because a {{qpid::framing::IllegalArgumentException}} is thrown in 
{{qpid::framing::FieldTable::decode}} with message {{Not enough data for field 
table.}}.  However, this exception type is not listed in the documentation for 
the {{qpid::messaging::decode}} function - the documentation only mentions 
{{EncodingException}}, and the two share no common ancestry until right back at 
{{std::exception}}.

Although one solution might be just to add {{IllegalArgumentException}} to the 
documentation, I suspect a preferable solution would be to catch the 
{{IllegalArgumentException}} in {{qpid::messaging::decode}} and re-throw it as 
an {{EncodingException}} like:
{code}
 static void decode(const Message message, typename C::ObjectType object, 
const std::string encoding)
 {
 checkEncoding(message, encoding);
-C::decode(message.getContent(), object);
+try {
+C::decode(message.getContent(), object);
+} catch (const qpid::Exception ex) {
+throw EncodingException(ex.what());
+}
 }
{code}

A quick code review shows that {{qpid::framing::FieldTable::decode}} (and thus 
{{qpid::messaging::decode}}) can also throw the {{OutOfBounds}} exception, 
which, like {{IllegalArgumentException}}, descends from {{qpid::Exception}}.  
So a final solution might look something like:
{code}
Index: framing/FieldTable.cpp
===
--- framing/FieldTable.cpp  (revision 1160172)
+++ framing/FieldTable.cpp  (working copy)
@@ -198,10 +198,12 @@

 void FieldTable::decode(Buffer buffer){
 clear();
+if (buffer.available()  4)
+throw IllegalArgumentException(QPID_MSG(Not enough data for field 
table.));
 uint32_t len = buffer.getLong();
 if (len) {
 uint32_t available = buffer.available();
-if (available  len)
+if ((available  len) || (available  4))
 throw IllegalArgumentException(QPID_MSG(Not enough data for field 
table.));
 uint32_t count = buffer.getLong();
 uint32_t leftover = available - len;
Index: messaging/Message.cpp

[jira] [Updated] (QPID-3445) Assertion, and unexpected exception in qpid::messaging::decode

2011-08-22 Thread Paul Colby (JIRA)

 [ 
https://issues.apache.org/jira/browse/QPID-3445?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Paul Colby updated QPID-3445:
-

Attachment: QPID-3445.diff

Attached a patch including the suggestions above, and equivalent changes to 
{{qpid::framing::List::decode}} too.

Patch is against http://svn.apache.org/repos/asf/qpid/trunk at revision 1160478.

 Assertion, and unexpected exception in qpid::messaging::decode
 --

 Key: QPID-3445
 URL: https://issues.apache.org/jira/browse/QPID-3445
 Project: Qpid
  Issue Type: Bug
  Components: C++ Client
Affects Versions: 0.10, Future
Reporter: Paul Colby
Assignee: Gordon Sim
 Attachments: QPID-3445.diff


 Although this is technically two different bug reports, they are very closely 
 related, and should probably be tested / fixed together, so I'm reporting 
 them both here... hope that's okay ;)
 Both {{qpid::messaging::decode}} functions can assert, or throw an unexpected 
 {{qpid::framing::IllegalArgumentException}} on invalid input.
 Consider the following code fragment:
 {code}
 const qpid::messaging::Message message(foo);
 try {
 qpid::types::Variant::Map map;
 qpid::messaging::decode(message, map); // asserts in 
 qpid::framing::Buffer::getLong
 } catch (const qpid::messaging::EncodingException ex) {
 std::cout  qpid::messaging::EncodingException   ex.what()  
 std::endl;
 }
 std::cout  done  std::endl; // never reached.
 {code}
 In that example, the {{qpid::messaging::decode}} function will result in an 
 assertion in {{qpid::framing::Buffer::getLong}} as that function assumes / 
 requires the buffer to be at least 4 bytes.  Clearly in this case the decode 
 should fail, but ideally it should fail in a catchable way, not an assertion.
 I would think the right solution would be to add a minimum size check to the 
 {{qpid::framing::FieldTable::decode}} function.  But it could also be solved 
 by adding the size check to the {{qpid::messaging::decode}} and/or  
 {{qpid::framing::Buffer::getLong}} functions.
 As a temporary workaround, client code can add a size check before the 
 {{decode}} call, like:
 {code}
 const qpid::messaging::Message message(foo);
 try {
 if (message.getContent().size()  4)
 throw qpid::messaging::EncodingException(message too small);
 qpid::types::Variant::Map map;
 qpid::messaging::decode(message, map);
 } catch (const qpid::messaging::EncodingException ex) {
 std::cout  qpid::messaging::EncodingException   ex.what()  
 std::endl;
 }
 std::cout  done  std::endl;
 {code}
 But now if we extend the message a little, so that it is at least 4 bytes 
 long like so:
 {code}
 const qpid::messaging::Message message(\0\0\0\7foo, 7);
 try {
 if (message.getContent().size()  4)
 throw qpid::messaging::EncodingException(message too small);
 qpid::types::Variant::Map map;
 qpid::messaging::decode(message, map);
 } catch (const qpid::messaging::EncodingException ex) {
 std::cout  qpid::messaging::EncodingException   ex.what()  
 std::endl;
 }
 std::cout  done  std::endl; // never reached.
 {code}
 Then we run into a second problem.  In that case, the {{done}} line is 
 still not reached, because a {{qpid::framing::IllegalArgumentException}} is 
 thrown in {{qpid::framing::FieldTable::decode}} with message {{Not enough 
 data for field table.}}.  However, this exception type is not listed in the 
 documentation for the {{qpid::messaging::decode}} function - the 
 documentation only mentions {{EncodingException}}, and the two share no 
 common ancestry until right back at {{std::exception}}.
 Although one solution might be just to add {{IllegalArgumentException}} to 
 the documentation, I suspect a preferable solution would be to catch the 
 {{IllegalArgumentException}} in {{qpid::messaging::decode}} and re-throw it 
 as an {{EncodingException}} like:
 {code}
  static void decode(const Message message, typename C::ObjectType 
 object, const std::string encoding)
  {
  checkEncoding(message, encoding);
 -C::decode(message.getContent(), object);
 +try {
 +C::decode(message.getContent(), object);
 +} catch (const qpid::Exception ex) {
 +throw EncodingException(ex.what());
 +}
  }
 {code}
 A quick code review shows that {{qpid::framing::FieldTable::decode}} (and 
 thus {{qpid::messaging::decode}}) can also throw the {{OutOfBounds}} 
 exception, which, like {{IllegalArgumentException}}, descends from 
 {{qpid::Exception}}.  So a final solution might look something like:
 {code}
 Index: framing/FieldTable.cpp
 ===
 --- framing/FieldTable.cpp  (revision 1160172)
 +++ framing/FieldTable.cpp  (working copy)
 @@ -198,10 +198,12 @@
  void 

[jira] [Created] (QPID-3419) qpid-config --file-size parameter's help text uses incorrect units

2011-08-14 Thread Paul Colby (JIRA)
qpid-config --file-size parameter's help text uses incorrect units
--

 Key: QPID-3419
 URL: https://issues.apache.org/jira/browse/QPID-3419
 Project: Qpid
  Issue Type: Bug
  Components: Tools
Affects Versions: 0.10
Reporter: Paul Colby
Priority: Trivial


It seems to me, that the {{qpid-config --file-size}} parameter's help text uses 
incorrect units.  It shows:

bq. --file-size=n File size in pages (64Kib/page)

which would indicate that 24-pages (the default) would yield 192KiB journal 
files (24 * 64 / 8).  But instead, the journal files I get are ~1.6MiB, which 
would suggest that the 64Kib is meant to be 64KiB (ie Kibibytes instead of 
Kibibits).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] [Created] (QPID-3420) Make C++ broker's help text use consistent kibibyte abbreviations

2011-08-14 Thread Paul Colby (JIRA)
Make C++ broker's help text use consistent kibibyte abbreviations
-

 Key: QPID-3420
 URL: https://issues.apache.org/jira/browse/QPID-3420
 Project: Qpid
  Issue Type: Improvement
  Components: C++ Broker
Affects Versions: 0.10
Reporter: Paul Colby
Priority: Trivial


Currently, the qpidd C++ broker's help text uses _KiB_ in some places and _kiB_ 
in others.  Would be nice it they were consistent.
{noformat}
 qpidd --help | grep -i '[kmt]i\?b'
  --num-jfiles N (8)Default number of files for each journal
of read pages (1 read page = 64kiB)
KiB. Allowable values - powers of 2: 1, 2, 4,
  --tpl-num-jfiles N (8)Number of files for transaction prepared list
64kiB)
list write page cache in KiB. Allowable values
  --cluster-size N (1)   Wait for N cluster members before allowing clients
{noformat}

Personally, I prefer _KiB_, but anything consistent would be good.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] [Commented] (QPID-3419) qpid-config --file-size parameter's help text uses incorrect units

2011-08-14 Thread Paul Colby (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-3419?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13084934#comment-13084934
 ] 

Paul Colby commented on QPID-3419:
--

I just noticed that C++ broker uses _KiB_ for the equivalent setting 
({{--jfile-size-pgs}}), so I guess that implies that {{qpid-config}} should be 
using _KiB_ too.

 qpid-config --file-size parameter's help text uses incorrect units
 --

 Key: QPID-3419
 URL: https://issues.apache.org/jira/browse/QPID-3419
 Project: Qpid
  Issue Type: Bug
  Components: Tools
Affects Versions: 0.10
Reporter: Paul Colby
Priority: Trivial

 It seems to me, that the {{qpid-config --file-size}} parameter's help text 
 uses incorrect units.  It shows:
 bq. --file-size=n File size in pages (64Kib/page)
 which would indicate that 24-pages (the default) would yield 192KiB journal 
 files (24 * 64 / 8).  But instead, the journal files I get are ~1.6MiB, which 
 would suggest that the 64Kib is meant to be 64KiB (ie Kibibytes instead of 
 Kibibits).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] [Created] (QPID-3364) Segmentation fault when unloading shared libraries linked with libqpidmessaging

2011-07-19 Thread Paul Colby (JIRA)
Segmentation fault when unloading shared libraries linked with libqpidmessaging
---

 Key: QPID-3364
 URL: https://issues.apache.org/jira/browse/QPID-3364
 Project: Qpid
  Issue Type: Bug
  Components: C++ Client
Affects Versions: 0.10, 0.8, 0.11
 Environment: Linux version 2.6.32-5-686 (Debian 2.6.32-34squeeze1) 
(da...@debian.org) (gcc version 4.3.5 (Debian 4.3.5-4) ) #1 SMP Wed May 18 
07:08:50 UTC 2011

Linux version 2.6.32-5-amd64 (Debian 2.6.32-34squeeze1) (da...@debian.org) (gcc 
version 4.3.5 (Debian 4.3.5-4) ) #1 SMP Wed May 18 23:13:22 UTC 2011
Reporter: Paul Colby
Priority: Minor


Disclaimer: I'm not a dlopen/dlclose expert... I'm perfectly happy to be told 
that I don't know what I'm doing! ;)

If I create a shared object (that may or may not implement anything) that links 
with libqpidmessaging (ie g++ ... -lqpidmessaging), and then create an 
application that dlopen's that library, then dlclose's that library, then that 
application will cause a seg-fault, which appears to be in the libqpidmessaging 
library itself.

To demonstrate, I have a loadee.cpp file that contains just the following 
unimportant code:

{quote}
void foo() { }
{quote}

Then I build a loadee.so shared object like:


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] [Updated] (QPID-3364) Segmentation fault when unloading shared libraries linked with libqpidmessaging

2011-07-19 Thread Paul Colby (JIRA)

 [ 
https://issues.apache.org/jira/browse/QPID-3364?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Paul Colby updated QPID-3364:
-

Attachment: Makefile
loader.cpp
loadee.cpp

Attached the sample files mentioned in the issue description, along with a 
near-trivial Makefile.

 Segmentation fault when unloading shared libraries linked with 
 libqpidmessaging
 ---

 Key: QPID-3364
 URL: https://issues.apache.org/jira/browse/QPID-3364
 Project: Qpid
  Issue Type: Bug
  Components: C++ Client
Affects Versions: 0.8, 0.10, 0.11
 Environment: Linux version 2.6.32-5-686 (Debian 2.6.32-34squeeze1) 
 (da...@debian.org) (gcc version 4.3.5 (Debian 4.3.5-4) ) #1 SMP Wed May 18 
 07:08:50 UTC 2011
 Linux version 2.6.32-5-amd64 (Debian 2.6.32-34squeeze1) (da...@debian.org) 
 (gcc version 4.3.5 (Debian 4.3.5-4) ) #1 SMP Wed May 18 23:13:22 UTC 2011
Reporter: Paul Colby
Priority: Minor
 Attachments: Makefile, loadee.cpp, loader.cpp


 Disclaimer: I'm not a dlopen/dlclose expert... I'm perfectly happy to be told 
 that I don't know what I'm doing! ;)
 h3. Basic Description
 If I create a shared object (that may or may not implement anything) that 
 links with libqpidmessaging (ie g++ ... -lqpidmessaging), and then create an 
 application that dlopen's that library, then dlclose's that library, then 
 that application will cause a seg-fault, which appears to be in the 
 libqpidmessaging library itself.
 To demonstrate, I have a loadee.cpp file that contains just the following 
 unimportant code:
 {code:title=loadee.cpp|borderStyle=solid}
 void foo() { }
 {code}
 Then I build a loadee.so shared object like:
 {noformat}
 g++ -g -shared -lqpidmessaging -o loadee.so loadee.cpp
 {noformat}
 Next I have:
 {code:title=loader.cpp|borderStyle=solid}
 #include stdio.h
 #include stdlib.h
 #include dlfcn.h
 int main(int c, char *argv[]) {
 void *handle = dlopen(./loadee.so, RTLD_LAZY); // segfaults in dlclose 
 below.
 //void *handle = dlopen(./loadee.so, RTLD_NOW); // no segfault.
 if (!handle) {
 fprintf(stderr, %s\n, dlerror());
 exit(EXIT_FAILURE);
 }
 dlclose(handle);
 return EXIT_SUCCESS;
 }
 {code}
 Finally I build the loader program like:
 {noformat}
 g++ -g -rdynamic -o loader loader.cpp -ldl
 {noformat}
 Now, if I run the resulting loader program, then the program seg-faults in 
 libqpidmessaging.  However, there is no such seg-fault (for me at least), if 
 I *either* remove the -lqpidmessaging flag from the first g++ command, *or* 
 change the flopen flags from RTLD_NOW to RTLD_LAZY (as indicated in the code 
 comments above).
 h3. Tested Versions
 I've tried this against the 0.8 and 0.10 tags, as well as trunk at r1148263, 
 with both Autotools and CMake.
 h3. GDB
 Unfortunately, gdb is not giving me much... very strange.
 {noformat}
 paul@debian:~/src/simple$ gdb ./loader
 GNU gdb (GDB) 7.0.1-debian
 Copyright (C) 2009 Free Software Foundation, Inc.
 License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
 This is free software: you are free to change and redistribute it.
 There is NO WARRANTY, to the extent permitted by law.  Type show copying
 and show warranty for details.
 This GDB was configured as i486-linux-gnu.
 For bug reporting instructions, please see:
 http://www.gnu.org/software/gdb/bugs/...
 Reading symbols from /home/paul/src/simple/loader...done.
 (gdb) run
 Starting program: /home/paul/src/simple/loader
 [Thread debugging using libthread_db enabled]
 Cannot find new threads: generic error
 (gdb) bt
 Target is executing.
 (gdb) bt full
 Target is executing.
 (gdb) thread apply all bt
 Cannot find new threads: generic error
 (gdb)
 {noformat}
 h3. Valgrind
 Valgrind is a little more interesting though...
 {noformat}
 paul@debian:~/src/simple$ valgrind --leak-check=full --show-reachable=yes 
 ./loader
 ==31992== Memcheck, a memory error detector
 ==31992== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
 ==31992== Using Valgrind-3.6.0.SVN-Debian and LibVEX; rerun with -h for 
 copyright info
 ==31992== Command: ./loader
 ==31992==
 ==31992== Jump to the invalid address stated on the next line
 ==31992==at 0x0: ???
 ==31992==by 0x41A1687: __cxa_finalize (cxa_finalize.c:56)
 ==31992==by 0x46ED0F3: ??? (in /usr/local/lib/libqpidmessaging.so.2.0.0)
 ==31992==by 0x473091F: ??? (in /usr/local/lib/libqpidmessaging.so.2.0.0)
 ==31992==by 0x401271D: _dl_close_worker (dl-close.c:271)
 ==31992==by 0x4013196: _dl_close (dl-close.c:742)
 ==31992==by 0x4034CA3: dlclose_doit (dlclose.c:37)
 ==31992==by 0x400D7F5: _dl_catch_error (dl-error.c:178)
 ==31992==by 0x403509B: _dlerror_run (dlerror.c:164)
 ==31992==by 0x4034CD9: dlclose (dlclose.c:48)
 

[jira] [Commented] (QPID-3027) PHP binding of Qpid Messaging API

2011-07-19 Thread Paul Colby (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-3027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13067633#comment-13067633
 ] 

Paul Colby commented on QPID-3027:
--

Regarding the segfault, I've created a very small test case that reproduces the 
same fault without involving PHP or swig at all, and reported it as a separate 
issue - https://issues.apache.org/jira/browse/QPID-3364

 PHP binding of Qpid Messaging API
 -

 Key: QPID-3027
 URL: https://issues.apache.org/jira/browse/QPID-3027
 Project: Qpid
  Issue Type: New Feature
  Components: C++ Client
Affects Versions: 0.8
Reporter: Paul Colby
Assignee: Ted Ross
 Attachments: FindPHPDev.cmake, Makefile, cqpid_php.20110220.diff, 
 cqpid_php.20110301.diff, cqpid_php.20110328.diff, cqpid_php.20110415.diff, 
 cqpid_php.diff


 Working on a PHP binding for the Qpid Messaging API via SWIG.  There are 
 several PHP-specific issues with C++ and SWIG which I've managed to 
 workaround, so the binding is starting to take shape, but still very much a 
 work in progress.
 The rough plan:
 1. report relevant bugs / feature requests to SWIG (done).
 2. clean-up Qpid php.i SWIG interface file (mostly done - just need to 
 implement PHP namespaces).
 3. implement qpid::types::Variant - PHP typemapping (not started).
 4. implement printinfo pragma (should be easy, just need to choose what info 
 to include).
 5. create relevant [auto]makefile.
 Of course, there's lots of things to discuss / decide along the way... so 
 I'll post 'em here as they come up.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] [Commented] (QPID-3027) PHP binding of Qpid Messaging API

2011-06-27 Thread Paul Colby (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-3027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13056218#comment-13056218
 ] 

Paul Colby commented on QPID-3027:
--

Thanks David!  I'm now able to reproduce the segfault... I'll investigate 
further :)

Paul.

 PHP binding of Qpid Messaging API
 -

 Key: QPID-3027
 URL: https://issues.apache.org/jira/browse/QPID-3027
 Project: Qpid
  Issue Type: New Feature
  Components: C++ Client
Affects Versions: 0.8
Reporter: Paul Colby
Assignee: Ted Ross
 Attachments: FindPHPDev.cmake, Makefile, cqpid_php.20110220.diff, 
 cqpid_php.20110301.diff, cqpid_php.20110328.diff, cqpid_php.20110415.diff, 
 cqpid_php.diff


 Working on a PHP binding for the Qpid Messaging API via SWIG.  There are 
 several PHP-specific issues with C++ and SWIG which I've managed to 
 workaround, so the binding is starting to take shape, but still very much a 
 work in progress.
 The rough plan:
 1. report relevant bugs / feature requests to SWIG (done).
 2. clean-up Qpid php.i SWIG interface file (mostly done - just need to 
 implement PHP namespaces).
 3. implement qpid::types::Variant - PHP typemapping (not started).
 4. implement printinfo pragma (should be easy, just need to choose what info 
 to include).
 5. create relevant [auto]makefile.
 Of course, there's lots of things to discuss / decide along the way... so 
 I'll post 'em here as they come up.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] [Updated] (QPID-3027) PHP binding of Qpid Messaging API

2011-03-28 Thread Paul Colby (JIRA)

 [ 
https://issues.apache.org/jira/browse/QPID-3027?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Paul Colby updated QPID-3027:
-

Attachment: cqpid_php.20110328.diff

Added cqpid_php.20110328.diff.

* added a QMF2 binding.
* fixed an int-size conversion bug in PHP type-mapping code.
* added the web-based example that was supposed to be in the last update 
(Subversion was misbehaving).

 PHP binding of Qpid Messaging API
 -

 Key: QPID-3027
 URL: https://issues.apache.org/jira/browse/QPID-3027
 Project: Qpid
  Issue Type: New Feature
  Components: C++ Client
Affects Versions: 0.8
Reporter: Paul Colby
Assignee: Ted Ross
 Attachments: Makefile, cqpid_php.20110220.diff, 
 cqpid_php.20110301.diff, cqpid_php.20110328.diff, cqpid_php.diff


 Working on a PHP binding for the Qpid Messaging API via SWIG.  There are 
 several PHP-specific issues with C++ and SWIG which I've managed to 
 workaround, so the binding is starting to take shape, but still very much a 
 work in progress.
 The rough plan:
 1. report relevant bugs / feature requests to SWIG (done).
 2. clean-up Qpid php.i SWIG interface file (mostly done - just need to 
 implement PHP namespaces).
 3. implement qpid::types::Variant - PHP typemapping (not started).
 4. implement printinfo pragma (should be easy, just need to choose what info 
 to include).
 5. create relevant [auto]makefile.
 Of course, there's lots of things to discuss / decide along the way... so 
 I'll post 'em here as they come up.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

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



[jira] Updated: (QPID-3027) PHP binding of Qpid Messaging API

2011-03-01 Thread Paul Colby (JIRA)

 [ 
https://issues.apache.org/jira/browse/QPID-3027?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Paul Colby updated QPID-3027:
-

Attachment: cqpid_php.20110301.diff

Added cqpid_php.20110301.diff.

The main difference in this version is integration with Qpid's autoconf / 
automake build system.  This is the first time I've ever worked with autoconf / 
automake, so there's likely to be something that needs tweaking... ?

Also included in this version is a small fix to key names extracted from PHP 
associative arrays when converting to Variants (was incorrectly including the 
trailing '\0' character).

And finally, this version includes a web-based hello_world.php example - ie one 
that can be hosted by Apache, or some other PHP-enabled web server (the other 
included examples are meant to be used via PHP's CLI SAPI).

The only thing that remains (apart from probable autoconf / automake tweaks), 
is CMake support.

 PHP binding of Qpid Messaging API
 -

 Key: QPID-3027
 URL: https://issues.apache.org/jira/browse/QPID-3027
 Project: Qpid
  Issue Type: New Feature
  Components: C++ Client
Affects Versions: 0.8
Reporter: Paul Colby
Assignee: Ted Ross
 Attachments: Makefile, cqpid_php.20110220.diff, 
 cqpid_php.20110301.diff, cqpid_php.diff


 Working on a PHP binding for the Qpid Messaging API via SWIG.  There are 
 several PHP-specific issues with C++ and SWIG which I've managed to 
 workaround, so the binding is starting to take shape, but still very much a 
 work in progress.
 The rough plan:
 1. report relevant bugs / feature requests to SWIG (done).
 2. clean-up Qpid php.i SWIG interface file (mostly done - just need to 
 implement PHP namespaces).
 3. implement qpid::types::Variant - PHP typemapping (not started).
 4. implement printinfo pragma (should be easy, just need to choose what info 
 to include).
 5. create relevant [auto]makefile.
 Of course, there's lots of things to discuss / decide along the way... so 
 I'll post 'em here as they come up.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] Updated: (QPID-3027) PHP binding of Qpid Messaging API

2011-02-20 Thread Paul Colby (JIRA)

 [ 
https://issues.apache.org/jira/browse/QPID-3027?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Paul Colby updated QPID-3027:
-

Attachment: cqpid_php.20110220.diff

Code-complete PHP binding via SWIG.

 PHP binding of Qpid Messaging API
 -

 Key: QPID-3027
 URL: https://issues.apache.org/jira/browse/QPID-3027
 Project: Qpid
  Issue Type: New Feature
  Components: C++ Client
Affects Versions: 0.8
Reporter: Paul Colby
 Attachments: cqpid_php.20110220.diff, cqpid_php.diff


 Working on a PHP binding for the Qpid Messaging API via SWIG.  There are 
 several PHP-specific issues with C++ and SWIG which I've managed to 
 workaround, so the binding is starting to take shape, but still very much a 
 work in progress.
 The rough plan:
 1. report relevant bugs / feature requests to SWIG (done).
 2. clean-up Qpid php.i SWIG interface file (mostly done - just need to 
 implement PHP namespaces).
 3. implement qpid::types::Variant - PHP typemapping (not started).
 4. implement printinfo pragma (should be easy, just need to choose what info 
 to include).
 5. create relevant [auto]makefile.
 Of course, there's lots of things to discuss / decide along the way... so 
 I'll post 'em here as they come up.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] Updated: (QPID-3027) PHP binding of Qpid Messaging API

2011-02-20 Thread Paul Colby (JIRA)

 [ 
https://issues.apache.org/jira/browse/QPID-3027?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Paul Colby updated QPID-3027:
-

Attachment: Makefile

Sample Makefile for early adopters :)

 PHP binding of Qpid Messaging API
 -

 Key: QPID-3027
 URL: https://issues.apache.org/jira/browse/QPID-3027
 Project: Qpid
  Issue Type: New Feature
  Components: C++ Client
Affects Versions: 0.8
Reporter: Paul Colby
 Attachments: Makefile, cqpid_php.20110220.diff, cqpid_php.diff


 Working on a PHP binding for the Qpid Messaging API via SWIG.  There are 
 several PHP-specific issues with C++ and SWIG which I've managed to 
 workaround, so the binding is starting to take shape, but still very much a 
 work in progress.
 The rough plan:
 1. report relevant bugs / feature requests to SWIG (done).
 2. clean-up Qpid php.i SWIG interface file (mostly done - just need to 
 implement PHP namespaces).
 3. implement qpid::types::Variant - PHP typemapping (not started).
 4. implement printinfo pragma (should be easy, just need to choose what info 
 to include).
 5. create relevant [auto]makefile.
 Of course, there's lots of things to discuss / decide along the way... so 
 I'll post 'em here as they come up.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] Commented: (QPID-3027) PHP binding of Qpid Messaging API

2011-02-18 Thread Paul Colby (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-3027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12996673#comment-12996673
 ] 

Paul Colby commented on QPID-3027:
--

The SWIG Segfault on overloaded methods with different return types issue I 
reported has just been fixed :)

This means that we won't need to rename/ignore certain overloaded methods when 
using SWIG 2.0.2+ (when its released; or r12471 in the meantime). So I think 
the least confusing thing to do is %ignore the offending overloads on for 
earlier versions of SWIG, rather than %rename them (which would introduce 
entirely new function names - worth avoiding).

Type-mapping is 99% done... will upload soon! :)

 PHP binding of Qpid Messaging API
 -

 Key: QPID-3027
 URL: https://issues.apache.org/jira/browse/QPID-3027
 Project: Qpid
  Issue Type: New Feature
  Components: C++ Client
Affects Versions: 0.8
Reporter: Paul Colby
 Attachments: cqpid_php.diff


 Working on a PHP binding for the Qpid Messaging API via SWIG.  There are 
 several PHP-specific issues with C++ and SWIG which I've managed to 
 workaround, so the binding is starting to take shape, but still very much a 
 work in progress.
 The rough plan:
 1. report relevant bugs / feature requests to SWIG (done).
 2. clean-up Qpid php.i SWIG interface file (mostly done - just need to 
 implement PHP namespaces).
 3. implement qpid::types::Variant - PHP typemapping (not started).
 4. implement printinfo pragma (should be easy, just need to choose what info 
 to include).
 5. create relevant [auto]makefile.
 Of course, there's lots of things to discuss / decide along the way... so 
 I'll post 'em here as they come up.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] Updated: (QPID-3027) PHP binding of Qpid Messaging API

2011-02-08 Thread Paul Colby (JIRA)

 [ 
https://issues.apache.org/jira/browse/QPID-3027?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Paul Colby updated QPID-3027:
-

Attachment: cqpid_php.diff

Initial C++ Messaging API binding for PHP.

 PHP binding of Qpid Messaging API
 -

 Key: QPID-3027
 URL: https://issues.apache.org/jira/browse/QPID-3027
 Project: Qpid
  Issue Type: New Feature
  Components: C++ Client
Affects Versions: 0.8
Reporter: Paul Colby
 Attachments: cqpid_php.diff


 Working on a PHP binding for the Qpid Messaging API via SWIG.  There are 
 several PHP-specific issues with C++ and SWIG which I've managed to 
 workaround, so the binding is starting to take shape, but still very much a 
 work in progress.
 The rough plan:
 1. report relevant bugs / feature requests to SWIG (done).
 2. clean-up Qpid php.i SWIG interface file (mostly done - just need to 
 implement PHP namespaces).
 3. implement qpid::types::Variant - PHP typemapping (not started).
 4. implement printinfo pragma (should be easy, just need to choose what info 
 to include).
 5. create relevant [auto]makefile.
 Of course, there's lots of things to discuss / decide along the way... so 
 I'll post 'em here as they come up.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] Commented: (QPID-3027) PHP binding of Qpid Messaging API

2011-02-08 Thread Paul Colby (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-3027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12991848#comment-12991848
 ] 

Paul Colby commented on QPID-3027:
--

I've just attached an initial PHP binding.  This includes:
* the basic SWIG interface files.
* three PHP CLI examples (ports of the hello_world, client and server examples 
from C++ to PHP).
* a basic temporary Makefile (just for initial development).

Still to go:
* Variant mapping.
* map_sender and map_receiver examples (depends on Variant mapping).
* phpinfo implementation.
* integration into Qpid's build system.

 PHP binding of Qpid Messaging API
 -

 Key: QPID-3027
 URL: https://issues.apache.org/jira/browse/QPID-3027
 Project: Qpid
  Issue Type: New Feature
  Components: C++ Client
Affects Versions: 0.8
Reporter: Paul Colby
 Attachments: cqpid_php.diff


 Working on a PHP binding for the Qpid Messaging API via SWIG.  There are 
 several PHP-specific issues with C++ and SWIG which I've managed to 
 workaround, so the binding is starting to take shape, but still very much a 
 work in progress.
 The rough plan:
 1. report relevant bugs / feature requests to SWIG (done).
 2. clean-up Qpid php.i SWIG interface file (mostly done - just need to 
 implement PHP namespaces).
 3. implement qpid::types::Variant - PHP typemapping (not started).
 4. implement printinfo pragma (should be easy, just need to choose what info 
 to include).
 5. create relevant [auto]makefile.
 Of course, there's lots of things to discuss / decide along the way... so 
 I'll post 'em here as they come up.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] Commented: (QPID-3027) PHP binding of Qpid Messaging API

2011-02-01 Thread Paul Colby (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-3027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12989121#comment-12989121
 ] 

Paul Colby commented on QPID-3027:
--

Another related SWIG bug report:
* %nspace does not work for PHP - 
https://sourceforge.net/tracker/?func=detailaid=3169536group_id=1645atid=101645

 PHP binding of Qpid Messaging API
 -

 Key: QPID-3027
 URL: https://issues.apache.org/jira/browse/QPID-3027
 Project: Qpid
  Issue Type: New Feature
  Components: C++ Client
Affects Versions: 0.8
Reporter: Paul Colby

 Working on a PHP binding for the Qpid Messaging API via SWIG.  There are 
 several PHP-specific issues with C++ and SWIG which I've managed to 
 workaround, so the binding is starting to take shape, but still very much a 
 work in progress.
 The rough plan:
 1. report relevant bugs / feature requests to SWIG (done).
 2. clean-up Qpid php.i SWIG interface file (mostly done - just need to 
 implement PHP namespaces).
 3. implement qpid::types::Variant - PHP typemapping (not started).
 4. implement printinfo pragma (should be easy, just need to choose what info 
 to include).
 5. create relevant [auto]makefile.
 Of course, there's lots of things to discuss / decide along the way... so 
 I'll post 'em here as they come up.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



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