RE: Modify content in META-INF/context.xml
-Original Message- From: Jose María Zaragoza [mailto:demablo...@gmail.com] Sent: Tuesday, December 17, 2013 4:33 AM To: Tomcat Users List Subject: Modify content in META-INF/context.xml Hello: I'm using Apache Tomcat 6.0.24 and I've deployed a web application that defines its resources into META-INF/context.xml , especially information about connection pool Sometimes I''ve to edit that file to change some data , i.e, database's JDBC url I've seen that restart web application is not enough to apply these changes , so I need to redeploy the web application ( I mean, unpack WAR file, modify it , repack it again, copy to deploy folder ...) My question: Do you know other way to modify META-INF/context.xml and apply the changes and don't have to redeploy the WAR file ? Restart the web application is not a problem, but restart Tomcat is Any ideas ? Thanks and regards I think that at 6.x you need to do one of the following to the context.xml file located in the configBase ($CATALINA_BASE/conf/[enginename]/[hostname]/): 1. make the changes to the file there and reload the webapp 2. make the changes in the META_INF file and copy it to the configBase, then reload the webapp 3. delete the file from the configBase, then redeploy the webapp. With 7.x (at least the latest version) you get the copyXML paramter in the Host element which will give you more control over the process. Jeff - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Modify content in META-INF/context.xml
2013/12/18 Jeffrey Janner jeffrey.jan...@polydyne.com: I think that at 6.x you need to do one of the following to the context.xml file located in the configBase ($CATALINA_BASE/conf/[enginename]/[hostname]/): 1. make the changes to the file there and reload the webapp 2. make the changes in the META_INF file and copy it to the configBase, then reload the webapp 3. delete the file from the configBase, then redeploy the webapp. With 7.x (at least the latest version) you get the copyXML paramter in the Host element which will give you more control over the process. Jeff Hello Jeffrey: Thanks a lot. You're right in all the points I was testing all this options yesterday and I would like feedbak the results to the list , but you did it before than me Finally, my choice is the 3º option - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Modify content in META-INF/context.xml
Jose María Zaragoza wrote: Hello: I'm using Apache Tomcat 6.0.24 and I've deployed a web application that defines its resources into META-INF/context.xml , especially information about connection pool Sometimes I''ve to edit that file to change some data , i.e, database's JDBC url I've seen that restart web application is not enough to apply these changes , so I need to redeploy the web application ( I mean, unpack WAR file, modify it , repack it again, copy to deploy folder ...) My question: Do you know other way to modify META-INF/context.xml and apply the changes and don't have to redeploy the WAR file ? Restart the web application is not a problem, but restart Tomcat is Any ideas ? Hi. Without having any idea really of the precise mechanism behind database connections, I can still imagine that with the possibility of pooled connections to said database(s), it may be difficult to detect such a change in the corresponding context.xml and apply them on the fly. Even more so if such connections could be shared between different applications. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Modify content in META-INF/context.xml
2013/12/17 André Warnier a...@ice-sa.com: Hi. Without having any idea really of the precise mechanism behind database connections, I can still imagine that with the possibility of pooled connections to said database(s), it may be difficult to detect such a change in the corresponding context.xml and apply them on the fly. Even more so if such connections could be shared between different applications. Thanks, but I didn't said that I neeed to apply changes on the fly. Indeed, I said Restart the web application is not a problem I only wan't to have to redeploy the web application to modify META-INF/context.xml and apply changes. Regards - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Modify content in META-INF/context.xml
On 17/12/2013 11:16, Jose María Zaragoza wrote: 2013/12/17 André Warnier a...@ice-sa.com: Hi. Without having any idea really of the precise mechanism behind database connections, I can still imagine that with the possibility of pooled connections to said database(s), it may be difficult to detect such a change in the corresponding context.xml and apply them on the fly. Even more so if such connections could be shared between different applications. Thanks, but I didn't said that I neeed to apply changes on the fly. Indeed, I said Restart the web application is not a problem I only wan't to have to redeploy the web application to modify META-INF/context.xml and apply changes. How do you feel about a Tomcat upgrade? Automatic deployment has had a bit of an overhaul in Tomcat 8 and those changes have been back-ported to 7.0.x for the next release. The behaviour in a number of edge cases is now clearly defined: http://ci.apache.org/projects/tomcat/tomcat8/docs/config/automatic-deployment.html In your case, you'd want to deploy as a WAR with unpackWARs set to true. Then, any time you edit the META-INF/context.xml in the unpacked directory the web application will be redeployed using the new context.xml This might work with 6 but I can't remember (it is a long time since I looked at the 6.0.x automatic deployment code). Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Modify content in META-INF/context.xml
-Original Message- From: Mark Thomas [mailto:ma...@apache.org] Sent: Tuesday, December 17, 2013 5:27 AM To: Tomcat Users List Subject: Re: Modify content in META-INF/context.xml On 17/12/2013 11:16, Jose María Zaragoza wrote: 2013/12/17 André Warnier a...@ice-sa.com: Hi. Without having any idea really of the precise mechanism behind database connections, I can still imagine that with the possibility of pooled connections to said database(s), it may be difficult to detect such a change in the corresponding context.xml and apply them on the fly. Even more so if such connections could be shared between different applications. Thanks, but I didn't said that I neeed to apply changes on the fly. Indeed, I said Restart the web application is not a problem I only wan't to have to redeploy the web application to modify META-INF/context.xml and apply changes. How do you feel about a Tomcat upgrade? Automatic deployment has had a bit of an overhaul in Tomcat 8 and those changes have been back-ported to 7.0.x for the next release. The behaviour in a number of edge cases is now clearly defined: http://ci.apache.org/projects/tomcat/tomcat8/docs/config/automatic-deployment.html In your case, you'd want to deploy as a WAR with unpackWARs set to true. Then, any time you edit the META-INF/context.xml in the unpacked directory the web application will be redeployed using the new context.xml This might work with 6 but I can't remember (it is a long time since I looked at the 6.0.x automatic deployment code). Mark - I'm on 6.0.26 and have this setting in my conf/server.xml file. Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false I was thinking it handled this kind of thing, but I may be wrong. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Modify content in META-INF/context.xml
Automatic deployment has had a bit of an overhaul in Tomcat 8 and those changes have been back-ported to 7.0.x for the next release. The behaviour in a number of edge cases is now clearly defined: http://ci.apache.org/projects/tomcat/tomcat8/docs/config/automatic-deployment.html In your case, you'd want to deploy as a WAR with unpackWARs set to true. Then, any time you edit the META-INF/context.xml in the unpacked directory the web application will be redeployed using the new context.xml This might work with 6 but I can't remember (it is a long time since I looked at the 6.0.x automatic deployment code). - I'm on 6.0.26 and have this setting in my conf/server.xml file. Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false I was thinking it handled this kind of thing, but I may be wrong. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org Thanks - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Modify content in META-INF/context.xml
Automatic deployment has had a bit of an overhaul in Tomcat 8 and those changes have been back-ported to 7.0.x for the next release. The behaviour in a number of edge cases is now clearly defined: http://ci.apache.org/projects/tomcat/tomcat8/docs/config/automatic-deployment.html Yay! Thank you Mark, this is what I've been hoping for every since this behavior changed from 6 - 7. This is great news for those of us that deploy commercial applications, and need an easy way for end user admins to modify an XML file to customize application behavior (and keep those customizations when new versions ship). --Jesse Barnum, President, 360Works http://www.360works.com Product updates and news on http://facebook.com/360Works (770) 234-9293 == Don't lose your data! http://360works.com/safetynet/ for FileMaker Server == - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org