title: Initialize Database in Jersey Resource
body: <p>what is the right way to initialize my database only once?
  See this example:</p>
  
  <pre><code>@Path("/")
  public class Resource {
      private static final Map&lt;Integer,String&gt; data = new ConcurrentHashMap&lt;Integer,String&gt;()
  
      public Resource() {
          data.put(1, "1");
          data.put(2, "2");
          ...
      }
  }
  </code></pre>
  
  <p>For example if I delete entry 1, it will be present on the next request again.</p>