Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3406658
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T05:39:17+00:00 2026-05-18T05:39:17+00:00

Guys i have created a properties file outside the jboss classpath (I kept outside

  • 0

Guys i have created a properties file outside the jboss classpath

(I kept outside because i can change during runtime and the values will be reflected).

I am loading this property file (like System.getProperty("jboss.base.dir.home")) everytime to do rmi lookup .I think that everytime loading the same file, eventhough it is not changed is pain.

I want ideas , how to detect the change in properties file and load only when there is a change.i thought of having the timestamp of lastmodified .kindly let me know your suggestions.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T05:39:18+00:00Added an answer on May 18, 2026 at 5:39 am

    You could reuse Apache commons to read the property file :
    http://commons.apache.org/configuration/userguide/howto_filebased.html#Automatic_Reloading

    OR

    You could do it programatillcay yourself. This would reimplementing the apache commons code – probably with far less testing and more error prone. If you insist on this approach here is that I think you can do :

    1. Use a wrapper class on a Properties instance.
    2. This wrapper class should (when initialized) load the properties file from the predefined location (probably configurable)
    3. The wrapper, post init, should start a thread that would run forever and do this :
      • record the modified timestamp of the properties file recently read (see methods in File class)
      • sleep for a configurable time period
      • wake up and check the modified timestamp of the properties file
      • if there is a difference in the timestamps – reload the properties file into the Properties instance. Remember this must be done in isolation (i.e change the object when no ones accessing it).

    HTH

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

does any knows how to access .jar file in JS. I have created class
I have created some code in Actionscript 3 following various tutorials which is a
Hello Guys! See I have been creating a code powered with ajax but it
Hello Guys! I have been trying to create a cool Image Slider using Jquery!
heys guys, i have a website, which contains lots of db work to display
I have a list of products I want to generate xml for currently all
I am trying to do something really basic but can not seem to find
Can anyone tell me how does the MsBuild picks up the value of the
I was looking around and saw the post for using resource (how-to-create-and-use-resources-in-net) . I
Possible Duplicate: Write once deploy on Windows Mobile 6, Windows Phone 7, Android and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.