My First application with AspectJ.. I developed a code compliance checker that checks for System.out.println in the code and reports itz usage. Can you believe that the following few lines of code did the magic, indeed they did!
public aspect Checker
{
pointcut sopReporter() :
call(void java.io.PrintStream.print*(..)) &&
within(com.trial03.*) && !within(Checker);
before() : sopReporter()
{
System.out.println("!!!!! STOP USINg System.out.println() !!!");
}
}
AspectJ is really cool and I'm lovin it !!!
Friday, May 27, 2005
Monday, May 23, 2005
My Initial Experience with AspectJ
I felt lucky when my manager told me that I need to design and develop a state-of-the art reporting framework for our product, while on my assignment in California. Upon protracted discussions with the product architect, we arrived at an architecture that required numerous patterns and AspectJ. I'm excited on listening AspectJ ;-). I downloaded the required libraries and plugins and started learning AspectJ. Itz fully fun filled experience. Keep watching my blogs as I surge ahead with AspectJ z :-)
Tuesday, May 17, 2005
An Amazing commons lib...
I came across this wonderful library from jakarta commons. It is called as the JXPath. This allows querying object graphs from the collection using a XPath Query syntax. Really amazing. I remeber writing a search component for a paginated list for which I had to cook up a custom query syntax. If I had used JXPath, my task would have been very simple.
Monday, May 16, 2005
My Eclipse is Heavy
Over time, I installed so many plugins that my Eclipse started cribbing despite a 1.2 GB RAM. Today I came across a code review plugin by name Jupiter. It is very good.
I also tried out the XMLHttpRequest object, itz cool.
I also tried out the XMLHttpRequest object, itz cool.
Thursday, May 12, 2005
Demystified the Black-Scholes Model
A very interesting presentation on the financial services offered by my current employer, made me nostalgic of the Financial concepts I studied while pursuing MBA. I'm highly motivated to do something and decided to demystify the very famous Black-Scholes formula. I must admit, it wasn't a smooth sail. First, I had to brush my understanding of mathematics and relate it to understand the Black-Scholes formula, it was fun filled experience. Today, I learnt a valuable lesson - Technology is an enabler, when coupled with domain expertise, the combination has the maximum value. I've decided to dedicate some time everyday to gain domain expertise.
Tuesday, May 10, 2005
Will be an MS Excel guru soon
Oflate, I'm churning out more spreadsheets and documents than LOC. I've already gained enough expertise with MS Excel and using it for all my planning activities. Perhaps, I'm doing justice to my MBA degree. My professors will be delighted to know about this development. Again, to quench my thirst for coding, I developed a pagination component using Tiles. Anyone interested in trying out this component can mail me ravisk@gmail.com
Thursday, May 05, 2005
Change in Attitude
I was asked by a colleague for some help in implementing a feature of a product. Upon probing, we found that the feature doesn't exist in the product. If such a thing ever happened, I'd have immediately googled for the thing and tried some open source stuff. But now surprisingly I sat down to develop it myself. Change in attitude.. :-)
Monday, May 02, 2005
XDoclet is cool..
Today I tried my hands at the XDoclet using JBossIDE as Eclipse plugin. It has been a very smooth ride and I'm amazed at the calibre of XDoclet. Although, I have heard of XDoclet earlier, I didn't get a chance to work with it.
Sunday, May 01, 2005
My Fingers are itching for code...
Last week has been too boring for me with no major activity. I've been asked to estimate the effort required for customizing a feature for a well-known client. And believe me guys, coding is far better than better than going thru the requirements doc and churning scores of spread sheets. To quench my thirst for code, I developed a small scale web based xml navigator using struts, jdom and JS. Surprisingly, it became instantly popular among my colleagues. Anyone interested in trying this out can mail me at ravisk@gmail.com. Your suggestions/comments shall definitely add value to it.
I expect to do some interesting stuff this week..
I expect to do some interesting stuff this week..
Thursday, April 21, 2005
Lifez chugging along...
Today I didn't have anything "nutritious" on my plate. I was asked to take a session on Tiles (again!) tomorrow that would be recorded for new joinees in the future. This time I want to experiment with the "metacognition" approach I learnt from reading the Heaf First series books, made a PPT. Letz see how it goes.
I accidently hit upon Amit Rathore's site, he is just amazing.
I accidently hit upon Amit Rathore's site, he is just amazing.
Wednesday, April 20, 2005
File Attachments using Axis
Another small but interesting problem. My colleague agained stumbled upon a problem - sending files as attachments using webservices. Although, I knew that SAAJ is used for attachments, I was looking for a good example to speed up my friend's work. I found a very simple yet exhaustive example at this link http://www.bii.a-star.edu.sg/infoscience/seg/fileTransfer.asp. Thanks to Azmi Bin Mohamed Ridwan, who shared this excellent example.
Monday, April 18, 2005
POI is tres cool
Today, my task was to parse an XML file and generate a Excel file out of it. I was trying various available alternatives like Gnumeric format, SpreadsheetML and jakarta POI. POI is tres cool.It saved lot of lines of code and most interestingly a very narrow learning curve.
Friday, April 15, 2005
Publishing an EJB as WS
To expose an EJB as an endpoint, there are two ways - if the container supports EJB2.1 spec, a stateless session bean can be exposed as a web service or use Axis Platform to publish an EJB as a WS. I preferred the latter for some project reasons. I'm using WLS8.1 SP2.
The process doesn't require more than 3-4 lines in the deploy.wsdd file.
The following is a copy paste from the deploy.wsdd:
<parameter name="beanJndiName" value="HelloBean"/> <parameter name="homeInterfaceName" value="demo.HelloHome"/> <parameter name="remoteInterfaceName" value="demo.Hello"/> <parameter name="allowedMethods" value="*"/> <parameter name="jndiURL" value="t3://localhost:7001"/> <parameter name="jndiContextClass" value="weblogic.jndi.WLInitialContextFactory"/> |
And Bingo! I executed published and consumed the WS at the first go without any errors. whew! what a relief.
The next step was to send and receive arrays of VOs from the WS. This requried some fiddling of the wsdd file again. This line did the magic:
|
and the extra lines in the client program>
|
This solved 80% of my problem. The next step was to return an array of VOs. This required just one change in the above code
call.setReturnType(XMLType.SOAP_ARRAY);
I'm delighted on publishing and consuming the WS. I'm still excited, thought I would write a Eclipse plugin that uses axis and generates stubs for static invocation.. Hmm not a bad idea....
Wednesday, April 13, 2005
Back to Web Services
One of my colleagues has stumbled upon webservices and asked for help. The problem was intriguing and spurred interest. The scope of the problem was to pass an object (VO) as in put argument to an EJB published as a web service and get another VO as a return from the method call. This was interesting indeed and I jumped onto it immediately....
Subscribe to:
Posts (Atom)