mirror of https://github.com/apache/openjpa.git
OPENJPA-849 Committing code for Dianne Richards that reverts driver property name back to openjpa property.
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@741386 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9f0a175b8d
commit
b4a09c4dab
|
@ -552,7 +552,7 @@
|
|||
<value>DefaultLevel=${openjpa.loglevel}</value>
|
||||
</property>
|
||||
<property>
|
||||
<name>javax.persistence.jdbc.driver</name>
|
||||
<name>openjpa.ConnectionDriverName</name>
|
||||
<value>org.apache.commons.dbcp.BasicDataSource</value>
|
||||
</property>
|
||||
<property>
|
||||
|
|
|
@ -59,7 +59,7 @@ public class TestBadJdbcUrl extends TestCase {
|
|||
*/
|
||||
public void testBadUrlProtocolValueWithValidDriverClass() {
|
||||
Properties p = new Properties();
|
||||
p.put("javax.persistence.jdbc.driver", GOOD_DRIVER);
|
||||
p.put("openjpa.ConnectionDriverName", GOOD_DRIVER);
|
||||
p.put("openjpa.ConnectionURL", BAD_URL_PROTOCOL);
|
||||
verifyConnectException(p, PersistenceException.class,
|
||||
UserException.class, GOOD_DRIVER, BAD_URL_PROTOCOL);
|
||||
|
@ -70,7 +70,7 @@ public class TestBadJdbcUrl extends TestCase {
|
|||
*/
|
||||
public void testBadUrlProtocolValueWithValidDataSource() {
|
||||
Properties p = new Properties();
|
||||
p.put("javax.persistence.jdbc.driver", GOOD_DATASOURCE);
|
||||
p.put("openjpa.ConnectionDriverName", GOOD_DATASOURCE);
|
||||
p.put("openjpa.ConnectionURL", BAD_URL_PROTOCOL);
|
||||
p.put("openjpa.ConnectionProperties", BAD_CONN_PROPS);
|
||||
verifyConnectException(p, PersistenceException.class,
|
||||
|
@ -82,7 +82,7 @@ public class TestBadJdbcUrl extends TestCase {
|
|||
*/
|
||||
public void testBadUrlSubprotocolValueWithValidDriverClass() {
|
||||
Properties p = new Properties();
|
||||
p.put("javax.persistence.jdbc.driver", GOOD_DRIVER);
|
||||
p.put("openjpa.ConnectionDriverName", GOOD_DRIVER);
|
||||
p.put("openjpa.ConnectionURL", BAD_URL_SUBPROTOCOL);
|
||||
verifyConnectException(p, PersistenceException.class,
|
||||
UserException.class, GOOD_DRIVER, BAD_URL_SUBPROTOCOL);
|
||||
|
@ -93,7 +93,7 @@ public class TestBadJdbcUrl extends TestCase {
|
|||
*/
|
||||
public void testBadUrlSubprotocolValueWithValidDataSource() {
|
||||
Properties p = new Properties();
|
||||
p.put("javax.persistence.jdbc.driver", GOOD_DRIVER);
|
||||
p.put("openjpa.ConnectionDriverName", GOOD_DRIVER);
|
||||
p.put("openjpa.ConnectionURL", BAD_URL_SUBPROTOCOL);
|
||||
verifyConnectException(p, PersistenceException.class,
|
||||
UserException.class, GOOD_DRIVER, BAD_URL_SUBPROTOCOL);
|
||||
|
@ -104,7 +104,7 @@ public class TestBadJdbcUrl extends TestCase {
|
|||
*/
|
||||
public void testValidUrlWithInvalidDriver() {
|
||||
Properties p = new Properties();
|
||||
p.put("javax.persistence.jdbc.driver", BAD_DRIVER);
|
||||
p.put("openjpa.ConnectionDriverName", BAD_DRIVER);
|
||||
p.put("openjpa.ConnectionURL", GOOD_URL);
|
||||
verifyConnectException(p, PersistenceException.class,
|
||||
UserException.class, GOOD_URL, BAD_DRIVER);
|
||||
|
|
|
@ -64,7 +64,7 @@ public class TestPropertiesMethods extends SingleEMFTestCase {
|
|||
// openjpa.ConnectionProperties. If either one of these are changed,
|
||||
// this test case may fail.
|
||||
String javaxConnectionDriver =
|
||||
(String) emProperties.get("javax.persistence.jdbc.driver");
|
||||
(String) emProperties.get("openjpa.ConnectionDriverName");
|
||||
assertNotNull(javaxConnectionDriver);
|
||||
String openjpaConnectionURL =
|
||||
(String) emProperties.get("openjpa.ConnectionURL");
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
|
||||
<persistence-unit name="invalid">
|
||||
<properties>
|
||||
<property name="javax.persistence.jdbc.driver"
|
||||
<property name="openjpa.ConnectionDriverName"
|
||||
value="org.apache.commons.dbcp.BasicDataSource" />
|
||||
<property name="openjpa.ConnectionProperties"
|
||||
value="DriverClassName=not.a.real.Driver,Url=jdbc:notreal://"/>
|
||||
|
|
Loading…
Reference in New Issue