The Service Manager
The Service Manager manages all the server-side Workflow Servicesrequired
by the Workflow
Engine. The services are completely pluggable to enable
extensibility and server-side integration with workflow-enabled
applications. The implementations are specified by a Java
properties-format configuration
file. OBE provides two sample configurations: a basic
non-transactional, non-persistent configuration based on in-memory
JavaBeans and a robust,
scalable, transactional configuration based on session,
entity and message-driven Enterprise JavaBeans. Many of the services
have their own XML configuration
files.
Service Lifecycle
Workflow Services have a lifecycle that is controlled by the Service Manager.
Instantiation
When the Service Manager is instantiated it first instantiates all of
the services, using the implementation class names specified in the
configuration file
${obe.config.dir}/ServiceManager.properties
.
Startup
The Service Manager then initializes each of the services in turn by calling its
init()
method. At this point the service may read a configuration file as a
classpath resource or disk file. In the J2EE configuration
initialization is controlled by the J2EEInitServlet, to ensure that
services are only enabled after the EJBs upon which they depend have
been deployed by the application server.
Shutdown
The Service Manager also controls the shutting down of running
services. In the J2EE configuration this is triggered by the
J2EEInitServlet receiving a destroy()
notification, in response to
which the Service Manager calls exit() on each
service in turn.