Skip to content
Snippets Groups Projects
Commit 908b0af1 authored by Goik Martin's avatar Goik Martin
Browse files

log JDBC communication

parent 5f761fa3
No related branches found
No related tags found
No related merge requests found
......@@ -12,7 +12,7 @@
The <code>persistence.xml</code> file configures at least one persistence unit;
each unit must have a unique name.
-->
<persistence-unit name="strategy_drop-and-create">
<persistence-unit name = "strategy_drop-and-create">
<!--
Hibernate will scan your classpath for mapped classes and add them automatically
......@@ -36,10 +36,10 @@
<!--
JDBC database connection parameter
-->
<property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver"/>
<property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/hdm?useSSL=false"/>
<property name="javax.persistence.jdbc.user" value="hdmuser"/>
<property name="javax.persistence.jdbc.password" value="XYZ"/>
<property name = "javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver"/>
<property name = "javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/hdm?useSSL=false"/>
<property name = "javax.persistence.jdbc.user" value="hdmuser"/>
<property name = "javax.persistence.jdbc.password" value="XYZ"/>
<!--
The JPA engine should drop and re-create the SQL schema in the database
......@@ -47,22 +47,23 @@
you want to work with a clean database for every test run.
-->
<property
name="javax.persistence.schema-generation.database.action"
name = "javax.persistence.schema-generation.database.action"
value="drop-and-create"/>
<!--
When printing SQL in logs, let Hibernate format the SQL nicely and generate
comments into the SQL string so we know why Hibernate executed the SQL statement.
-->
<property name="hibernate.format_sql" value="true"/>
<property name="hibernate.use_sql_comments" value="true"/>
<property name = "hibernate.show_sql" value = "true" />
<property name = "hibernate.format_sql" value="true"/>
<property name = "hibernate.use_sql_comments" value="true"/>
<!-- Choose Mysql's innodb backend -->
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5InnoDBDialect" />
<property name = "hibernate.dialect" value="org.hibernate.dialect.MySQL5InnoDBDialect" />
<!-- Enable Hibernate scanning for entity classes and adding them automatically
but not for hbm.xml files. -->
<property name="hibernate.archive.autodetection" value="class"/>
<property name = "hibernate.archive.autodetection" value="class"/>
</properties>
</persistence-unit>
......@@ -70,26 +71,27 @@
<!-- The subsequent persistence unit won't modify the database's schema
javax.persistence.schema-generation.database.action=none
-->
<persistence-unit name="strategy_none">
<persistence-unit name = "strategy_none">
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver"/>
<property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/hdm?useSSL=false"/>
<property name="javax.persistence.jdbc.user" value="hdmuser"/>
<property name="javax.persistence.jdbc.password" value="XYZ"/>
<property name = "javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver"/>
<property name = "javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/hdm?useSSL=false"/>
<property name = "javax.persistence.jdbc.user" value="hdmuser"/>
<property name = "javax.persistence.jdbc.password" value="XYZ"/>
<property
name="javax.persistence.schema-generation.database.action"
name = "javax.persistence.schema-generation.database.action"
value="none"/>
<property name="hibernate.format_sql" value="true"/>
<property name="hibernate.use_sql_comments" value="true"/>
<property name = "hibernate.show_sql" value = "true" />
<property name = "hibernate.format_sql" value="true"/>
<property name = "hibernate.use_sql_comments" value="true"/>
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5InnoDBDialect" />
<property name = "hibernate.dialect" value="org.hibernate.dialect.MySQL5InnoDBDialect" />
<property name="hibernate.archive.autodetection" value="class"/>
<property name = "hibernate.archive.autodetection" value="class"/>
</properties>
</persistence-unit>
......
......@@ -9,9 +9,8 @@
</Console>
</Appenders>
<Loggers>
<!-- You my want to define class or package level per-logger rules -->
<Logger name="de.hdm_stuttgart.mi.sda2.q.App" level="debug">
<!-- You may want to enable more detailed hibernate logging -->
<Logger name="org.hibernate" level="info">
<AppenderRef ref="A1"/>
</Logger>
<Root level="info">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment