openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Georgi Naplatanov <go...@oles.biz>
Subject Re: Get database password for persistence.xml from external file
Date Tue, 29 May 2012 14:33:55 GMT
Hi.

You can mix properties in persistence.xml file and additional 
properties. Look at

public static EntityManagerFactory createEntityManagerFactory(String 
persistenceUnitName,Map properties)

method.

HTH

Best regards
Georgi

On 05/29/2012 04:16 PM, vinbr88 wrote:
> Hello,
>
> my application is using the persistence.xml for connecting to our Oracle
> test database. The password is inserted there like this:
>
> <properties>
> 	<property name="openjpa.ConnectionDriverName"
> 		value="oracle.jdbc.driver.OracleDriver" />
> 	<property name="openjpa.ConnectionURL"
> 		value="jdbc:oracle:thin:@XX.XXX.XXX.XXX:XXXX:DBNAME " />
> 	<property name="openjpa.ConnectionUserName" value="ADMIN" />
> 	<property name="openjpa.ConnectionPassword" value="test" />
> </properties>
>
> On the target system, the database password changes every 90 days. The
> system automatically creates a property file for every user on the Linux
> file system with his new password in there. Our applications read and use
> the password of this property file on the file system.
>
> Is there a possibility to use this file for connecting to the database via
> openJPA/Oracle JDBC driver. Or do you know a possibility to import the
> password of the property file into the persistence.xml?
>
> Thank you in advance.
>
> Vince
>
>
> --
> View this message in context: http://openjpa.208410.n2.nabble.com/Get-database-password-for-persistence-xml-from-external-file-tp7579412.html
> Sent from the OpenJPA Users mailing list archive at Nabble.com.

Mime
View raw message