This will require some form of remoting to marshal between processes. The
first two that come directly to mind is Remoting and WCF. Based on the
limited info I gleen from post, I might create a .Net service that hosts the
singleton. Then use remoting to surface the MBR singleton object as it is
easy and fast (other ipc options could be namedpipes, memmappedfile,
sockets, etc). All your other apps then become clients of the service.
Your win management app becomes a remoting client, your web service becomes
a remoting client, a console mgmt app becomes a remoting client, your com
app becomes a remoting app - they all acess the same library the same way
with the same MBR proxy api. Pretty clean solution imo (you could use WCF
in same kinda way). You don't actually need to use a real service if you
don't want. You could use a console app to host the service as long as you
want to start it each time (i.e. via boot or from scheduler or something).
The console host is probably easiest during testing, then convert to service
if needed. hth
--
William Stacey [C# MVP]
PCR concurrency library:
www.codeplex.com/pcr
PSH Scripts Project
www.codeplex.com/psobject
<ol*****@gmail. comwrote in message
news:11******** **************@ a75g2000cwd.goo glegroups.com.. .
|I hope, I misunderstood some basics here and it is easy to solve..
| I need a singleton object running on server which can be used(write
| and read) by different client interfaces - for example there is
| webservice that simply transfer calls to this object and there is a
| COM Interop, that does the same. Also I need to control lifecycle and
| behaviour of this singleton - and for that I am going to have window
| application, that will start and finish it.
| I do not have problem with the last part :) - I run window app and
| request an instance of my singleton. But how can I make another apps
| (webservice and COM interop) to work with the same singleton? I
| believe it is doable, but how?
|