• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

The answer will contain the word "classloader"

 
William Barnes
Ranch Hand
Posts: 986
Eclipse IDE Firefox Browser Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Follow on to this post
I hava two Tomcat jars which support connection pooling. Which one am I using? I don't think there is any difference in the application code, which is making the db calls. I suppose I could swap the files out, only have one in the directory at a time. But I am assuming there is a smarter way of figuring this out. And it will include the word "classloader".
 
William Barnes
Ranch Hand
Posts: 986
Eclipse IDE Firefox Browser Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So I took the brute force method and swapped these jar files out of $CATALINA_HOME/lib The result was that tomcat-dbcp.jar is not used, because I was able to recreate the issue when it the jar was not available. This is good to know, but doesn't help me, as the suggestions on the internet to address the "max open cursors exceeded" issue was to use tomcat-jdbc.jar for the connection pooling. But I am already doing that.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17639
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Huh?

Connection Pools are plug-in components. You can have as many different connection pool implementations as you like - even concurrently, since the choice of which pool implementation you use is made by supplying its primary classname in the pool resource definition in the Tomcat server or Context.

And, yes, no changes should be required to applications unless they are explicitly using pool-specific features, since the actual application interface is the DataSource returned from Tomcat by JNDI.
 
William Barnes
Ranch Hand
Posts: 986
Eclipse IDE Firefox Browser Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Holloway wrote:the choice of which pool implementation you use is made by supplying its primary classname in the pool resource definition in the Tomcat server or Context.


This I am not seeing. I don't see this defined any where. Which leads to my general confusion on the topic. Do you have an example of what this would look like in the configs?

Thanks.
 
William Barnes
Ranch Hand
Posts: 986
Eclipse IDE Firefox Browser Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Reviewing this page again, I noticed that my server.xml didn't have this line.



Added that, and still have the exact same issue. That jar was already getting used before adding that line to server.xml. I proved that when I removed tomcat-jdbc.jar and got this error



So what is my question?
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17639
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You never actually named the jdbc pool jars in question unless my bleary eyes deceive me. Nor indicated where they came from. I take it as a given that one of them shipped with Tomcat, but what about the other?

Although you can specify which pooler you want to use in the server config, if you have a classpath conflict, it's still a classpath conflict.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic