Help in setting the setClientInfo with JPA
Posted
by enrique
on Stack Overflow
See other posts from Stack Overflow
or by enrique
Published on 2010-05-21T15:06:34Z
Indexed on
2010/05/21
15:10 UTC
Read the original article
Hit count: 184
i am trying to set to jpa the new JDBC method which allows the application to be identified with a name it is the setClientInfo() and i could do it using pure JDBC using the lines Properties jdbcProperties = new Properties(); jdbcProperties.put("user", "system"); jdbcProperties.put("password", "sw01"); jdbcProperties.put("v$session.program", "Clients"); Connection connection = DriverManager.getConnection(url,jdbcProperties);
However i have new requirements and i need to make it with JPA EclipseLink i have been googling and could not find something substantial on how to set this property out in JPA i guess it is by annotating something but i do not know what, i was trying to setting the persistence unit by putting the following in the persistence unit:
<properties>
<property name="toplink.ddl-generation" value="create-tables"/>
<property name="v$session.program" value="Clients"/>
</properties>
but no lucky ...does somebody know how to do it or any idea...?
thanks in advanced.-
© Stack Overflow or respective owner