Last couple of months, I was working with a Team that developed standardised interface framework for accessing and using j2ee services (logging, exception handling, data access, search, cache, messaging, web services among others). Now, our next job was to sell this framework to the other teams doing IT development with in the corporation.
We developed sample applications around each of the j2ee services to showcase these.
Looking at the sample application, somebody asked a question jokingly, how do we know the framework services are really getting called and you have not hard coded some of the things.
The question got us thinking, on how we can demonstrate the actual method calls happening with out introducing or writing more code. We hit upon the idea of using AspectJ, we put in the point cuts at the service interface method calls and showcased these calls in a applet.
Now, when ever the sample application was run, the applet would display all the service interface calls being executed to the user. It was a beautiful way to get the call stack out in the open.
Filed in: Java
Post a Comment