Sha256: df53ae2aaefb460e45ae4a3561edad219dc481c8c4fe43edccde96b6b4bf35de
Contents?: true
Size: 668 Bytes
Versions: 3
Compression:
Stored size: 668 Bytes
Contents
package app.infra; import javax.annotation.PostConstruct; import br.com.caelum.vraptor.ioc.Component; import br.com.caelum.vraptor.ioc.ComponentFactory; import br.com.caelum.vraptor.ioc.RequestScoped; import com.googlecode.objectify.Objectify; import com.googlecode.objectify.ObjectifyService; import app.models.Product; @Component @RequestScoped public class ObjectifyFactory implements ComponentFactory<Objectify> { private Objectify session; static { ObjectifyService.register(Product.class); } @PostConstruct public void abreSession() { session = ObjectifyService.begin(); } @Override public Objectify getInstance() { return session; } }
Version data entries
3 entries across 3 versions & 2 rubygems