Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Resin Connection Pooling Problem

 
Ranch Hand
Posts: 287
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just finishing up & site that uses Resin as it's servlet engine & Im having problems getting the connection pooling to work. I also run resin on my local machine & had it set up & pooling away in just about no time.....I will admit I had some help from the fine, fine people at caucho but none the less it works fine. The problem is when I set up the resin.conf file on the server & attempt to get a connection from the "pool" I get a SQL Exception that says 'no such pool (poolname)'. The server is Unix & Im not sure if there are any other additions I need to make or not. Here is my pooling config on the local machine (works just fine):
<resource-ref>
<res-ref-name>jdbc/Connection_Pool</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<init-param driver-name="org.gjt.mm.mysql.Driver"/>
<init-param url="jdbc:mysql://localhost/[dbname]"/>
<init-param user="[username]"/>
<init-param password="[password]"/>
<init-param max-connections="20"/>
<init-param max-idle-time="30"/>
</resource-ref>
As i sais this works perfectly on my Win98 machine but when I move this particular xml paramter into my conf file on the server, change the db name, username & password I get this exception.......Does anyone know if there are any other parameters I need to add to the conf file to make this work in Unix? This is the last thing to do & this site is ready so Im really dying to get this out of the way (Been working on this monster for 6 weeks) Here is the complete .conf file from the server...minus the important stuff of course...
<caucho.com>
<java compiler='internal' work-dir='work'/>
<http-server>
<thread-max>200</thread-max>
<thread-keepalive>100</thread-keepalive>
<app-dir>public_html</app-dir>
<srun host='www.sitename.com' port='14259'/>
<host id='www.sitename.com'>
<error-log id='log/error.log'/>
<war-dir>webapps</war-dir>
<resource-ref>
<res-ref-name>jdbc/Connection_Pool</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<init-param driver-name="org.gjt.mm.mysql.Driver"/>
<init-param url="jdbc:mysql://localhost/[db_name]"/>
<init-param user="[db_username]"/>
<init-param password="[db_password]"/>
<init-param max-connections="50"/>
<init-param max-idle-time="30"/>
</resource-ref>
<web-app id='/'>
<classpath id='/home/[siteusername]/public_html/WEB-INF/classes' source='/home/[siteusername]/public_html/WEB-INF/classes'/>
<servlet-mapping url-pattern='*.jsp' servlet-name='jsp'/>
<servlet-mapping url-pattern='*.xtp' servlet-name='xtp'/>
<path-mapping url-pattern='/servlet/*' real-path='/home/[siteusername]/public_html/WEB-INF/classes'/>
<servlet-mapping url-pattern='/servlet/testServ' servlet-name='testServ'/>
<servlet-mapping url-pattern='/servlet/*' servlet-name='invoker'/>
</web-app>
</host>
</http-server>
</caucho.com>

Ive made 100% sure the username & passwords are correct..Everthing works just fine with single connection methods..its this pool thats killing me! If anyone can help here I would REALLY appreciate it!
BTW: folks the rumors are true.....it blows Tomcat right out of the water
 
I think I'll just lie down here for a second. And ponder this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic