[jboss-cvs] JBossAS SVN: r87176 - projects/webbeans-ri-int/trunk/deployer/src/main/java/org/jboss/webbeans/integration/deployer/env.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Sun Apr 12 08:40:36 EDT 2009
Author: alesj
Date: 2009-04-12 08:40:36 -0400 (Sun, 12 Apr 2009)
New Revision: 87176
Modified:
projects/webbeans-ri-int/trunk/deployer/src/main/java/org/jboss/webbeans/integration/deployer/env/DynamicDependencyCreator.java
Log:
Creator is actually generic, not having just bootstrap as target.
Modified: projects/webbeans-ri-int/trunk/deployer/src/main/java/org/jboss/webbeans/integration/deployer/env/DynamicDependencyCreator.java
===================================================================
--- projects/webbeans-ri-int/trunk/deployer/src/main/java/org/jboss/webbeans/integration/deployer/env/DynamicDependencyCreator.java 2009-04-12 09:08:42 UTC (rev 87175)
+++ projects/webbeans-ri-int/trunk/deployer/src/main/java/org/jboss/webbeans/integration/deployer/env/DynamicDependencyCreator.java 2009-04-12 12:40:36 UTC (rev 87176)
@@ -32,7 +32,7 @@
import org.jboss.kernel.plugins.bootstrap.basic.KernelConstants;
/**
- * Bean which knows how to create dynamic dependencies to bootstrap bean.
+ * Bean which knows how to create dynamic dependencies to target bean.
*
* @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
*/
@@ -48,23 +48,23 @@
}
/**
- * Create dependencies to bootstrap bean.
+ * Create dependencies to target bean.
*
- * @param bootstrapName the bootstrap bean name
+ * @param targetName the target bean name
* @param dependencies dependencies names
* @param whenRequiredState when required state
* @param dependentState dependencies dependent state
*/
- public void createDepenencies(Object bootstrapName, Iterable<String> dependencies, String whenRequiredState, String dependentState)
+ public void createDepenencies(Object targetName, Iterable<String> dependencies, String whenRequiredState, String dependentState)
{
- if (bootstrapName == null)
- throw new IllegalArgumentException("Null bootstrap name");
+ if (targetName == null)
+ throw new IllegalArgumentException("Null target name");
if (dependencies == null)
throw new IllegalArgumentException("Null dependecies");
- ControllerContext bootstrapControllerContext = controller.getContext(bootstrapName, null);
- if (bootstrapControllerContext == null)
- throw new IllegalArgumentException("No such bootstrap bean installed: " + bootstrapName);
+ ControllerContext targetControllerContext = controller.getContext(targetName, null);
+ if (targetControllerContext == null)
+ throw new IllegalArgumentException("No such target bean installed: " + targetName);
ControllerState whenRequired;
if (whenRequiredState == null)
@@ -72,7 +72,7 @@
else
whenRequired = new ControllerState(whenRequiredState);
- ControllerState currentBootstrapState = bootstrapControllerContext.getState();
+ ControllerState currentBootstrapState = targetControllerContext.getState();
if (controller.getStates().isBeforeState(currentBootstrapState, whenRequired) == false)
throw new IllegalArgumentException("Bootstrap bean is already past " + whenRequiredState + " state");
@@ -80,10 +80,10 @@
if (dependentState != null)
dependent = new ControllerState(dependentState);
- DependencyInfo di = bootstrapControllerContext.getDependencyInfo();
+ DependencyInfo di = targetControllerContext.getDependencyInfo();
for (Object dependency : dependencies)
{
- DependencyItem item = new AbstractDependencyItem(bootstrapName, dependency, whenRequired, dependent);
+ DependencyItem item = new AbstractDependencyItem(targetName, dependency, whenRequired, dependent);
di.addIDependOn(item);
}
}
More information about the jboss-cvs-commits
mailing list