Tagged: Java

Logging uncaught exception (redirecting from sysout to logger) 0

Logging uncaught exception (redirecting from sysout to logger)

Uncaught exceptions in Java are handled by the System. The JVM usually logs the exception into the System.err and then shuts down. But in case of web applications its different. It logs the printstack trace to server console and then continues. Even though most of the time System.err is redirected to a file...

My code contribution during foss.in/2008 jFotoNotes 2

My code contribution during foss.in/2008 jFotoNotes

I am attending FOSS.IN/2008 virtually through twitter (unfortunately I could not attend due to work pressure). Here is my contribution to the FOSS world as part of FOSS.IN/2008. Go to jFotoNotes project page jFotoNotes is java implementation of famous FotoNotes in php. A variation of FotoNotes is also used by flickr. Fotonotes is...

Generic toString Method for Simple Java Beans 7

Generic toString Method for Simple Java Beans

I have seen developers writing toString method in each of their bean class. The purpose is to print the bean variables for logging or debugging purposes. I thought of reducing their effort by writing a generic toString method to have in their base bean class. It works for simple bean classes. Its no-brainer...

Chat with Greg Murray on Jmaki, ajax, comet etc 0

Chat with Greg Murray on Jmaki, ajax, comet etc

Myself and Veetrag caught up with Greg Murray sipping his coffee at Developers Summit. As usual we started talking and in between I realized, we could as well record it. Hence the start is abrupt and volume is low. Greg Murray is an AJAX architect at Sun. He is known for his contributions...

How to design Java Application shutdown hook 0

How to design Java Application shutdown hook

Simple shutdown hooks can often be written as anonymous inner classes, as in this example: This idiom is fine as long as you’ll never need to cancel the hook, in which case you’d need to save a reference to the hook when you create it. More about Java Application shutdown hook design