Carey wrote:
Hi All,
I am developing an extension that uses an xpcom service. I am now wanting multiple instances of that service. I guess that means I really want multiple components? But I want the component to last longer than the plugin that created it, and to be able to use its methods from another plugin (hence I had implemented it as a service till now).
Am I making sense?
Not really, but here is my attempt at understanding you. You have service A and B, and they are implemented by the same class instantated different times. You want both A and B to exist for the duration of the application. Sound correct?
Can I have multiple instances of the same service?
No. Servcies == singleton.
Does changing to a component restrict me in any way? can I still use it like a service? I am a bit confused.
Not really. Just have your components also implement nsIObserver and listen to the xpcom shutdown notification. Your objects will exist until the xpcom shuts down.
Regards, Doug _______________________________________________ Mozilla-xpcom mailing list [EMAIL PROTECTED] http://mail.mozilla.org/listinfo/mozilla-xpcom
