- priority: 5 --> 7
Extend the current configuration possibilities, so that
a user can register services in the PackageRegistry on
the command line and in form of a configuration file.
Note that a service is not the same as the
ServiceProvider. To configure an external service, a
default implementation of a ServiceProvider has to
wrapped around the service to avoid breaking the
current PackageRegistry semantics.
Command line syntax proposal:
-s name:com.package.Implementation
the -s switch stands for "service" and can occur as
often as needed on the commandline.
Configuration file proposal
<Services>
<Service key="name" class="com.package.Implementation"/>
</Services>
For the time being, only singletons should be
configured, to keep the implementation simple, but the
approach could be extended to pools and factories by
providing flags for the ServiceProvider to use for
storing a service in the PackageRegistry.
This configuration framework should be well documented,
especially the available service-keys for existing
functionality along their required base
interfaces/classes, to give a good overview over the
extensability of JFCML.