title: Replacement for deprecated `WrappingNeoServerBootstrapper`
body: <p>I am trying to convert some Neo4J Java code code to 2.2+, the code runs an embedded Neo4J server with web frontend.</p>
  
  <pre class="lang-java prettyprint-override"><code>// configure embedded DB,
  // but this doesn't start a server at port 12345 ?
  final GraphDatabaseService db = new GraphDatabaseFactory()
      .newEmbeddedDatabaseBuilder("/path/to/db")
      .setConfig(ServerSettings.webserver_address, "localhost")
      .setConfig(ServerSettings.webserver_port, 12345)
      .newGraphDatabase();
  
  // add shutdown hook
  Runtime.getRuntime().addShutdownHook(new Thread(){
      @Override public void run() {
          graphDb.shutdown();
      }
  });
  </code></pre>
  
  <p>The deprecated code that starts a server reads:</p>
  
  <pre class="lang-java prettyprint-override"><code>final GraphDatabaseAPI api = (GraphDatabaseAPI)db;
  
  final ServerConfigurator c = new ServerConfigurator(api);
  c.configuration().addProperty(
      Configurator.WEBSERVER_ADDRESS_PROPERTY_KEY, "localhost");
  c.configuration().addProperty(
      Configurator.WEBSERVER_PORT_PROPERTY_KEY, 12345);
  
  new WrappingNeoServerBootstrapper(api, c).start();
  </code></pre>
  
  <p>Leaving this out doesn't start the server. It is unclear to me how to get an embedded server running without using the deprecated methods. Any thoughts?</p>
  
  <p><strong>UPDATE</strong>:</p>
  
  <p>So indeed the correct answer seems: change your architecture.</p>
  
  <p>One shouldn't use the embedded server anymore, instead use the server and RESTful API. For the bits that you need the Java API you can write an unmanaged extension (see <a href="http://neo4j.com/docs/stable/server-unmanaged-extensions.html" rel="nofollow">docs</a>).</p>
  
  <p>Here is a simple example of such an extension <a href="https://github.com/histograph/neo4j-plugin" rel="nofollow">https://github.com/histograph/neo4j-plugin</a></p>
  
  <p>Thanks!</p>