Over the last weeks I have been preparing for the move from JBoss to Glassfish application server. The reason for this was to have full Java EE 5 capability instead of having to depend on a patched JBoss 4 server.
This migration has caused me a few problems though. I started with the most difficult application where I did a lot of work on security with JBoss. This was an application where I integrated J2EE declarative security with JAAS and tapestry. A lot of work.
The application used authentication to a database so looking for support in glassfish, I found the JDBC realm. Unfortunately, that was a bit restrictive because it placed all kinds of restrictions on the data model. So the first thing I had to do was to write a new flexible JDBC realm that could be configured with the same flexibility as that in JBoss. Of course, that didn't work out of the box and I encountered an error. Finally, however, I managed to work around this problem. See this thread for details.
After this problem, it was relatively easy to move over all the other applications. One final issue I encountered was the automatic restart of glassfish at a server reboot. Here, SUN recommends a non-standard approach by editing /etc/inittab directly. This is cumbersome since that file is managed by yast2 on SuSE so I added a init.d script for glassfish instead. This fits much better in the way that services work on SuSE.
Now everything is running on glassfish and jboss has been shutdown. Migration successful!