ChatServer/main/resources/META-INF/persistence.xml

29 lines
1.7 KiB
XML
Raw Normal View History

2016-07-28 09:23:17 +00:00
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
version="2.0">
<persistence-unit name="ChatServerPU">
<properties>
<property name="javax.persistence.jdbc.driver" value="org.apache.derby.jdbc.EmbeddedDriver" />
<property name="javax.persistence.jdbc.url" value="jdbc:derby:memory:chatserver;create=true" />
<property name="hibernate.hbm2ddl.auto" value="update" />
<!-- c3p0 config http://www.hibernate.org/214.html -->
<!-- <property name="connection.provider_class" value="org.hibernate.connection.C3P0ConnectionProvider"
/> <property name="hibernate.c3p0.acquire_increment" value="1" /> <property
name="hibernate.c3p0.idle_test_period" value="60" /> <property name="hibernate.c3p0.min_size"
value="1" /> <property name="hibernate.c3p0.max_size" value="2" /> <property
name="hibernate.c3p0.max_statements" value="50" /> <property name="hibernate.c3p0.timeout"
value="0" /> <property name="hibernate.c3p0.acquireRetryAttempts" value="1"
/> <property name="hibernate.c3p0.acquireRetryDelay" value="250" /> -->
<property name="hibernate.show_sql" value="true" />
<property name="hibernate.use_sql_comments" value="true" />
<property name="hibernate.transaction.factory_class"
value="org.hibernate.transaction.JDBCTransactionFactory" />
<property name="hibernate.current_session_context_class"
value="thread" />
2016-07-28 09:54:44 +00:00
<property name="hibernate.enable_lazy_load_no_trans"
value="true" />
2016-07-28 09:23:17 +00:00
</properties>
</persistence-unit>
2016-07-18 12:36:33 +00:00
</persistence>