Yes, SiteEntityEntityServiceMemoryImpl is not thread safe, we need make it thread safe. Also one thing to mention is memory implementation is only for testing purpose, we should have JDBC service implementation. In JDBCMetadataStore, we have not registered jdbc implementation module. Besides Site, for application, we also need jdbc implementation. If you are interested, please help with it.
Thanks Edward On Mon, Aug 22, 2016 at 6:57 AM, Chang Chen <baibaic...@gmail.com> wrote: > Hi > > I am not very familiar with CompletableFuture, but highly suspect > SiteResource isn't thread safe. > > Its member functions(i.e. createSite, getSiteBySiteId) could be called > concurrently, and each member function run its callback via > CompletableFuture. This requires SiteEntityEntityServiceMemoryImpl thread > safe, but it's not , because siteId2EntityMap is HashMap. > > > Thanks > Chang >