[jboss-cvs] JBossAS SVN: r60569 - branches/Branch_4_0/aspects/src/main/org/jboss/aop/deployment.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Feb 15 10:16:24 EST 2007
Author: kabir.khan at jboss.com
Date: 2007-02-15 10:16:24 -0500 (Thu, 15 Feb 2007)
New Revision: 60569
Modified:
branches/Branch_4_0/aspects/src/main/org/jboss/aop/deployment/AspectDeployer.java
Log:
Cleanup
Modified: branches/Branch_4_0/aspects/src/main/org/jboss/aop/deployment/AspectDeployer.java
===================================================================
--- branches/Branch_4_0/aspects/src/main/org/jboss/aop/deployment/AspectDeployer.java 2007-02-15 13:38:04 UTC (rev 60568)
+++ branches/Branch_4_0/aspects/src/main/org/jboss/aop/deployment/AspectDeployer.java 2007-02-15 15:16:24 UTC (rev 60569)
@@ -85,7 +85,7 @@
/**
* Set the suffixes and relative order attributes.
- *
+ *
* Those are read at subdeployer registration time by the MainDeployer
* to update its SuffixOrder list.
*/
@@ -171,9 +171,9 @@
if (scl != null)
{
- log.info("AOP deployment is scoped using classloader " + scl);
+ log.info("AOP deployment is scoped using classloader " + scl);
}
-
+
Thread.currentThread().setContextClassLoader(di.ucl);
if (!di.isXML)
{
@@ -181,7 +181,7 @@
AspectAnnotationLoader loader = new AspectAnnotationLoader(AspectManager.instance());
loader.deployInputStreamIterator(it);
}
-
+
AspectXmlLoader.deployXML(docURL, scl);
Notification msg = new Notification("AOP Deploy", this, getNextNotificationSequenceNumber());
sendNotification(msg);
@@ -230,7 +230,7 @@
log.debug("Ignoring request to stop '" + di.url + "', current state: " + di.state);
return;
}
-
+
log.debug("undeploying document " + di.url);
ClassLoader old = Thread.currentThread().getContextClassLoader();
try
@@ -305,7 +305,7 @@
throw new DeploymentException("Failed to find META-INF/jboss-aop.xml");
return docURL;
}
-
+
private ClassLoader getScopedClassLoader(DeploymentInfo di, URL docUrl) throws Exception
{
//Scoped AOP deployments are only available when deployed as part of a scoped sar, ear etc.
@@ -315,7 +315,7 @@
{
return di.ucl;
}
-
+
LoaderRepository attachToRepository = getLoaderRepositoryIfAttaching(di, docUrl);
if (attachToRepository != null)
{
@@ -325,24 +325,23 @@
}
return null;
}
-
+
private LoaderRepository getLoaderRepositoryIfAttaching(DeploymentInfo di, URL docUrl) throws Exception
{
if (di.parent == null)
{
//We are a top-level deployment, check if we are meant to be attaching to a scoped repository
-
- //TODO Use AspectXmlLoader.loadURL once AOP is added to repository
+
Document doc = AspectXmlLoader.loadURL(docUrl);
Element top = doc.getDocumentElement();
NodeList children = top.getChildNodes();
int childlength = children.getLength();
for (int i = 0; i < childlength ; i++)
{
- Node child = children.item(i);
+ Node child = children.item(i);
if (child.getNodeType() == Node.ELEMENT_NODE)
{
- Element element = (Element)child;
+ Element element = (Element)child;
if (element.getTagName().equals("loader-repository"))
{
String repositoryName = null;
@@ -367,7 +366,7 @@
{
throw new RuntimeException("loader-repository='" + repositoryName + "' is not a valid object name", e);
}
-
+
try
{
MBeanInfo info = server.getMBeanInfo(on);
@@ -376,7 +375,7 @@
{
log.warn("No scoped loader repository exists with the name " + on);
}
-
+
LoaderRepository repository = (LoaderRepository)server.getAttribute(on, "Instance");
if (repository instanceof HeirarchicalLoaderRepository3)
{
@@ -387,10 +386,10 @@
log.warn("Loader repository " + on + " is not a isolated loader repository. Deploying aspects in default domain.");
}
}
- }
+ }
}
}
-
+
return null;
}
}
\ No newline at end of file
More information about the jboss-cvs-commits
mailing list