private static List<DeploymentAspect> aspects = null;
public static synchronized List<DeploymentAspect> getSortedDeploymentAspects() {
if (aspects == null) {
final List<DeploymentAspect> deploymentAspects = new LinkedList<DeploymentAspect>();
final ClassLoaderProvider provider = ClassLoaderProvider.getDefaultProvider();
final ClassLoader cl = provider.getServerIntegrationClassLoader();
deploymentAspects.addAll(getDeploymentAspects(cl, "/META-INF/stack-agnostic-deployment-aspects.xml"));
deploymentAspects.addAll(getDeploymentAspects(cl, "/META-INF/stack-specific-deployment-aspects.xml"));
final ClassLoader jaxrpcCl = provider.getServerJAXRPCIntegrationClassLoader();
deploymentAspects.addAll(getDeploymentAspects(jaxrpcCl, "/META-INF/jaxrpc-deployment-aspects.xml"));
aspects = DeploymentAspectSorter.getInstance().sort(deploymentAspects);
}
return aspects;
}