Created
September 12, 2013 18:33
-
-
Save saulovenancio/6541933 to your computer and use it in GitHub Desktop.
hibernate mysql and jpa and c3po persistence.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <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_1_0.xsd" | |
| version="1.0"> | |
| <persistence-unit name="<PERSISTENCE UNIT NAME>"> | |
| <properties> | |
| <!-- | |
| <property name="hibernate.ejb.cfgfile" value="/hibernate.cfg.xml"/> | |
| <property name="hibernate.hbm2ddl.auto" value="create"/> | |
| --> | |
| <property name="hibernate.archive.autodetection" value="class, hbm"/> | |
| <property name="hibernate.show_sql" value="true"/> | |
| <property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver"/> | |
| <property name="hibernate.connection.password" value="<PASSWORD>"/> | |
| <property name="hibernate.connection.url" value="jdbc:mysql://<HOST IP ADDRESS>/<DB NAME>"/> | |
| <property name="hibernate.connection.username" value="<USERNAME>"/> | |
| <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/> | |
| <property name="hibernate.c3p0.min_size" value="5"/> | |
| <property name="hibernate.c3p0.max_size" value="20"/> | |
| <property name="hibernate.c3p0.timeout" value="300"/> | |
| <property name="hibernate.c3p0.max_statements" value="50"/> | |
| <property name="hibernate.c3p0.idle_test_period" value="3000"/> | |
| </properties> | |
| </persistence-unit> | |
| </persistence> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment