[jira] [Updated] (QPID-3900) Windows build fails to compile store ms-clfs

2012-04-10 Thread Chuck Rolke (Updated) (JIRA)

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

Chuck Rolke updated QPID-3900:
--

Fix Version/s: 0.17

> Windows build fails to compile store ms-clfs
> 
>
> Key: QPID-3900
> URL: https://issues.apache.org/jira/browse/QPID-3900
> Project: Qpid
>  Issue Type: Bug
>Reporter: Chuck Rolke
>Assignee: Chuck Rolke
> Fix For: 0.16, 0.17
>
>
> missing a '#include ' in Transaction.h

--
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-3900) Windows build fails to compile store ms-clfs

2012-04-10 Thread Chuck Rolke (Updated) (JIRA)

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

Chuck Rolke updated QPID-3900:
--

Fix Version/s: (was: 0.17)
   0.16

> Windows build fails to compile store ms-clfs
> 
>
> Key: QPID-3900
> URL: https://issues.apache.org/jira/browse/QPID-3900
> Project: Qpid
>  Issue Type: Bug
>Reporter: Chuck Rolke
>Assignee: Chuck Rolke
> Fix For: 0.16
>
>
> missing a '#include ' in Transaction.h

--
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-3932) HA library links to non-existant broker::SignalHandler::shutdown()

2012-04-04 Thread Chuck Rolke (Updated) (JIRA)

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

Chuck Rolke updated QPID-3932:
--

Attachment: QPID-3932-shutdown-01.patch

Use the broker's native shutdown() function.

> HA library links to non-existant broker::SignalHandler::shutdown()
> --
>
> Key: QPID-3932
> URL: https://issues.apache.org/jira/browse/QPID-3932
> Project: Qpid
>  Issue Type: Bug
>  Components: C++ Broker
>Affects Versions: 0.17
> Environment: Windows, Visual Studio
>Reporter: Steve Huston
> Attachments: QPID-3932-shutdown-01.patch
>
>
> There is a recently started build error on Windows:
> HaBroker.obj : error LNK2019: unresolved external symbol "public: static void 
> __cdecl qpid::broker::SignalHandler::shutdown(void)"
> The missing symbol is in qpid/broker/SignalHandler.(h cpp) which appear to 
> not be meant to be used on Windows. So the normal easy fix of adding a 
> QPID_BROKER_EXTERN won't work. There are two issues:
> 1. The qpid/broker/SignalHandler.cpp file is POSIX-specific since it uses 
> signal handlers. Therefore, it should be in qpid/broker/posix, not qpid/broker
> 2a. Should HA be building on Windows?
> 2. The HaBroker module needs some sort of shutdown mechanism for Windows, 
> probably a Windows equivalent of the above SignalHandler.cpp - note that the 
> windows/QpiddBroker.cpp has this type of shutdown in it. Maybe it should be 
> worked into a form useable by HaBroker?
> Could the experts in these areas comment please?

--
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-3918) Add management acl-query test methods to C++ broker ACL plugin

2012-03-30 Thread Chuck Rolke (Updated) (JIRA)

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

Chuck Rolke updated QPID-3918:
--

Attachment: acl-test-01-brokerlog.txt
acl-test-01.log
acl-test-01-rules.acl
acl-test-01.py

Refreshed user test scenario:
1. Start the broker using the acl-test-01-rules.acl file.
2. Run the python script acl-test-01.py
3. The python output is shown in acl-test-01.log
4. The broker was started with QPID_LOG_ENABLE=debug+:acl
   A short bit of the broker log is in acl-test-01-brokerlog.txt

The ACL wiki page could use a description of how a user uses these features to 
verify his ACL settings.

> Add management acl-query test methods to C++ broker ACL plugin
> --
>
> Key: QPID-3918
> URL: https://issues.apache.org/jira/browse/QPID-3918
> Project: Qpid
>  Issue Type: New Feature
>  Components: C++ Broker
>Affects Versions: 0.14
>Reporter: Chuck Rolke
>Assignee: Chuck Rolke
> Attachments: acl-test-01-brokerlog.txt, acl-test-01-rules.acl, 
> acl-test-01.log, acl-test-01.py
>
>
> In its current form the ACL module is not testable in a customer deployment. 
> The ACL module loads the ACL file and from then on only real-world activity 
> triggers allow and deny decisions. 
> This feature proposal adds two management methods that are directly tied to 
> the ACL decision Lookup functions. Using them a customer may start a dummy 
> broker process that uses his actual (1) ACL rule file. Then using a 
> management application the customer may fire off a set of lookups against his 
> rule file to see if the ACL rules deliver the intended results.
> This feature could also be used to augment the self tests. It is very hard to 
> stage enough driver code to trigger some of the ACL queries. Using the 
> proposed methods then the self test can launch any ACL query directly.
> (1) As usual the ACL file must be bent enough to allow 'anonymous' to have 
> access to the management methods

--
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-3918) Add management acl-query test methods to C++ broker ACL plugin

2012-03-30 Thread Chuck Rolke (Updated) (JIRA)

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

Chuck Rolke updated QPID-3918:
--

Attachment: (was: acl-test-00.py)

> Add management acl-query test methods to C++ broker ACL plugin
> --
>
> Key: QPID-3918
> URL: https://issues.apache.org/jira/browse/QPID-3918
> Project: Qpid
>  Issue Type: New Feature
>  Components: C++ Broker
>Affects Versions: 0.14
>Reporter: Chuck Rolke
>Assignee: Chuck Rolke
>
> In its current form the ACL module is not testable in a customer deployment. 
> The ACL module loads the ACL file and from then on only real-world activity 
> triggers allow and deny decisions. 
> This feature proposal adds two management methods that are directly tied to 
> the ACL decision Lookup functions. Using them a customer may start a dummy 
> broker process that uses his actual (1) ACL rule file. Then using a 
> management application the customer may fire off a set of lookups against his 
> rule file to see if the ACL rules deliver the intended results.
> This feature could also be used to augment the self tests. It is very hard to 
> stage enough driver code to trigger some of the ACL queries. Using the 
> proposed methods then the self test can launch any ACL query directly.
> (1) As usual the ACL file must be bent enough to allow 'anonymous' to have 
> access to the management methods

--
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-3918) Add management acl-query test methods to C++ broker ACL plugin

2012-03-30 Thread Chuck Rolke (Updated) (JIRA)

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

Chuck Rolke updated QPID-3918:
--

Attachment: (was: acl-test-00-rules.acl)

> Add management acl-query test methods to C++ broker ACL plugin
> --
>
> Key: QPID-3918
> URL: https://issues.apache.org/jira/browse/QPID-3918
> Project: Qpid
>  Issue Type: New Feature
>  Components: C++ Broker
>Affects Versions: 0.14
>Reporter: Chuck Rolke
>Assignee: Chuck Rolke
> Attachments: acl-test-00.log, acl-test-00.py
>
>
> In its current form the ACL module is not testable in a customer deployment. 
> The ACL module loads the ACL file and from then on only real-world activity 
> triggers allow and deny decisions. 
> This feature proposal adds two management methods that are directly tied to 
> the ACL decision Lookup functions. Using them a customer may start a dummy 
> broker process that uses his actual (1) ACL rule file. Then using a 
> management application the customer may fire off a set of lookups against his 
> rule file to see if the ACL rules deliver the intended results.
> This feature could also be used to augment the self tests. It is very hard to 
> stage enough driver code to trigger some of the ACL queries. Using the 
> proposed methods then the self test can launch any ACL query directly.
> (1) As usual the ACL file must be bent enough to allow 'anonymous' to have 
> access to the management methods

--
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-3918) Add management acl-query test methods to C++ broker ACL plugin

2012-03-30 Thread Chuck Rolke (Updated) (JIRA)

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

Chuck Rolke updated QPID-3918:
--

Attachment: (was: acl-test-00.log)

> Add management acl-query test methods to C++ broker ACL plugin
> --
>
> Key: QPID-3918
> URL: https://issues.apache.org/jira/browse/QPID-3918
> Project: Qpid
>  Issue Type: New Feature
>  Components: C++ Broker
>Affects Versions: 0.14
>Reporter: Chuck Rolke
>Assignee: Chuck Rolke
> Attachments: acl-test-00.py
>
>
> In its current form the ACL module is not testable in a customer deployment. 
> The ACL module loads the ACL file and from then on only real-world activity 
> triggers allow and deny decisions. 
> This feature proposal adds two management methods that are directly tied to 
> the ACL decision Lookup functions. Using them a customer may start a dummy 
> broker process that uses his actual (1) ACL rule file. Then using a 
> management application the customer may fire off a set of lookups against his 
> rule file to see if the ACL rules deliver the intended results.
> This feature could also be used to augment the self tests. It is very hard to 
> stage enough driver code to trigger some of the ACL queries. Using the 
> proposed methods then the self test can launch any ACL query directly.
> (1) As usual the ACL file must be bent enough to allow 'anonymous' to have 
> access to the management methods

--
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-3918) Add management acl-query test methods to C++ broker ACL plugin

2012-03-27 Thread Chuck Rolke (Updated) (JIRA)

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

Chuck Rolke updated QPID-3918:
--

Attachment: acl-test-00.log
acl-test-00.py
acl-test-00-rules.acl

The attached files demonstrate how this feature would work. 
* The rules file is a simple but non-trivial ACL file.
* The py file is a qmf.console test driver that runs queries against the broker 
with the ACLs.
* The log shows the result.


> Add management acl-query test methods to C++ broker ACL plugin
> --
>
> Key: QPID-3918
> URL: https://issues.apache.org/jira/browse/QPID-3918
> Project: Qpid
>  Issue Type: New Feature
>  Components: C++ Broker
>Affects Versions: 0.14
>Reporter: Chuck Rolke
>Assignee: Chuck Rolke
> Attachments: acl-test-00-rules.acl, acl-test-00.log, acl-test-00.py
>
>
> In its current form the ACL module is not testable in a customer deployment. 
> The ACL module loads the ACL file and from then on only real-world activity 
> triggers allow and deny decisions. 
> This feature proposal adds two management methods that are directly tied to 
> the ACL decision Lookup functions. Using them a customer may start a dummy 
> broker process that uses his actual (1) ACL rule file. Then using a 
> management application the customer may fire off a set of lookups against his 
> rule file to see if the ACL rules deliver the intended results.
> This feature could also be used to augment the self tests. It is very hard to 
> stage enough driver code to trigger some of the ACL queries. Using the 
> proposed methods then the self test can launch any ACL query directly.
> (1) As usual the ACL file must be bent enough to allow 'anonymous' to have 
> access to the management methods

--
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-3892) ACLs shall support full regular expressions in property values

2012-03-09 Thread Chuck Rolke (Updated) (JIRA)

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

Chuck Rolke updated QPID-3892:
--

Description: 
Currently ACL syntax supports in a property value either direct match 
("name=RequestQueue") or a substring match ("name=tmp.*").

That is not sufficient when authorizing access to topics. One particular 
example: amq.topic exchange receives messages with keys usa.sports, usa.news, 
europe.sports and europe.news. Currently we can not authorize access just to 
topics **.sports* and to *usa.* *

As there exist different use cases where regular expressions are required in a, 
it is meaningful to support (full) regular expressions in ACL property values.

Since qpid C++ broker already relies on boost libraries a lot, I suggest (in a 
patch proposed) using boost::regex library.

I tested the attached patch on Fedora, not sure if other Linux distributions 
are familiar with the change in Makefile.am.

  was:
Currently ACL syntax supports in a property value either direct match 
("name=RequestQueue") or a substring match ("name=tmp.*").

That is not sufficient when authorizing access to topics. One particular 
example: amq.topic exchange receives messages with keys usa.sports, usa.news, 
europe.sports and europe.news. Currently we can not authorize access just to 
topics *.sports and to usa.* 

As there exist different use cases where regular expressions are required in a, 
it is meaningful to support (full) regular expressions in ACL property values.

Since qpid C++ broker already relies on boost libraries a lot, I suggest (in a 
patch proposed) using boost::regex library.

I tested the attached patch on Fedora, not sure if other Linux distributions 
are familiar with the change in Makefile.am.

Summary: ACLs shall support full regular expressions in property values 
 (was: ACLs shall support full regural expressions in property values)

> ACLs shall support full regular expressions in property values
> --
>
> Key: QPID-3892
> URL: https://issues.apache.org/jira/browse/QPID-3892
> Project: Qpid
>  Issue Type: Improvement
>  Components: C++ Broker
>Affects Versions: 0.14
>Reporter: Pavel Moravec
>Assignee: Chuck Rolke
>  Labels: features
> Attachments: ACLs-full-regexp.patch
>
>
> Currently ACL syntax supports in a property value either direct match 
> ("name=RequestQueue") or a substring match ("name=tmp.*").
> That is not sufficient when authorizing access to topics. One particular 
> example: amq.topic exchange receives messages with keys usa.sports, usa.news, 
> europe.sports and europe.news. Currently we can not authorize access just to 
> topics **.sports* and to *usa.* *
> As there exist different use cases where regular expressions are required in 
> a, it is meaningful to support (full) regular expressions in ACL property 
> values.
> Since qpid C++ broker already relies on boost libraries a lot, I suggest (in 
> a patch proposed) using boost::regex library.
> I tested the attached patch on Fedora, not sure if other Linux distributions 
> are familiar with the change in Makefile.am.

--
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-3891) C++ Broker --log-function switch injects too much noise into log file

2012-03-08 Thread Chuck Rolke (Updated) (JIRA)

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

Chuck Rolke updated QPID-3891:
--

Summary: C++ Broker --log-function switch injects too much noise into log 
file  (was: Log-function switch injects too much noise into log file)

> C++ Broker --log-function switch injects too much noise into log file
> -
>
> Key: QPID-3891
> URL: https://issues.apache.org/jira/browse/QPID-3891
> Project: Qpid
>  Issue Type: Improvement
>  Components: C++ Broker
>Affects Versions: 0.16
>Reporter: Chuck Rolke
>Assignee: Chuck Rolke
> Fix For: Future
>
>
> When the C++ Broker is started with '--log-function yes' the function name 
> that gets printed is barely usable. From a coding standpoint it's pretty 
> efficient but from a user standpoint raw BOOST_CURRENT_FUNCTION output is too 
> much. For example here is the same log entry printed from two systems:
> Linux: 
> 2012-03-08 14:09:47 debug std::map, 
> std::map qpid::management::ManagementAgent::SchemaClass, 
> qpid::management::ManagementAgent::SchemaClassKeyComp> >::iterator 
> qpid::management::ManagementAgent::findOrAddPackageLH(std::string): SEND 
> PackageInd package=org.apache.qpid.broker to=schema.package
> Windows:
> 2012-03-06 14:20:05 debug class std::_Tree_iterator std::_Tree_val std::char_traits,class std::allocator >,class std::map qpid::management::ManagementAgent::SchemaClassKey,struct 
> qpid::management::ManagementAgent::SchemaClass,struct 
> qpid::management::ManagementAgent::SchemaClassKeyComp,class 
> std::allocator qpid::management::ManagementAgent::SchemaClassKey const ,struct 
> qpid::management::ManagementAgent::SchemaClass> > >,struct std::less std::basic_string,class 
> std::allocator > >,class std::allocator std::basic_string,class 
> std::allocator > const ,class std::map qpid::management::ManagementAgent::SchemaClassKey,struct 
> qpid::management::ManagementAgent::SchemaClass,struct 
> qpid::management::ManagementAgent::SchemaClassKeyComp,class 
> std::allocator qpid::management::ManagementAgent::SchemaClassKey const ,struct 
> qpid::management::ManagementAgent::SchemaClass> > > > >,0> > > __thiscall 
> qpid::management::ManagementAgent::findOrAddPackageLH(class 
> std::basic_string,class 
> std::allocator >): SEND PackageInd package=org.apache.qpid.broker 
> to=schema.package
> This level of detail has no use. An easy improvement is to print only the 
> class and function names and not to print the function return type and the 
> function arguments.
> Trimmed:
> 2012-03-06 16:55:38 debug 
> qpid::management::ManagementAgent::findOrAddPackageLH: SEND PackageInd 
> package=org.apache.qpid.broker to=schema.package
> Coincidently, these function names in all their glory are what is used for 
> log message filtering. If one specifies '--log-enable debug+:_Tree_iterator' 
> then the Windows log will be emitted but the Linux log will not. By trimming 
> the function name then Windows and Linux will get the same filter results. 

--
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-3759) Heartbeat timeout in Windows does not lead to timely reconnect

2012-01-13 Thread Chuck Rolke (Updated) (JIRA)

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

Chuck Rolke updated QPID-3759:
--

Attachment: main.cpp

Heartbeat timeout test code.

> Heartbeat timeout in Windows does not lead to timely reconnect
> --
>
> Key: QPID-3759
> URL: https://issues.apache.org/jira/browse/QPID-3759
> Project: Qpid
>  Issue Type: Bug
>  Components: C++ Client
>Affects Versions: 0.14
> Environment: Windows C++ messaging
>Reporter: Chuck Rolke
> Attachments: main.cpp
>
>
> Reported by Wolf Wolfswinkel on Qpid users 
> http://qpid.2158936.n2.nabble.com/Heartbeats-in-C-broker-on-Windows-td7118702.html
>  22-Dec-2011
> The simplest test case is in attached main.cpp. Establish a good network 
> connection to the broker and then start the program. It creates a connection, 
> sends two messages, and then pauses for 15 seconds. During the pause 
> disconnect the network connection to the broker for at least two heartbeat 
> timeouts (12 seconds).
> After the heartbeat timeout the timer task fires and a debug trace shows:
>  Traffic timeout,  TCPConnector::abort, TCPConnector::eof, TCPConnector::close
> But the connection is not actually closed until something happens on the 
> network to wake up the thread waiting in Poller::run().
> The timer event appears unable to interrupt the IO thread waiting for the 
> completion port.

--
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



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



[jira] [Updated] (QPID-3193) .NET Binding for Messaging classes need a test to check that binding is still in effect

2011-12-16 Thread Chuck Rolke (Updated) (JIRA)

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

Chuck Rolke updated QPID-3193:
--

Attachment: QPID-3694_lock-and-throw-preview.patch

This patch, soon to be on Review Board, is what I suggest makes sense for a 
single class in the .NET Binding. It fixes the 'Message' class as that has most 
of the variations. The highlights are:

1. A common file with a macro in it. This macro blocks entry into disposed 
objects.

2. An IsDisposed property to tell if your underlying object is still there. 
Consider it a diagnostic.

3. A mess of THROW_IF_DISPOSED calls to block access to disposed objects.

4. Some changes to object destructor and finalizer. Destructors called (C# 
Dispose, C++ delete) deliberately suppress GC finalization. 

WRT lock(this), I think it is the best choice. The entire Message class storage 
consists of a single pointer into unmanaged space. There is no finer-grained 
object on which to lock than 'this'.

This patch and the Review Board show one class. The intent is to do the same to 
all the binding classes.

> .NET Binding for Messaging classes need a test to check that binding is still 
> in effect
> ---
>
> Key: QPID-3193
> URL: https://issues.apache.org/jira/browse/QPID-3193
> Project: Qpid
>  Issue Type: Improvement
>Affects Versions: 0.11
>Reporter: Chuck Rolke
>Assignee: Chuck Rolke
> Attachments: QPID-3694_lock-and-throw-preview.patch
>
>
> The .NET Binding for Messaging could be made more user-friendly with the 
> addition of a property that indicates whether or not the underlying binding 
> is still available. A C# coder may innocently write:
> (1)  Message mA = new Message("a");
> (2)  Message mB = mA;
>  ...
> (N)  mB.Dispose();
> After disposing of message mB then message mA is clobbered. 'Message' is a 
> 'ref class' type and messages mA and mB refer to the same object on managed 
> heap. When message mB is disposed then the bound C++ Messaging object is 
> deleted [1]. Any reference to the bound message part of mA will result in an 
> illegal memory reference (to 0) and a process exit. The .NET runtime can't 
> catch this fault.
> The obvious answer is not to do that. If the second line of code was 'Message 
> mB = new Message(mA)' then mA and mB would have been completely separate and 
> disposing of either would have no effect on the other.
> Another answer is to have the binding check for a null binding reference on 
> each and every access and then to throw if the underlying binding is gone. 
> This is not very appealing from a performance standpoint.
> As a compromise I would like to add a property isBound to each class. Users 
> then have a fighting chance to check that the binding is still in effect and 
> that function calls on the object shouldn't blow up. This property would be 
> useful in Assert statements or in debugging.
> [1] If anyone knows how to have my binding library intercept example code 
> line (2) and create reference counts, please let me know.

--
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



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