-->
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.  [ 1 post ] 
Author Message
 Post subject: <hibernatecfg> ANT task for C3P0?
PostPosted: Tue Aug 17, 2004 12:36 pm 
Newbie

Joined: Fri Jul 16, 2004 3:58 pm
Posts: 3
Just wondering if there is a way to make the <hibernatecfg> ant task create the config file with C3P0 statements, instead of the default hibernate connection pool?

Currently I have this ANT task:

Code:
<hibernatecfg
               poolSize="3"
               jdbcUrl="jdbc:oracle:thin:@oracle1:1521:oracle1"
             transactionManagerLookup="net.sf.hibernate.transaction.JRun4TransactionManagerLookup"
              driver="oracle.jdbc.driver.OracleDriver"
               userName="abc"
               password="xyz"
               dialect="net.sf.hibernate.dialect.Oracle9Dialect"
              showSql="true"

/>


Which creates the following hibernate.cfg.xml fragment:

Code:
   <property name="dialect">net.sf.hibernate.dialect.Oracle9Dialect</property>
      <property name="show_sql">true</property>
      <property name="use_outer_join">false</property>
      <property name="transaction.manager_lookup_class">net.sf.hibernate.transaction.JRun4TransactionManagerLookup</property>
         <property name="connection.username">abc</property>
         <property name="connection.password">xyz</property>
         <property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
         <property name="connection.url">jdbc:oracle:thin:@oracle1:1521:oracle1</property>
         <property name="connection.pool_size">3</property>


Now I want to change it so that it uses the C3P0 pooling. Is there a way to do this? Or do I have to edit my hibernate.cfg.xml file by hand?

M.


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

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.