Search in sources :

Example 1 with SSLConfig

use of org.apache.solr.client.solrj.embedded.SSLConfig in project camel by apache.

the class JettySolrFactory method createJetty.

private static JettySolrRunner createJetty(String solrHome, String configFile, String schemaFile, String context, boolean stopAtShutdown, SortedMap<ServletHolder, String> extraServlets, boolean ssl) throws Exception {
    if (!mockedSslClient) {
        installAllTrustingClientSsl();
        mockedSslClient = true;
    }
    // Set appropriate paths for Solr to use.
    System.setProperty("solr.solr.home", solrHome);
    System.setProperty("jetty.testMode", "true");
    System.setProperty("solr.data.dir", "target/test-classes/solr/data" + (dataDirNo++));
    // Instruct Solr to keep the index in memory, for faster testing.
    System.setProperty("solr.directoryFactory", "solr.RAMDirectoryFactory");
    SSLConfig sslConfig = buildSSLConfig(ssl, false);
    context = context == null ? "/solr" : context;
    JettySolrRunner jetty = new JettySolrRunner(solrHome, context, 0, configFile, schemaFile, stopAtShutdown, extraServlets, sslConfig);
    jetty.start();
    return jetty;
}
Also used : SSLConfig(org.apache.solr.client.solrj.embedded.SSLConfig) JettySolrRunner(org.apache.solr.client.solrj.embedded.JettySolrRunner)

Aggregations

JettySolrRunner (org.apache.solr.client.solrj.embedded.JettySolrRunner)1 SSLConfig (org.apache.solr.client.solrj.embedded.SSLConfig)1