Class: com.sybase.djc.server.ServiceComponent (Service Component) EAServer 6.3 Help
Description A service component is a background task that runs at server startup, shutdown, and during server operation.

For a service component to be active in a server, the service component's name must be included in the server's serviceComponents property.

See also: Scheduled Task. Note that service components are activated before scheduled tasks.

Configuration See Set Properties Task.
Properties allowStartFailure, component, dependsOn, runThreadCount, startBeforeBinding, startOrder, stopWaitTime
Files Repository/Instance/com/sybase/djc/server/ServiceComponent/*.properties

Property: allowStartFailure (Allow Start Failure)
Description Allow the server to start even if the "start" method of this service fails. If allowStartFailure is false, the server will continue (retry) starting the service until it starts successfully. A perpetually failing service component can thus cause the server to hang during startup.
Default Value true
Legal Values false, true

Property: component (Component)
Description Required. Name of the class implementing an EJB's local or remote interface (e.g. "ejb.components.example.MyServiceLocal" or "ejb.components.example.MyServiceRemote"), or the name of a plain Java class.

If the EJB is a wrapper generated for a CORBA component, the CORBA component can optionally implement the CtsServices::GenericService IDL interface.

The component or class may optionally implement any or all of the following methods:

  • public void start() { ... }

    Code that should run during server startup.

  • public void stop() { ... }

    Code that should run during server shutdown.

  • public void run() { ... }

    Code that should run during server operation (see also runThreadCount). If the code needs to perform an iterative task, consider using the Java Thread.sleep API or the C JagSleep API in order to avoid excessive CPU utilization. Alternatively, use a scheduled task.

Property: dependsOn (Depends On)
Description A comma-separated list of names of other service components that must be started before this service component.

Property: runThreadCount (Run Thread Count)
Description The number of threads the server should start to simultaneously call the "run" method.
Default Value 1
Minimum Value 1
Maximum Value 2147483647

Property: startBeforeBinding (Start Before Binding)
Description Enable if the service must start before name service bindings are set up.
Default Value false
Legal Values false, true

Property: startOrder (Start Order)
Description Service components with a lower startOrder are started before service components with a higher startOrder. However the dependsOn property can cause service components to be started before it might otherwise be indicated by their startOrder.
Default Value 1
Minimum Value 1
Maximum Value 2147483647

Property: stopWaitTime (Stop Wait Time (ms))
Description The number of milliseconds the server will wait for this service component to stop during server shutdown. If the service component does not stop within this time, the server will shutdown regardless.
Default Value 1000
Minimum Value 0
Maximum Value 2147483647