-->
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.  [ 2 posts ] 
Author Message
 Post subject: JNDI connection pooling for a container or for each war file
PostPosted: Wed Mar 17, 2010 4:23 am 
Newbie

Joined: Fri Dec 04, 2009 5:10 am
Posts: 14
Hello All,

I am developing an application which consists of several different modules pointing to the same database. I have configured the datasource in a JNDI file. I have done connection pooling in it like below:



<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<local-tx-datasource>
<jndi-name>jdbc/public_PostgreSQL</jndi-name>
<connection-url>jdbc:postgresql://localhost/autohaul2</connection-url>
<driver-class>org.postgresql.Driver</driver-class>
<user-name>postgres</user-name>
<password>stafona</password>
<min-pool-size>5</min-pool-size>
<max-pool-size>20</max-pool-size>
<idle-timeout-minutes>5</idle-timeout-minutes>
</local-tx-datasource>
</datasources>


In hibernate.cfg.xml of each module I added this line

<property name="hibernate.connection.datasource">java:AutoHaul2Datasource</property>

Now my question is that whether this pool size will be for the whole container or each war file will read this file separately and have its own 20 pool size. For example, if I have the following modules:



Module A

Module B

Module C

Module D



and each module pointing to the same datasource in JNDI. So the whole system will have a max-pool-size=20 or 80?


Top
 Profile  
 
 Post subject: Re: JNDI connection pooling for a container or for each war file
PostPosted: Wed Mar 17, 2010 5:46 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
hello,
sorry this is the wrong forum, please post in https://forum.hibernate.org/viewforum.php?f=1

_________________
Sanne
http://in.relation.to/


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