hi!
i'm using guice in a JSE project to inject an EntityManager in my
cotrollers, but am having a hard ...
private static EntityManagerFactory configure() {
Map<String, Object> properties = new HashMap<>();
properties.put("javax.persistence.jdbc.url",
"jdbc:h2:C:\\teste\\db_testeGuice");
properties.put("javax.persistence.jdbc.password", "dba@guice*");
properties.put("javax.persistence.jdbc.user", "dba_guice");
return Persistence.createEntityManagerFactory("TesteGuicePU",
properties);
}
public static EntityManager getEntityManager() {
return factory.createEntityManager();
}
the above method puts the properties of database access during scription of
EntityManagerFactory, I wonder if this is how the above method does but
using guice ...
I can not declare the data in the URL of BD persistence.xml they change
according to the application directory (the jar) ...
thanks for any response! =D
Arthur
--
You received this message because you are subscribed to the Google Groups
"google-guice" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-guice/-/W3R5xP8EAKAJ.
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.