Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

To archive log file without stopping JMS application

 
Jyoti Sharma
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • 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
 
Sunil Dixit
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • 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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!