Tech Off Thread

1 post

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

EnterpriseServices.SharedPropertyManager Questions

Back to Forum: Tech Off
  • User profile image
    phreaks

    Couple of questions,

    1) If SharedPropertyGroupManager.Group() doesn't find the property, does it return null?

    2) How do I specify a Remote  DTC for the SPM?


    The documentation doesn't say what happens if it can't find the property.

    I am assuming it will return null, so this should work?

    SharedPropertyGroupManager groupManager = new SharedPropertyGroupManager();

    SharedPropertyGroup group = groupManager.Group(BATCH_PROPERTY_GROUP);

    if (null == group)
    {
       returnCode =
    false;
       return returnCode;
    }

    SharedProperty IsBatchRunning = group.Property(BATCH_PROPERTY_ISRUNNING);
    // if IsBatchRunning is null, Batch can't be running, don't even check.

    if (null == IsBatchRunning) //IsBatchRunning is a bool
    {
       returnCode =
    false;
       return returnCode;
    }

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.