Run Java with Jetty in Windows Azure
Following PDC09 last fall, we announced support for running Java and Tomcat in Windows Azure, but this doesn't mean Tomcat is the only Java application container supported in Windows Azure. In fact, the approach basically consists of creating a Java Runtime (JRE) and any Java package that can be instantiated via the command line (instead of needing to install into the OS). This Java application can then be packaged into a Worker Role application, and then deployed into Windows Azure.
If you're looking for an alternative deployment approach, you should consider using Jetty. As Microsoft Architect David Chou explains in his recent blog post Run Java with Jetty in Windows Azure, Jetty is a Java-based, open source Web Server which provides an HTTP server and Servlet container capable of serving static and dynamic content either from a standalone or embedded instantiations. Jetty is used by many popular projects, including the Apache Geronimo JavaEE compliant application server, BEA WebLogic Event Server, Google App Engine and Web Toolkit plug-in for Eclipse, Google Android, RedHat JBoss and others.
The Jetty project provides:
- Asynchronous HTTP Server
- Standard based Servlet Container
- Web Sockets server
- Asynchronous HTTP Client
- OSGi, JNDI, JMX, JASPI, AJP support
To further explain exactly how to get started, as well as the differences between using Jetty and other tools for developing applications for Windows Azure, be sure to read David's post. You can also check out the following resources to help you get started or answer any questions.