Team LiB
Previous Section Next Section

Remoting Configuration Files and Configuration Attributes

The following is a standard configuration file for Remoting:

<configuration>
                <system.runtime.remoting>
                            <application>
                                         <lifetime />
                                         <channels
                                                      <channel>
                                         <serverProviders>
                                         <formatter/>
                                         <provider/>
                                         </serviceProviders>
                                         <clientProviders>
                                          <formatter/>
                                          <provider/>
                                          </clientProviders>
                                          </channels>
                                          <service>
                                                     <wellknown/>
                                                     <activated/>
                                          </service>
                                          <client>
                                                     <wellknown/>
                                                     <activated/>
                                          </client>
                       </application>
               </system.runtime.remoting>
</configuration>

Configuration attributes include lifetime, channel, formatter, wellknown service and client, and activated server and client attributes.

Remoting Lifetime Attributes

Table 17-1 shows the lifetime attributes you can use to configure Remoting.

Table 17-1: Lifetime Attributes

Attribute

Description

leaseTime

The initial lease time for objects. The default is 5 minutes.

sponsorshipTimeout

Time to wait for a sponsor's reply. The default is 2 minutes.

renewOnCallTime

Time to add to an object's Time to Live (TTL) when a method is called. The default is 2 minutes.

leaseManagerPollTime

The interval in which an object's TTL will be checked. The default is 10 seconds.

Channel Attributes

Table 17-2 shows the common channel attributes you can use to configure Remoting channels. Tables 17-3 and 17-4 show the HTTP channel and TCP channel attributes, respectively.

Table 17-2: Common Channel Attributes

Attribute

Description

Ref

References a predefined channel, such as tcp or http.

Type

References a custom channel when one of the predefined channels is not used.

Port

Server-side port number.

Table 17-3: HTTP Channel Attributes

Attribute

Description

Name

Name of the channel.

Priority

Indicates the priority of the channel. The higher the integer, the greater the possibility that the channel will be used. The default is 1.

clientConnectionLimit

Number of connections that can be simultaneously opened. The default is 2.

proxyName

Name of the proxy server.

proxyPort

Port number for the proxy server.

SuppressChannelData

Determines if the channel will contribute to the channel data. The default is false.

useIpAddress

Determines if the channel will use the IP address or hostname. The default is true (to use the IP address).

Listen

Specifies if activation can hook into the listener service. The default is true.

bindTo

IP address on which the server will listen. Used on computers with more than one IP address.

machineName

Sets the machine name used with the current channel. This overrides the useIpAddress attribute.

Table 17-4: TCP Channel Attributes

Attribute

Description

rejectRemoteRequests

Determines if the channel will accept requests from remote servers.

socketCachePolicy

Sets how the socket cache works.

retryCount

Sets the number of retry attempts. The default is 1.

Formatter Attributes

For Remoting, you can use several formatter attributes, as listed in Table 17-5.

Table 17-5: Formatter Attributes

Attribute

Description

Ref

Sets the sink used to format messages, such soap, binary, or wsdl.

Type

Used when specifying a custom formatter.

includeVersions

Determines if version information is included in the formatted data. The default is true.

strictBinding

Specifies whether the exact version will be used when deserializing data. The default is false.

typeFilterLevel

Sets security on the filter.

Wellknown Service and Client Attributes

There is one wellknown client attribute: url sets the path to the server. The three wellknown service attributes are listed in Table 17-6.

Table 17-6: Wellknown Service Attributes

Attribute

Description

Type

Stores type information about the object being remoted

Mode

Specifies SingleCall or Singleton objects

objectUri

Sets the endpoint for remoted calls

Activated Server and Client Attributes

There is one activated server attribute and one activated client attribute. Both have the Type attribute, which specifies the type being remoted.


Team LiB
Previous Section Next Section