Java neo4j, REST and memory

后端 未结 3 965
余生分开走
余生分开走 2021-01-21 21:33

I\'ve deployed an app using neo4j java embedded version under Jersey tomcat for REST API. By measuring memory usage with jconsole I noticed each REST call adds 200Mb of memory (

3条回答
  •  春和景丽
    2021-01-21 21:57

    If you're not using Spring or Guice you could get around this by using a static member and static initialization for your neo4J object. If having that static is a deal breaker another option would be to use a static factory to get at a singleton instance of that neo4J object...

提交回复
热议问题