Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Connection Pool that is local to my application

 
Timothy Sam
Ranch Hand
Posts: 751
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possibel to configure a connection pool in the xml file under $CATALINA_HOME/conf/Cataline/localhost?

I noticed that in the Tomcat docs the context was in Server.xml which I don't really like...
 
Masoud Kalali
Author
Ranch Hand
Posts: 531
Java Mac OS X Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can put the connection pool declaration in a context.xml file and put this file inside your_application/META-INF folder .
you should know that meta-inf folder is a sibiling of web-inf folder.

hth
 
Timothy Sam
Ranch Hand
Posts: 751
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for your reply. That was very enlightening.
 
Timothy Sam
Ranch Hand
Posts: 751
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmmm... What if I don't have a context.xml file because I deployed a webapp from a war file?
 
Masoud Kalali
Author
Ranch Hand
Posts: 531
Java Mac OS X Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
before you create the war file you can create that meta-inf folder and add context.xml to it.
even you can extract the war file create that folder and xml file and rearchive the war file.

if you the the later make sure that content of archive file should be your web application content not the folder that contains your web application.
 
Timothy Sam
Ranch Hand
Posts: 751
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi again, sorry if I'm getting this slow. Does context.xml need be the same name as my application like what you do with $CATALINA_HOME/conf/engine/host? Also, would all the attributes on the context tag still be mandator?

<Context path="/DBTest" docBase="DBTest"
debug="5" reloadable="true" crossContext="true">

</Context>

I was wondering if it would be possible to just put

<Context>
</Context>

since this is inside my app's META-INF folder...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic