Service components require these EAServer Manager settings in the Component Properties window:
IDL Interface Your service component must implement the CtsServices::GenericService interface. You can define additional methods in one or more additional IDL interfaces if necessary.
Concurrency and Bind Thread Options For best performance, you must enable the Concurrency option on the Instances tab, and disable the Bind Thread option.
Selecting the Concurrency option allows multiple method invocations to occur simultaneously. Concurrent access can decrease client response time. Also, if your component has a run() method that executes indefinitely, you must enable the Concurrency option or no clients will be able to invoke methods. To support concurrency, you must ensure that access to read/write instance variables is synchronized in your component.
Disabling the Bind Thread option allows EAServer to run the component on any available thread. This option is only required by ActiveX components (where it is on implicitly) and by components that use thread-local storage. It should be disabled in any other case.
Sharing Option For simplified implementation, select the Sharing option on the instances tab. This option ensures that only a single instance of your component is created. One instance serves all client requests. With Sharing enabled, the component can store data in class instance variables. If Sharing is disabled, you must coordinate access to shared data among multiple instances of the component (typically, data shared by multiple instances is stored in static class variables, in a database, or in EAServer shared properties).
Transaction Attribute Do not create service components that are transactional. On the Transactions tab, choose Not Supported. If you require EAServer’s transaction semantics, implement a component to perform the transaction-created work and call this component from your service component
Automatic Demarcation/Deactivation If a service component is installed to run in multiple service threads, the component must be stateless.You must enable this option if the multiple instances will run as service components. See “Install the component as an EAServer service” for information on configuring the component so multiple instances run as services.
Copyright © 2005. Sybase Inc. All rights reserved. |