OSGi is a set of specifications published by the OSGi Alliance  for modular Java-based services. OSGi has been around for a number of years, and was originally targeted at the network device market, but has increasingly been moving into the enterprise stream, where the ability to compose together diverse modules in a standard way is seen to offer significant competitive advantages.

As Jetty’s architecture has always been component-based and highly embeddable, moving Jetty into OSGi was something of a natural fit. A while ago, we were contacted by the Eclipse guys to tell us that they’d integrated Jetty into Eclipse’s OSGi container – called Equinox – as the Http service. We struck up a dialog and made some changes to Jetty to make it even easier to slurp into OSGi-land.  As an outcome of that dialog, we now publish OSGi manifests in all the Jetty jars so they become instantly visible when dropped into an OSGi container.

Lest you were thinking that Jetty is only in the Http layer in Equinox, we’re also embedded as the OSGi Http Service in most of the other well-known containers like Apache Felix and OPS4JPax. We’ve also been collaborating with the Spring guys on using Jetty in Spring Dynamic Modules, and are continuing to plow their feedback  into improving Jetty.

OSGi has now also been making inroads into the enterprise, an area which has traditionally seen a lot of  use of Jetty as the webtier in J2EE servers such as Geronimo, JBoss and EAServer. Enterprise servers are starting to adopt an internal OSGi architecture, which is again driving the uptake of Jetty. For example, JOnAS 5 now provides Jetty as a web-tier implementation, and Jetty is incorporated into BEA’s new OSGi-based microServiceArchitecture upon which their new enterprise offerings are based.  We’ve listed the OSGi containers that use Jetty here – we’d like to hear of any others you come across.

Interestingly, OSGi is also moving “down” the spectrum of Java environments from the enterprise level to the mobile level (from whence it came actually). For example, Sprint recently announced their OSGi-based Titan sofware environment for Win Mobile 6 PDA phones.  So given Jetty’s extensive OSGi integration and our proven embeddability, there will be a natural migration path for us to mobile OSGi platforms.  In fact, a mobile OSGi platform would prove an interesting challenge to Google’s Android platform, but as we’ve already got Jetty running on Android, we’ve got it covered either way!

 

Jetty and OSGi

One thought on “Jetty and OSGi

  • May 15, 2008 at 9:14 am
    Permalink

    how to deploy web application(Sevlet + jdbc connection) with out using ide. please provide step by step process with example by using Jetty Server.

Comments are closed.