Make JEGraphDatabase synchronized to avoid concurrency issues.