Neo4j graphDatabaseService blows up on context initialization if remote DB is down

412 Views Asked by At

When the Neo4j config is initialzed, and the remote DB is not running, the server will not start ...

    <neo4j:config graphDatabaseService="graphDatabaseService" />
    <bean id="graphDatabaseService class="org.springframework.data.neo4j.rest.SpringRestGraphDatabase">
    <constructor-arg index="0" value="http://220.10.25.24:7474/db/data/" /> 
    </bean>

is there a way to gracefully stop or halt it's creation when the server isn't running ?

This is a module in a much larger Application & I can't not start the app b/c Neo4j has stopped running ..

1

There are 1 best solutions below

0
Peter Neubauer On

Not sure there is a good hook in there, maybe you can raise an issue in https://github.com/neo4j/java-rest-binding on exposing either an exception or some check method to find out if the neo4j server is alive?