Archive for the ‘j2ee’ Category

GIDS 2009

Blogging after a long gap.. As this post is mainly for GIDS, talk about the rest of the stuff later 🙂

GIDS 2009 – Great Indian Developer Summit (Thank god, there exists other gids — Giri Institute of Development Studies in , a great technical conference from the people all over the world ranging from Java to .Net to Web 2.0 🙂

First thing to appreciate is the way the events are organized. Phew, got really amazed by the way delegates are notified of all the events and registrations and any such notices through an SMS.

Thanks to my colleague Vivek Juneja who had actually let us know and coordinated with the GIDS organizers to get the concession package for a team of 10 people from the same company! Feel like the money spent was not wasted 🙂

Moreover, happened to visit IISC, Bangalore for the first time which I had been waiting for 🙂 though it happens in JN Tata Auditorium.

Attended the Day 3 and 4 sessions on yesterday (Java) and today (workshops) .

Day 3 : JAVA


1. Struts 2.0 Deep Dive by Prabhu Subramanian of DuraSoft, India

It was a nice session to get to know about Struts 2.0 — the new features offerred by Struts 2.0 , the benefits and betterments from earlier versions, significant differences of Struts 1.x Vs 2.0 were neatly covered and the session ended with a hands on demo application of a traditional “NumberGuess” application.

But the session was not satisfying the title I believe. It was  not a deep dive at all rather just a gentle intro! 😦

2. Know your Java by Venkat Subramaniam

This is one of the excellent and interesting sessions. Venkat is a very nice person and well experienced and I have already interacted with him in one of the Book Promo sessions in JavaRanch for his book “Programming Groovy” and was glad to see him in person and attend his session. 🙂 He is the directory of the company .

The session was very good and inquisitive as he had prepared Q&A in basic Java on some categories like Strings, basics, Derived, Math etc., each with the points of  100,500,1000. Volunteers are asked to come to stage and pick up their choice of interest and give a try for answering the question. Venkat did NOT only validate the answer but also demonstrated then and there in his Apple MAC which was really satisfying and convincing  :). I got one 500 points and at the end he called up the peopel whoever has got 1000 points and handed over his books :).

I would have picked up one for 1000 points but somehow dint want to go for “derived” topic and went for my favorite “Strings” area hence I missed the book! 😦 Had I not missed the initial few minutes of the session, I would have grabbed one?

Tea break 🙂

3. Unleashing the power of Java on Intel by Mukeh Gangadhar

It was an informative session by an Intel engineer and nice to rehearse the electronics terms (processor, cpu cyles, throughput etc., after a decade) as he was demonstrating the various ways to optimize the Java applications running on Intel and other tools available for monitoring the performance.

Lunch break 🙂

4. Building RESTful applications with JAX-RS by Criag McClanahan

Was very very excited to see him as he was the original founder of popular open source J2EE Web application framework called Struts 🙂 . He had been also the one of the main persons in JSF (Java server Faces). Though I could not attend his first session “What is RESTful?”, was somehow able to cope up with this session.

5. Programming Groovy by Venkat Subramaniam

This was again one of the interesting sessions and could not even believe that the session was over after the stipulated time. It was all about Groovy a new dynamic language which runs on top of JVM and the features it offers, few excellent benefits it offers, programming features of the language etc. Of course everything with the instant demo!

Kept all the audiences in sync 😉 Kudos..

Tea break 🙂

Day 4 – Workshops


1. Building external DSLs for Java by Venkat Subramaniam

Started with an introduction of DSL (Domain Specific Languages) and what it is all about and continued with the need for the DSL, the two different types of DSL (Internal and External) the present trends and activities being done on it.

The good part is the Q & A session wherein we get to know about the good collection of views and the way venkat takes them up and clarifies. He discussed about Xtext — an DSL tool comes as a plugin for  Eclipse. He had demonstrated one application with XText and the source code it generates along with the parser 🙂

[will blog in detail about the DSL on a separate post]

2. JRuby in Action by Ola Bini

Ola Bini has been one of the 8 core developers of Ruby language and he has been promoting the same thought some of them have quit in the middle. It was nice to see the Ruby features and the pros and cons with the application being demonstrated.

One thing is Ruby was developed based out of Java (following and/or keeping Java in mind) but it just works like a C program but with the Garbage Collectable facility. Has drawbacks on performance compared to Java and few others. Still people go for it due to the features, ease of use .

3. Get Connected – A web based Tutorial by Jim Webber

He is a director, architect of Thought Works and an author of the book “Building Enterprise Web Services”.

Attending right now 🙂

He is talking about the evolution of Web and the various paradigms the history has been seeing. The needs and driving factors of information sharing, various parameters such as client, ISP, Cache, Router etc., wherein some of them drive the trends while few others facilitate.

Also discusses about Http Vs Https and the different parameters associated with it.  its on going…

Today evening there is an award ceremony for which the chief guest is Cyrus Broacha. 🙂

Looks great altogether.

Few comments and suggestions to the Organizing committee

1. The way delegates are kept informed was well. Good lunch and snacks 🙂

2. The audio/video aids were neat and adding values to the talks.

3. Distributing prizes based on a lucky draw for almost all the events like the feedback form after each session,  blogging entry with the url, completion of survey, handing over a EXPO Passport which has to be stamped from all the sponsors around. 🙂 The prizes are Sony 72 MP digital  Camera, 3 days and 2 nights trip to Singapore, Technical books, Badge etc., — A way to keep the participants enthusiastic. Nice Guys!

4. Nice to see plenty of volunteers being around everywhere to assist the delegates for their queries.

4. Only one of the main halls were having an electric outlet for getting our laptops charged! Had to suffer in the sessions happening on other halls! Moroever the credentials (if any) and way to access the wireless network would have been mentioned well rather than letting the delegates suffer! Of course I did for the whole day yesterday! — Point to be noted Organizers! None of the volunteers whom I aksed had an answer for the query! 😦

5. Handing over the goodies (Tshirts) would have been done better — like giving to delegates at the time of registration itself than making all of them form a line and every individual has to spend around 20-30 minutes in the crowd just to get to know that they can get the  Tshirt on the next day as that would be their last day! 😦 Absolutely no need for all these circus guys!

6. Looked like there was no option to choose/customize the technical books given away based on the individual’s interest. I still remember and could not control my laughter on seeing my ex-colleagues face after getting a book on “Software Testing on Visual Studio .NET” when she is a hard core Java/J2EE Developer and the only sentence she could utter was, “fayda kya hai?” [whats the use!]. could have been better!

7. Upon seeing most of the speakers using my dream product Apple Mac Notebook, my craze towards the same has got drastically increased and falling in love with it more and more :)) One excellent feature in Mac which lacks in any other OS is the zooming the desktop with no compromise on the resoultion. Wonderful. Is nt it?

Well, its time to move on.. will have to finish the entry and submit this URL to the organizing committee and also to test my so called LUCK 🙂 Let me see and definitely would keep you posted on the status 🙂 (if I get).

Cya later…


A talk on Jakarta Digester

BOJUGBangalore Open Java User Group, a group formed and maintained by young Java aspirants who reside in Bangalore as the name indicates. I came to know about this group in BarCamp in the year 2007 (Barcamp meet at IIMB, Bangalore) and from then on there used to be a regular meeting every month.

As I was onsite (Bahrain) for a couple of months could not join till then. This time (Sep 08) had opted to give a talk on ‘Jakarta Digester‘ – an open source XML to Java Mapping tool from Jakarta Commons. Recently the venue has been changed to ThoughtWorks in Diamond District Building in the Airport Road. This time the meet was on 27th September 2008 Saturday and at 1130 AM IST.

The Thoughtworks building and the environment itself is worth mentioning. Awesome it was :).

The session was started exactly at 1130 AM and I happened to join a bit late :(. There were 3 topics discussed.

1. Web Application Sharing /Clustering in Tomcat – by Sriram Narayanan, a thoughtworks’ employee.

2. IBatis and ICG (Integrated Code Generator) by Sathishkumar Thiyagarajan, a Starmarks employee (Of course my good friend and BE classmate).

3. Jakarta Digester — none other than me :).

Sriram’s session was quite informative as he talked about various aspects of Clustering, load balancing and what it means to different people, how can we achieve the same using Apache Tomcat, Connector Architecture etc with some samples and Demo. It was awesome but a bit exhaustive. He could not complete as planned as others were in queue. In the middle he asked me to give a talk on ‘IPAnycasting’ as i spoke about it since the topic he covered (LoadBalancing) seemed to be related to or even a mimic of IPAnycasting. A point to mention here is, I have done my final year BE project based on that IPAnyCasting :). But I could not speak about because of lack of time. Perhaps, may give a talk in the future meets.

IBatis – basically an ORM tool was neatly handled by Sathish. But he concentrated more into his own project ICG (Integrated Code Generator) which is a platform that provides a single place to give your inputs irrespective of underlying persistence framework being used (be it Hibernate, Ibatis, Toplink etc to name a few). It is a very good initiative and he gave a small demo on the same.

Jakarta Digester – I started off with the intro of XML and its usage, the need to have a XML-Java converter, what Jakarta Digester is and how we can go ahead with converting the same, the pros and cons of using Jakarta Digester. Of course had done with a demo application and walked through it :).

The information about Jakarta Digester will be posted in my technical blog and linked here a little later.

Overall, It was a nice experience and a good day!


Happy News.. Got a book in lucky draw

Hurray….. 🙂

Whatever it is, the moment you share it does matter right..? I feel so..

Just got to know that my name was in the list of lucky draw winners of the ‘Professional Apache Tomcat 6’ book in the JavaRanch forum.  [Tomcat is a Web Server  used for hosting J2EE based Web Applications. ]

Here you go…

I repeat it, its lucky,lucky draw – purely.

Felt very happy and thought of sharing it with you.  I too have some lucky mole(s) i guess!

 As usual, pasting the screenshot here.. he he he… 🙂

Winners - Professional Apache Tomcat 6 - JavaRanch lucky draw

How to get the deployed JNDI Namespaces in WAS

The people in enterprise applications would have definitely got their hands dirty in dealing with a buzzword called ‘components’. As a component, it has to be searched first and upon successful return of its whereabouts, a reference to it has to be returned to the caller which becomes the first step of success to the programmer who is in need of it.

So, how can you search for a component? Obviously, with some of its properties that helps to identify the components uniquely in the arena where its deployed. Its up to the programmer to be aware of the correct JNDI name (Java Naming and Directory Interface) which helps to achieve the binding of the component with its unique name.

In case of Application Servers they may have some components deployed by themselves and they let the users make use of it with the enhancement support if required.  Is there a way to find out all the components deployed and their JNDI names as well?

Well, i am not going to give the way for ‘n’ number of application servers available in the market except ‘WAS’ (IBM’s WebSphere Application Server). Probably, a later time i may be able to consolidate if i get a chance to try with other application servers. 😉

 Here you go for WAS….

(i) Start your WebSphere Application Server (this you can achieve it by going to the ‘bin’ directory of ‘ApplicationServerRootInstallationDirectory’ and then double click on the batch file (in case of Windows, it would be “.bat” and in case of Unix like OS, it would be “.sh” [meaning a shell script]) named ‘startServer’.

Other way is you can directly go to the particular bin directly in the command prompt or shell (based on the OS) and then execute the batch file. This saves you in retaining the window. In the previous scenario where you just double click on the batch / script file the window may get vanished once the server is started. This holds for other Web Servers like Tomcat as well.

(ii) Wait for sometime till the application server is started and ready to listen. Usually it will take a couple of minutes to get started (without errors, obviously ;-))

(iii) Once the App. Server is started, issue the following command in the command prompt [if you have just double clicked on the executable batch/script file, you have to go to command prompt and navigate to the ‘bin’ directory].

dumpNameSpace.bat -port <port_number>”

     Usually the port number would be “2809” until and unless it is overridden. The command fetches you the list of components and their JNDI names. You can make use of it by redirecting it to a file in the command prompt like

    “C:\IBM\WebSphere\AppServer\bin>dumpNameSpace.bat -port 2809 > namespace.txt

     The redirection symbol (the ‘greater than’ arrow mark in Windows OS) tells the OS to redirect the output of the previous command (dumpNameSpace.bat) to the next resource which is nothing but the file in our case and its name is “namespace.txt“. It will be saved in the current directory where this dumpNameSpace command is executed.

oreilly’s online books – excellent link

here you go

 this link contains the online (ebooks) of many oreilly books where in the subjects vary from networking to programming languages, scripting languages etc etc..

 make the best use of it! 🙂

but dont expect the latest books 🙂

referring the css files for webpages inside Netbeans IDE

If you are dealing with CSS (Cascading Style Sheet) files for the web pages inside Netbeans IDE, you need to know one thing.

It does not pick up the .css files as referred in the files which has the link to it. Generally, all other IDEs and Application Servers should work that way. But when i had been doing a J2EE based web application, i found that aspect missing. When i tested, the pages were displayed as if the css files were not present at all.

Though i tried by placing the css file in a different location  by thinking that whethere the relative path given by me would have got some mistakes, there was no luck still. Then i got a doubt and referred the Help section of the IDE itself. You got to do a different work around for your css files to have effect.

Actually, the Netbeans IDE places (keeps its own references to) the css files in a separate location which is totally far away from your application’s root folder. You have to get that location and put it in the files whichever need the css links (in case of .html, .jsp files).

Steps to do that:

1. Select the particular .css file and Right click on it.

2. Click on either the ‘Copy XML Style’ or ‘Copy HTML Style’ based on the file types where you gonna link this .css file.It will copy the location of this .css file from the Netbean’s perspective into the Clipboard.

3. Now paste the copied text (actual reference to the .css file) in the appropriate place of the files needing this .css file.

In case of .html file, it would be in the ‘href’ attribute of ‘<link>’ element placed inside the ‘<head>’ element. In case of .xml files, place the reference after the XML prologue or header.

Really don’t know whether its purely based on the Netbeans IDE or the internally built-in Tomcat has some contribution towards this! Is this a bug in Netbeans? Yet to find out that 🙂

But somehow found this to get the css effects on pages with an overhead towards portability! If at all, i need to take the .war file and place it normal Tomcat itself, i may need to change the reference to the .css files referred everywhere right. Just to avoid that , i have made one common .jsp file where i have put this .css reference in <link> element and included this .jsp file in all the other .jsp files through include directive!