Red Hat Developer Program

JUDCon 2012 - Modular Java EE in the Cloud

A JUDCon 2012 session presented by Paul Bakker Designing a system that can evolve without creating a maintenance nightmare is far from trivial and there are no silver bullets to do this correctly. A service oriented, modular architecture will help a lot to achieve this goal. Modularity forces separation of concerns which, when combined with a service oriented architecture, enables you to replace parts of a system without breaking others. The only mature modularity approach for Java is OSGi. OSGi is a framework that enables low-level modularity and services, but it is not an application framework like Java EE, i.e. you still need APIs to create web applications, use transactions, access data sources etc. Without these APIs you will have a hard time to actually build applications. Unfortunately OSGi and Java EE did not interoperate well in the past; it was very challenging to mix both. But what if we want modularity in our architecture, but also the ease-of-use of Java EE 6? Luckily times are changing. All major application servers are getting support for deploying mixed Java EE and OSGi applications. This makes it possible to deploy OSGi bundles that contain Java EE 6 code such as EJBs, JPA and JAX-RS resources. CDI can be used to inject OSGi services and EJBs can easily be exported as OSGi services too. The next question is how to deploy this into the cloud. Just uploading a large WAR file to a server in the cloud doesn't fit modularity very well. How can you update just parts of a running application without breaking the rest of it? We will introduce Apache ACE, an Open Source Provisioning Platform to deploy OSGi bundles (containing Java EE code) and other artifacts to the cloud.