Jump to: navigation, search

Difference between revisions of "Virgo/Future"

(Bootstrapping Jetty)
Line 9: Line 9:
 
=== Bootstrapping Jetty ===
 
=== Bootstrapping Jetty ===
  
Jetty already supports [[Jetty/Feature/Jetty_OSGi#Jetty_bootstrapping_in_OSGi|bootstrapping inside OSGi]]. The Jetty bootstrapping bundle 'org.eclipse.jetty.osgi.boot' can easily be included in the list of initial artifacts to deploy into the user region.
+
Jetty already supports [[Jetty/Feature/Jetty_OSGi#Jetty_bootstrapping_in_OSGi|bootstrapping inside OSGi]]. The Jetty bootstrapping bundle 'org.eclipse.jetty.osgi.boot' can easily be included in the list of initial artifacts automatically deployed into the user region during Virgo startup.
  
 
=== Deploying Web Bundles ===
 
=== Deploying Web Bundles ===

Revision as of 03:08, 1 July 2010



This page notes design ideas for future Virgo features.

Jetty Support

Note that Jetty support may be provided mostly in Virgo's sister project Gemini Web. The Tomcat-based Virgo Web Server integrates Gemini Web and a Jetty-based variant may do the same.

Bootstrapping Jetty

Jetty already supports bootstrapping inside OSGi. The Jetty bootstrapping bundle 'org.eclipse.jetty.osgi.boot' can easily be included in the list of initial artifacts automatically deployed into the user region during Virgo startup.

Deploying Web Bundles

Jetty already supports deployment of OSGi web applications.

After Jetty is bootstrapped in the OSGi framework, web bundles may be deployed directly to Jetty using the whiteboard pattern.

A ContextHandler service must be registered with appropriate service properties. Presumably the bundle registering the service is the web bundle itself, although this is not clear from the Jetty documentation above which refers to the registering bundle as a 'contributor'. It is not clear whether the contributor is a bundle which is contributing some other web bundle or whether the contributor is the web bundle itself (in which case why should it be called 'contributor'?).

Assuming that the contributor is the web bundle itself, Virgo will need to create a ContextHandler service each time a web bundle starts.

If deployment of the web application fails, the failure must be reported back on the thread which initiated deployment. A problem with the whiteboard pattern is that errors are not easily detected. Perhaps Jetty provides some way to listen for successful or failed deployment of a particular web bundle?

Deploying WAR Files

Jetty supports deploying WAR files by installing the WAR file as a bundle using the "war:" URL scheme. However, Virgo supports deploying WAR files via all its standard deployment mechanisms which ultimately drive the deployer API. We could either drive installation using the "war:" scheme or, to provide greater consistency with the existing support, we could transform WARs into web bundles using the transformation support inside Gemini Web.

Class Loading

Need to ensure correct class loading and resource lookup in the single bundle case as well as the case of a web bundle inside a scoped plan.

Need to support class loader customisation, throw-away class loaders, etc. as in the current Virgo web support.

Logging

Need to ensure Jetty's logs feed in to the appropriate Virgo Medic logs.

Also need to support per-application logging.