Using MSMQ to persist your COM

I wont go into the details of using MSMQ, you can figure out yourself by looking at the code but the important thing is how we used the property bag to store the information and then later retrieve that information from the property bag to send via MSMQ.

Just look at the code of the class how we made the component persistable by storing the information in the property bags. A property bag object holds information  that is to be saved and  restored across invocations of an object.

A property bag object is passed into an object through the  readproperties event and the writeproperties event in order to save and restore the state of the object. Using the methods of the property bag object, the object can read or write properties of itself. The readproperty method of the propertybag is used to read a value for a property, while the writeproperty method of the propertybag object is used to write a value of a property. The value of a property can itself be an object; in that case the propertybag object will attempt to save it. Also, the code will show you how to use the MSMQ to pass a persistable component to the MSMQ Server.

You might also like...

Comments

S.S. Ahmed S.S. Ahmed is a senior IT Professional and works for a web and software development firm. Ahmed is a Microsoft Office SharePoint Server MVP. Ahmed specializes in creating database driven dynamic we...

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“If Java had true garbage collection, most programs would delete themselves upon execution.” - Robert Sewell