Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

sample hibernate configataion files...

 
Sherry Dindigala
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hibernate.cfg.xml
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

<hibernate-configuration>
<session-factory>
<property name="show_sql">true</property>
<property name="hibernate.connection.driver_class">com.microsoft.sqlserver.jdbc.SQLServerDriver</property>

<property name="connection.url">jdbc:sqlserver://16.123.123.105:1433;SelectMethod=cursor;databaseName=XXXX</property>
<property name="connection.username">un</property>
<property name="connection.password">pw</property>


<property name="hibernate.connection.autocommit">false</property>
<property name="hibernate.dialect">org.hibernate.dialect.SQLServerDialect</property>
<property name="hibernate.default_schema">dbo</property>
<property name="cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
<property name="transaction.flush_before_completion">true</property>
<property name="transaction.factory_class">org.hibernate.transaction.JDBCTransactionFactory</property>



</session-factory>
</hibernate-configuration>

hibernate.reveng.xml
<?xml version='1.0' encoding='UTF-8'?>
****************************************************************
-->
<!DOCTYPE hibernate-reverse-engineering PUBLIC "-//Hibernate/Hibernate Reverse Engineering DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-reverse-engineering-3.0.dtd" >

<hibernate-reverse-engineering>

<type-mapping>
<!-- jdbc-type is name fom java.sql.Types -->
<sql-type jdbc-type="CHAR" hibernate-type="java.lang.String" />
<sql-type jdbc-type="VARCHAR" hibernate-type="java.lang.String" />
<sql-type jdbc-type="BIT" hibernate-type="java.lang.Boolean" />
<sql-type jdbc-type="TINYINT" hibernate-type="java.lang.Short" />
<sql-type jdbc-type="SMALLINT" hibernate-type="java.lang.Short" />
<sql-type jdbc-type="INTEGER" hibernate-type="java.lang.Integer" />
<sql-type jdbc-type="BIGINT" hibernate-type="java.lang.Long" />
<sql-type jdbc-type="DOUBLE" hibernate-type="java.lang.Double" />
<sql-type jdbc-type="FLOAT" hibernate-type="java.lang.Double" />
<sql-type jdbc-type="DECIMAL" hibernate-type="java.lang.Long" />
<sql-type jdbc-type="NUMERIC" hibernate-type="java.lang.Long" />
<sql-type jdbc-type="TIMESTAMP" hibernate-type="java.sql.Timestamp" />
<sql-type jdbc-type="TIME" hibernate-type="java.sql.Time" />
<sql-type jdbc-type="DATE" hibernate-type="java.util.Date" />

</type-mapping>

<table-filter match-name="USERS" match-schema="dbo" />

</hibernate-reverse-engineering>
 
Rob Spoor
Sheriff
Pie
Posts: 20753
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to ORM
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy Greenhorn.

These definitely look like Hibernate files. Are you having a problem with them?

-Cameron McKenzie
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic