Question about openWithProperties


Tom Doust
 

Hi

 

We have just come across this little oddity and wonder if anyone can throw any light on what is supposed to be happening

 

I notice from the source to the C# implementation of Open Mama 2.3.0, that the following code:

        public static void open ()
        {       
            initGetVersionWrapper();
            MamaWrapper.CheckResultCode(NativeMethods.mama_open());
            Interlocked.Increment(ref mMamaopen);
        }

increments the mMamaopen flag, whereas the code:

        public static void openWithProperties (string path, string filename)
        {
            initGetVersionWrapper();
            MamaWrapper.CheckResultCode (NativeMethods.mama_openWithProperties (path, filename));
        }

does not. The transport's destroy() method does nothing unless mMamaopen is non-zero, and that is causing me problems when I try to shutdown an application that uses openWithProperties.  Making an additional call to open() gets round the problem but doesn’t really seem to be the right thing to do. Assuming it is necessary should I expect to call open() before or after openWithProperties()


Has anyone come across this issue?

 

Tom

TOM DOUST | Head of Consultancy                                                                                                         


TICK42

P: +44 (0) 1628 477444 | M: +44 (0) 7710 479924 | E: tom.doust@... | skype:  tom.doust |  http://www.tick42.com  


 

 

Join Openmama-dev@lists.openmama.org to automatically receive all group messages.