facebook

connection pooling selection

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #237057 Reply

    pcleung
    Member

    I have added the Hibernate capability.

    When I click the hibernate.cfg.xml,
    the center panel “Hiberbate 3 configuration” displays two radio buttons: JDBC Driver and JNDI datasource. Hibernate implements its own connection pooling C3P0.

    What should I do if I want to have connection pooling?

    Is it by default, after adding Hibernate capability, the framework will
    have connection pooling? What steps I should do next?

    Thanks

    #237060 Reply

    Riyad Kalla
    Member

    I believe the connection pool is transparent, you should setup your properties to connect with a JDBC driver, and then you need to add configuration for your connection pool to the hibernate config fille as well as a cp30 properties file, please see this post to get an idea of how it works: http://forums.hibernate.org/viewtopic.php?t=939066&highlight=cp30&sid=da3561523be923059175771c0169880e

    #237072 Reply

    pcleung
    Member

    I have read the link.
    Do I have to remove the JNDI/DBCP entries in web.xml and server.xml
    so to let the hibernate all the things of connection pooling?

    #237083 Reply

    Riyad Kalla
    Member

    You don’t *have* to remove them, just don’t use them. Although if Tomcat automatically makes connectiosn to your DB, you might runout of available connections, so maybe commenting them out temporarily isn’t a bad idea.

    #237145 Reply

    pcleung
    Member

    thnx

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: connection pooling selection

You must be logged in to post in the forum log in