I am a *little* biased in that I think IBM i on Power is the greatest server platform on the planet but you really can’t blame me since it seems that it can run just about any app you can throw at it (well, any non-Windows based app). Over a year ago I had attempted to get Glassfish running on i because I had heard good things about it and wanted to give it a whirl. It actually started with a Ruby CMS application called Radiant that I wanted to run to demonstrate that yes, Ruby can run on i. This particular implementation suggested Glassfish as the web server. First I tried a full blown copy of Glassfish (3.0.1) but got a couple of very strange errors that seemed related to the IBM J9 JVM and after running them down with marginal success, I decided to install the Glassfish gem, which, surprisingly, ran just fine on i. I documented the issues to both Oracle and IBM and moved on. (BTW you can check out the Ruby on IBM i site here)
The primary issue with the full Glassfish implementation was that the Admin console wouldn’t display and it was definitely due to the J9 JVM. The actual server would run fine. You could auto-deploy and run servlets and other apps but you couldn’t manage them. One of things I liked about Glassfish was the administration console, so not having a console made using Glassfish a non-starter for me.
What a difference a year or so makes. Oracle released Glassfish 3.1.1 and that seems to have solved the Admin console issue for me. There is still one open issue now, but there is a workaround, so using Glassfish in production on IBM i is now a reality. Here is all you need to do:
I downloaded the aix zip version of Glassfish 3.1.1 and just expanded it to the IFS. I made some changes to the domain.xml file to point to the correct IP and ports I needed and I removed references to the -server and -client java directives (they had given me trouble before, so I
commented them out). I changed the MaxPermSize as well ( -XX:MaxPermSize=384m ). That was about it. I am running Java 6, 32bit
and I am pretty current on Group PTF’s.
I came across one additional issue when running Liferay on Glassfish on IBM i: There was a java.lang.NoSuchMethodException: com.ibm.lang.management.OperatingSystemMXBeanImpl.getTotalPhysicalMemorySize() error. Turns out that this was patched for AIX on a previous build but that patch is conditional on the os.name system property returning ‘AIX’. This should work on i except that PASE returns ‘OS/400 ‘ instead of ‘AIX’ so I have submitted a bug report to Oracle (could hack it myself, I guess) but there is a workaround: the Oracle developer I worked with suggested I pass this argument to the Glassfish start command:
asadmin create-jvm-options -Dos.name=OS/400-AIX
That seems to work fine. With all that info, you should have no problems using Glassfish on IBM (FYI: I am running 6.1 and use the Java 6 JVM)