Before a service bridge is available to agents, it must be installed on a Concordia server. The installation process involves supplying the server with information it needs in order instantiate and run the service. This is done using the servercontrol command-line tool.
The first step in installing a service bridge on a Concordia server is to modify the server's CLASSPATH to include the bytecodes of the service. The Concordia server is a Java application and like other Java applications, it loads class bytecodes from its CLASSPATH. In order for the server to incorporate an application service bridge, the bytecodes for that bridge must be present on the servers CLASSPATH.
The process for modifying the CLASSPATH of the server varies from platform to platform. On Windows, this involves modifying the server configuration using the Concordia Server Control Panel. On UNIX, this involves editing a script file. More information on modifying the server's CLASSPATH can be found here. Reconfiguring a server's CLASSPATH usually requires that the server be restarted in order for the changes to take affect.
Once the CLASSPATH of the Concordia server has been modified, the next step is to install the service bridge on the Concordia server using the servercontrol command (win32 and UNIX).
D:\Concordia\Agents\bin\win32>servercontrol Usage: ServerControl query ServerControl install <service> <class_name> [<prereq1> ...] ServerControl deinstall <service> Where: service Name of service (enclose in quotes if name contains spaces) class_name Full name of implementation class prereq Name of service(s) on which this service depends
Service installation requires supplying the name that will be used to identify the bridge as well as the name of the main class of the service bridge. This class must be a subclass of ServiceBridge. If this class supplies the appropriate constructor, then the identifying name supplied here will be passed to the constructor when a new instance is created, otherwise the default constructor will be called. Note that when installing a new service, you may optionally specify one or more services that must be running in order for the newly-installed service to run properly. A service must have been previously installed on the server in order for it to be listed as a prerequisite for another server. This is to prevent circular dependencies among services.
In the Freeware version of Concordia, the installation process starts the service, too. The non-Freeware versions of Concordia offer the ability to independently install, start, pause, resume, stop and deinstall a service. Each time the Concordia server is restarted, any installed services will be restarted, too. Information may be displayed on the system console. Errors at service startup are usually caused by bugs in the constructor or startService methods of the service bridge or by ClassNotFoundExceptions which occur because the Concordia server's CLASSPATH is incorrect.
Once a service bridge is up and running, it is available to agents via the ServiceBridge.getServiceBridge method.
As an example, following is the command that was used to add the Concordia Directory Manager service to the local Concordia Server. The Directory Manager is a lightweight directory service through which service bridges can register themselves with a central naming service. It is implemented as a ServiceBridge, so it can be installed and deinstalled just like user-defined services.
D:\Concordia\Agents\bin\win32>servercontrol query Installed servers: Remote Class Loader Event Manager Agent Manager D:\Concordia\Agents\bin\win32>servercontrol install "Directory Manager" COM.meitca.concordia.service.DirectoryImpl D:\Concordia\Agents\bin\win32>servercontrol query Installed servers: Remote Class Loader Directory Manager Event Manager Agent Manager D:\Concordia\Agents\bin\win32>