Posts

Showing posts from August, 2008

Error Reporting through E-Mail using Log4j (SMTPAppender Class)

This could be one of the cool thing if you get an intimation through an email when ever your application is facing the problem in production or test environments apart from this you get log file as well so we can decrees the turn around time some what in fixing and issue and making your environment up. A few months back I have implemented the same thing for one of our production application and I have used log4j for logging and emailing the log file when ever log file get populated with error level messages. In log4j api we have one class called SMTPAppender which will email us our log file when ever log file is populated with error level message. Just needs to configure log4j properties file with all SMTP server details. Note: Make sure that you should have mail.jar and activation.jar files in your class path. log4j.properties: log4j.rootLogger=INFO, filer ,SMTPTest log4j.appender.filer=org.apache.log4j.RollingFileAppender log4j.appender.filer.layout=org.apache.log4j.PatternLayout lo...

Why Managers Fail

Good one... http://managementcraft.typepad.com/management_craft/2008/06/why-managers-fa.html

JUnit testing tips

As we used to write our JUnit test cases for all Story cards we develop, well we follow TDD (Test Driven Development). Here are the rules we follow for our JUnit testcase as part of our TDD... Never break others test case. Don't update any database values as part of your JUnit testing. (But we can read DB values if required.) Test your business logic no need to test java or other API's as they are well tested. Try to avoid Mock Objects usage. (I think some times this mock objects will cause problems when you debug your test case - I am not quite sure to give any instance but I think so) And he used to tell one more thing Clean first before committing something back to repository. Ensure your JUnit test is passing on cruise control. Some time JUnit will pass locally when it actually running along with Cruise Control test beds it fails so need to ensure till you get positive build results other wise need to fix again.

Cruise Control configuaration over VSS

Nice article on how to configure Cruise Control over VSS. http://www.spiderlogic.com/news_threads/articles/cruisecontrol.html http://cruisecontrol.sourceforge.net/gettingstartedbindist.html