Package org.exist.util

Examples of org.exist.util.Configuration$IndexModuleConfig


       
        DBBroker broker = null;
        try {
            broker = getPool().get(user);

            final Configuration configuration = broker.getConfiguration();
           
            final HttpRequest requestAdapter = new HttpServletRequestAdapter(
                request,
                new FilterInputStreamCacheConfiguration(){
                    @Override
                    public String getCacheClass() {
                        return (String)configuration.getProperty(Configuration.BINARY_CACHE_CLASS_PROPERTY);
                    }
                });
         
           
            final RestXqService service = getRegistry().findService(requestAdapter);
View Full Code Here


        DBBroker broker = null;
        TransactionManager transact = null;
        Txn transaction = null;
        try {
            File confFile = ConfigurationHelper.lookup("conf.xml");
            Configuration config = new Configuration(confFile.getAbsolutePath());
            BrokerPool.configure(1, 5, config);
            pool = BrokerPool.getInstance();
            assertNotNull(pool);
            broker = pool.get(pool.getSecurityManager().getSystemSubject());
            assertNotNull(broker);
View Full Code Here

    private File getRegistryFile(boolean temp) {
       
        DBBroker broker = null;
        try {
            broker = getBrokerPool().getBroker();
            final Configuration configuration = broker.getConfiguration();
            final File dataDir = new File((String)configuration.getProperty(BrokerPool.PROPERTY_DATA_DIR));
           
            return new File(dataDir, temp != true ? REGISTRY_FILENAME : REGISTRY_FILENAME_TMP);
          } catch(EXistException ee) {
            log.error(ee.getMessage(), ee);
            return null;
View Full Code Here

        }
    }

    @BeforeClass
    public static void startup() throws Exception {
        config = new Configuration();
        config.setProperty(XMLReaderObjectFactory.PROPERTY_VALIDATION_MODE, "auto");
        BrokerPool.configure(1, 5, config);
        createTestCollections();

    }
View Full Code Here

      File config2File = new File(existHome+"/test/src/"+packagePath+"/conf2.xml");
      File data2Dir = new File(existHome+"/test/temp/"+packagePath+"/data2");
      assertTrue(data2Dir.exists() || data2Dir.mkdirs());

      // Configure the database
      Configuration config1 = new Configuration(config1File.getAbsolutePath());
      BrokerPool.configure("db1", 1, threads, config1 );
      pool1 = BrokerPool.getInstance("db1");
      pool1.registerShutdownListener(new ShutdownListenerImpl());
      user1 = pool1.getSecurityManager().getSystemSubject();
      DBBroker broker1 = pool1.get(user1);
     

      Configuration config2 = new Configuration(config2File.getAbsolutePath());
      BrokerPool.configure("db2", 1, threads, config2 );
      pool2 = BrokerPool.getInstance("db2");
      pool2.registerShutdownListener(new ShutdownListenerImpl());
      user2 = pool1.getSecurityManager().getSystemSubject();
      DBBroker broker2 = pool2.get(user2);
View Full Code Here

        DBBroker broker = null;
        TransactionManager transact = null;
        Txn transaction = null;
        try {
            File confFile = ConfigurationHelper.lookup("conf.xml");
            Configuration config = new Configuration(confFile.getAbsolutePath());
            BrokerPool.configure(1, 5, config);
            pool = BrokerPool.getInstance();
          assertNotNull(pool);
          pool.getPluginsManager().addPlugin("org.exist.storage.md.Plugin");
View Full Code Here

    /* (non-Javadoc)
     * @see junit.framework.TestCase#setUp()
     */
    @Before
    public void setUp() throws DatabaseConfigurationException, EXistException {
        Configuration config = new Configuration();
        BrokerPool.configure(1, 5, config);
   
View Full Code Here

        startupDatabase();
    }

    private void deleteDatabaseFiles() throws DatabaseConfigurationException {
        final File confFile = ConfigurationHelper.lookup("conf.xml");
        final Configuration config = new Configuration(confFile.getAbsolutePath());

        final File dataDir = new File(config.getProperty(BrokerPool.PROPERTY_DATA_DIR).toString());
        if(dataDir.exists()) {
            deleteAllDataFiles(dataDir);
        }

        final File journalDir = new File(config.getProperty(Journal.PROPERTY_RECOVERY_JOURNAL_DIR).toString());
        if(journalDir.exists()) {
            deleteAllDataFiles(journalDir);
        }
    }
View Full Code Here

    assertEquals(0, root.getDocumentCount(broker));
  }


  @Before public void startDB() throws Exception {
    Configuration config = new Configuration();
    BrokerPool.configure(1, 1, config);
    pool = BrokerPool.getInstance();  assertNotNull(pool);
    broker = pool.get(pool.getSecurityManager().getSystemSubject());  assertNotNull(broker);
    transact = pool.getTransactionManager();  assertNotNull(transact);
    root = broker.getCollection(XmldbURI.ROOT_COLLECTION_URI);  assertNotNull(root);
View Full Code Here

        }
    }

    protected BrokerPool startDB() {
        try {
            Configuration config = new Configuration();
            BrokerPool.configure(1, 5, config);
            return BrokerPool.getInstance();
        } catch (Exception e) {           
            fail(e.getMessage());
            return null;
View Full Code Here

TOP

Related Classes of org.exist.util.Configuration$IndexModuleConfig

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.