vrijdag 31 juli 2009

Running Equinox on the System i - Part 1


For our next version of TD/OMS, which is our System i based Software Change Management System, we are moving to OSGi. Since a large part of the processing involves the management of the local System i file system we also need to setup OSGi on this machine.

Okay so the first thing to do is to determine which OSGi implementation to install. Since we are an Eclipse foundation member the first thing to try is the Eclipse implementation of OSGi called Equinox. Equinox has its own page at http://www.eclipse.org/equinox and there is a quick start guide.

The quick start guide instructs us to download Equinox from the download site and sure enough there is a 25 mb drop. After downloading the contents of the zip we can safely say that there is too much in this file but we will worry about that later.

Installing Equinox on the AS/400
I have arranged network access to the IFS so the first thing to do is determine a location. For this I have picked the QOpenSys file system which I always use for long filename and case sensitive related stuff. In the QOpenSys file system I create an Equinox directory and then I copy the plugins directory from the drop into this directory.

According to the getting started guide I would now be able to run equinox with the following command. java -jar org.eclipse.osgi_3.2.0.jar -console

On the System i and translated to the correct jar in the plugins directory (yes you have to look that up yourself) this looks like this:

JAVA CLASS('/QOpenSys/Equinox/plugins/org.eclipse.osgi_3.5.0.v20090520.jar') PARM('-console')

The 5250 java console pops up and after a while the message "Attaching Java program to /QOpenSys/Equinox/plugins/org.eclipse.osgi_3.5.0.v20090520.jar." appears. This is the indication that the jar file was found and that the System i is now compiling all class files to local digestable classes.

And sure enough, after a short while we see the OSGi console. To check all the installed bundles we enter the command "ss" and there, in all its glory, is the org.eclipse.osgi bundle.

I would call this a completely painless operation.

In the next part I will try to install ECF and some homegrown bundles