Bookmark Topic Watch Topic
  • New Topic

Wrtting to a common file (cont'd)  RSS feed

 
Artemesia Lakener
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Report post to moderator
I posted a question yesterday regarding writing to a common file by different instances. Now my concern changed little bit -- If this log file is a sort of "guest book" that every application just prints a footprint in this "guest book" log file. In other words, I really do NOT care the order of two competing almost-simultaneous write operations as long as as each writes 'prints' its name in my guest book. SImply put this way, I want every application invoke this class and thus create an instance of this class, then writes the application's name in my log file with a time stamp.

With this being said as requirement, do I still need to use "synchronized" for "object" or use any FileLock method ?
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Report post to moderator
Let's not have five different conversations about this, please. I'm closing this thread; follow-ups can go here. Thank you.
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!