Posts

JSE 6 Mustang

After ages we finally have a solution for path length > 255 on Windows. This is pure joy for all serious users of java on windows. Its such a legacy that we started coding around it.. catching this exception and detecting "ooh rats! the path length is too long..., go another route..." More details here http://java.sun.com/developer/technicalArticles/J2SE/Desktop/Mustang_build39.html#Libraries Feature : java.io.File does not support long paths on Windows. Bug ID : 4403166 Status : Delivered in b19 Description : Another longtime bugaboo for many developers, the issue with paths with more than 255 characters on the Microsoft Windows operating system has finally been resolved. I'm really glad to see this fixed!

TML

All I wanted was to write a useful document on how to use AppGen. Since I had to publish this on to my website at nagesh.net, it had to be html. Now I really am not big with WYSIWYG-editors so I was looking around for a very clean and easy to use html generator which just let me worry about the content rather than the presentation. After a little searching, I found TML which does pretty much everything that I need and in a clean way. You just have to write your *.tml files in wiki like syntax and run the tml tool i.e. org.antlr.tml.Tool , which has the ability to generate either Lout or HTML. I was just interested in the html part and it works pretty well. Infact the entire antlr and stringtemplate site is based on TML which is pretty neat. Two small things : If you are writing your *.tml files on Windows then you have to convert the '\r\n' s to '\n' before you pass it on to the TML tool. (Small little quirk) You can rewrite your tml.sh to look like #/bin

AppGen

Finally, I've uploaded an initial cut at appgen. The current version is 0.1 and links and documentation can be found at http://www.nagesh.net/appgen/ The initial release can be used to generate webapp artifacts namely Filters Servlets Listeners web.xml and weblogic.xml descriptors build.xml It extensively uses StringTemplate for all the code generation. In addition to all the above features , it can also generate empty implementations for any arbitrary java interface in its classpath. I haven't exposed that feature yet but intend to do it in a future release. Read more on http://www.nagesh.net/appgen

Occasional

No, I'm not apologizing for not blogging for so long. Infact after looking at my long history of blogging, I decided to update the description on my blog to add "Very occasional blogger" :-) Its exactly a year since I last blogged and by some divine call I decided it was time to write another short note this year. I hope my next blog is atleast on 8th Jan 2007. Happy New year

Code generation using StringTemplate

I've been using StringTemplate ( http://www.stringtemplate.org ) for some cool code generation for some time and its ease has really impressed me. I first used it to generate some templates to send email and got hooked on. The simplicity is just awesome. After reading some codegen articles by Terence listed here , I decided to use it to generate java files. Update: Here is a link one should read to understand code generation with StringTemplate. http://www.codegeneration.net/tiki-read_article.php?articleId=65 What I like about StringTemplate: Strict MVC which is very important IMO. I've fallen into traps using other engines where the model can be modified from within the view. As soon as I wanted to add a new view, I was totally lost. I had to go into the old view and find all places where I set some magic value into the model. I like StringTemplate's policy of just disallowing it instead of giving you an option :-) Flexibility of using various delimiters such as &#

Article on WebLogic JSP Container

My article on avoiding unnecessary recompilation of JSP's in WebLogic has just been published on dev2dev.bea.com. It describes the entire stale checking mechanism used by the WebLogic compiler and I hope it helps people in taking the right steps to prevent recompilation and also provides a little insight into the container.

J2EE Performance Profiling tools:

The last few days, I've spent most of my time profiling my code and trying to see where I can improve the performance. I played around with some tools and here is what i liked in them: JProfiler 3 I should say that the JProfiler 3.0 tool looks refreshingly new. It has a great UI and its very well integrated with the IDE's such as IDEA. If you like new UI's like me and also want to get some serious performance profile done then give JProfiler a spin. More information on the JProfiler tool can be found here Optimize It 6.0 Cool thing in Optimize it is the new Quality Analyzer. It catches all kinds of exceptions, shows you if there is abnormal/inefficient growth in a StringBuffer/ HashMap etc. I really liked this feature. Its one way to catch errors early on in your project and keep your code sane.

Yet another Java Blog

I've tried creating blogs many a times, but never had the consistency to follow up on maintaining and regularly updating them. This is yet another attempt at writing about something I do for my living. Yes you guessed it right Java. I work for BEA Systems on WebLogic and try to learn about the latest advances in linux.