-->
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.  [ 2 posts ] 
Author Message
 Post subject: question about configuration of hibernate
PostPosted: Wed Mar 27, 2013 12:54 am 
Newbie

Joined: Mon Mar 25, 2013 5:29 am
Posts: 1
I am currently having with my application program which is developed with JAVA language and hibernate.

First of all, please check configuration below that i set up !!

<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</prop>
<prop key="hibernate.hbm2ddl.auto">validate</prop>
<prop key="hibernate.show_sql">false</prop>
<prop key="hibernate.current_session_context_class">thread</prop>

<propkey="hibernate.connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</prop>
<prop key="hibernate.c3p0.idle_test_period">2800</prop>
<prop key="hibernate.connection.pool_size">15</prop>
<prop key="hibernate.c3p0.min_size">3</prop>
<prop key="hibernate.c3p0.max_size">15</prop>
<prop key="hibernate.c3p0.timeout">2800</prop>
<prop key="hibernate.c3p0.max_statements">100</prop>
<prop key="hibernate.jdbc.batch_size">50</prop>
<prop key="hibernate.cglib.use_reflection_optimizer">false</prop>
<prop key="hibernate.cache.use_structured_cache">true</prop>
<prop key="hibernate.cache.use_second_level_cache">true</prop>
<prop key="hibernate.cache.use_query_cache">true</prop>
<prop key="hibernate.cache.provider_configuration_file_resource_path">cache.xml</prop>
<prop key="hibernate.cache.provider_class">net.sf.ehcache.hibernate.EhCacheProvider</prop>
</props>
</property>

As you can see, I set up 15 for connection pool size so that my appication program can keep 15 DB session.

As I know my application program have to keep 15 DB session eventhough there is no transation.

But it seem not to keep 15 DB session, it keeps only 1 DB session.

when I check DB session using this query "select * from v$session where username = 'netstar'",
it seems that there is only one session for one process.

How can I do to make multi session for one process????

Please, Let me know how to do !!!


Top
 Profile  
 
 Post subject: Re: question about configuration of hibernate
PostPosted: Wed Mar 27, 2013 9:50 am 
Expert
Expert

Joined: Tue Jun 16, 2009 3:36 am
Posts: 990
I suggest you to log all jdbc-activities using a JDBCLogger like p6spy,
so you can check exactly how many connections are opened at startup of the c3p0 connection pool.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.