Table of Contents Previous Next
Logo
Properties : C.9 Ice Miscellaneous Properties
Copyright © 2003-2007 ZeroC, Inc.

C.9 Ice Miscellaneous Properties

Ice.ACM.Client

Synopsis

Ice.ACM.Client=num

Description

If num is set to a value larger than zero, client-side Active Connection Manage­ment (ACM) is enabled. This means that connections are automatically closed by the client after they have been idle for num seconds. This is transparent to applica­tions because connections closed by ACM are automatically reestablished if they are needed again. The default value is 60, meaning that idle connections are auto­matically closed after one minute.

Ice.ACM.Server

Synopsis

Ice.ACM.Server=num

Description

This property is the server-side equivalent of Ice.ACM.Client. If num is set to a value larger than zero, server-side Active Connection Management (ACM) is enabled, in which the server automatically closes an incoming connection after it has been idle for num seconds. The default value is 0, meaning that server-side ACM is disabled by default.
Server-side ACM can cause incoming oneway requests to be silently discarded. See the Ice manual for more information.

Ice.BatchAutoFlush

Synopsis

Ice.BatchAutoFlush=num

Description

This property controls how the Ice run time deals with flushing of batch messages. If num is set to a non-zero value (the default), the run time automatically forces a flush of the current batch when a new message is added to a batch and that message would cause the batch to exceed Ice.MessageSizeMax. If num is set to zero, batches must be flushed explicitly by the application; in this case, if the application adds more messages to a batch than permitted by Ice.MessageSizeMax, the application receives a MemoryLimitException when it flushes the batch.

Ice.CacheMessageBuffers

Synopsis

Ice.CacheMessageBuffers=num (Java, C#)

Description

If num is a value greater than zero, the Ice run time caches message buffers for future reuse. This can improve performance and reduce the amount of garbage produced by Ice internals that the garbage collector would eventually spend time to reclaim. However, for applications that exchange very large messages, this cache may consume excessive amounts of memory and therefore should be disabled by setting this property to zero. If not defined, the default value is 1.

Ice.ChangeUser

Synopsis

Ice.ChangeUser=user

Description

If set, Ice changes the user and group id to the respective ids of user in /etc/passwd. This only works if the Ice application is executed by the super-user (Unix only).

Ice.Compression.Level

Synopsis

Ice.Compression.Level=num

Description

Specifies the bzip2 compression level. Legal values for num are 1 to 9, where 1 represents the fastest compression and 9 represents the best compression. Note that higher levels cause the bzip2 algorithm to devote more resources to the compression effort, and may not result in a significant improvement over lower levels. If not specified, the default value is 1.

Ice.GC.Interval

Synopsis

Ice.GC.Interval=num

Description

This property determines the frequency with which the class garbage collector runs. If the interval is set to zero (the default), no collector thread is created. Otherwise, the collector thread runs every num seconds.

Ice.ImplicitContext

Synopsis

Ice.ImplicitContext=type

Description

Specifies whether a communicator has an implicit context and, if so, at what scope the context applies. Legal values for this property are None (equivalent to the empty string), PerThread, and Shared. If not specified, the default value is None. See Section 32.11.4 for more information on implicit contexts.

Ice.LoggerPlugin

Synopsis

Ice.LoggerPlugin=entry_point [args]

Description

Specifies the entry point of a plugin that supplies a logger object to be installed during communicator initialization. This property allows you to modify the logger used by an existing application without altering its source code.

Platform Notes

C++
The value of entry_point has the form basename[,version]:function. The basename and optional version components are used to construct the name of a DLL or shared library. If no version is supplied, the Ice version is used. The function component is the name of a function with C linkage. For example, the entry point MyPlugin,32:create would imply a shared library name of libMyPlugin.so.32 on Unix and MyPlugin32.dll on Windows. Furthermore, if Ice is built on Windows with debugging, a d is automatically appended to the version (for example, MyPlugin32d.dll).
The function must be declared with external linkage and have the following signature:
Ice::Logger* function(const Ice::CommunicatorPtr& communicator,
                      const Ice::StringSeq& args);
Note that the function must return a pointer and not a smart pointer. The Ice core deallocates the object when it unloads the library.
Java
The value of entry_point is the name of a class that must implement the Ice.LoggerFactory interface. Any arguments that follow the class name are passed to the create method. For example:
Ice.LoggerPlugin=MyLogger arg1 arg2
.NET
The value of entry_point has the form assembly:class. The assembly can be the full assembly name, such as myplugin, Version=1.2.3.4, Culture=neutral, or an assembly DLL name such as myplugin.dll. The specified class must implement the Ice.LoggerFactory interface. Any arguments that follow the class name are passed to the create method. For example:
Ice.LoggerPlugin=myplugin, Version=1.2.3.4, Culture=neutral:MyLogger arg1 arg2

Ice.MessageSizeMax

Synopsis

Ice.MessageSizeMax=num

Description

This property controls the maximum size (in kilobytes) of a protocol message that is accepted or sent by the Ice run time. The size includes the size of the Ice protocol header. Messages larger than this size cause a MemoryLimitException. The default size is 1024 (1 Megabyte). Settings with a value less than 1 are ignored.

Ice.MonitorConnections

Synopsis

Ice.MonitorConnections=num

Description

If num is set to a value larger than zero, Ice starts a thread that monitors connec­tions. Approximately each num seconds, this thread shuts down idle connections and enforces AMI timeouts. The default value is the smaller of Ice.ACM.Client or Ice.ACM.Server. If neither property is defined with a non-zero value, the monitoring thread is disabled.
It is important to understand the relationship between this thread and the time­outs it is responsible for enforcing. It is legal to define Ice.ACM.Client or Ice.ACM.Server with a value smaller than num, but idle connections will only be closed every num seconds. Similarly, AMI timeouts cannot happen faster than num seconds.

Ice.Nohup

Synopsis

Ice.Nohup=num

Description

If num is set to a value larger than zero, the C++ classes Ice::Application and Ice::Service ignore SIGHUP (for Unix) and CTRL_LOGOFF_EVENT (for Windows). As a result, an application that sets Ice.Nohup continues to run if the user that started the application logs off. The default value for Ice::Application is 0, and the default value for Ice::Service is 1 (C++ only.)

Ice.NullHandleAbort

Synopsis

Ice.NullHandleAbort=num

Description

If num is set to a value larger than zero, invoking an operation using a null smart pointer causes the program to abort immediately instead of raising IceUtil::NullHandleException (C++ only).

Ice.Package.module

Synopsis

Ice.Package.module=package

Description

Associates a top-level Slice module with a Java package. If global metadata is used to enclose generated Java classes in a user-defined package, the Ice run time must be configured in order to successfully unmarshal exceptions and concrete class types. If all top-level modules are generated into the same user-defined package, it is easier to use Ice.Default.Package instead.

Ice.PrintAdapterReady

Synopsis

Ice.PrintAdapterReady=num

Description

If num is set to a value larger than zero, an object adapter prints “adapter_name ready” on standard output after initialization is complete. This is useful for scripts that need to wait until an object adapter is ready to be used.

Ice.PrintProcessId

Synopsis

Ice.PrintProcessId=num

Description

If num is set to a value larger than zero, the process ID is printed on standard output upon startup.

Ice.ProgramName

Synopsis

Ice.ProgramName=name

Description

name is the program name, which is set automatically from argv[0] (C++) and from AppDomain.CurrentDomain.FriendlyName (C#) during initializa­tion. (For Java, Ice.ProgramName is initialized to the empty string.) For all languages, the default name can be overridden by setting this property.

Ice.RetryIntervals

Synopsis

Ice.RetryIntervals=num [num ...]

Description

This property defines the number of times an operation is re‑tried and the delay between each retry. For example, if the property is set to 0 100 500, the operation is re‑tried 3 times: immediately after the first failure, again after waiting 100ms after the second failure, and again after waiting 500ms after the third failure. The default value (0) is to retry once immediately. If set to 1, no retry occurs.

Ice.ServerId

Synopsis

Ice.ServerId=id

Description

The value id is used as the server id when an object adapter registers the server with the locator registry. Refer to the description of the object adapter property adapter.RegisterProcess for more information.

Ice.ServerIdleTime

Synopsis

Ice.ServerIdleTime=num

Description

If num is set to a value larger than zero, Ice automatically calls Communicator::shutdown once the communicator has been idle for num seconds. This shuts down the Communicator's server side and causes all threads waiting in Communicator::waitForShutdown to return. After that, a server will typically do some clean‑up work before exiting. The default value is zero, meaning that the server will not shut down automatically.

Ice.StdErr

Synopsis

Ice.StdErr=filename

Description

If filename is not empty, the standard error stream of this process is redirected to this file, in append mode. This property is checked only for the first communicator that is created in a process.

Ice.StdOut

Synopsis

Ice.StdOut=filename

Description

If filename is not empty, the standard output stream of this process is redirected to this file, in append mode. This property is checked only for the first communi­cator created in a process.

Ice.ThreadPerConnection

Synopsis

Ice.ThreadPerConnection=num

Description

If num is set to a value larger than zero, the Ice run time uses a thread-per-connec­tion concurrency model as its default instead of the thread pool. As its name implies, this concurrency model creates a new thread for each outgoing and incoming connection. Unlike the thread pool concurrency model, thread-per-connection supports at most one level of nested callbacks.

Ice.ThreadPerConnection.StackSize

Synopsis

Ice.ThreadPerConnection.StackSize=num

Description

num is the stack size (in bytes) of the threads created for each connection. The default value is zero, meaning the operating system’s default is used.

Ice.UDP.RcvSize
Ice.UDP.SndSize

Synopsis

Ice.UDP.RcvSize=num
Ice.UDP.SndSize=num

Description

These properties set the UDP receive and send buffer sizes to the specified value in bytes. Ice messages larger than num  28 bytes cause a DatagramLimitException. The default value depends on the configuration of the local UDP stack. (Common default values are 65535 and 8192 bytes.)
The OS may impose lower and upper limits on the receive and send buffer sizes or otherwise adjust the buffer sizes. If a limit is requested that is lower than the OS‑imposed minimum, the value is silently adjusted to the OS‑imposed minimum. If a limit is requested that is larger than the OS‑imposed maximum, the value is adjusted to the OS‑imposed maximum; in addition, Ice logs a warning showing the requested size and the adjusted size.
Settings of these properties less than 28 are ignored.
Note that, on many operating systems, it is possible to set buffer sizes greater than 65535. Such settings do not change the hard limit of 65507 bytes for the payload of a UDP packet, but merely affect how much data can be buffered by the kernel.
Settings less than 65535 limit the size of Ice datagrams as well as adjust the kernel buffer sizes.

Ice.UseSyslog

Synopsis

Ice.UseSyslog=num

Description

If num is set to a value larger than zero, a special logger is installed that logs to the syslog facility instead of standard error. The identifier for syslog is the value of Ice.ProgramName (Unix only).
Table of Contents Previous Next
Logo