WCF: Service calling service in same assembly
I have a WCF service (hosted in IIS 6) with two services, FileMonitorService ans JobService. In one of FileMonitorService's methods I want to call a 开发者_JAVA技巧method in JobService through WCF. This method in JobService is executed asynchronously (fire and forget).
I suppose it'd be easy enough use a Thread Pool and signal when they are all done.. I'd rather use WCF though (this is a personal project, so I'm just trying out new things).
edit: I came across these two posts, but they addressed WCF services across different servers.
Calling a WCF service from another WCF service calling a WCF service object method in another WCF serviceedit 2: Clarification on question:
Less a question I suppose than more of a request for thoughts on the approach.
Doing it through WCF only adds overhead so you should call the method in JobServices directly unless you have a compelling reason to not to do so. Given the limited amount of context, I would stick with the ThreadPool if I were you.
精彩评论