.jar file of a service should contain a default configuration,
you find this configuration in the configuration.xml file which comes with
the jar. A configuration file can specify several services, as well as
there can be several services in one jar file.
For example, open the
/conf/portal/configuration.xml inside this jar. You will see:
Here you will note that a service is specified between the
Each service has got a key, which defines the kind of service.
As you imagine, the content of the
<key> tag matches the qualified Java interface name
org.exoplatform.services.cache.CacheService) of the service.
The specific implementation class of the
CacheService is defined in the
Parameters You have already opened
some configuration files and seen that there are more than just
tags. You can provide your service with init parameters. The parameters
can be simple parameters, properties, or object-params. There are also
plugins and they are special because the container
calls the setters of your service in order to inject
your plugin in your service (called setter injection)
configuration in detail. In general your service is free to use
init parameters, they are not required.
If you ever need to create your own service, the minimum is to
create an empty interface, an empty class and a constructor for your class
- that's all. You also should put your class and the interface in a
.jar file and add a default configuration file.