Results 1 to 5 of 5

Thread: WCF Service Interobject access

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2007
    Location
    ZA
    Posts
    65

    WCF Service Interobject access

    Hi

    I have a service with worker threads running in the background. I would like to implement WCF in order to communicate the status of these worker threads to a client.

    How do I access the instance of the ServiceBehaviour created by the WCF ServiceHost in order to add references to the worker threads so that I can communicate the status?

    ROTD

  2. #2
    Frenzied Member Lightning's Avatar
    Join Date
    Oct 2002
    Location
    Eygelshoven
    Posts
    1,611

    Re: WCF Service Interobject access

    If each worker listens to a different port, which is known by the service, the service can talk to the workers.
    VB6 & C# (WCF LINQ) mostly


    If you need help with a WPF/WCF question post in the NEW WPF & WCF forum and we will try help the best we can

    My site

    My blog, couding troubles and solutions

    Free online tools

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Mar 2007
    Location
    ZA
    Posts
    65

    Re: WCF Service Interobject access

    Thanks for the reply.

    I have a single host with a single endpoint. The worker threads executes inside the service itself and is controlled by the service.

    I have found a way to let my host have access to the worker threads but I am not loving it. If I make my array where my worker threads are kept in shared in the service then I can access them from my host class.

    Surely there has to be another way.

  4. #4
    Frenzied Member Lightning's Avatar
    Join Date
    Oct 2002
    Location
    Eygelshoven
    Posts
    1,611

    Re: WCF Service Interobject access

    The workthreads should report there status back to the mainthread, not the other way around.
    VB6 & C# (WCF LINQ) mostly


    If you need help with a WPF/WCF question post in the NEW WPF & WCF forum and we will try help the best we can

    My site

    My blog, couding troubles and solutions

    Free online tools

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Mar 2007
    Location
    ZA
    Posts
    65

    Re: WCF Service Interobject access

    Wow! Realy!

    O, wait a second:
    If I want the worker threads waisting CPU time by reporting the status back to the main monitoring thread that would work.
    Also the work threads depend on the control from the monitoring thread and do not control the monitoring thread. If they were to control the monitoring thread then you would have possible thread classes.
    Also the instability factor involved with WCF would cause my worker threads to crash or run oncontrolled.
    Also your comment has absolutely nothing to do with the main question that I asked.

    But thanks for bumping my thread!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width