-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Slow Performance when used with hibernate
PostPosted: Wed Aug 29, 2007 4:46 am 
Newbie

Joined: Wed Aug 29, 2007 4:01 am
Posts: 2
HI,
I am facing a problem of slow performance when I am using hibernate with c3p0 connection pooling.

Hibernate Version : 3
MySQL Version : 5.0.27
C3p0 Version : 0.9.0
ehcache Version :1.2.3

Hibernate Config files:
Code:
<hibernate-configuration>
    <session-factory>
           <property name="hibernate.c3p0.min_size">5</property>
        <property name="hibernate.c3p0.max_size">20</property>
        <property name="hibernate.c3p0.timeout">300</property>
        <property name="hibernate.c3p0.max_statements">0</property>
        <property name="hibernate.c3p0.acquire_increment">2</property>
        <property name="hibernate.c3p0.validate">false</property>
        <property name="show_sql">false</property>
        <property name="format_sql">false</property>
        <property name="use_sql_comments">false</property>
        <property name="connection.pool_size">1</property>
        <property name="dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
         <mapping resource="CommonSessionData.hbm.xml"/>
<propertyname="hibernate.cache.provider_class">org.hibernate.cache.EhCacheProvider</property>
<mapping resource="CommonSessionData.hbm.xml"/>
</session-factory>
</hibernate-configuration>

// Mapping for CommonSessionData

<hibernate-mapping>
<class
        name="com.ortiva.eventlistener.mappings.CommonSessionData"
        table="Sessions">
     <cache usage="read-write"/>
   <!--Other parameters have been mapped to table column-->
</class>
</hibernate-mapping>

//Config param for EHCACHE

<ehcache>
    <diskStore path="java.io.tmpdir"/>
    <defaultCache
        maxElementsInMemory="10000"
        eternal="false"
        timeToIdleSeconds="120"
        timeToLiveSeconds="120"
        overflowToDisk="true"
        diskPersistent="false"
        diskExpiryThreadIntervalSeconds="120"
        memoryStoreEvictionPolicy="LRU"
        />
    <cache name="com.ortiva.eventlistener.mappings.CommonSessionData"
        maxElementsInMemory="1000"
        eternal="true"
        overflowToDisk="false"
        />
    <cache name="com.ortiva.eventlistener.mappings.GatewayEventData"
        maxElementsInMemory="2000"
        eternal="true"
        overflowToDisk="false"
        />
</ehcache>

We have a java code that opens a Session from SessionFactory and Searches database if CommonSessionData object exists by comparing a varchar field which is primary field.  If it finds then updates with some values otherwise inserts that record into database.
Now I am facing problem when I am running the code with many files from where we are creating CommonSessionData objects.Input files starts queuing in the input directory.So please help me . [b]Its an urgent as it is a part of the project that I am currently doing.[/b]


Thanks & regards
Manisha Nandi


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 29, 2007 11:02 am 
Beginner
Beginner

Joined: Fri May 18, 2007 10:28 am
Posts: 48
Location: Madison, WI
Can you increase the [quote]<property name="hibernate.c3p0.max_statements">0</property> [/quote] to 50

_________________
Please rate if it helped


Top
 Profile  
 
 Post subject: Slow Performance when used with hibernate
PostPosted: Thu Aug 30, 2007 2:55 am 
Newbie

Joined: Wed Aug 29, 2007 4:01 am
Posts: 2
Hi,
Actually I have tried with this. That is <property name="hibernate.c3p0.max_statements">50</property>. But It did not help me.That is my application is running very slow.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.