[jboss-cvs] JBossAS SVN: r79513 - in projects/microcontainer/trunk/kernel/src/test: java/org/jboss/test/kernel/deployment/test and 1 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Oct 15 04:15:26 EDT 2008


Author: alesj
Date: 2008-10-15 04:15:26 -0400 (Wed, 15 Oct 2008)
New Revision: 79513

Added:
   projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/support/HAPartition.java
   projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/support/HAPartitionCacheHandler.java
   projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/support/SomeCacheTreeManager.java
   projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/support/SuperDemand.java
   projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/support/SuperDemandAnnotationPlugin.java
   projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/support/SuperDemandCreator.java
   projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/test/SuperDemandAnnotationTestCase.java
   projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/test/SuperDemandInstallTestCase.java
   projects/microcontainer/trunk/kernel/src/test/resources/org/jboss/test/kernel/deployment/test/SuperDemandAnnotationTestCase.xml
   projects/microcontainer/trunk/kernel/src/test/resources/org/jboss/test/kernel/deployment/test/SuperDemandInstallTestCase.xml
Modified:
   projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/test/DeploymentTestSuite.java
Log:
Scott's super-demand example - twice. ;-)

Added: projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/support/HAPartition.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/support/HAPartition.java	                        (rev 0)
+++ projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/support/HAPartition.java	2008-10-15 08:15:26 UTC (rev 79513)
@@ -0,0 +1,46 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.test.kernel.deployment.support;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class HAPartition
+{
+   private boolean started;
+   private HAPartitionCacheHandler handler;
+
+   public void start()
+   {
+      started = true;
+   }
+
+   public boolean isStarted()
+   {
+      return started;
+   }
+
+   public void setHandler(HAPartitionCacheHandler handler)
+   {
+      handler.setPartition(this);
+   }
+}

Added: projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/support/HAPartitionCacheHandler.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/support/HAPartitionCacheHandler.java	                        (rev 0)
+++ projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/support/HAPartitionCacheHandler.java	2008-10-15 08:15:26 UTC (rev 79513)
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.test.kernel.deployment.support;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class HAPartitionCacheHandler
+{
+   private HAPartition partition;
+
+   public void setPartition(HAPartition partition)
+   {
+      this.partition = partition;
+   }
+
+   public String getCache()
+   {
+      if (partition == null  || partition.isStarted() == false)
+         throw new IllegalArgumentException("HAPartition not started!");
+
+      return "some-cache";
+   }
+}
\ No newline at end of file

Added: projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/support/SomeCacheTreeManager.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/support/SomeCacheTreeManager.java	                        (rev 0)
+++ projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/support/SomeCacheTreeManager.java	2008-10-15 08:15:26 UTC (rev 79513)
@@ -0,0 +1,40 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.test.kernel.deployment.support;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class SomeCacheTreeManager
+{
+   private String clusteredCache;
+
+   public String getClusteredCache()
+   {
+      return clusteredCache;
+   }
+
+   public void setClusteredCache(String clusteredCache)
+   {
+      this.clusteredCache = clusteredCache;
+   }
+}
\ No newline at end of file

Added: projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/support/SuperDemand.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/support/SuperDemand.java	                        (rev 0)
+++ projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/support/SuperDemand.java	2008-10-15 08:15:26 UTC (rev 79513)
@@ -0,0 +1,41 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.test.kernel.deployment.support;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import java.lang.annotation.RetentionPolicy;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+ at Target(ElementType.TYPE)
+ at Retention(RetentionPolicy.RUNTIME)
+public @interface SuperDemand
+{
+   String demand();
+
+   String whenRequired() default "Instantiated";
+
+   String dependentState() default "Installed";
+}
\ No newline at end of file

Added: projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/support/SuperDemandAnnotationPlugin.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/support/SuperDemandAnnotationPlugin.java	                        (rev 0)
+++ projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/support/SuperDemandAnnotationPlugin.java	2008-10-15 08:15:26 UTC (rev 79513)
@@ -0,0 +1,53 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.test.kernel.deployment.support;
+
+import java.util.List;
+
+import org.jboss.beans.metadata.spi.MetaDataVisitorNode;
+import org.jboss.dependency.spi.DependencyInfo;
+import org.jboss.dependency.spi.DependencyItem;
+import org.jboss.dependency.spi.ControllerState;
+import org.jboss.dependency.plugins.AbstractDependencyItem;
+import org.jboss.kernel.plugins.annotations.ClassAnnotationPlugin;
+import org.jboss.kernel.spi.dependency.KernelControllerContext;
+import org.jboss.metadata.spi.MetaData;
+import org.jboss.reflect.spi.ClassInfo;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class SuperDemandAnnotationPlugin extends ClassAnnotationPlugin<SuperDemand>
+{
+   public SuperDemandAnnotationPlugin()
+   {
+      super(SuperDemand.class);
+   }
+
+   protected List<? extends MetaDataVisitorNode> internalApplyAnnotation(ClassInfo info, MetaData retrieval, SuperDemand annotation, KernelControllerContext context) throws Throwable
+   {
+      DependencyInfo di = context.getDependencyInfo();
+      DependencyItem item = new AbstractDependencyItem(context.getName(), annotation.demand(), new ControllerState(annotation.whenRequired()), new ControllerState(annotation.dependentState()));
+      di.addIDependOn(item);
+      return null;
+   }
+}
\ No newline at end of file

Added: projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/support/SuperDemandCreator.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/support/SuperDemandCreator.java	                        (rev 0)
+++ projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/support/SuperDemandCreator.java	2008-10-15 08:15:26 UTC (rev 79513)
@@ -0,0 +1,57 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.test.kernel.deployment.support;
+
+import org.jboss.beans.metadata.api.annotations.Constructor;
+import org.jboss.beans.metadata.api.annotations.Inject;
+import org.jboss.dependency.plugins.AbstractDependencyItem;
+import org.jboss.dependency.spi.Controller;
+import org.jboss.dependency.spi.ControllerState;
+import org.jboss.dependency.spi.DependencyInfo;
+import org.jboss.dependency.spi.DependencyItem;
+import org.jboss.dependency.spi.ControllerContext;
+import org.jboss.kernel.plugins.bootstrap.basic.KernelConstants;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class SuperDemandCreator
+{
+   private Controller controller;
+
+   @Constructor
+   public SuperDemandCreator(@Inject(bean = KernelConstants.KERNEL_CONTROLLER_NAME) Controller controller)
+   {
+      this.controller = controller;
+   }
+
+   public void createDependency(String name, String demand, String whenRequired, String dependentState)
+   {
+      ControllerContext context = controller.getContext(name, null);
+      if (context == null)
+         throw new IllegalArgumentException("Cannot find context: " + name);
+      
+      DependencyInfo di = context.getDependencyInfo();
+      DependencyItem item = new AbstractDependencyItem(context.getName(), demand, new ControllerState(whenRequired), new ControllerState(dependentState));
+      di.addIDependOn(item);
+   }
+}
\ No newline at end of file

Modified: projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/test/DeploymentTestSuite.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/test/DeploymentTestSuite.java	2008-10-15 08:00:00 UTC (rev 79512)
+++ projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/test/DeploymentTestSuite.java	2008-10-15 08:15:26 UTC (rev 79513)
@@ -82,6 +82,9 @@
       suite.addTest(ScopingAliasAPITestCase.suite());
       suite.addTest(ScopingOverrideTestCase.suite());
       suite.addTest(ScopingDependencyTestCase.suite());
+      // super-demand
+      suite.addTest(SuperDemandAnnotationTestCase.suite());
+      suite.addTest(SuperDemandInstallTestCase.suite());
 
       return suite;
    }

Copied: projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/test/SuperDemandAnnotationTestCase.java (from rev 79511, projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/test/MockServiceBindingTestCase.java)
===================================================================
--- projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/test/SuperDemandAnnotationTestCase.java	                        (rev 0)
+++ projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/test/SuperDemandAnnotationTestCase.java	2008-10-15 08:15:26 UTC (rev 79513)
@@ -0,0 +1,48 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.test.kernel.deployment.test;
+
+import junit.framework.Test;
+import org.jboss.test.kernel.deployment.support.SomeCacheTreeManager;
+
+/**
+ * SuperDemandAnnotationTestCase
+ *
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class SuperDemandAnnotationTestCase extends AbstractDeploymentTest
+{
+   public SuperDemandAnnotationTestCase(String name) throws Throwable
+   {
+      super(name);
+   }
+
+   public static Test suite()
+   {
+      return suite(SuperDemandAnnotationTestCase.class);
+   }
+
+   public void testDependency() throws Throwable
+   {
+      assertBean("Manager", SomeCacheTreeManager.class);
+   }
+}
\ No newline at end of file

Added: projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/test/SuperDemandInstallTestCase.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/test/SuperDemandInstallTestCase.java	                        (rev 0)
+++ projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/test/SuperDemandInstallTestCase.java	2008-10-15 08:15:26 UTC (rev 79513)
@@ -0,0 +1,48 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.test.kernel.deployment.test;
+
+import junit.framework.Test;
+import org.jboss.test.kernel.deployment.support.SomeCacheTreeManager;
+
+/**
+ * SuperDemandAnnotationTestCase
+ *
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class SuperDemandInstallTestCase extends AbstractDeploymentTest
+{
+   public SuperDemandInstallTestCase(String name) throws Throwable
+   {
+      super(name);
+   }
+
+   public static Test suite()
+   {
+      return suite(SuperDemandInstallTestCase.class);
+   }
+
+   public void testDependency() throws Throwable
+   {
+      assertBean("Manager", SomeCacheTreeManager.class);
+   }
+}
\ No newline at end of file

Copied: projects/microcontainer/trunk/kernel/src/test/resources/org/jboss/test/kernel/deployment/test/SuperDemandAnnotationTestCase.xml (from rev 79511, projects/microcontainer/trunk/kernel/src/test/resources/org/jboss/test/kernel/deployment/test/MockServiceBindingTestCase.xml)
===================================================================
--- projects/microcontainer/trunk/kernel/src/test/resources/org/jboss/test/kernel/deployment/test/SuperDemandAnnotationTestCase.xml	                        (rev 0)
+++ projects/microcontainer/trunk/kernel/src/test/resources/org/jboss/test/kernel/deployment/test/SuperDemandAnnotationTestCase.xml	2008-10-15 08:15:26 UTC (rev 79513)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+  <bean name="AnnotationHandlerFactory">
+     <constructor factoryClass="org.jboss.kernel.plugins.annotations.BeanAnnotationAdapterFactory" factoryMethod="getInstance" />
+  </bean>
+  <bean name="AnnotationHandler">
+     <constructor factoryMethod="getBeanAnnotationAdapter">
+        <factory bean="AnnotationHandlerFactory"/>
+     </constructor>
+     <incallback method="addAnnotationPlugin" />
+     <uncallback method="removeAnnotationPlugin" />
+  </bean>
+  <bean name="SuperDemandAnnotationPlugin" class="org.jboss.test.kernel.deployment.support.SuperDemandAnnotationPlugin" />
+
+  <bean name="Manager" class="org.jboss.test.kernel.deployment.support.SomeCacheTreeManager">
+    <property name="clusteredCache"><inject bean="HAPartitionCacheHandler" property="cache"/></property>
+    <annotation>@org.jboss.test.kernel.deployment.support.SuperDemand(demand="Partition", whenRequired="Configured", dependentState="Start")</annotation>
+  </bean>
+
+  <bean name="HAPartitionCacheHandler" class="org.jboss.test.kernel.deployment.support.HAPartitionCacheHandler"/>
+
+  <bean name="Partition" class="org.jboss.test.kernel.deployment.support.HAPartition">
+    <property name="handler"><inject bean="HAPartitionCacheHandler"/></property>
+  </bean>
+
+</deployment>

Added: projects/microcontainer/trunk/kernel/src/test/resources/org/jboss/test/kernel/deployment/test/SuperDemandInstallTestCase.xml
===================================================================
--- projects/microcontainer/trunk/kernel/src/test/resources/org/jboss/test/kernel/deployment/test/SuperDemandInstallTestCase.xml	                        (rev 0)
+++ projects/microcontainer/trunk/kernel/src/test/resources/org/jboss/test/kernel/deployment/test/SuperDemandInstallTestCase.xml	2008-10-15 08:15:26 UTC (rev 79513)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+  <bean name="SuperDemand" class="org.jboss.test.kernel.deployment.support.SuperDemandCreator"/>
+
+  <bean name="Manager" class="org.jboss.test.kernel.deployment.support.SomeCacheTreeManager">
+    <property name="clusteredCache"><inject bean="HAPartitionCacheHandler" property="cache"/></property>
+    <install bean="SuperDemand" method="createDependency" whenRequired="Instantiated">
+      <parameter><inject fromContext="name"/></parameter>
+      <parameter>Partition</parameter>
+      <parameter>Configured</parameter>
+      <parameter>Start</parameter>
+    </install>
+  </bean>
+
+  <bean name="HAPartitionCacheHandler" class="org.jboss.test.kernel.deployment.support.HAPartitionCacheHandler"/>
+
+  <bean name="Partition" class="org.jboss.test.kernel.deployment.support.HAPartition">
+    <property name="handler"><inject bean="HAPartitionCacheHandler"/></property>
+  </bean>
+
+</deployment>




More information about the jboss-cvs-commits mailing list