SpringSource Application Platform

As SpringSource released its first beta version of the SpringSource Application Platform (S2AP), my attention was jerked towards it. In order to get to know more about this new project from Spring I attended a webinar last week. The platform looks very promising in terms of used technologies and the features it offers.

So what is S2AP?

The S2AP is the Spring Dynamic Modules Kernel, running on top of Equinox, hosting a Tomcat server, with a specialized management interface, with some funky new advantages. So you get a Java EE application server with OSGi dynamic modules and all the power of the Spring Framework. Awesome!

The platform aims at being a lightweight, customizable Java EE Server, with a preference for Spring-oriented applications. The platform has no trouble running applications that were not built with Spring technologies though, it accepts standard Java EE WAR-files and also standard OSGi bundles.

Yet Another Application Server?

Definitely not. I have recently been looking at possibilities for running an application server on OSGi, or running OSGi in an application server. However cool this sounds, it proves pretty hard to realize. If you want to run a OSGi inside a web application, you need to somehow proxy the servlet requests to the OSGi subsystem, which then gives it to the right bundle. Suffice to say, it was not easily done.

The S2AP platform does all this for you. Because the platform embeds a Tomcat server and completely controls it, you don’t have to worry about proxying requests, delegating them to the right bundle. I should add that this is not entirely new, I have also been looking at the JOnAS project, which is also an OSGi based application server, but I have yet to try it for real.

Hot features!

The platform also comes with handy features in case something goes wrong. I’m pretty sure everyone sometimes gets a part of a logfile from a production server, containing a nasty set of stack traces as some exception has occurred. This generally forces us to try and recreate the situation, but that’s not so easy from just a single NullPointerException.

The S2AP comes with ‘Data Capture on Failure’, meaning it will generate a snapshot of the platform when it detects problems in the application. These snapshots contain information about all active Threads and their current lock-states and supposedly a lot more. This sounds very good, especially since the S2AP also comes with a Deadlock Detection feature, which will also trigger the snapshot. I think I’ll have to try it for myself sometime in the near future to see how much information is actually contained in such a snapshot.

Another nice feature is the fact that the platform accepts applications in standard JEE WAR-files and standard OSGi bundles. However, the platform also introduces its own format: the Platform ARchive (PAR). The PAR is actually bringing the modularity to the application level. A PAR is a single deployable unit in which multiple bundles are contained which together form an application. It has its own service namespace to keep the different applications from cluttering the OSGi service registry.

The webinar certainly raised my interest and I am hoping to see and hear more of this on the SpringOne conference in June.