-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ issue #14 ] SOLR client configuration within SLFactory
- Loading branch information
agazzarini
committed
Aug 27, 2014
1 parent
c55f983
commit 3defee6
Showing
12 changed files
with
69 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
...ql-binding-solr/src/main/java/org/gazzax/labs/jena/nosql/solr/SolrClientShutdownHook.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package org.gazzax.labs.jena.nosql.solr; | ||
|
||
import org.apache.solr.client.solrj.SolrServer; | ||
import org.gazzax.labs.jena.nosql.fwk.factory.ClientShutdownHook; | ||
import org.gazzax.labs.jena.nosql.fwk.log.Log; | ||
import org.gazzax.labs.jena.nosql.fwk.log.MessageCatalog; | ||
import org.slf4j.LoggerFactory; | ||
|
||
/** | ||
* A {@link ClientShutdownHook} for SOLR clients. | ||
* | ||
* @author Andrea Gazzarini | ||
* @since 1.0 | ||
*/ | ||
public class SolrClientShutdownHook implements ClientShutdownHook { | ||
private final static Log LOGGER = new Log(LoggerFactory.getLogger(ClientShutdownHook.class)); | ||
private final SolrServer connection; | ||
|
||
/** | ||
* Builds a new SOLR Client shutdown hook. | ||
* | ||
* @param connection the connection to SOLR. | ||
*/ | ||
public SolrClientShutdownHook(final SolrServer connection) { | ||
this.connection = connection; | ||
} | ||
|
||
@Override | ||
public void close() { | ||
try { | ||
connection.shutdown(); | ||
} catch (final Exception exception) { | ||
LOGGER.error(MessageCatalog._00099_CLIENT_SHUTDOWN_FAILURE, exception); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...in/resources/META-INF/services/org.gazzax.labs.jena.nosql.fwk.factory.StorageLayerFactory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
org.gazzax.labs.jena.nosql.solr.SolrStorageLayerFactory |
8 changes: 8 additions & 0 deletions
8
jena-nosql-binding/jena-nosql-binding-solr/src/main/resources/jena-nosql-default.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
########################################## | ||
## JENA-NOSQL default configuration ## | ||
########################################## | ||
|
||
# SorlServer implementation | ||
solr-server-class: "org.apache.solr.client.solrj.impl.HttpSolrServer" | ||
solr-address: "http://127.0.0.1:8080/solr/store" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -159,4 +159,5 @@ | |
<version>1.0</version> | ||
</dependency> | ||
</dependencies> | ||
<name>Jena NoSQL Integration Tests</name> | ||
</project> |
Binary file not shown.