Package org.fcrepo.server.config

Examples of org.fcrepo.server.config.ModuleConfiguration


*/
public abstract class SQLUtility {

    public static ConnectionPool getConnectionPool(ServerConfiguration fcfg)
            throws SQLException {
        ModuleConfiguration mcfg =
                fcfg
                        .getModuleConfiguration("org.fcrepo.server.storage.ConnectionPoolManager");
        String defaultPool = mcfg.getParameter("defaultPoolName",Parameter.class).getValue();
        DatastoreConfiguration dcfg =
                fcfg.getDatastoreConfiguration(defaultPool);
        return getConnectionPool(dcfg);
    }
View Full Code Here


     * Gets a connection to the database specified in connection pool module's
     * "defaultPoolName" config value. This allows us to the connect to the
     * database without the server running.
     */
    public static Connection getDefaultConnection(ServerConfiguration serverConfig) {
        ModuleConfiguration poolConfig =
                serverConfig
                        .getModuleConfiguration("org.fcrepo.server.storage.ConnectionPoolManager");
        String datastoreID =
                poolConfig.getParameter("defaultPoolName",Parameter.class).getValue();
        DatastoreConfiguration dbConfig =
                serverConfig.getDatastoreConfiguration(datastoreID);
        return getConnection(dbConfig.getParameter("jdbcDriverClass",Parameter.class)
                                     .getValue(),
                             dbConfig.getParameter("jdbcURL",Parameter.class).getValue(),
View Full Code Here

    @Override
    protected void registerBeanDefinitions()
            throws ServerInitializationException{
        ServerConfiguration sc = getConfig();
        ModuleConfiguration rim = sc.getModuleConfiguration(ResourceIndex.class.getName());
        if (rim != null){
            String ds = rim.getParameter("datastore");
            if (ds != null){
                DatastoreConfiguration dsConfig = sc.getDatastoreConfiguration(ds);
                if (dsConfig != null){
                    try{
                        String name = TriplestoreConnector.class.getName();
View Full Code Here

          .parse();
      config.applyProperties(props);

      // If using akubra-fs, set the class of the module and clear params.
      if (usingAkubra()) {
        ModuleConfiguration mConfig = config
            .getModuleConfiguration("org.fcrepo.server.storage.lowlevel.ILowlevelStorage");
        config.getModuleConfigurations().remove(mConfig);
      }

      config.serialize(new FileOutputStream(fcfg));
View Full Code Here

TOP

Related Classes of org.fcrepo.server.config.ModuleConfiguration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.