Debugging H2 with TRACE_LEVEL_SYSTEM_OUT=3
authorGustavo Martin Morcuende <gu.martinm@gmail.com>
Thu, 29 Dec 2016 10:10:36 +0000 (11:10 +0100)
committerGustavo Martin Morcuende <gu.martinm@gmail.com>
Thu, 29 Dec 2016 10:10:36 +0000 (11:10 +0100)
SpringJava/JPA/spring-jpa-persistence/src/test/resources/datasource-test-configuration.xml [deleted file]
SpringJava/JPA/spring-jpa-persistence/src/test/resources/spring-configuration-test/datasource-test-configuration.xml

diff --git a/SpringJava/JPA/spring-jpa-persistence/src/test/resources/datasource-test-configuration.xml b/SpringJava/JPA/spring-jpa-persistence/src/test/resources/datasource-test-configuration.xml
deleted file mode 100644 (file)
index 68cd61f..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<beans xmlns="http://www.springframework.org/schema/beans"\r
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
-       xmlns:util="http://www.springframework.org/schema/util"\r
-       xmlns:tx="http://www.springframework.org/schema/tx"\r
-       xmlns:jee="http://www.springframework.org/schema/jee"\r
-       xsi:schemaLocation="http://www.springframework.org/schema/beans\r
-        http://www.springframework.org/schema/beans/spring-beans.xsd\r
-        http://www.springframework.org/schema/util\r
-        http://www.springframework.org/schema/util/spring-util.xsd\r
-        http://www.springframework.org/schema/tx \r
-        http://www.springframework.org/schema/tx/spring-tx.xsd\r
-        http://www.springframework.org/schema/jee\r
-        http://www.springframework.org/schema/jee/spring-jee.xsd">\r
-\r
-       \r
-       <!-- \r
-               In this way we can not use all the available options for H2.\r
-               \r
-               Because of that I will be using the dataSource bean where I can choose as many options\r
-               as I want for H2.\r
-    <jdbc:embedded-database id="dataSource" type="H2" />\r
-       -->\r
-       \r
-       <!-- \r
-               1. There are two beans with the same id "dataSource"\r
-                  One declared in datasource-configuration.xml\r
-                  Another one declared in datasource-test-configuration.xml\r
-               2. Both beans are declared in different XML files.\r
-               3. Because there are in different XML files Spring does not complain about having duplicate beans.\r
-               4. Because files in src/test will be loaded in class path after files in src/main this bean will\r
-                  override the one declared in datasource-configuration.xml when running JUnit Tests :)\r
-        -->\r
-       <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">\r
-               <property name="driverClassName" value="org.h2.Driver" />\r
-               <property name="url" value="jdbc:h2:mem:mybatis_example;INIT=create schema if not exists mybatis_example\;SET SCHEMA mybatis_example;MODE=DB2;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE" />\r
-               <property name="username" value="mybatis" />\r
-               <property name="password" value="" />\r
-       </bean>\r
-       \r
-</beans>\r
index 68cd61f..d57992a 100644 (file)
         -->\r
        <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">\r
                <property name="driverClassName" value="org.h2.Driver" />\r
+\r
+        <!-- For debugging H2 use TRACE_LEVEL_SYSTEM_OUT=3 option :)\r
+        <property name="url" value="jdbc:h2:mem:mybatis_example;INIT=create schema if not exists mybatis_example\;SET SCHEMA mybatis_example;TRACE_LEVEL_SYSTEM_OUT=3;MODE=MySQL;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE" />\r
+        -->\r
                <property name="url" value="jdbc:h2:mem:mybatis_example;INIT=create schema if not exists mybatis_example\;SET SCHEMA mybatis_example;MODE=DB2;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE" />\r
                <property name="username" value="mybatis" />\r
                <property name="password" value="" />\r