@ PostConstruct public void buildRepository ( ) { try { LOGGER . info ( "Using repo config (classpath): {}" , repositoryConfiguration . getURL ( ) ) ; getPropertiesLoader ( ) . loadSystemProperties ( ) ; final RepositoryConfiguration config = RepositoryConfiguration . read ( repositoryConfiguration . getURL ( ) ) ; repository = modeShapeEngine . deploy ( config ) ; // next line ensures that repository starts before the factory is used. final org . modeshape . common . collection . Problems problems = repository . getStartupProblems ( ) ; for ( final org . modeshape . common . collection . Problem p : problems ) { LOGGER . error ( "ModeShape Start Problem: {}" , p . getMessageString ( ) ) ; // TODO determine problems that should be runtime errors } } catch ( final Exception e ) { throw new RepositoryRuntimeException ( e ) ; } }
Generate a JCR repository from the given configuration