ModeShape/modeshape — pull request #224 by rhauch (2011-11-21 20:30:20+00:00)
Title: MODE-1289 Added JcrRepositoryFactory class

Migrated the JcrRepositoryFactory class, which is our implementation of javax.jcr.RepositoryFactory. The behavior is basically the same as with 2.x, except that the configuration files are now JSON files (rather than XML files as with 2.x) and now define a single repository rather than the engine's configuration.

This latter change requires that the factory manage the statically-held instances a little differently. With 2.x, the factory managed a map of JcrEngine instances keyed by the configuration URL string. This doesn't work now, since the configurations are for a single repository. Therefore, the factory maintains a map of JcrRepository instances keyed by the configuration URL string. From a user's perspective, this change is not visible. Note that these JcrRepository instances are not running within an engine (this is not a problem in 3.x).

All tests pass with these changes.