Dibyendu Majumdar wrote:

3. Following two questions are related to the org.apache.derby.iapi.services.monitor package.

a) Is my understanding correct that each module must know what other module it depends upon and try to boot the required module? Thus, the Monitor system does not inject dependencies, each module needs to find any modules it depends upon?

Modules explicitly boot other modules that they need. E.g. the database module boots (through the monitor) an access factory and a dictionary (system catalog) (and others). The module doesn't care about the implementation of the modules it requires, just that they work in the configured environment.

So there is no automatic dependency injection.

b) Is a Service a synonym for a database instance on disk?

Yes, but service is wider than that. A service is a collection of modules working together to provide a set of functionality (a service). A service can be non-persistent or persistent. A persistent service is one who's configuration is derived from a service.properties file, though there's no requirement that there is any persistent data or that the service.properties file is actually a file on disk (or even a file).

A database instance on disk is an instance of a persistent service, the jdbc driver is an instance of a non-persistent service.

This covers some of it at a high level:

http://db.apache.org/derby/binaries/ApacheDerbyInternals_1_1.pdf

HTH,
Dan.

Reply via email to