Skip to main content

Posts

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 http://pastie.org/695314

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: http://subclipse.tigris.org/ update_1.6.x

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 j

Master Detail

Master-Detail Eclipse Forms I just finished working on the editor which uses the Master-Detail pattern of the eclipse forms. During which I faced several problems like: In my master block, when the size of table-viewer increased, the master block shows the scrollbar instead of table-viewer. Also, it made the length of the detail and master parts equal which made my editor unusable Detail part having scroll problems like the one mentioned above Setting the details part data-dynamically was yet another area where I faced a lot of problem In this blog, I will be giving a brief introduction about the master-detail pattern and will be addressing the problems mentioned above. 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 Messaging module of the FID using the example of JMS Messages . In