Re: Get database password for persistence.xml from external file

2012-05-30 Thread vinbr88
Creating an EntityManagerFactory with properties Map will solve my problem I think. But will try the EncryptionProvider Method. I think this brings a few advantages, but I've never done this before. I hope I find an example or something like that. The resutls will be posted here. Thanks. --

Re: Get database password for persistence.xml from external file

2012-05-30 Thread vinbr88
Creating an EntityManagerFactory with properties Map will solve my problem I think. But will try the EncryptionProvider Method. I think this brings a few advantages, but I've never done this before. I hope I find an example or something like that. The resutls will be posted here. Thanks. --

Get database password for persistence.xml from external file

2012-05-29 Thread vinbr88
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

Re: Get database password for persistence.xml from external file

2012-05-29 Thread Georgi Naplatanov
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

Re: Get database password for persistence.xml from external file

2012-05-29 Thread Rick Curtis
Vince - Take a look at the encryption provider[1]. You wouldn't be using it as intended, but it think it could do the trick. You'll need to implement the org.apache.openjpa.lib.encryption.EncryptionProvider interface and whenever .decrypt(...) is called, go find your properties file and return