String securityDomain = component.getDocument().getString(FieldName.SECURITY_DOMAIN); envProvider.setSecurityDomain(securityDomain); envProvider.setEnvironment(environment()); envProvider.initialize();
String securityDomain = component.getDocument().getString(FieldName.SECURITY_DOMAIN); envProvider.setSecurityDomain(securityDomain); envProvider.setEnvironment(environment()); envProvider.initialize();
this.environment().shutdown();
} else { this.schematicDb = environment().getDb(config.getPersistenceConfiguration()); this.txMgrLookup = config.getTransactionManagerLookup(); this.txnMgr = this.txMgrLookup.getTransactionManager(); if (clustering.isEnabled()) { final String clusterName = clustering.getClusterName(); Channel channel = environment().getChannel(clusterName); if (channel != null) { this.clusteringService = ClusteringService.startStandalone(clusterName, channel);
} else { this.schematicDb = environment().getDb(config.getPersistenceConfiguration()); this.txMgrLookup = config.getTransactionManagerLookup(); this.txnMgr = this.txMgrLookup.getTransactionManager(); if (clustering.isEnabled()) { final String clusterName = clustering.getClusterName(); Channel channel = environment().getChannel(clusterName); if (channel != null) { this.clusteringService = ClusteringService.startStandalone(clusterName, channel);
this.environment().shutdown();
protected void initializeConnector( Connector connector, NamespaceRegistry registry, org.modeshape.jcr.api.nodetype.NodeTypeManager nodeTypeManager ) throws IOException, RepositoryException { // Set the execution context instance ... Reflection.setValue(connector, "context", repository.context()); // Set the execution context instance ... Reflection.setValue(connector, "translator", getDocumentTranslator()); // Set the MIME type detector ... Reflection.setValue(connector, "mimeTypeDetector", repository.mimeTypeDetector()); // Set the transaction manager Reflection.setValue(connector, "transactionManager", repository.txnManager()); // Set the ConnectorChangedSet factory Reflection.setValue(connector, "connectorChangedSetFactory", createConnectorChangedSetFactory(connector)); // Set the Environment Reflection.setValue(connector, "environment", repository.environment()); // Set the ExtraPropertiesStore instance, which is unique to this connector ... LocalDocumentStore store = repository.documentStore().localStore(); String name = connector.getSourceName(); String sourceKey = NodeKey.keyForSourceName(name); DocumentTranslator translator = getDocumentTranslator(); ExtraPropertiesStore defaultExtraPropertiesStore = new LocalDocumentStoreExtraProperties(store, sourceKey, translator); Reflection.setValue(connector, "extraPropertiesStore", defaultExtraPropertiesStore); connector.initialize(registry, nodeTypeManager); // If successful, call the 'postInitialize' method reflectively (due to inability to call directly) ... Method postInitialize = Reflection.findMethod(Connector.class, "postInitialize"); Reflection.invokeAccessibly(connector, postInitialize, new Object[] {}); }
protected void initializeConnector( Connector connector, NamespaceRegistry registry, org.modeshape.jcr.api.nodetype.NodeTypeManager nodeTypeManager ) throws IOException, RepositoryException { // Set the execution context instance ... Reflection.setValue(connector, "context", repository.context()); // Set the execution context instance ... Reflection.setValue(connector, "translator", getDocumentTranslator()); // Set the MIME type detector ... Reflection.setValue(connector, "mimeTypeDetector", repository.mimeTypeDetector()); // Set the transaction manager Reflection.setValue(connector, "transactionManager", repository.txnManager()); // Set the ConnectorChangedSet factory Reflection.setValue(connector, "connectorChangedSetFactory", createConnectorChangedSetFactory(connector)); // Set the Environment Reflection.setValue(connector, "environment", repository.environment()); // Set the ExtraPropertiesStore instance, which is unique to this connector ... LocalDocumentStore store = repository.documentStore().localStore(); String name = connector.getSourceName(); String sourceKey = NodeKey.keyForSourceName(name); DocumentTranslator translator = getDocumentTranslator(); ExtraPropertiesStore defaultExtraPropertiesStore = new LocalDocumentStoreExtraProperties(store, sourceKey, translator); Reflection.setValue(connector, "extraPropertiesStore", defaultExtraPropertiesStore); connector.initialize(registry, nodeTypeManager); // If successful, call the 'postInitialize' method reflectively (due to inability to call directly) ... Method postInitialize = Reflection.findMethod(Connector.class, "postInitialize"); Reflection.invokeAccessibly(connector, postInitialize, new Object[] {}); }
/** * Initialize the supplied provider. * * @param provider the provider; may not be null * @throws RepositoryException if there is a problem initializing the provider */ protected void doInitialize( IndexProvider provider ) throws RepositoryException { // Set the execution context instance ... Reflection.setValue(provider, "context", repository.context()); // Set the environment Reflection.setValue(provider, "environment", repository.environment()); provider.initialize(); // If successful, call the 'postInitialize' method reflectively (due to inability to call directly) ... Method postInitialize = Reflection.findMethod(IndexProvider.class, "postInitialize"); Reflection.invokeAccessibly(provider, postInitialize, new Object[] {}); if (logger.isDebugEnabled()) { logger.debug("Successfully initialized index provider '{0}' in repository '{1}'", provider.getName(), repository.name()); } }
/** * Initialize the supplied provider. * * @param provider the provider; may not be null * @throws RepositoryException if there is a problem initializing the provider */ protected void doInitialize( IndexProvider provider ) throws RepositoryException { // Set the execution context instance ... Reflection.setValue(provider, "context", repository.context()); // Set the environment Reflection.setValue(provider, "environment", repository.environment()); provider.initialize(); // If successful, call the 'postInitialize' method reflectively (due to inability to call directly) ... Method postInitialize = Reflection.findMethod(IndexProvider.class, "postInitialize"); Reflection.invokeAccessibly(provider, postInitialize, new Object[] {}); if (logger.isDebugEnabled()) { logger.debug("Successfully initialized index provider '{0}' in repository '{1}'", provider.getName(), repository.name()); } }
private InputStream getInputStreamForFile( String cndFileString ) { return IoUtil.getResourceAsStream(cndFileString, repository.environment().getClassLoader(this), null); }
private InputStream getInitialContentFileStream( String workspaceName ) { String initialContentFileString = initialContentConfig.getInitialContentFile(workspaceName); InputStream stream = IoUtil.getResourceAsStream(initialContentFileString, repository.environment().getClassLoader(this), null); if (stream == null) { repository.warn(JcrI18n.cannotLoadInitialContentFile, initialContentFileString); } return stream; }
private InputStream getInitialContentFileStream( String workspaceName ) { String initialContentFileString = initialContentConfig.getInitialContentFile(workspaceName); InputStream stream = IoUtil.getResourceAsStream(initialContentFileString, repository.environment().getClassLoader(this), null); if (stream == null) { repository.warn(JcrI18n.cannotLoadInitialContentFile, initialContentFileString); } return stream; }
private InputStream getInputStreamForFile( String cndFileString ) { return IoUtil.getResourceAsStream(cndFileString, repository.environment().getClassLoader(this), null); }