4.3. Load-time weaving
Note
From Spring 3.0 onward, load-time weaving on Red Hat JBoss Enterprise Application Platform is supported out of the box. The component described in this section can be used to facilitate backward compatibility, but configuring a custom load-time weaver is not required when using Spring 3.0 or later.
Load-time weaving support is provided by the
snowdrop-weaving.jar library.
To perform load-time weaving for the application classes in Spring (either for using load-time support for AspectJ or for JPA support), the Spring framework needs to install its own transformers in the classloader. For JBoss Enterprise Application Platform, a classloader-specific
LoadTimeWeaver is necessary.
Define the
JBossLoadTimeWeaver in the Spring application context as shown here:
<context:load-time-weaver weaver-class="org.jboss.instrument.classloading.JBossLoadTimeWeaver"/>