Showing posts from 2009

Servicemix: Accessing the OSGi service from the JBI

Currently the communication between the OSGI and JBI services are not straight forward in the Servicemix (SMX), this blog tries to fill in the gap and explains the use case of accessing the OSGi service in the JBI-SU, deployed on SMX. I have deployed simple OSGi service as:

the class org.example.Hello has one method which print's the current time.

Now i will deploy a SU which will access the OSGi service via JNDI lookup.

There are couple of ways to do it:

1. Firstly via using the tag:

2. You can also use the jndi-lookup tag from the spring-remoting API for example visit

SCM Tool for Eclipse IDE Users on Mac OS

Recently i got Mac PC to work on, no doubt the Mac experience is fabulous and gives you the feel that hardware is not an issue anymore with speed, graphics, UI etc. But one thing (as an software developer) which was very annoying to me was very little or should i say no choice in terms of complete SCM tool (like Tortoise SVN in windows).

I tried couple of tools like svnX, scplugin etc. but none of them is completely usable as far as i am concerned. The latest tool i tried is subclipse. Its a plug-in for Eclipse and gives most of the features like Tortoise SVN. Tool feels better because of integration with eclipse learning cycle is almost nil. You can get the plug-in from the following update site:

How to use Eclipse Compiler

Some use-cases require compiling the java file on the fly, hence using a class file with reflection API to the introspection. The scenario might not be frequent and there are plenty of ways to do it, but if you decide to use eclipse compiler (which can be debatable). That's how you can use it:

Map m = new HashMap();
m.put(CompilerOptions.OPTION_Source, System.getProperty("java.specification.version"));

org.eclipse.jdt.internal.compiler.batch.Main main = new org.eclipse.jdt.internal.compiler.batch.Main(new PrintWriter(System.out), new PrintWriter(System.err), false, m , null);

return main.compile(new String[] { "-classpath ", classPathStr, srcFile.getAbsolutePath()});

Getting 3d effect from draw 2d

Last three months have been like a roller-coaster to say the least, to learn lot new things, mastering the existing and come up renovating yourself. The time we developed FID 1.2 which is open source and available for free download.

The key feature shipped with FID1.2 is EIP Editor (to know about FID and EIP editor go to FUSE Team blogs) and i got a chance to work on it to enhance the look and feel of the editor.

The task was to make the shadowed figures of shapes likes Rectangle, circle, diamond etc using draw2d API. And since designing and development was proceeding hand-to-hand, their were lot of changes in colors and sizes so effectively we needed to design a system or framework which reflect requirement changes in no time. Following are some frequent requirement changes:
Change the gradient colors (which includes start color and end color)New shapes diamonds, rounded rectangle etc.Change in sizes of the figures both width, height, insets etc.
Clearly you can't just keep on cha…

Master Detail

Master-Detail Eclipse Forms Today I thought of writing something on Master/Detail section of the eclipse forms, actually I just finished working on the editor which uses the feature of the eclipse forms. During which I went through certain problems like:
In my master block the as the size of table viewer increased master block shows the scroll bar instead of table viewer also it makes the length of the detail part equal to that of master part which made my editor unusable
detail part having the scroll problems like the one mentioned abovegetting the details part dynamically was yet another area where i faced lot of problem

In this blog I'll be addressing all the above and also little brief introduction on Master/Detail and how to use it.

The article by Dejan Glozic is really helpful and explains the basics of the eclipse forms. I’ll be explaining the stuff using FUSE Integration Designer(FID) which is an open source and available for download. And the screen-shots will be from the Mes…