Possible Duplicate:
Is it better to create a singleton to access unity container or pass it through the application?
We have an application that is processing various XML messages. We are using Dependency Injection along with a Singleton Factory to create instances of the related messages. We are using WCF to pick these messages off of a queue so when we launch the WCF Service it is spinning up multiple instances enabling us to process messages concurrently off of the queue.
We implemented our factory using a Singleton and just concerned we could encounter issues because we are processing multiple instances in parallel. (Issues like this is now a bottleneck, could encounter thread contention, etc)
Should we not make the Factory a Singleton? Just curious....wanted some more expert opinion on this as I am ignorant in this area.
Any suggestions / comments would be greatly appreciated.
thanks,
S