Need help in setting application name with JPA (EclipseLink)
Posted
by enrique
on Stack Overflow
See other posts from Stack Overflow
or by enrique
Published on 2010-05-24T20:00:02Z
Indexed on
2010/05/24
23:51 UTC
Read the original article
Hit count: 236
hello everybody i am using JPA with EclipseLink and oracle as DB and i need to set the property v$session of jdbc4 it allows to set an identification name to the application for auditing purposes but i had no lucky setting it up....i have been trying through entitiyManager following the example in this page: http://wiki.eclipse.org/Configuring_a_EclipseLink_JPA_Application_(ELUG) it does not show any error but does not set the application name at all... when i see the audit in oracle it is not being audited with the name i set by code "Customers" but with OS_program_name=JDBC Thin Client it means that the property in the code is not being set properly and i have no idea where the issue is, the code i am using is the following :
emProperties.put("v$session.program","Customers");
factory=Persistence.createEntityManagerFactory("clients",emProperties);
em=factory.createEntityManager(emProperties);
em.merge(clients);
does anybody know how to do it or any idea....
thanks.-
© Stack Overflow or respective owner