• Post Reply Bookmark Topic Watch Topic
  • New Topic

instances getting duplicated on Tomcat4.1

 
Rajendar Goud
Ranch Hand
Posts: 220
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
i am not sure how much i can be able to explain it .
i am running a web application on tomcat4.1,it uses a connection pool from tomcat only. In this ,when ever iam running my application which is given a specific context, its picking up the values twice.even the log statements are getting printed twice,and when i log off and log in again ,the instances are getting multiplied. is it related to code leakage or am i missing something else also ?

could any one pls suggest some solution?

Thanks
Raj
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If autoDeploy is set to true (which is the default) and you explicitly set up a context in your server.xml file, you will end up with two running instances of your app.
 
Rajendar Goud
Ranch Hand
Posts: 220
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ben ,
And yes i see that the server.xml in tomcat has the autodeploy=true and i have the context set explicitly itself.
so how can i avoid these instances?
shall i turn the autodeploy off ?


Thanks
Raj
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, if you are explicitly declaring them, there is no need for autoDeploy.
The other option is to move your codebase out of the webapps directory so that it doesn't get auto-deployed. Just make sure you update your codeBase attribute in server.xml.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!