Skip to main content


Showing posts from December, 2008

What a Year! Phew..

-- Art by Baran

Happy Holidays!

I am a Hindu by faith. but I love christmas, for the sense of good it cultivates in you (or atleast thats what it attempts). I am big sucker for those 25 days to Chirstmas on ABC , and the movies of that genre.. Having said that I have my own (small) list for Santa.. Love, Peace, Harmony, Health and Success. For Me, My Family, Friends, My Country, and the whole World. I am sure I have been nice all year, and Santa Obliges.. So be good for Goodness sake.. Happy Holidays! image by mcgraths

Using Equinox CommandProvider to make OSGi console interactive.

After fiddling with the First Bundles that "Hello World"-ed upon Activation, You want to see more interactivity in OSGi. Although Using OSGi for an interactive Command Line Application would be like this one would be, well, a callable over-kill, I am going to start with an example and Expand it in later posts. So, please Welcome CommandProvider. CommandProvider is an EQUINOX specific API for extending the Console. This basic Example illustrates how to get a command from console and do something in java and also gets your feet wet on Service Registry package; import org. eclipse .osgi.framework.console .CommandInterpreter; import org.eclipse.osgi.framework.console.CommandProvider; public class DisplayMessageCommand implements CommandProvider { public void _say(CommandInterpreter ci) { ci.print("You said:" + ci.nextArgument()); } @Override public String getHelp() { return "\tsay - repeats what you say\n"; } }

OSGi: Starters Guide for Install, Update and Refresh Bundles

In OSGi, with a Bundle you could Install, Update or Refresh. There is a subtle difference in all these three. Just enough for a beginner to entangle the mind. To help, This post gives an a practical insight. I recorded the commands and thier out puts. To Begin with, Install puts a bundle in the framework runtime. It also records the file location (on FileSystem or URL). It doesnot start or resolve dependents on it. sarath@sar-akshaya:~/zbin/equinox$ ls bundles equinox.jar org.eclipse.osgi_3.4.0.v20080605-1900.jar sarath@sar-akshaya:~/zbin/equinox$ ls bundles/ FirstBundle-1.0.0.jar SecondBundle-1.0.0.jar sarath@sar-akshaya:~/zbin/equinox$ java -jar equinox.jar -console osgi> ss Framework is launched. id State Bundle 0 ACTIVE org.eclipse.osgi_3.4.0.v20080605-1900 osgi> install file:bundles/FirstBundle-1.0.0.jar Bundle id is 1 //Try starting osgi> start 1 org.osgi.framework.BundleException: The bundle could not be resolved. Reason: Missing Constraint:

Days after Nov 26 2008

I wish this long weekend never happened in time. No less than 200 people were reported killed in terror attacks in Mumbai, India. I was driving to new york when I first heard about the reports on NPR at around 3 in the after noon. The death toll reported was ~50. For a year like 2008, in which there had been blasts almost every fortnight , this initially did not come to strike me as hard as it did with every 10 minutes of passing time. The number slowly jumped to 70s and then to 100 by the time I lost NPR signal on my car. By the end of the evening, I reached New Jersey, stayed over at my uncles place. From then, till late night, I was glued to Indian news channels on TV. NDTV and IBN live on the internet. Words cant explain the state of mind watching those gory initial pictures and videos of the happenings. State of dismay, panic and confusion reined through out the night. All the while, There was only one question. What in the world is a Country doing when handful terrorists ha