Hi all,
I really need some help on this Problem. I'm using EL in a JavaSE
Environment and want to have to entitymanagers with different dbuser
connection so that e.g em1 uses "scott" "tiger" and em2 uses "jeff"
"someone" as the database user. I tried to set the user in the
Properties while creating the emf using
Persistence.createEntityManagerFactory("myPu", props)
where the key PersistenceUnitProperties.JDBC_USER and JDBC_PASSWORD are set.
This works fine when the first emf is created but the second emf just
uses the same user as the first. I saw in another post that someone used
not the PersistenceUnitProperties as keys but
"javax.persistence.jdbc.user". I tried that, but this ended up in an
error saying "no suitable driver found".
I tried not to set user password credentials on the emf but on the
entitymanager using the entitymanagerproperties but the the
entitymanager tries to connect to the database using the user "" which I
think is a bug.
What am I missing?
Later,
Tom