[Zope] COMObject Thoughts
Toby Dickenson
htrd90@zepler.org
Tue, 18 May 1999 21:38:26 GMT
Thanks for posting the COMObject product Amos.... very interesting reading. I have some first impressions that I thought I would share:
1) I suspect there is a problem with the current implementation on multi-threaded servers. pythoncom will initialise the first thread in apartment-threaded mode, but then the com objects gets cached in the COMObject instance. Any future calls on a different thread break the apartment-threading rules. I see there are two ways to solve the problem; either stick with apartment-threading but not cache objects, or get pythoncom to create free-threaded apartments.
A related question is how to ensure CoInitialize is called for each thread.... I guess this should be called by whatever creates the thread? (I really am guessing on this part)
2) Providing uncontrolled access to COM objects leaves a very big security hole in the server. This could be partly avoided if COMObject used the IObjectSafety com interface to restrict how the object can be used. I'm not sure how useful such a product would be... any thoughts?
Toby Dickenson