Show Table of Contents
12.9.2. Attaching to a scoped deployment
If you have an application that uses classloader isolation, as long as you have prepared your classes, you can later attach an AOP file to that deployment. If we have an EAR file scoped using a
jboss-app.xml file, with the scoped loader repository jboss.test:service=scoped:
<jboss-app>
<loader-repository>
jboss.test:service=scoped
</loader-repository>
</jboss-app>
We can later deploy an AOP file containing aspects and configuration to attach that deployment to the scoped EAR. This is done using the
loader-repository tag in the AOP file's META-INF/jboss-aop.xml file.
<?xml version="1.0" encoding="UTF-8"?>
<aop>
<loader-repository>jboss.test:service=scoped</loader-repository>
<!-- Aspects and bindings -->
</aop>
This has the same effect as deploying the AOP file as part of the EAR as we saw previously, but allows you to hot deploy aspects into your scoped application.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.