• 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

To archive log file without stopping JMS application

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

I am working on a JMS code(publisher/subscriber) which is not using MDB or application server.
Requirement is my code will stop only once in a week for 5 mins.
I need to close my log file daily and archive it to some folder without stoping the subscriber code.
Any help

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

It is very simple, if your using Log4J/SLF4J then you can cofigure this fetaure.This framework will take care of all of your requirement even without stoping you code any time.
If you are not using Log4J/SLF4J and you would like to create your own soln then have a look on Appender components of Log4J.

For archive your log files either you can use TimerService OR Quartz which let you execute any code based on time.

Hope that this helps !

Thanks,
Sunil Dixit
reply
    Bookmark Topic Watch Topic
  • New Topic