You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by jl...@apache.org on 2020/11/25 18:54:53 UTC

[tomee-tck] 02/02: Attempt to fix JPA 2 issues with datetime not finding datasource

This is an automated email from the ASF dual-hosted git repository.

jlmonteiro pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomee-tck.git

commit 02cf551f354b54b59d9ff5a2311e294ffbac5022
Author: Jean-Louis Monteiro <jl...@tomitribe.com>
AuthorDate: Wed Nov 25 19:04:20 2020 +0100

    Attempt to fix JPA 2 issues with datetime not finding datasource
---
 src/test/script/openejb/tck/commands/SetupCommand.groovy |  4 ++--
 src/test/tomee-plume/conf/system.properties              |  9 +++++++++
 src/test/tomee-plume/conf/tomee.xml                      | 15 +++++++++++++++
 3 files changed, 26 insertions(+), 2 deletions(-)

diff --git a/src/test/script/openejb/tck/commands/SetupCommand.groovy b/src/test/script/openejb/tck/commands/SetupCommand.groovy
index 57aee3a..2e5eb08 100644
--- a/src/test/script/openejb/tck/commands/SetupCommand.groovy
+++ b/src/test/script/openejb/tck/commands/SetupCommand.groovy
@@ -19,8 +19,8 @@
 
 package openejb.tck.commands
 
+import org.apache.commons.collections4.properties.SortedProperties
 import org.apache.commons.lang.SystemUtils
-import java.sql.DriverManager
 
 /**
  * Setup the environment for running the TCK.
@@ -179,7 +179,7 @@ class SetupCommand
     def loadProps(file) {
         file = new File("$file")
 
-        def props = new Properties()
+        def props = new SortedProperties()
         def input = file.newInputStream()
         try {
             props.load(input)
diff --git a/src/test/tomee-plume/conf/system.properties b/src/test/tomee-plume/conf/system.properties
index 3222fc8..a2aadd8 100644
--- a/src/test/tomee-plume/conf/system.properties
+++ b/src/test/tomee-plume/conf/system.properties
@@ -72,6 +72,15 @@ openejb.crosscontext=true
 #openejb.web.xml.major=3
 jsp_config_general_web.openejb.web.xml.major=2
 
+javax.persistence.provider=org.eclipse.persistence.jpa.PersistenceProvider
+# javax.persistence.transactionType=
+javax.persistence.jtaDataSource=java:openejb/Resource/jdbc/DB1
+javax.persistence.nonJtaDataSource=java:openejb/Resource/jdbc/DB1Unmanaged
+# openejb.jpa.force.javax.persistence.provider=
+
+# not sure if it should go to testsuite.properties
+jpa.provider.implementation.specific.properties=eclipselink.logging.level\=OFF
+
 PERSISTENCEUNIT.CTS-EM.openjpa.Specification=JPA 2.0
 PERSISTENCEUNIT.CTS-EM.openjpa.jdbc.SchemaFactory=native(ForeignKeys=true)
 PERSISTENCEUNIT.CTS-EM.openjpa.jdbc.SynchronizeMappings=buildSchema(IgnoreErrors=true)
diff --git a/src/test/tomee-plume/conf/tomee.xml b/src/test/tomee-plume/conf/tomee.xml
index 55228a5..d1e87f1 100644
--- a/src/test/tomee-plume/conf/tomee.xml
+++ b/src/test/tomee-plume/conf/tomee.xml
@@ -72,6 +72,21 @@
     JtaManaged false
   </Resource>
 
+  <Resource id="jdbc/DB" type="DataSource">
+    JdbcDriver org.apache.derby.jdbc.ClientDriver
+    JdbcUrl jdbc:derby://localhost:%derby.server.port%/derbydb;create=true
+    UserName cts
+    Password cts
+  </Resource>
+
+  <Resource id="jdbc/DB_no_tx" type="DataSource">
+    JdbcDriver org.apache.derby.jdbc.ClientDriver
+    JdbcUrl jdbc:derby://localhost:%derby.server.port%/derbydb;create=true
+    UserName cts
+    Password cts
+    JtaManaged false
+  </Resource>
+
 
   <!--<Resource id="JmsResourceAdapter" type="ActiveMQResourceAdapter">-->
   <!--# Broker configuration-->