[jboss-cvs] JBossAS SVN: r88710 - in projects/microcontainer/trunk/kernel/src/main/java/org/jboss: kernel/plugins/dependency and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue May 12 05:39:59 EDT 2009
Author: alesj
Date: 2009-05-12 05:39:59 -0400 (Tue, 12 May 2009)
New Revision: 88710
Added:
projects/microcontainer/trunk/kernel/src/main/java/org/jboss/beans/metadata/api/annotations/IgnoreAOP.java
Modified:
projects/microcontainer/trunk/kernel/src/main/java/org/jboss/kernel/plugins/dependency/DescribeAction.java
Log:
Add @IgnoreAOP.
Copied: projects/microcontainer/trunk/kernel/src/main/java/org/jboss/beans/metadata/api/annotations/IgnoreAOP.java (from rev 88707, projects/microcontainer/trunk/kernel/src/main/java/org/jboss/beans/metadata/api/annotations/MCAnnotations.java)
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/java/org/jboss/beans/metadata/api/annotations/IgnoreAOP.java (rev 0)
+++ projects/microcontainer/trunk/kernel/src/main/java/org/jboss/beans/metadata/api/annotations/IgnoreAOP.java 2009-05-12 09:39:59 UTC (rev 88710)
@@ -0,0 +1,39 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.beans.metadata.api.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Ignore any AOP mechanism on this bean.
+ *
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+ at Target(ElementType.TYPE)
+ at Retention(RetentionPolicy.RUNTIME)
+public @interface IgnoreAOP
+{
+}
\ No newline at end of file
Modified: projects/microcontainer/trunk/kernel/src/main/java/org/jboss/kernel/plugins/dependency/DescribeAction.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/java/org/jboss/kernel/plugins/dependency/DescribeAction.java 2009-05-12 08:57:28 UTC (rev 88709)
+++ projects/microcontainer/trunk/kernel/src/main/java/org/jboss/kernel/plugins/dependency/DescribeAction.java 2009-05-12 09:39:59 UTC (rev 88710)
@@ -24,6 +24,7 @@
import java.util.List;
import org.jboss.beans.info.spi.BeanInfo;
+import org.jboss.beans.metadata.api.annotations.IgnoreAOP;
import org.jboss.dependency.spi.ControllerState;
import org.jboss.kernel.Kernel;
import org.jboss.kernel.spi.config.KernelConfig;
@@ -31,6 +32,7 @@
import org.jboss.kernel.spi.dependency.DependencyBuilderListItem;
import org.jboss.kernel.spi.dependency.KernelController;
import org.jboss.kernel.spi.dependency.KernelControllerContext;
+import org.jboss.kernel.spi.dependency.helpers.AbstractDependencyBuilder;
import org.jboss.kernel.spi.metadata.KernelMetaDataRepository;
import org.jboss.metadata.spi.MetaData;
@@ -43,7 +45,20 @@
*/
public class DescribeAction extends AnnotationsAction
{
+ /** Basic dependency builder, no AOP */
+ private DependencyBuilder basicDependencyBuilder = createBasicDependencyBuilder();
+
/**
+ * Create basic dependency builder.
+ *
+ * @return the basic dependency builder
+ */
+ protected DependencyBuilder createBasicDependencyBuilder()
+ {
+ return new AbstractDependencyBuilder();
+ }
+
+ /**
* Get dependency builder.
*
* @param md the metadata
@@ -56,8 +71,16 @@
DependencyBuilder dependencyBuilder = md.getMetaData(DependencyBuilder.class);
if (dependencyBuilder == null)
{
- KernelConfig config = kernel.getConfig();
- dependencyBuilder = config.getDependencyBuilder();
+ IgnoreAOP ignoreAOP = md.getAnnotation(IgnoreAOP.class);
+ if (ignoreAOP != null)
+ {
+ return basicDependencyBuilder;
+ }
+ else
+ {
+ KernelConfig config = kernel.getConfig();
+ dependencyBuilder = config.getDependencyBuilder();
+ }
}
return dependencyBuilder;
}
More information about the jboss-cvs-commits
mailing list