mirror of https://github.com/apache/openjpa.git
Mysql driver is basically updated
This commit is contained in:
parent
05069dfee4
commit
1d47613294
|
@ -27,7 +27,7 @@
|
|||
<class>demo.Actor</class>
|
||||
|
||||
<properties>
|
||||
<property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver"/>
|
||||
<property name="javax.persistence.jdbc.driver" value="com.mysql.cj.jdbc.Driver"/>
|
||||
<property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost/jest"/>
|
||||
<property name="javax.persistence.jdbc.user" value="root"/>
|
||||
<property name="javax.persistence.jdbc.password" value=""/>
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
<properties>
|
||||
<!-- Use these for MySQL
|
||||
<property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver"/>
|
||||
<property name="javax.persistence.jdbc.driver" value="com.mysql.cj.jdbc.Driver"/>
|
||||
<property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost/OpenBooks"/>
|
||||
<property name="javax.persistence.jdbc.user" value="user"/>
|
||||
<property name="javax.persistence.jdbc.password" value="password"/>
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
<properties>
|
||||
<property name="openjpa.BrokerFactory" value="slice"/>
|
||||
<property name="openjpa.ConnectionDriverName" value="com.mysql.jdbc.Driver"/>
|
||||
<property name="openjpa.ConnectionDriverName" value="com.mysql.cj.jdbc.Driver"/>
|
||||
<property name="openjpa.ConnectionUserName" value="demo"/>
|
||||
<property name="openjpa.ConnectionPassword" value="pwd"/>
|
||||
|
||||
|
@ -68,7 +68,7 @@
|
|||
<class>org.apache.openjpa.trader.domain.Trade</class>
|
||||
<class>org.apache.openjpa.trader.domain.Stock</class>
|
||||
<properties>
|
||||
<property name="openjpa.ConnectionDriverName" value="com.mysql.jdbc.Driver"/>
|
||||
<property name="openjpa.ConnectionDriverName" value="com.mysql.cj.jdbc.Driver"/>
|
||||
<property name="openjpa.ConnectionURL" value="jdbc:mysql://localhost/exchange"/>
|
||||
<property name="openjpa.ConnectionUserName" value="root"/>
|
||||
<property name="openjpa.ConnectionPassword" value=""/>
|
||||
|
@ -90,7 +90,7 @@
|
|||
<class>org.apache.openjpa.trader.domain.Trade</class>
|
||||
<class>org.apache.openjpa.trader.domain.Stock</class>
|
||||
<properties>
|
||||
<property name="openjpa.ConnectionDriverName" value="com.mysql.jdbc.Driver"/>
|
||||
<property name="openjpa.ConnectionDriverName" value="com.mysql.cj.jdbc.Driver"/>
|
||||
<property name="openjpa.ConnectionURL" value="jdbc:mysql://opentrader.cxlsv2qt7orp.us-east-1.rds.amazonaws.com:3306/exchange"/>
|
||||
<property name="openjpa.ConnectionUserName" value="ppoddar"/>
|
||||
<property name="openjpa.ConnectionPassword" value="password"/>
|
||||
|
|
|
@ -185,7 +185,7 @@ ConnectionDriverName-values: org.hsqldb.jdbcDriver,org.hsql.jdbcDriver,\
|
|||
org.h2.Driver,\
|
||||
COM.cloudscape.core.JDBCDriver,in.co.daffodil.db.jdbc.DaffodilDBDriver,\
|
||||
com.ddtek.jdbc.db2.DB2Driver,interbase.interclient.Driver,\
|
||||
com.mysql.jdbc.Driver,com.ddtek.jdbc.oracle.OracleDriver,\
|
||||
com.mysql.cj.jdbc.Driver,com.ddtek.jdbc.oracle.OracleDriver,\
|
||||
org.postgresql.Driver,com.pointbase.jdbc.jdbcUniversalDriver,\
|
||||
org.sourceforge.jxdbcon.JXDBConDriver,\
|
||||
com.ddtek.jdbc.sqlserver.SQLServerDriver,com.jnetdirect.jsql.JSQLDriver,\
|
||||
|
|
|
@ -34,7 +34,7 @@ import org.apache.openjpa.persistence.ArgumentException;
|
|||
import org.apache.openjpa.persistence.OpenJPAEntityManagerSPI;
|
||||
import org.apache.openjpa.persistence.test.SingleEMFTestCase;
|
||||
|
||||
// -ea -Dopenjpa.ConnectionDriverName=com.mysql.jdbc.Driver -Dopenjpa.ConnectionPassword=openjpatst
|
||||
// -ea -Dopenjpa.ConnectionDriverName=com.mysql.cj.jdbc.Driver -Dopenjpa.ConnectionPassword=openjpatst
|
||||
// -Dopenjpa.ConnectionURL=jdbc:mysql://localhost:3306/openjpatst -Dopenjpa.ConnectionUserName=openjpatst
|
||||
public class TestExplicitAccess extends SingleEMFTestCase {
|
||||
|
||||
|
|
|
@ -198,7 +198,7 @@ To run the tests in the debugger simply add the following JVM properties
|
|||
-ea -Dopenjpa.ConnectionURL=jdbc:derby:target/database/openjpa-derby-database;create=true -Dopenjpa.ConnectionDriverName=org.apache.derby.jdbc.EmbeddedDriver
|
||||
|
||||
For running against a MySQL Docker installation:
|
||||
-ea -Dopenjpa.ConnectionDriverName=com.mysql.jdbc.Driver -Dopenjpa.ConnectionURL=jdbc:mysql://localhost:3306/openjpatst -Dopenjpa.ConnectionUserName=openjpatst -Dopenjpa.ConnectionPassword=openjpatst
|
||||
-ea -Dopenjpa.ConnectionDriverName=com.mysql.cj.jdbc.Driver -Dopenjpa.ConnectionURL=jdbc:mysql://localhost:3306/openjpatst -Dopenjpa.ConnectionUserName=openjpatst -Dopenjpa.ConnectionPassword=openjpatst
|
||||
|
||||
Running against a PostgreSQL Docker installation:
|
||||
-ea -Dopenjpa.ConnectionDriverName=org.postgresql.Driver -Dopenjpa.ConnectionURL=jdbc:postgresql://localhost:5432/openjpatst -Dopenjpa.ConnectionUserName=postgres -Dopenjpa.ConnectionPassword=postgres
|
||||
|
|
|
@ -365,7 +365,7 @@
|
|||
For example, the following configuration will use two different JDBC
|
||||
drivers for slice <classname>One</classname> and <classname>Two</classname>.
|
||||
<programlisting>
|
||||
<![CDATA[<property name="openjpa.slice.One.ConnectionDriverName" value="com.mysql.jdbc.Driver"/>
|
||||
<![CDATA[<property name="openjpa.slice.One.ConnectionDriverName" value="com.mysql.cj.jdbc.Driver"/>
|
||||
<property name="openjpa.slice.Two.ConnectionDriverName" value="com.mysql.jdbc.jdbc2.optional.MysqlXADataSource"/>]]>
|
||||
</programlisting>
|
||||
</para>
|
||||
|
@ -378,13 +378,13 @@
|
|||
<property name="openjpa.slice.Two.ConnectionURL" value="jdbc:mysql:localhost//slice2"/>
|
||||
<property name="openjpa.slice.Three.ConnectionURL" value="jdbc:oracle:localhost//slice3"/>
|
||||
|
||||
<property name="openjpa.ConnectionDriverName" value="com.mysql.jdbc.Driver"/>
|
||||
<property name="openjpa.ConnectionDriverName" value="com.mysql.cj.jdbc.Driver"/>
|
||||
<property name="openjpa.slice.Three.ConnectionDriverName" value="oracle.jdbc.Driver"/>]]>
|
||||
</programlisting>
|
||||
In this example, <classname>Three</classname> will use slice-specific
|
||||
<classname>oracle.jdbc.Driver</classname> driver while slice
|
||||
<classname>One</classname> and <classname>Two</classname> will use
|
||||
the driver <classname>com.mysql.jdbc.Driver</classname> as
|
||||
the driver <classname>com.mysql.cj.jdbc.Driver</classname> as
|
||||
specified by <classname>openjpa.ConnectionDriverName</classname>
|
||||
property value.
|
||||
</para>
|
||||
|
|
|
@ -155,13 +155,13 @@ users, but may not support every feature of this release, please refer to the
|
|||
<link linkend="dbsupport_mysql">MySQL</link>
|
||||
</entry>
|
||||
<entry colname="dbversion">
|
||||
5.0.26, 5.1.6, 5.7
|
||||
5.0.26, 5.1.6, 5.7, 8.0.x
|
||||
</entry>
|
||||
<entry colname="drivname">
|
||||
MySQL Driver
|
||||
</entry>
|
||||
<entry colname="drivversion">
|
||||
5.1.6, 5.1.47
|
||||
5.1.6, 5.1.47, 8.0.29
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
|
@ -1135,7 +1135,7 @@ Using the Sun JDBC-ODBC bridge to connect is not supported.
|
|||
Example properties for MySQL
|
||||
</title>
|
||||
<programlisting>
|
||||
openjpa.ConnectionDriverName: com.mysql.jdbc.Driver
|
||||
openjpa.ConnectionDriverName: com.mysql.cj.jdbc.Driver
|
||||
openjpa.ConnectionURL: jdbc:mysql://SERVER_NAME/DB_NAME
|
||||
</programlisting>
|
||||
</example>
|
||||
|
|
|
@ -89,7 +89,7 @@
|
|||
</dependency>
|
||||
</dependencies>
|
||||
<properties>
|
||||
<connection.driver.name>com.mysql.jdbc.Driver</connection.driver.name>
|
||||
<connection.driver.name>com.mysql.cj.jdbc.Driver</connection.driver.name>
|
||||
<connection.url>${openjpa.mysql.url}</connection.url>
|
||||
<connection.username>${openjpa.mysql.username}</connection.username>
|
||||
<connection.password>${openjpa.mysql.password}</connection.password>
|
||||
|
|
|
@ -136,16 +136,16 @@
|
|||
<persistence-unit name="mysql">
|
||||
<properties>
|
||||
<property name="openjpa.BrokerFactory" value="slice"/>
|
||||
<property name="openjpa.ConnectionDriverName" value="com.mysql.jdbc.Driver"/>
|
||||
<property name="openjpa.ConnectionDriverName" value="com.mysql.cj.jdbc.Driver"/>
|
||||
|
||||
<property name="openjpa.slice.Names" value="One,Two"/>
|
||||
<property name="openjpa.slice.DistributionPolicy" value="org.apache.openjpa.slice.policy.UserDistributionPolicy"/>
|
||||
|
||||
<property name="openjpa.ConnectionUserName" value="root"/>
|
||||
<property name="openjpa.ConnectionPassword" value=""/>
|
||||
<property name="openjpa.slice.One.ConnectionDriverName" value="com.mysql.jdbc.Driver"/>
|
||||
<property name="openjpa.slice.One.ConnectionDriverName" value="com.mysql.cj.jdbc.Driver"/>
|
||||
<property name="openjpa.slice.One.ConnectionURL" value="jdbc:mysql://localhost/slice1"/>
|
||||
<property name="openjpa.slice.Two.ConnectionDriverName" value="com.mysql.jdbc.Driver"/>
|
||||
<property name="openjpa.slice.Two.ConnectionDriverName" value="com.mysql.cj.jdbc.Driver"/>
|
||||
<property name="openjpa.slice.Two.ConnectionURL" value="jdbc:mysql://localhost/slice2"/>
|
||||
|
||||
<property name="openjpa.Multithreaded" value="false"/>
|
||||
|
@ -236,7 +236,7 @@
|
|||
<persistence-unit name="car.mysql">
|
||||
<properties>
|
||||
<property name="openjpa.BrokerFactory" value="slice"/>
|
||||
<property name="openjpa.ConnectionDriverName" value="com.mysql.jdbc.Driver"/>
|
||||
<property name="openjpa.ConnectionDriverName" value="com.mysql.cj.jdbc.Driver"/>
|
||||
|
||||
<property name="openjpa.slice.Names" value="BMW,Honda,Ford"/>
|
||||
|
||||
|
@ -288,10 +288,10 @@
|
|||
|
||||
<property name="openjpa.ConnectionUserName" value="root"/>
|
||||
<property name="openjpa.ConnectionPassword" value=""/>
|
||||
<property name="openjpa.slice.S1.ConnectionProperties" value="DriverClassName=com.mysql.jdbc.Driver,Url=jdbc:mysql://localhost/S1,MaxTotal=4"/>
|
||||
<property name="openjpa.slice.S2.ConnectionProperties" value="DriverClassName=com.mysql.jdbc.Driver,Url=jdbc:mysql://localhost/S2,MaxTotal=4"/>
|
||||
<property name="openjpa.slice.S3.ConnectionProperties" value="DriverClassName=com.mysql.jdbc.Driver,Url=jdbc:mysql://localhost/S3,MaxTotal=4"/>
|
||||
<property name="openjpa.slice.S4.ConnectionProperties" value="DriverClassName=com.mysql.jdbc.Driver,Url=jdbc:mysql://localhost/S4,MaxTotal=4"/>
|
||||
<property name="openjpa.slice.S1.ConnectionProperties" value="DriverClassName=com.mysql.cj.jdbc.Driver,Url=jdbc:mysql://localhost/S1,MaxTotal=4"/>
|
||||
<property name="openjpa.slice.S2.ConnectionProperties" value="DriverClassName=com.mysql.cj.jdbc.Driver,Url=jdbc:mysql://localhost/S2,MaxTotal=4"/>
|
||||
<property name="openjpa.slice.S3.ConnectionProperties" value="DriverClassName=com.mysql.cj.jdbc.Driver,Url=jdbc:mysql://localhost/S3,MaxTotal=4"/>
|
||||
<property name="openjpa.slice.S4.ConnectionProperties" value="DriverClassName=com.mysql.cj.jdbc.Driver,Url=jdbc:mysql://localhost/S4,MaxTotal=4"/>
|
||||
|
||||
<property name="openjpa.jdbc.DBDictionary" value="mysql"/>
|
||||
<property name="openjpa.Multithreaded" value="false"/>
|
||||
|
@ -311,7 +311,7 @@
|
|||
|
||||
<property name="openjpa.ConnectionUserName" value="root"/>
|
||||
<property name="openjpa.ConnectionPassword" value=""/>
|
||||
<property name="openjpa.ConnectionProperties" value="DriverClassName=com.mysql.jdbc.Driver,Url=jdbc:mysql://localhost/S,MaxTotal=4"/>
|
||||
<property name="openjpa.ConnectionProperties" value="DriverClassName=com.mysql.cj.jdbc.Driver,Url=jdbc:mysql://localhost/S,MaxTotal=4"/>
|
||||
|
||||
<property name="openjpa.jdbc.DBDictionary" value="mysql"/>
|
||||
<property name="openjpa.Multithreaded" value="false"/>
|
||||
|
|
|
@ -120,7 +120,7 @@ public abstract class AbstractOpenJpaMojo extends AbstractMojo
|
|||
* Sample:
|
||||
* <pre>
|
||||
* <connectionProperties>
|
||||
* driverClass=com.mysql.jdbc.Driver,
|
||||
* driverClass=com.mysql.cj.jdbc.Driver,
|
||||
* jdbcUrl=jdbc:mysql://localhost/mydatabase,
|
||||
* user=root,
|
||||
* password=,
|
||||
|
|
|
@ -39,7 +39,7 @@ Specifying connection settings in the plugin section
|
|||
<sqlFile>${project.build.directory}/database.sql</sqlFile>
|
||||
<connectionDriverName>com.mchange.v2.c3p0.ComboPooledDataSource</connectionDriverName>
|
||||
<connectionProperties>
|
||||
driverClass=com.mysql.jdbc.Driver,
|
||||
driverClass=com.mysql.cj.jdbc.Driver,
|
||||
jdbcUrl=jdbc:mysql://localhost/TissExamples,
|
||||
user=root,
|
||||
password=,
|
||||
|
|
6
pom.xml
6
pom.xml
|
@ -79,7 +79,7 @@
|
|||
<!-- common JDBC driver versions -->
|
||||
<derby.version>10.14.2.0</derby.version>
|
||||
<hsqldb.version>2.5.1</hsqldb.version>
|
||||
<mysql.connector.version>5.1.49</mysql.connector.version>
|
||||
<mysql.connector.version>8.0.29</mysql.connector.version>
|
||||
<mariadb.connector.version>2.7.2</mariadb.connector.version>
|
||||
<postgresql.connector.version>42.5.1</postgresql.connector.version>
|
||||
<mssql.connector.version>11.2.1.jre8</mssql.connector.version>
|
||||
|
@ -607,7 +607,7 @@
|
|||
</dependency>
|
||||
</dependencies>
|
||||
<properties>
|
||||
<connection.driver.name>com.mysql.jdbc.Driver</connection.driver.name>
|
||||
<connection.driver.name>com.mysql.cj.jdbc.Driver</connection.driver.name>
|
||||
<!--<connection.url>jdbc:mysql://localhost/OPENJPA</connection.url>-->
|
||||
<connection.url>${openjpa.mysql.url}</connection.url>
|
||||
<connection.username>${openjpa.mysql.username}</connection.username>
|
||||
|
@ -636,7 +636,7 @@
|
|||
</dependency>
|
||||
</dependencies>
|
||||
<properties>
|
||||
<connection.driver.name>com.mysql.jdbc.Driver</connection.driver.name>
|
||||
<connection.driver.name>com.mysql.cj.jdbc.Driver</connection.driver.name>
|
||||
|
||||
<!-- default settings for local docker -->
|
||||
<docker.external.mysql.port>3306</docker.external.mysql.port>
|
||||
|
|
Loading…
Reference in New Issue