Monday, December 17, 2007

[completeJava] Hibernate is Very Slow

Hi Friens:

I am new to Hibernate .Now I am using Hibernate3.0 which performance
is very slow. Could you please suggest me with some setting so that
it performance can increase. Many thanks for your help.

Please see below my attached files....

hibernate.cfg.xml file


<?xml version='1.0' encoding='utf-8'?>

<!DOCTYPE hibernate-configuration PUBLIC

"-//Hibernate/Hibernate Configuration DTD//EN"

"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

<hibernate-configuration>

<session-factory>

<property
name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</proper
ty>

<property
name="hibernate.connection.url">jdbc:mysql://localhost:3306/inish</pro
perty>

<property name="hibernate.connection.username">root</property>

<property name="hibernate.connection.password">password</property>

<property name="hibernate.connection.pool_size">10</property>

<property name="hibernate.jdbc.batch_size">30</property>

<property name="c3p0.max_size">20</property>

<property name="c3p0.max_statements">50</property>

<property name="c3p0.acquire_increment">10</property>

<property name="show_sql">true</property>

<property name="dialect">org.hibernate.dialect.MySQLDialect</property>

<property name="hibernate.hbm2ddl.auto">create</property>

<!-- Mapping files -->

<mapping resource="message.hbm.xml"/>

</session-factory>

</hibernate-configuration>

Message.hbm.xml file

<?xml version="1.0"?>

<!DOCTYPE hibernate-mapping PUBLIC

"-//Hibernate/Hibernate Mapping DTD 3.0//EN"

"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping>

<class name="hibernateImpl.message.Message" table="MESSAGE">

<id name="id" column="ID" >

<generator class="increment"/>

</id>

<map name="MessageProperties" cascade="all" batch-size="100"
optimistic-lock="false">

<key column="MESSAGEID"/>

<index column="NAME" type="string"/>

<element column="VALUE" type="string"/>

</map>

<property name="conversationId">

<column name="CONVERSATIONID" />

</property>

<property name="deliveryMode">

<column name="DELIVERYMODE" not-null="true"/>

</property>

<property name="destination">

<column name="DESTINATION" />

</property>

<property name="expiration">

<column name="EXPIRATION" />

</property>

<property name="messageId">

<column name="MESSAGEID" />

</property>

<property name="messageType">

<column name="MESSAGETYPE" />

</property>

<property name="replyTo">

<column name="REPLYTO" />

</property>

<property name="timeToLive">

<column name="TIMETOLIVE" />

</property>

<property name="timestamp">

<column name="TIMESTAMP" />

</property>

<property name="priority">

<column name="PRIORITY" />

</property>

</class>

</hibernate-mapping>

Thanks,
Asutosh

__._,_.___
Recent Activity
Visit Your Group
Yahoo! Finance

It's Now Personal

Guides, news,

advice & more.

New web site?

Drive traffic now.

Get your business

on Yahoo! search.

Cat Zone

on Yahoo! Groups

Join a Group

all about cats.

.

__,_._,___

No comments: