JSR-303 Bean Validation and Spring MVC in a Sling OSGi container

Submitted by jasonday on Sun, 09/11/2011 - 22:53

After reading Having “fun” with JSR-303 Beans Validation and OSGi + Spring DM, I thought I would attempt to bootstrap JSR-303 Beans Validation in Spring in a Sling OSGi container.  Unfortunately, a few changes have been made to the Hibernate API since Magnus' articles, so a few updates to his version are required.  Additionally, I want to enable JSR-303 Beans Validation in the

Running Spring MVC in Sling

Submitted by jasonday on Fri, 09/02/2011 - 22:27

It is sometimes desirable to run Spring MVC within a Sling container. However, since Sling is a web application, you may not be able to utilize the features within Spring Dynamic Modules and drop a WAR file within the container. In this case, you need to create an application which will bootstrap the Spring Web container within the Sling context.

Build OSGi version of AspectJ Tools that doesn't conflict

Submitted by jasonday on Thu, 09/01/2011 - 22:42

An OSGi version of AspectJ Tools is already available from the Spring Bundle Repository. Unfortunately, some of the exports of that bundle may conflict with your OSGi container, such as Apache Felix. In this case, you may need to re-wrap the bundle with the conflicting exports disabled. Additionally, versions newer than v1.6.6 contain a change that can cause an error when attempting to load certain types of Aspects with Spring annotations in an OSGi environment.