Servers: Protocols: jCOM
Configuration Options Related Tasks Related Topics
Use this page to define the Java to COM (jCOM) protocol settings for this server. jCOM enables you to use COM (Component Object Model) objects from applications written in Java.
In addition, you can use this tab to enable and disable:
- The NT Authentication Host address
- Whether it runs in native or non-native mode
- Whether the server logs memory usage
- Whether prefetch enumeration is enabled
- Whether jCOM is initialized in native mode
Note: You must be in the
Admin
security role to see the Security, Compatibility Security, and Services —> jCOM nodes in the navigation tree.Configuration Options
Name Description Enable COM Specifies whether COM support is enabled on the regular (non-SSL) port. COM is not supported on the SSL port. (The remaining fields on this page are relevant only if you check this box.)
MBean Attribute:
ServerMBean.COMEnabled
Changes take effect after you redeploy the module or restart the server.
NT Authentication Host The address of the primary domain controller this server uses for authenticating clients. (If not specified, COM clients will not be authenticated.)
MBean Attribute:
COMMBean.NTAuthHost
Changes take effect after you redeploy the module or restart the server.
Enable Native Mode Specifies whether this server should use native DLLs to allow Java objects to interact with COM objects. (Supported on Windows only.)
MBean Attribute:
COMMBean.NativeModeEnabled
Changes take effect after you redeploy the module or restart the server.
Verbose Logging Enabled Specifies whether verbose logging is enabled.
MBean Attribute:
COMMBean.VerboseLoggingEnabled
Changes take effect after you redeploy the module or restart the server.
Enable Memory Logging Specifies whether this server should log memory usage.
MBean Attribute:
COMMBean.MemoryLoggingEnabled
Changes take effect after you redeploy the module or restart the server.
Prefetch Enumeration Specifies whether this server should prefetch the next element in a java.lang.Enumeration (that had been improperly converted from a COM VariantEnumeration type) so the correct value is returned when the hasMoreElements() method is called.
Some COM methods return a COM VariantEnumeration type. The java2com tool automatically converts the returned type into a java.lang.Enumeration. This is not a perfect match since COM enumerations have no equivalent to the
hasMoreElements()
call. The client must continue to callnextElement
until aNoSuchElementException
occurs. Setting this property will cause jCOM to prefetch the next element in behind the scenes and return the correct value when hasMoreElements is called.MBean Attribute:
COMMBean.PrefetchEnums
Changes take effect after you redeploy the module or restart the server.
Apartment Threaded Controls the flag that is used to initialize COM in native mode.
By default, when jCOM initializes COM in native mode, it starts COM with the
COINIT_MULTITHREADED
. This causes COM to use Multi-Threaded Apartment (MTA) thread model. In the MTA model, calls to an object are not synchronized by COM. Multiple clients can concurrently call an object that supports this model on different threads, and the object must provide synchronization in its interface/method implementations using synchronization objects such as events, mutexes, semaphores, etc. MTA objects can receive concurrent calls from multiple out-of-process clients through a pool of COM-created threads belonging to the object's process.If the server logs a Class Not Registered Message when starting COM in native mode, try setting this property. This will cause jCOM to start COM in native mode, using
COINIT_APARTMENTTHREADED
option instead of theCOINIT_MULTITHREADED
option. In a component that is marked as Apartment Threaded, each method of that component will execute on a thread that is associated with that component. This separates the methods into their own "Apartments", with each instance of a component corresponding to one apartment. While there is only one thread inside of a component, each instance of that component will have its own thread apartment.MBean Attribute:
COMMBean.ApartmentThreaded
Changes take effect after you redeploy the module or restart the server.