Win a copy of Spring Boot in Practice this week in the Spring forum!
  • 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
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

getting only modified data for logging from component list

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
My objective is to log only those contents which are really modified through update button, by comparing the previous existing contents from content list. If a person just go to edit page and without modifying anything he saves the page and comes out log should not do anything here. but whatever he modifies like name, content, description it sholud get compared with previously found data and modified content sholud get reported and logged to file system.
People says using thread in backgroud to compare objects can do this but will cost the speed of application and if you kill the deployed applcation at any stage process gets killed and logging will not take into effect.

Anyone have any better suggestion or any proper idea which is been implemented somewhere.

thanks
vijendra
[ August 03, 2007: Message edited by: Bear Bibeault ]
 
Ranch Hand
Posts: 893
Tomcat Server Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can use the setters of you're javabean for checking if the value of the form is different than the current values of the bean. If this is so then you can save the changed value.

I do this in almost all my beans, because I only want to save something to the database if something is changed. This saves database capacity.

reply
    Bookmark Topic Watch Topic
  • New Topic