-->
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.  [ 6 posts ] 
Author Message
 Post subject: How to enable connection pooling for Hibernate (SAR)
PostPosted: Wed Nov 26, 2003 8:12 am 
Pro
Pro

Joined: Wed Oct 08, 2003 10:31 am
Posts: 247
I've deployed Hibernate as a SAR in JBoss 3.2.1.
I'm using a Postgres database.
To enable connection pooling in my project I only need to define the "min-pool-size", "max-pool-size", etc. parameters in my "postgres-ds.xml" so that Hibernate can use pooling?
How do I know if Hibernate is using connection pooling after these changes?


Top
 Profile  
 
 Post subject: Re: How to enable connection pooling for Hibernate (SAR)
PostPosted: Wed Nov 26, 2003 8:46 am 
Pro
Pro

Joined: Wed Oct 08, 2003 10:31 am
Posts: 247
nerotnt wrote:
I've deployed Hibernate as a SAR in JBoss 3.2.1.
I'm using a Postgres database.
To enable connection pooling in my project I only need to define the "min-pool-size", "max-pool-size", etc. parameters in my "postgres-ds.xml" so that Hibernate can use pooling?
How do I know if Hibernate is using connection pooling after these changes?


Strange thing is with or without the pooling parameters in my "postgres-ds.xml" the console always shows me:

(...)
12:45:15,416 INFO [JBossManagedConnectionPool] Starting
12:45:15,416 INFO [JBossManagedConnectionPool] Started
(...)

How can I know if it's really reading my pooling parameters.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 26, 2003 10:05 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
JBoss has a nice management console which allow you to view the MBeans and other aspects via your web browser. Find the deployed postgess MBean and look at the parameters. You can possibly change the values if needed.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 26, 2003 11:06 am 
Pro
Pro

Joined: Wed Oct 08, 2003 10:31 am
Posts: 247
david wrote:
JBoss has a nice management console which allow you to view the MBeans and other aspects via your web browser. Find the deployed postgess MBean and look at the parameters. You can possibly change the values if needed.


Postgres MBean?
I've installed Hibernate as a SAR in JBoss. In the SAR I have a "postgres-ds.xml" where I put my pooling parameters. I've looked in "http://localhost:8080/web-console/" and in my Hibernate MBean I see no reference to the pooling parameters. Do I have to put a property in the "hibernate.cfg.xml" to activate pooling?
I'm a bit confused.

NOTE: I followed "http://hibernate.bluemars.net/66.html" to create my SAR.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 06, 2003 1:28 am 
Senior
Senior

Joined: Tue Nov 25, 2003 9:35 am
Posts: 194
Location: San Francisco
In the Hibernate SAR, you should have a jboss-service.xml that defines the MBean parameters. The attribute:

<attribute name="Datasource">java:/jdbc/DataSource</attribute>

should point to the data source that you defined in the postgres-ds.xml.


In the jboss web-console, you should see a bunch of references to the data source.


Sherman


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 06, 2003 9:26 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
The postgres_ds connection descriptor creates MBeans at deployement for the connection pool. Have a look at that MBean rather then the hibernate one.


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