Hello Janap,

Maybe you can try comething like this:

public static EntityManagerFactory createEntityManagerFactory(String persistenceUnitName, Map properties)

" Create and return an EntityManagerFactory for the named persistence unit using the given properties."

Put username, password and other things in the map.

Regards,
Ognjen



Janap wrote:
Hello all,

I need some information regarding use of Open JPA in Non-EE use. As I
understood in the Open JPA manual, i am required to initialize
EntityManagerFactory when the application(Tomcat) starts and use this to
create the EntityManager.

In our project this would be impossible since I have user-per-connection
architecture, which means that i dont have the connection username and
password beforehand. All authentication takes place after user logs in(no
connection pooling!)

can someone plz suggest how to use OpenJPA in this context??

thx in advance
Janap

Reply via email to