3.2. Why SpringSource Application Platform

You could deploy a web application in a web- or application-server. Or you could even deploy directly in an OSGi container such as Equinox. However, deploying in the SpringSource Application Platform offers a number of key benefits that make it suitable for enterprise application development.

Unified treatment for deployment of applications

While many using the SpringSource Application Platform will take advantage of OSGi capability, not all applications need such sophistication. Further, some applications may want to migrate to full-power OSGi only over time (as we will discuss in Chapter 7, Migrating to OSGi). Consequently, some applications may choose to stay as simple WAR deployments. The SpringSource Application Platform can deploy a number of different styles, from a simple WAR to a full blown set of OSGi bundles.

Simplified development and deployment of OSGi-based applications

Developing and deploying OSGi applications involves inherent complexity such as:

  • Obtaining OSGi bundles for popular Java libraries: For optimal benefits, every technology you use in an OSGi application must be packaged as OSGi bundles. Currently, this involves manually converting JAR files into bundles and making sure that any libraries needed by those bundles are also available as OSGi bundles.
  • Package management complexity: OSGi bundles use other bundles through Import-Package directives. Many of the applications use a set of common technologies (an ORM solution, a web framework, etc.). Combining these two characteristics leads to repeated and long Import-Package statements.
  • Lack of application level isolation: In OSGi everything is a bundle and bundles share the same container space. Therefore, if two applications use the same bundles, services exposed by them will cause interference between the applications. Further, since there isn't a concept of an application as a set of bundles, you cannot deploy or undeploy an application as a unit.

The platform introduces a number of features to solve these issues:

  • It includes OSGi bundles for many popular Java libraries to get you started quickly with creating OSGi applications.
  • It introduces an OSGi library concept that obviates the need for repeated and long-winded Import-Package statements.
  • It introduces Platform Archive packaging that offers application level isolation and deployment

Enhanced diagnostics during deployment and in production

Identifying why an application won't deploy, or which particular library dependencies are unsatisfied is the cause of many headaches! Similarly, production time errors that don't identify the root cause are all too familiar to Java developers. The Platform was designed from the ground up to enable tracing and First Failure Data Capture (FFDC) that empower developers with precise information at the point of failure to fix the problem quickly.

[Tip]Commercial SpringSource Application Platform offering

The commercial version of SpringSource Application Platform offers additional capabilities such as instrumented versions of platform libraries that enable in-depth monitoring of deployed applications. See SpringSource for more details.