locked
ParticipantStateChangedNotification in csf 3.0. RRS feed

  • Question

  • Hi,

     

     

    how to trigger the ParticipantStateChangedNotification in csf 3.0.

    I tried the code given in the documentation of csf 3.0 but not able to trigger the ParticipantStateChangedNotification.

    Also pls let me know how to find out the state of a destination participant before sending a message to that destination participant as things given in the documentaqtion & on msdn are not working.

     

    Thanks in advance.

     

     

    Regards,

    Meera

     

    Tuesday, July 22, 2008 12:52 PM

Answers

  • the ParticipantStateChangedNotification is sent when one of the participant cannot be reached by the session (typically 404 or time out)

    So, you need to have one "Listener" participant which implements the ISessionNotification interface and specifically the "ParticipantStateChangedNotification" action

     

    [Operation(Name="NotificationCatcher", Action = SessionActions.ParticipantStateChangedNotification , RequestType = typeof(ParticipantStateChangedNotification ))]
    public void NotificationCatcher(ParticipantStateChangedNotification pscn)

     

    then once the session is created you can, if the other participant runs on another IIS than the listener, switch off the IIS

    Or, if it is on the same IIS, remove your participant virtual directory.

     

    Then, if you try to send a request to the participant through the session, it will trigger the notification which should be caught by your listener

     

    the notification will only be sent if the session tries to route a message to the service, so make sure that you send a request which should be routed to the switched off WES

     

    if you switch the service back on and try to contact the service again, a new ParticipantStateChangedNotification will be sent.

     

    The ParticipantStateChangedNotification is sent only once for each participant, so unless you keep track of the state of each participant in a listener service, there is no way to know the state of a service at a given time.

    I hope this helps
    Thursday, July 24, 2008 12:37 PM

All replies

  • the ParticipantStateChangedNotification is sent when one of the participant cannot be reached by the session (typically 404 or time out)

    So, you need to have one "Listener" participant which implements the ISessionNotification interface and specifically the "ParticipantStateChangedNotification" action

     

    [Operation(Name="NotificationCatcher", Action = SessionActions.ParticipantStateChangedNotification , RequestType = typeof(ParticipantStateChangedNotification ))]
    public void NotificationCatcher(ParticipantStateChangedNotification pscn)

     

    then once the session is created you can, if the other participant runs on another IIS than the listener, switch off the IIS

    Or, if it is on the same IIS, remove your participant virtual directory.

     

    Then, if you try to send a request to the participant through the session, it will trigger the notification which should be caught by your listener

     

    the notification will only be sent if the session tries to route a message to the service, so make sure that you send a request which should be routed to the switched off WES

     

    if you switch the service back on and try to contact the service again, a new ParticipantStateChangedNotification will be sent.

     

    The ParticipantStateChangedNotification is sent only once for each participant, so unless you keep track of the state of each participant in a listener service, there is no way to know the state of a service at a given time.

    I hope this helps
    Thursday, July 24, 2008 12:37 PM
  •  

    Hi GuillaumeG,

     

    Thanks for your reply.it works.

     

    Thanks again,

     

    Regards

    Meera

    Thursday, July 31, 2008 12:24 PM