OSGi, Ivy and WebBeans
With 3.2.1, we’ve started working on our OSGi integration with Resin and based on that work, it looks like we’ll have a slight different approach to OSGi than most everyone else. Since OSGi was originally designed for embedded applications, the design is slightly different than the requirements for an application server.
From our perspective, OSGi provides two benefits:
- a jar versioning and dependency system
- a service registration system
The versioning and dependency of OSGi gives us a chance to add more sophisticated classloading to Resin. For example, we can add a generic deployment director for all library jars in ${resin.root} and create the classloaders as needed at the web-app level. This could mean avoiding all WEB-INF/lib jars, reducing the .war size and improving memory efficiency.
Since OSGi’s service system overlaps with our use of WebBeans for service configuration and injection, we’re working on merging the two systems. OSGi services will export to the web-app’s WebBeans context, and you can use WebBeans inside an OSGi bundle to define services and components. By combining the two specifications, we’re hoping to add more power and flexibility to both, and also make documentation consistent, since there will be one unified service system.
Tags: classloaders, ivy, osgi, webbeans
