Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: DataSource suggestion

  1. #11

    Default

    Hi Michael,

    You are 100% correct. I didn't getting a c3p0 datasource.
    so I have removed the hibernate.c3p0.* property from the Hibernate Property files and moved to the DataSource . Now as per my configuration only 7 connections are opened(2 (Min_Size) + 5 (Max_size) = (Total) 7 ).

    One more question michael.

    I have started my batch with 10 Threads. my batch hangs there. Records are not processing.

    10 Threads should share the 7 connections from the pool right? If the answer is yes, why the batch get hangs here?

    <code>

    <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"
    destroy-method="close">
    <property name="driverClass" value="com.microsoft.sqlserver.jdbc.SQLServerDrive r" />
    <property name="jdbcUrl" value="url" />
    <property name="user" value="User" />
    <property name="password" value="password" />
    <property name="acquireIncrement" value="1" />
    <property name="minPoolSize" value="2" />
    <property name="maxPoolSize" value="5" />
    </bean>

    </code>
    Thanks & Regards,
    Arun Duraisamy

  2. #12
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,632

    Default

    Please use [ code][/code ] tags when posting..

    7 connections, 10 threads that isn't enough... The 8th thread is blocking and waiting for a connection to be available.


    so I have removed the hibernate.c3p0.* property from the Hibernate Property files and moved to the DataSource . Now as per my configuration only 7 connections are opened(2 (Min_Size) + 5 (Max_size) = (Total) 7 ).
    Which is strange because only the max number should be opened and 2 at startup... So where those 6th and 7th connection come from is a bit of a riddle.
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  3. #13

    Default

    Thanks for your reply Marten.

    I am running 3 JVM in 3 different machine(10 threads are running for each JVM).

    In this case Can you suggest What should be the MinPoolSize and MaxPoolSize ?
    Thanks & Regards,
    Arun Duraisamy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •