Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7648909
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T10:50:02+00:00 2026-05-31T10:50:02+00:00

We are developing a Java SE application and I am using Hibernate to communicate

  • 0

We are developing a Java SE application and I am using Hibernate to communicate with the Database. My database is Oracle 11g Express Edition. Up till now I have not used a connection pool in the application. But I have used c3p0 connection pool before but I never really had a good understanding of it.

What are the Pros and Cons of using c3p0 in a Java SE application? I can understand it’s usefulness when it comes to a Java EE application but Java SE?

Here is my Configuration for Hibernate.

<?xml version="1.0" encoding="utf-8"?>
<!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="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
  <property name="hibernate.connection.url">jdbc:oracle:thin:@localhost:1521:XE</property>
  <property name="hibernate.connection.username">EP</property>
  <property name="hibernate.connection.password">123</property>
  <property name="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</property>
  <property name="hibernate.default_schema">EP</property>
  <property name="show_sql">true</property>

  <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">50</property>
  <property name="hibernate.c3p0.idle_test_period">3000</property>

  <mapping class="app.model.User"></mapping>
</session-factory>
</hibernate-configuration>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T10:50:03+00:00Added an answer on May 31, 2026 at 10:50 am

    I can understand it’s usefulness when it comes to a Java EE application but Java SE?

    The reason for using a connection pool in Java SE is fundamentally the same as in the Java EE case. Openning and closing JDBC connections is relatively expensive, and connection pools allow you to reuse connections that the application openned previously.

    (Obviously, if the Java SE application only ever needs to use one (or a small number) of JDBC connections, there is no pay-off in using a connection pool. But the same would apply to a Java EE application with the same characteristics.)


    Yeah but is it necessary for Java SE applications to have multiple connections at a time?

    1) That entirely depends on the application, and what it does.

    2) A connection pool is also useful for an application that requires multiple connections serially … but only ever one connection at a time. Like for example if the connections are being created and closed in a 3rd-party library.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing an application using oracle 11g, Java(struts2) and Hibernate. I have table
I have been developing a Java application using J2EE and a Derby database. My
I am developing a java web application using hibernate as ORM. Is it possible
I am developing a Java Web Application using JSF, Spring and Hibernate. I need
I am developing a Java Application (not a web app, no server etc) using
I'm developing an application using java but I'm not going to release the code.
I have been using Hibernate + HSQLDB on my desktop for developing a database
We are developing a Java EE application using Hibernate as a JPA provider. We
I'm developing a console Java application(Not swing) using java.awt.Desktop class, which will launch the
I am using netbeans for developing java dextop application,I have created a JFilechooser which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.