• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

Replace old value with new value using Spring PropertyPlaceHolderConfigurer

 
Ranch Hand
Posts: 255
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have a properties file in which I have configured the thread pool data (count), this properties is loaded in spring context using the PropertyPlaceHolderConfigurer and will replace the thread pool data in the properties with the place holder defined in spring context. All is fine.

Now based on the records count which I retrieve from the DB, Say I need to change the thread pool count from 10 to 15, similarly the connection pool which is defined in the same properties file needs to be changed from 10 to 15. Now how I can update the changes in the properties file and make sure the application context take that changes into account. Is there any way we can do it from Spring side by adding certain properties for the "PropertyPlaceHolderConfigurer" or whether we need to overwrite the new value by replacing the old value in the properties file using properties.store("threadcount", "15")? How we need to go about this please clarify.

Thanks.
 
Rithanya Laxmi
Ranch Hand
Posts: 255
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Guys any response for this?
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic