Hi  Edward

Do you mean implement SiteEntityEntityServiceJDBCImpl
and ApplicationEntityJDBCImpl, so that we can bind them in
JDBCMetadataStore? i.e.

        bind(SiteEntityService.class).to(SiteEntityEntityServiceJDBCI
mpl .class).in(Singleton.class);

bind(ApplicationEntityService.class).to(ApplicationEntityJDBCImpl.class).in(Singleton.class);
Right?

If so, that looks like we need define an interface like IMetadataDao(or
directly update this interface).

Any Idea? And Please correct me if I am wrong

Thanks
Chang


On Tuesday, August 23, 2016, Edward Zhang <[email protected]> wrote:

> 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 <[email protected]
> <javascript:;>> 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
> >
>

Reply via email to