Can't get JPA properties passed through to DriverManager [message #1119419] |
Sat, 28 September 2013 08:36  |
Eclipse User |
|
|
|
I am using ucanaccess as a DB driver and want to be able to pass properties through to the DriverManager#getConnection(url, properties), but I am finding that EclipseLink strips all properties except for user and password.
Eg I have the following config:
<persistence-unit name="myEMF" transaction-type="RESOURCE_LOCAL">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<mapping-file>jpa/some-entity-orm.xml</mapping-file>
<exclude-unlisted-classes>true</exclude-unlisted-classes> <!-- Persist only those classes listed above -->
<properties>
<property name="eclipselink.ddl-generation" value="create-tables"/> <!-- Creates the tables if they do not exist. -->
<!-- Tells ucanaccess that the DB will not be shared. -->
<property name="singleconnection" value="true"/>
<property name="javax.persistence.jdbc.singleconnection" value="true"/>
<property name="any.damn.property" value="someValue"/>
<property name="javax.persistence.jdbc.driver" value="net.ucanaccess.jdbc.UcanaccessDriver"/>
<property name="javax.persistence.jdbc.url" value="jdbc:ucanaccess://!!dbFileName!!"/> <!-- Filename needs to be subbed in at runtime -->
<property name="javax.persistence.jdbc.user" value=""/>
<property name="javax.persistence.jdbc.password" value=""/> <!-- Get password from Settings -->
</properties>
</persistence-unit>
but only get user and password show in UcanaccessDriver#getConnection()
How can I get my properties passed through the UcanaccessDriver#getConnection?
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.10125 seconds