• 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
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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.

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic