hi all

i'm instantiating my entityManager like this:
https://gist.github.com/1243361

and my module that inject the entityManager inside my repos is like this:

    @Override
    protected void configure() {
bind(PapelRepository.class).to(PapelRepostitoryImpl.class).in(Scopes.SINGLETON); bind(UsuarioRepository.class).to(UsuarioRepositroyImpl.class).in(Scopes.SINGLETON); bind(EmpresaRepository.class).to(EmpresaRepositoryImpl.class).in(Scopes.SINGLETON);
    }

    @Provides
    public EntityManager getEntityManger(){
        return ECFEntityManager.createEntityManager();
    }


but if i remove the ThreadLocal from my entityManagerFactory, the whole thing just doesn't work (e.g: transcations aren't commited)

ps: this is an RCP (OSGi) app, and i'm installing peaberry module like this


Module mod = new AbstractModule() {

            @Override
            protected void configure() {
                install(Peaberry.osgiModule(context));
            }
        };

        injector = Guice.createInjector(mod, new GermantechModulo());

any ideas? thanks in advice

--
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-guice?hl=en.

Reply via email to