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.  [ 13 posts ] 
Author Message
 Post subject: How to configure Proxool and Hibernate
PostPosted: Mon Aug 09, 2004 3:42 pm 
Newbie

Joined: Tue Nov 18, 2003 11:56 am
Posts: 16
I understand that there was a change in Hibernate 2.1.4 so that Proxool must be configured by itself (proxool properties in hibernate.properties or hibernate.cfg.xml is no longer supported).

But how do I setup the connection between hibernate.cfg.xml and proxool.properties? It would be great with a Wiki page on this...

Hibernate version: 2.1.6

Thanks
Per Thomas


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 10, 2004 6:41 am 
Proxool Developer
Proxool Developer

Joined: Tue Aug 26, 2003 10:42 am
Posts: 373
Location: Belgium
As you mentionned, since Hibernate 2.1.4, the Proxool configuration has changed... It is now a bit less convenient to use and configure Proxool with Hibernate but still possible. We, at the proxool dev team are aware of this situation and are working hard to provide better integration with Hibernate.

In the meantime, here is how you can get it working:

- in the hibernate.properties:

Code:
# the pool alias used to identify the pool
# note: hibernate will prefix this alias with 'hibernate-' - so your actual pool name becomes 'hibernate-myalias'
#
hibernate.proxool.pool_alias myalias

# Only need one of the following:
#
# -if the pool is configured from outside of hibernate
#hibernate.proxool.existing_pool true

# - if hibernate must configure the pool from an XML configuration file
#hibernate.proxool.xml proxool.xml

# - if hibernate must configure the pool from a properties file
#hibernate.proxool.properties proxool.properties


The XML or properties file containing the proxool configuration can be specified using a standard URL. If an invalid url is used (say the protocol part is missing) then the file will be looked-up as a resource on the classpath. The later is probably the most convenient...

For more information about what should be in the proxool configuration, please refer to http://proxool.sourceforge.net/configure.html

Below is a minimal proxool.properties for an Oracle database:

Code:
# the pool alias (name comes from the hibernate.properties)
# (don't forget Hibernate adds the 'hibernate-' prefix to your pool alias)
#
jdbc-0.proxool.alias=hibernate-myname

jdbc-0.proxool.driver-class    oracle.jdbc.driver.OracleDriver
jdbc-0.proxool.driver-url      jdbc:oracle:thin:@<host>:1521:<sid>
jdbc-0.user                    <login>
jdbc-0.password                <password>

jdbc-0.proxool.house-keeping-sleep-time   30000
jdbc-0.proxool.house-keeping-test-sql     select 1 from dual
jdbc-0.proxool.test-before-use            true
jdbc-0.proxool.test-after-user            false


Hope this helps.
A wiki page on how to configure Proxool with Hibernate will be soon available ;)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 10, 2004 6:50 am 
Newbie

Joined: Tue Nov 18, 2003 11:56 am
Posts: 16
Great, thanks!

--
Per Thomas


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 11, 2004 11:41 am 
Proxool Developer
Proxool Developer

Joined: Tue Aug 26, 2003 10:42 am
Posts: 373
Location: Belgium
Hmm... not sure I was 100% correct - depending on the Hibernate/Proxool versions you may have to add or remove the 'hibernate-' prefix from your pool alias in the proxool.properties file.

Sorry for the mistake.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 11, 2004 1:34 pm 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
hi brenuart,
what's up?

there is a wiki here http://www.hibernate.org/214.html
can you had your info about proxool there? with proxool and c3p0, users will have all they need about connection pooling

_________________
Anthony,
Get value thanks to your skills: http://www.redhat.com/certification


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 17, 2004 5:54 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Added this to the Wiki: http://www.hibernate.org/222.html

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 17, 2004 6:13 am 
Proxool Developer
Proxool Developer

Joined: Tue Aug 26, 2003 10:42 am
Posts: 373
Location: Belgium
christian wrote:
Added this to the Wiki: http://www.hibernate.org/222.html


Thanks Christian - I will update and maintain this page once I have a bit more time (my second child is expected for the end of this month... am a bit in a hurry for the moment ;).


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 17, 2004 6:14 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Congratulations :)

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 17, 2004 6:15 am 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
Congratulation brenuart!

_________________
Anthony,
Get value thanks to your skills: http://www.redhat.com/certification


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 17, 2004 6:30 am 
Proxool Developer
Proxool Developer

Joined: Tue Aug 26, 2003 10:42 am
Posts: 373
Location: Belgium
anthony wrote:
Congratulation brenuart!


Thanks...

BTW: my firstname is Bertrand - is it possible to change the way my name appears on the forum while keeping the same login ?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 17, 2004 6:57 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
congrats man


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 14, 2006 8:07 pm 
Newbie

Joined: Mon Mar 06, 2006 3:17 pm
Posts: 5
Has this configuration changed either with the release of hibernate 3.1 or the release of proxool 0.9? Is there anyway of configuring proxool using the hibernate properties?

I didn't see anything in the change log, but I'm hoping (perhaps foolishly) it was overlooked.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 06, 2006 8:34 am 
Newbie

Joined: Mon Jun 06, 2005 8:28 am
Posts: 5
Location: Germany
Quote:
Hmm... not sure I was 100% correct - depending on the Hibernate/Proxool versions you may have to add or remove the 'hibernate-' prefix from your pool alias in the proxool.properties file.

Sorry for the mistake.


At least, with Hibernate 3.1.3/Proxool 0.8.3, no 'hibernate-' prefix is required.

Here's my hibernate.cfg.xml:
Code:
    <!-- Use the proxool connection pool. -->
    <property name="proxool.pool_alias">hlss-trm</property>
    <property name="proxool.properties">proxool.properties</property>
...


and my proxool.properties:
Code:
jdbc-0.proxool.alias=hlss-trm
...

_________________
Cd wrttn wtht vwls s mch trsr.


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