ArcFM Engine Developer Guide
Services Property


Gets the ServiceContainer for the Responder applications.
Syntax
'Declaration
 
Public Shared ReadOnly Property Services As IServiceContainer
'Usage
 
Dim value As IServiceContainer
 
value = RxApp.Services
public static IServiceContainer Services {get;}

Property Value

The services.
Remarks

For 9.2sp3 and earlier, the object references in RxApp.Services were shared across threads (i.e., standard System.ComponentModel.Design.ServiceContainer behavior). This was "good-enough" at the time because all calls to IDataServices (via our MSMQ remoting channel) were processed on a single STA thread. A call to RxApp.Services.GetService from a SubmitRule or DataRequest object was already on the "correct" thread - however, it was possible to spawn a new thread and access the "shared" instance from another thread which would inadvertently require marshaling.

In order to support multi-threading and support working with COM objects the behavior of the RxApp.Services service container has changed. That is, in order to be multi-threaded it needs to support multiple COM STA apartments (which means that COM object instances cannot be shared across multiple threads, but rather requires an instance per-thread). For non-COM types the service container works as before (shared across all threads); however, for COM service types (e.g. IWorkspace) the service will be per-thread. Also, in order to prevent (and expose) inadvertent marshaling issues the new ComAwareServiceContainer will throw an exception if an MTA thread attempts to access a COM service type.

Requirements

Target Platforms: Windows XP SP3 (32-bit and 64-bit), Windows 7 (32-bit and 64-bit)

Not all Operating Systems are supported on all products. Visit the ArcFM Solution Supported Versions page for full details.

See Also

Reference

RxApp Class
RxApp Members

 

 


Send Comment