Windows service wcf session
Paul Cowan <[email protected]> Tue, 7 Apr 2009 10:00:00 +0100
| Newsgroups | gmane.comp.windows.devel.dotnet.advanced |
|---|---|
| Message-ID | <[email protected]> |
Hi all, I am hosting a WcF Managed service that runs under the context of a windows service. It is accessable by MSMQ. I have the following problem and I would like some advice on the approach. The service will be part of a multi-tenant application where each client has their own web site instance and own database with exactly the same schema. I have created the service so I only have to roll out changes to the service and not 40 websites. Anyway, the way it works is each client places a message on the MSMQ. I am passing the clients specific connection string on the MSMQ. I am using Nhibernate for my data access and it is possible to change the connection string for nhibernate using this approach: http://nhforge.org/wikis/howtonh/dynamically-change-user-info-in-connection-string.aspx This is not a Nhibernate problem I am asking here. What I need to do is somehow let the Nhibernate connection provider class know which connection string I am using. The only thing I can think of is a static variable and I would have to lock the calling code. Is there an alternative to using static variables from a windows service or a WcF service for that matter? Cheers Paul =================================== View archives and manage your subscription(s) at http://peach.ease.lsoft.com/archives