|
In my application i have to use singleton class.. and also enough single worker process. case is, when i start a application, it has created then working and if have any crash occurred, worker process created new one so it(singleton object) has been created again.. now i want to modify this single object getting entire( worker process).. my idea is
1) Can we create separate service for single instance application for processing. with service to iis communication via tcp using wcf.
or
2) Can we assign that object to httpContext for keeping object to entire application. if i used this, its applicable all webservice method (ajax callback).. please clarify
Any other idea?? please give proper idea for this concept..
|
|
|
|
|
Use IoC container and inject this singleton instance wherever you need it.
No more Mister Nice Guy... >: |
|
|
|
|
|
IOC Container is new to me.. can you give some article related with web app.. i have doubt with this, it is applicable to asp.net web application ( page ) and also framework3.5
|
|
|
|
|
Why not? Try this maybe.
stefanoricciardi.com/2011/01/21/ninject-mini-tutorial-part-1/[^]
It's so easy that is hard to find any tutorials.
Try also ninject documentation. And wikipedia on IoC and DI. I using this container because it is hosted on nuget. Just add the package and it works.
No more Mister Nice Guy... >: |
|
|
|
|