I haven't ever used Xerces COM but that wont stop my from wild speculation!
I don't see any reason why it can't live in the MTA. One of the cool things about Xerces COM is the ability to access Xerces form COM aware scripting languages. These environments usually like STA components since they are single threaded. Creating the parser in the MTA would cause it to exist in another apartment and incur the overhead of inter-apartment marshaling. But, it doesn't explain why it couldn't be registered to support both threading models. All the COM wrapper classes inherit from: CComObjectRootEx<CComSingleThreadModel> but if they were re-written to inherit from: CComObjectRootEx<CComMultiThreadModel> and the rgs scripts were changed you would be in business. I wonder what manually modifying the registry entry from 'Apartment' to 'both' would do? Provided you only used a parser on its creating thread I bet you wouldn't have a problem. Ugly I know but worth the experiment? Jim > -----Original Message----- > From: Thomas Rummel [mailto:[EMAIL PROTECTED]] > Sent: Monday, January 07, 2002 3:55 AM > To: [EMAIL PROTECTED] > Subject: COM Threading Model of COM binding (xerces-com) > > > Hi, > > I'm want to use the Xerces COM wrapper (xerces-com) as > replacement for the > MSXML parser. > During my tests I encoutered difficulties with the COM > threading model used > by xerces-com. > > xerces-com supports only appartment threaded applications > (COM STA) but > MSXML supports > free and appartment threaded applications (COM STA and COM > MTA). This leads > to a > very bad performance if xerces-com is used in an COM MTA > application like in > my case > (each method call causes a marshaling between to threads of the > application). > > Does someone know the reason for the "only COM STA" restriction? > > I've made some minor changes to get xerces-com running in a > COM MTA thread > without > marshaling. With my application this xerces-com seems to work > without any > problem. > > Thanks, Tom > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
