Friday, August 01, 2008

Handling java.lang.InterruptedException

What do most Java developers do when they are faced with handling an InterruptedException? This should look very familiar;

try{
// Do something
} catch (InterruptedException ignored){
log.debug("Exception", ignored);
}

We've seen plenty of code that does this, it makes us wonder whether InterruptedException is just useless and simply clutters the code. The question is, "Is this the correct way of handling InterruptedException". The answer is, "No, it isn't always the best way of handling this exception".

Dealing with InterruptedException is an excellent article that points out how this exception needs to be handled in different scenarios. It is a "must read" for any Java developer. When an InterruptedException is thrown, the interrupted status of the thread is cleared. Hence, at least we should set the interrupted status again using the Thread.currentThread().interrupt() method so that somebody else could handle it, if necessary.

Sunday, July 20, 2008

The first ever product release from WSO2!



A picture with a lot of historical value... This picture was taken soon after the very first product release from WSO2; WSO2 Tungsten 1.0-alpha (now known as WSO2 WSAS). This was the very first team that worked on WSAS. Only 2 members from this initial team still remain in WSO2. The rest have left to pursue higher studies. This post is a tribute to all those former team members.

Thursday, July 17, 2008

You can check-out any time you like, But you can never leave!

Today there was a farewell party for Deepal, Ruchith, Saminda, Sanka, Sandakith, Dinesh, Diluka, Suran & Chandima. Most of them are leaving for grad school to pursue masters degrees & doctoral studies. It was a sad day since these are some of the people who helped shape WSO2 from a technical perspective as well as its culture. They were also some of my close friends, some of whom I've known throughout my career. Sanjiva, in his farewell address mentioned that WSO2 is like Hotel California; You can check-out any time you like, But you can never leave! Indeed, once a WSO2er, always a WSO2er. WSO2 is such a unique company not only taking into consideration the technological aspects, but also the environment & culture. Anybody who had worked at WSO2 would agree that it was a unique experience & opportunity. I'd like to wish all of these guys the best of luck & wish that they come back to work at this great place after completing their studies.

Tuesday, July 08, 2008

Server-side OSGi in WSO2 Products

Here is a good presentation about server-side OSGi on InfoQ. At WSO2, we are in the process of migrating our products to OSGi. We are building a base platform called Carbon, on top of which, all other products and solutions will be built. The following diagram nicely demonstrates how Carbon is positioned in our product & solutions stack.




The features that can be shared across products and solutions are built as Carbon components. The real power of OSGi comes from the fact that these components, and even multiple versions of these components and other libraries, can be be combined in different ways to build a desired set of functionalities in order to satisfy varying user requirements.

Just heard about OSGi, and no idea what it is? Then you should read OSGi for Beginners


Monday, July 07, 2008

Demand OpenID!

demand OpenID

Demand OpenID support for all the sites you sign into everyday.

Here is how to do it (Source: http://demand.openid.net/home)

1) Install the bookmarklet

Drag this link to your bookmarks toolbar: Demand OpenID!

2) Use the bookmarklet to vote

When you visit a website that has traditional username/password login, and wish to yourself that it had OpenID login instead, click the bookmarklet in your toolbar.

3) Check back often

To see how many people are demanding OpenID at sites around the web, and to see which sites you've voted for have converted. Tell your friends to visit demand.openid.net, and start demanding OpenID support from the websites they visit every day!

Thursday, July 03, 2008

A Comparison between WSO2 Registry & Mule Galaxy

Deepal Jayasinghe has written a great article on The OxygenTank comparing the features in WSO2 Registry and Mule Galaxy.

See Open Source Competition - Mule Galaxy vs WSO2 Registry

Friday, June 27, 2008

Engine Oil Bible

I've been using Mobil fully synthetic engine oil for the past 6 months, and had covered a bit over 4000 km since the last oil change. When I went for the routine vehicle checkup at Kleenpark (an autoshop in Sri Lanka), I was informed that I need to change the oil since it's been 6 months since the last change, even though synthetic oils can be used for at least 10,000 km. In Sri Lanka, synthetic oils cost about 3 times the price of mineral oils. So the service advisor asked me to use a mineral oil. I was a bit concerned, but the service advisor assured that there will be no issues in switching to mineral oil. However, I was not completely satisfied with his explanations but decided to try mineral oil.

Since then, I have been having a lots of questions regarding engine oils. There are so many things to consider when selecting an engine oil for your ride such as;

1. Synthetic vs. mineral oils
2. Desired viscosity
3. Oil change intervals - max mileage and/or time between oil changes
4. Engine oil additives - are they good or bad?
5. How to check the oil level & what are the adverse effects of overfilling
6. Can engine oils made for cars be used in bikes (This was a very important point for me since I ride a bike during the week and use the car during weekends, and was thinking about using the leftover oil after filling up the car in my bike ;) )

So, while trying to get answers for the above, I found this great resource, Engine Oil Bible. This is a must-read for any vehicle owner.