facebook

Properties file not reloaded

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #211099 Reply

    schuer
    Member

    hi,

    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.

    #211105 Reply

    Scott Anderson
    Participant

    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.

    #211241 Reply

    Wayne Kidd
    Member

    @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.

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: Properties file not reloaded

You must be logged in to post in the forum log in