- This topic has 2 replies, 3 voices, and was last updated 20 years, 3 months ago by Wayne Kidd.
-
AuthorPosts
-
schuerMemberhi,
I am using weblogic and tomcat on 2 different projects.
On both I have noticed that when I update a properties file in my workbench and when my program try to load it again (Properties.load(InputStrem in)) it returns me the initial values.That is strange because when I change the classes they are well reloaded, but doesn’t seem to work with other resources like properties or xml files.
I have checked on the server and the synchronization is well done. Seems the ClassLoader or the app server keeps a cached version.
Any solutions for my problem?
thanks.
Scott AndersonParticipantSchuer,
I have checked on the server and the synchronization is well done.
Seems the ClassLoader or the app server keeps a cached version.The next step would be to force the application server to fully reload the application. For Tomcat, you can do this by ‘touching’ the web.xml file in the workbench. When it’s copied to the deployment location Tomcat will drop the existing context and fully reload. For weblogic, you need to add an empty file called ‘REDEPLOY’ in the META-INF or WEB-INF directory, depending on the project type, and ‘touch’ that in the workbench when you want to force a reload.
Wayne KiddMember@support-scott wrote:
Schuer,
I have checked on the server and the synchronization is well done.
Seems the ClassLoader or the app server keeps a cached version.The next step would be to force the application server to fully reload the application. For Tomcat, you can do this by ‘touching’ the web.xml file in the workbench. When it’s copied to the deployment location Tomcat will drop the existing context and fully reload. For weblogic, you need to add an empty file called ‘REDEPLOY’ in the META-INF or WEB-INF directory, depending on the project type, and ‘touch’ that in the workbench when you want to force a reload.
With Tomcat, one approach would be to issue the manager reload command. You could even sort of put it in the background by running through httpunit. Since you know everything about the web app (from web.xml and other stuff), you could figure out the specifics of the command. I think you could do something similar with Websphere. If all else failed, you could start something with app startup parameters (initialization servlet) that waits for a signal to shut down.
-
AuthorPosts