Hey this is absolutely great! Thanks!
Starting to hack on it.

Cheers,
Shalabh

Jon Smirl wrote in message 98052e$[EMAIL PROTECTED]">news:98052e$[EMAIL PROTECTED]...
> It is fairly easy to make XPCOM work with Apache. Use the attached code as
a
> sample. Initialization is the tricky part since Apache will re-initialize
> your DLL and re-initializaing XPCOM does not work. This code is set up to
> avoid the problem rather than fixing it.
>
> You are also going to get burnt by a long standing bug in XPCOM.
> CreateInstance is not thread safe in XPCOM and there is no way to avoid
> doing CreateInstance from multiple threads when you're an Apache module.
My
> current work around is to load all XPCOM objects at init time. I then have
a
> method on each one that says clone me. I use this method at run time
instead
> of CreateInstance. This work around has the major drawbacks of needing to
> know all of the components up front, the special method, needing a wrapper
> for exisiting components, etc....
>
> The other scheme is to disable the threadsafe check macros in
CreateInstance
> and play Russian Roulette. This works most of the time. When it doesn't
work
> the Apache process restart feature will kick in and recover.
>
> --
>
> Jon Smirl
> [EMAIL PROTECTED]
>
>
>
>



Reply via email to