[jboss-cvs] JBossAS SVN: r75793 - in projects/demos/trunk: bootstrap and 69 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Jul 14 12:55:34 EDT 2008


Author: alesj
Date: 2008-07-14 12:55:32 -0400 (Mon, 14 Jul 2008)
New Revision: 75793

Added:
   projects/demos/trunk/bootstrap/pom.xml
   projects/demos/trunk/bootstrap/src/
   projects/demos/trunk/bootstrap/src/main/
   projects/demos/trunk/bootstrap/src/main/log4j.properties
   projects/demos/trunk/bootstrap/src/main/org/
   projects/demos/trunk/bootstrap/src/main/org/jboss/
   projects/demos/trunk/bootstrap/src/main/org/jboss/demos/
   projects/demos/trunk/bootstrap/src/main/org/jboss/demos/boostrap/
   projects/demos/trunk/bootstrap/src/main/org/jboss/demos/boostrap/HDScanner.java
   projects/demos/trunk/bootstrap/src/main/org/jboss/demos/boostrap/Main.java
   projects/demos/trunk/bootstrap/src/main/org/jboss/demos/boostrap/MainDeployerHelper.java
   projects/demos/trunk/bootstrap/src/main/org/jboss/demos/system/
   projects/demos/trunk/bootstrap/src/main/org/jboss/demos/system/classloader/
   projects/demos/trunk/bootstrap/src/main/org/jboss/demos/system/classloader/CapabilityFilter.java
   projects/demos/trunk/bootstrap/src/main/org/jboss/demos/system/classloader/MockClassLoaderPolicy.java
   projects/demos/trunk/bootstrap/src/main/org/jboss/demos/system/classloader/NoAnnotationURLClassLoader.java
   projects/demos/trunk/bootstrap/src/main/org/jboss/demos/system/deployers/
   projects/demos/trunk/bootstrap/src/main/org/jboss/demos/system/deployers/ClassloadingDescribeDeployer.java
   projects/demos/trunk/bootstrap/src/main/org/jboss/demos/system/deployers/PropertyClassloaderMetaDataDeployer.java
   projects/demos/trunk/bootstrap/src/resources/
   projects/demos/trunk/bootstrap/src/resources/bootstrap-beans-bak.xml
   projects/demos/trunk/bootstrap/src/resources/bootstrap-beans.xml
   projects/demos/trunk/build/JBossORG-EULA.txt
   projects/demos/trunk/build/jboss-demos.iml
   projects/demos/trunk/build/pom.xml
   projects/demos/trunk/jmx/
   projects/demos/trunk/jmx/pom.xml
   projects/demos/trunk/jmx/src/
   projects/demos/trunk/jmx/src/main/
   projects/demos/trunk/jmx/src/main/log4j.properties
   projects/demos/trunk/jmx/src/main/org/
   projects/demos/trunk/jmx/src/main/org/jboss/
   projects/demos/trunk/jmx/src/main/org/jboss/demos/
   projects/demos/trunk/jmx/src/main/org/jboss/demos/bootstrap/
   projects/demos/trunk/jmx/src/main/org/jboss/demos/bootstrap/jmx/
   projects/demos/trunk/jmx/src/main/org/jboss/demos/bootstrap/jmx/JMXMain.java
   projects/demos/trunk/jmx/src/main/org/jboss/demos/system/
   projects/demos/trunk/jmx/src/main/org/jboss/demos/system/jmx/
   projects/demos/trunk/jmx/src/main/org/jboss/demos/system/jmx/JMXKernel.java
   projects/demos/trunk/jmx/src/resources/
   projects/demos/trunk/jmx/src/resources/aop-beans.xml
   projects/demos/trunk/jmx/src/resources/system-jmx-beans.xml
   projects/demos/trunk/jmx/src/resources/varia-deployers-beans.xml
   projects/demos/trunk/models/
   projects/demos/trunk/models/pom.xml
   projects/demos/trunk/models/src/
   projects/demos/trunk/models/src/main/
   projects/demos/trunk/models/src/main/org/
   projects/demos/trunk/models/src/main/org/jboss/
   projects/demos/trunk/models/src/main/org/jboss/demos/
   projects/demos/trunk/models/src/main/org/jboss/demos/models/
   projects/demos/trunk/models/src/main/org/jboss/demos/models/AbstractPojo.java
   projects/demos/trunk/models/src/main/org/jboss/demos/models/IPojo.java
   projects/demos/trunk/models/src/main/org/jboss/demos/models/annotated/
   projects/demos/trunk/models/src/main/org/jboss/demos/models/annotated/Pojo.java
   projects/demos/trunk/models/src/main/org/jboss/demos/models/annotated/PojoRegistry.java
   projects/demos/trunk/models/src/main/org/jboss/demos/models/guice/
   projects/demos/trunk/models/src/main/org/jboss/demos/models/guice/FromMC.java
   projects/demos/trunk/models/src/main/org/jboss/demos/models/guice/Pojo.java
   projects/demos/trunk/models/src/main/org/jboss/demos/models/guice/PojoModule.java
   projects/demos/trunk/models/src/main/org/jboss/demos/models/jmx/
   projects/demos/trunk/models/src/main/org/jboss/demos/models/jmx/ExposePojo.java
   projects/demos/trunk/models/src/main/org/jboss/demos/models/jmx/Pojo.java
   projects/demos/trunk/models/src/main/org/jboss/demos/models/jmx/PojoMBean.java
   projects/demos/trunk/models/src/main/org/jboss/demos/models/mbeans/
   projects/demos/trunk/models/src/main/org/jboss/demos/models/mbeans/Pojo.java
   projects/demos/trunk/models/src/main/org/jboss/demos/models/mbeans/PojoMBean.java
   projects/demos/trunk/models/src/main/org/jboss/demos/models/plain/
   projects/demos/trunk/models/src/main/org/jboss/demos/models/plain/FromGuice.java
   projects/demos/trunk/models/src/main/org/jboss/demos/models/plain/Pojo.java
   projects/demos/trunk/models/src/main/org/jboss/demos/models/plain/PojoFactory.java
   projects/demos/trunk/models/src/main/org/jboss/demos/models/spring/
   projects/demos/trunk/models/src/main/org/jboss/demos/models/spring/Pojo.java
   projects/demos/trunk/models/src/resources/
   projects/demos/trunk/models/src/resources/META-INF/
   projects/demos/trunk/models/src/resources/META-INF/guice-beans.xml
   projects/demos/trunk/models/src/resources/META-INF/jmx-beans.xml
   projects/demos/trunk/models/src/resources/META-INF/mbeans-service.xml
   projects/demos/trunk/models/src/resources/META-INF/plain-beans.xml
   projects/demos/trunk/models/src/resources/META-INF/spring-beans.xml
   projects/demos/trunk/osgi/acme1/
   projects/demos/trunk/osgi/acme1/src/
   projects/demos/trunk/osgi/acme1/src/META-INF/
   projects/demos/trunk/osgi/acme1/src/META-INF/MANIFEST.MF
   projects/demos/trunk/osgi/acme1/src/META-INF/acme-beans.xml
   projects/demos/trunk/osgi/acme1/src/META-INF/acme-clmd.properties
   projects/demos/trunk/osgi/acme1/src/META-INF/jboss-classloading.xml
   projects/demos/trunk/osgi/acme1/src/org/
   projects/demos/trunk/osgi/acme1/src/org/jboss/
   projects/demos/trunk/osgi/acme1/src/org/jboss/acme/
   projects/demos/trunk/osgi/acme1/src/org/jboss/acme/CommonService.java
   projects/demos/trunk/osgi/acme1/src/org/jboss/acme/ales/
   projects/demos/trunk/osgi/acme1/src/org/jboss/acme/ales/AlesService.java
   projects/demos/trunk/osgi/acme1/src/org/jboss/acme/ales/impl/
   projects/demos/trunk/osgi/acme1/src/org/jboss/acme/ales/impl/AlesServiceImpl.java
   projects/demos/trunk/osgi/acme1/src/org/jboss/acme/print/
   projects/demos/trunk/osgi/acme1/src/org/jboss/acme/print/PrettyPrint.java
   projects/demos/trunk/osgi/acme1/src/org/jboss/acme/scott/
   projects/demos/trunk/osgi/acme1/src/org/jboss/acme/scott/ScottService.java
   projects/demos/trunk/osgi/acme1/src/org/jboss/acme/scott/impl/
   projects/demos/trunk/osgi/acme1/src/org/jboss/acme/scott/impl/ScottServiceImpl.java
   projects/demos/trunk/osgi/acme2/
   projects/demos/trunk/osgi/acme2/src/
   projects/demos/trunk/osgi/acme2/src/META-INF/
   projects/demos/trunk/osgi/acme2/src/META-INF/MANIFEST.MF
   projects/demos/trunk/osgi/acme2/src/META-INF/acme-beans.xml
   projects/demos/trunk/osgi/acme2/src/META-INF/acme-clmd.properties
   projects/demos/trunk/osgi/acme2/src/META-INF/jboss-classloading.xml
   projects/demos/trunk/osgi/acme2/src/org/
   projects/demos/trunk/osgi/acme2/src/org/jboss/
   projects/demos/trunk/osgi/acme2/src/org/jboss/acme/
   projects/demos/trunk/osgi/acme2/src/org/jboss/acme/CommonService.java
   projects/demos/trunk/osgi/acme2/src/org/jboss/acme/ales/
   projects/demos/trunk/osgi/acme2/src/org/jboss/acme/ales/AlesService.java
   projects/demos/trunk/osgi/acme2/src/org/jboss/acme/ales/impl/
   projects/demos/trunk/osgi/acme2/src/org/jboss/acme/ales/impl/AlesServiceImpl.java
   projects/demos/trunk/osgi/acme2/src/org/jboss/acme/print/
   projects/demos/trunk/osgi/acme2/src/org/jboss/acme/print/PrettyPrint.java
   projects/demos/trunk/osgi/acme2/src/org/jboss/acme/scott/
   projects/demos/trunk/osgi/acme2/src/org/jboss/acme/scott/ScottService.java
   projects/demos/trunk/osgi/acme2/src/org/jboss/acme/scott/impl/
   projects/demos/trunk/osgi/acme2/src/org/jboss/acme/scott/impl/ScottServiceImpl.java
   projects/demos/trunk/osgi/boot/
   projects/demos/trunk/osgi/boot/acme2.jar
   projects/demos/trunk/osgi/boot/backup/
   projects/demos/trunk/osgi/boot/backup/foo.jar
   projects/demos/trunk/osgi/boot/backup/foo_11.jar
   projects/demos/trunk/osgi/boot/backup/foo_13.jar
   projects/demos/trunk/osgi/boot/backup/foo_23.jar
   projects/demos/trunk/osgi/boot/bootstrap-beans.xml
   projects/demos/trunk/osgi/boot/work/
   projects/demos/trunk/osgi/boot/work/acme1.jar
   projects/demos/trunk/osgi/boot/work/acme2.jar
   projects/demos/trunk/osgi/boot/work/foo.jar
   projects/demos/trunk/osgi/foo/
   projects/demos/trunk/osgi/foo/src/
   projects/demos/trunk/osgi/foo/src/META-INF/
   projects/demos/trunk/osgi/foo/src/META-INF/MANIFEST.MF
   projects/demos/trunk/osgi/foo/src/META-INF/foo-beans.xml
   projects/demos/trunk/osgi/foo/src/META-INF/foo-clmd.properties
   projects/demos/trunk/osgi/foo/src/META-INF/jboss-classloading.xml
   projects/demos/trunk/osgi/foo/src/org/
   projects/demos/trunk/osgi/foo/src/org/jboss/
   projects/demos/trunk/osgi/foo/src/org/jboss/foo/
   projects/demos/trunk/osgi/foo/src/org/jboss/foo/FooBarService.java
   projects/demos/trunk/pom.xml
   projects/demos/trunk/sandbox/
Log:
Initial MC demos.

Added: projects/demos/trunk/bootstrap/pom.xml
===================================================================
--- projects/demos/trunk/bootstrap/pom.xml	                        (rev 0)
+++ projects/demos/trunk/bootstrap/pom.xml	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,92 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <parent>
+    <groupId>org.jboss.demos</groupId>
+    <artifactId>jboss-demos</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.jboss.demos</groupId>
+  <artifactId>jboss-demos-bootstrap</artifactId>
+  <packaging>jar</packaging>
+  <name>JBoss MC Demos Boostrap</name>
+  <url>http://www.jboss.org/jbossmc</url>
+  <description>JBoss MC Demos</description>
+  <build>
+    <sourceDirectory>src/main</sourceDirectory>
+  </build>
+  <dependencies>
+    <!-- Compile (global dependencies) -->
+    <dependency>
+      <groupId>org.jboss.deployers</groupId>
+      <artifactId>jboss-deployers-vfs-spi</artifactId>
+      <exclusions>
+        <exclusion>
+          <groupId>jboss</groupId>
+          <artifactId>jboss-vfs</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>apache-xerces</groupId>
+      <artifactId>xml-apis</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss</groupId>
+      <artifactId>jboss-vfs</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss</groupId>
+      <artifactId>jboss-common-core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.logging</groupId>
+      <artifactId>jboss-logging-spi</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.logging</groupId>
+      <artifactId>jboss-logging-log4j</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.microcontainer</groupId>
+      <artifactId>jboss-dependency</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.deployers</groupId>
+      <artifactId>jboss-deployers-spi</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.deployers</groupId>
+      <artifactId>jboss-deployers-structure-spi</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.deployers</groupId>
+      <artifactId>jboss-deployers-vfs</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.deployers</groupId>
+      <artifactId>jboss-deployers-core-spi</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.microcontainer</groupId>
+      <artifactId>jboss-kernel</artifactId>
+    </dependency>
+    <!-- Comment this if you want plain POJO bootstrap -->
+    <dependency>
+      <groupId>org.jboss.microcontainer</groupId>
+      <artifactId>jboss-aop-mc-int</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.aop</groupId>
+      <artifactId>jboss-aop</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.jbossas</groupId>
+      <artifactId>jboss-as-system-jmx</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.jbossas</groupId>
+      <artifactId>jboss-as-aspects</artifactId>
+    </dependency>
+  </dependencies>
+  
+</project>
\ No newline at end of file

Added: projects/demos/trunk/bootstrap/src/main/log4j.properties
===================================================================
--- projects/demos/trunk/bootstrap/src/main/log4j.properties	                        (rev 0)
+++ projects/demos/trunk/bootstrap/src/main/log4j.properties	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,6 @@
+log4j.rootLogger=INFO, stdout
+
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+# Pattern to output the caller's file name and line number.
+log4j.appender.stdout.layout.ConversionPattern=JBoss-MC-Demo %5p [%d{dd-MM-yyyy HH:mm:ss}] %c{1} - %m%n

Added: projects/demos/trunk/bootstrap/src/main/org/jboss/demos/boostrap/HDScanner.java
===================================================================
--- projects/demos/trunk/bootstrap/src/main/org/jboss/demos/boostrap/HDScanner.java	                        (rev 0)
+++ projects/demos/trunk/bootstrap/src/main/org/jboss/demos/boostrap/HDScanner.java	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,148 @@
+/*
+* 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.demos.boostrap;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.ScheduledFuture;
+import java.util.concurrent.ThreadFactory;
+import java.util.concurrent.TimeUnit;
+
+import org.jboss.logging.Logger;
+import org.jboss.virtual.VFS;
+import org.jboss.virtual.VirtualFile;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class HDScanner implements Runnable
+{
+   private static Logger log = Logger.getLogger(HDScanner.class);
+   private ScheduledExecutorService scanExecutor;
+   private ScheduledFuture activeScan;
+   private String scanThreadName = "HDScanner";
+   private long initialDelay = 5000;
+   private long scanPeriod = 10000;
+
+   private MainDeployerHelper helper;
+   private VirtualFile root;
+   private Set<VirtualFile> files = new HashSet<VirtualFile>();
+
+   public HDScanner(MainDeployerHelper helper, File file) throws IOException
+   {
+      this.helper = helper;
+      this.root = VFS.getRoot(file.toURL());
+   }
+
+   public void setScanThreadName(String scanThreadName)
+   {
+      this.scanThreadName = scanThreadName;
+   }
+
+   public void setInitialDelay(long initialDelay)
+   {
+      this.initialDelay = initialDelay;
+   }
+
+   public void setScanPeriod(long scanPeriod)
+   {
+      this.scanPeriod = scanPeriod;
+   }
+
+   public void start() throws Exception
+   {
+      // Default to a single thread executor
+      if (scanExecutor == null)
+      {
+         scanExecutor = Executors.newSingleThreadScheduledExecutor(
+               new ThreadFactory()
+               {
+                  public Thread newThread(Runnable r)
+                  {
+                     return new Thread(r, scanThreadName);
+                  }
+               }
+         );
+      }
+      activeScan = scanExecutor.scheduleWithFixedDelay(this, initialDelay, scanPeriod, TimeUnit.MILLISECONDS);
+   }
+
+   public void stop()
+   {
+      if (activeScan != null)
+      {
+         activeScan.cancel(true);
+         activeScan = null;
+      }
+   }
+
+   public void run()
+   {
+      try
+      {
+         scan();
+      }
+      catch (Throwable e)
+      {
+         System.err.println("Scan failed: " + e);
+      }
+   }
+
+   protected void scan() throws Throwable
+   {
+      Set<VirtualFile> tmp = new HashSet<VirtualFile>();
+      List<VirtualFile> children = root.getChildren();
+      for (VirtualFile file : children)
+      {
+         if (files.contains(file) == false)
+         {
+            helper.deploy(file);
+            log.info("Deploy: " + file);
+            tmp.add(file);
+         }
+         else
+         {
+            if (file.hasBeenModified())
+            {
+               helper.redeploy(file);
+               log.info("Redeploy: " + file);
+            }
+            files.remove(file);
+            tmp.add(file);
+         }
+      }
+      for (VirtualFile file : files)
+      {
+         helper.undeploy(file);
+         log.info("Undeploy: " + file);
+      }
+      files.clear();
+      files.addAll(tmp);
+      log.info("Process deployments...");
+      helper.process();
+   }
+}

Added: projects/demos/trunk/bootstrap/src/main/org/jboss/demos/boostrap/Main.java
===================================================================
--- projects/demos/trunk/bootstrap/src/main/org/jboss/demos/boostrap/Main.java	                        (rev 0)
+++ projects/demos/trunk/bootstrap/src/main/org/jboss/demos/boostrap/Main.java	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,131 @@
+/*
+* 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.demos.boostrap;
+
+import java.io.File;
+import java.net.URL;
+
+import org.jboss.kernel.Kernel;
+import org.jboss.kernel.plugins.bootstrap.basic.BasicBootstrap;
+import org.jboss.kernel.plugins.deployment.xml.BasicXMLDeployer;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class Main
+{
+   private static Main main;
+
+   private Kernel kernel;
+   private BasicXMLDeployer kernelDeployer;
+
+   public static void main(String[] args)
+   {
+      main = new Main();
+      main.configure(args);
+   }
+
+   protected void configure(String[] args)
+   {
+      try
+      {
+         String rootString = "/projects/demos/bootstrap/src/resources/bootstrap-beans.xml";
+         if (args.length > 0)
+            rootString = args[0];
+         System.out.println("Using bootstrap: " + rootString);
+         if (args != null)
+         {
+            if (args.length > 0)
+               rootString = args[0];
+         }
+         File rootFile = new File(rootString);
+         if (rootFile.exists() == false)
+            throw new IllegalArgumentException(rootFile + " doesn't exist!");
+
+         BasicBootstrap bootstrap = new BasicBootstrap();
+         bootstrap.run();
+         kernel = bootstrap.getKernel();
+
+         kernelDeployer = new BasicXMLDeployer(kernel);
+         kernelDeployer.deploy(rootFile.toURL());
+         kernelDeployer.validate();
+      }
+      catch (Throwable t)
+      {
+         t.printStackTrace();
+      }
+   }
+
+   private static Main getMain()
+   {
+      if (main == null)
+         throw new IllegalArgumentException("Main in not initialized, should run Main.main()!");
+
+      return main;
+   }
+
+   public static void deploy(URL... urls) throws Throwable
+   {
+      if (urls == null)
+         return;
+
+      for (URL url : urls)
+      {
+         getMain().kernelDeployer.deploy(url);
+         System.out.println("Deployed URL: " + url);
+      }
+   }
+
+   public static void validate() throws Throwable
+   {
+      getMain().kernelDeployer.validate();
+   }
+
+   public static void undeploy(URL... urls) throws Throwable
+   {
+      if (urls == null)
+         return;
+
+      for (URL url : urls)
+      {
+         getMain().kernelDeployer.undeploy(url);
+         System.out.println("Undeployed URL: " + url);
+      }
+   }
+
+   protected void registerShutdownThread()
+   {
+      Runtime.getRuntime().addShutdownHook(new Thread(new ShutdownThread()));
+   }
+
+   private class ShutdownThread implements Runnable
+   {
+      public void run()
+      {
+         kernelDeployer.shutdown();
+         kernelDeployer = null;
+
+         kernel.getController().shutdown();
+         kernel = null;
+      }
+   }
+}

Added: projects/demos/trunk/bootstrap/src/main/org/jboss/demos/boostrap/MainDeployerHelper.java
===================================================================
--- projects/demos/trunk/bootstrap/src/main/org/jboss/demos/boostrap/MainDeployerHelper.java	                        (rev 0)
+++ projects/demos/trunk/bootstrap/src/main/org/jboss/demos/boostrap/MainDeployerHelper.java	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,80 @@
+/*
+* 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.demos.boostrap;
+
+import org.jboss.deployers.client.spi.DeployerClient;
+import org.jboss.deployers.client.spi.Deployment;
+import org.jboss.deployers.client.spi.DeploymentFactory;
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.vfs.spi.client.VFSDeploymentFactory;
+import org.jboss.virtual.VirtualFile;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class MainDeployerHelper
+{
+   private DeployerClient deployerClient;
+   private VFSDeploymentFactory factory;
+
+   public MainDeployerHelper(DeployerClient deployerClient)
+   {
+      this.deployerClient = deployerClient;
+   }
+
+   protected VFSDeploymentFactory getDeploymentFactory()
+   {
+      if (factory == null)
+         factory = VFSDeploymentFactory.getInstance();
+      return factory;
+   }
+
+   protected Deployment createDeployment(VirtualFile file)
+   {
+      return getDeploymentFactory().createVFSDeployment(file);
+   }
+
+   public void deploy(VirtualFile file) throws DeploymentException
+   {
+      Deployment deployment = createDeployment(file);
+      deployerClient.addDeployment(deployment);
+   }
+
+   public void redeploy(VirtualFile file) throws DeploymentException
+   {
+      Deployment deployment = createDeployment(file);
+      deployerClient.addDeployment(deployment);
+
+   }
+
+   public void undeploy(VirtualFile file) throws DeploymentException
+   {
+      Deployment deployment = createDeployment(file);
+      deployerClient.removeDeployment(deployment);
+   }
+
+   public void process() throws DeploymentException
+   {
+      deployerClient.process();
+      deployerClient.checkComplete();
+   }
+}

Added: projects/demos/trunk/bootstrap/src/main/org/jboss/demos/system/classloader/CapabilityFilter.java
===================================================================
--- projects/demos/trunk/bootstrap/src/main/org/jboss/demos/system/classloader/CapabilityFilter.java	                        (rev 0)
+++ projects/demos/trunk/bootstrap/src/main/org/jboss/demos/system/classloader/CapabilityFilter.java	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,68 @@
+/*
+* 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.demos.system.classloader;
+
+import java.util.Set;
+
+import org.jboss.classloader.plugins.ClassLoaderUtils;
+import org.jboss.classloader.spi.filter.ClassFilter;
+import org.jboss.classloading.spi.metadata.Capability;
+import org.jboss.classloading.spi.metadata.ExportPackages;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class CapabilityFilter implements ClassFilter
+{
+   private Capability capability;
+
+   public CapabilityFilter(Capability capability)
+   {
+      if (capability == null)
+         throw new IllegalArgumentException("Null capability.");
+
+      this.capability = capability;
+   }
+
+   public boolean matchesClassName(String className)
+   {
+      return matchesPackageName(ClassLoaderUtils.getClassPackageName(className));
+   }
+
+   public boolean matchesResourcePath(String resourcePath)
+   {
+      return matchesPackageName(ClassLoaderUtils.getResourcePackageName(resourcePath));
+   }
+
+   public boolean matchesPackageName(String packageName)
+   {
+      if (capability instanceof ExportPackages)
+      {
+         ExportPackages ep = (ExportPackages)capability;
+         Set<String> packages = ep.getPackageNames(null);
+         if (packages != null && packages.contains(packageName))
+            return true;
+      }
+
+      return false;
+   }
+}

Added: projects/demos/trunk/bootstrap/src/main/org/jboss/demos/system/classloader/MockClassLoaderPolicy.java
===================================================================
--- projects/demos/trunk/bootstrap/src/main/org/jboss/demos/system/classloader/MockClassLoaderPolicy.java	                        (rev 0)
+++ projects/demos/trunk/bootstrap/src/main/org/jboss/demos/system/classloader/MockClassLoaderPolicy.java	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,333 @@
+/*
+* 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.demos.system.classloader;
+
+import java.io.IOException;
+import java.net.URL;
+import java.security.CodeSource;
+import java.security.PermissionCollection;
+import java.security.Policy;
+import java.security.ProtectionDomain;
+import java.security.cert.Certificate;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.jar.Manifest;
+
+import org.jboss.classloader.plugins.filter.PatternClassFilter;
+import org.jboss.classloader.spi.ClassLoaderPolicy;
+import org.jboss.classloader.spi.DelegateLoader;
+import org.jboss.classloader.spi.PackageInformation;
+import org.jboss.classloader.spi.filter.ClassFilter;
+import org.jboss.logging.Logger;
+import org.jboss.virtual.VFSUtils;
+import org.jboss.virtual.VirtualFile;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class MockClassLoaderPolicy extends ClassLoaderPolicy
+{
+   /**
+    * The log
+    */
+   private static Logger log = Logger.getLogger(MockClassLoaderPolicy.class);
+
+   /**
+    * Tag for no manifest
+    */
+   private static final Manifest NO_MANIFEST = new Manifest();
+
+   /**
+    * The logical name of the policy
+    */
+   private String name;
+
+   /**
+    * The delegates
+    */
+   private List<? extends DelegateLoader> delegates;
+
+   /**
+    * Whether to import all
+    */
+   private boolean importAll;
+
+   /**
+    * The non JDK classes filter
+    */
+   private ClassFilter nonJDKFilter;
+
+   /**
+    * Virtual file root
+    */
+   private VirtualFile root;
+
+   /**
+    * Manifest cache
+    */
+   private Map<URL, Manifest> manifestCache = new ConcurrentHashMap<URL, Manifest>();
+
+   /**
+    * Create a new MockClassLoaderPolicy filtering org.jboss.* classes
+    * with logical name "mock"
+    */
+   public MockClassLoaderPolicy()
+   {
+      this(null);
+   }
+
+   /**
+    * Create a new MockClassLoaderPolicy filtering org.jboss.* classes
+    *
+    * @param name the logical name of the policy
+    */
+   public MockClassLoaderPolicy(String name)
+   {
+      this(name, new String[]{"org\\.jboss\\..+"},
+            new String[]{"org/jboss/.+"},
+            new String[]{"org\\.jboss", "org\\.jboss\\..*"});
+   }
+
+   /**
+    * Create a new MockClassLoaderPolicy filtering org.jboss.* classes
+    *
+    * @param name             the name
+    * @param classPatterns    the class patterns
+    * @param resourcePatterns the resourcePatterns
+    * @param packagePatterns  the packagePatterns
+    */
+   public MockClassLoaderPolicy(String name, String[] classPatterns, String[] resourcePatterns, String[] packagePatterns)
+   {
+      this(name, new PatternClassFilter(classPatterns, resourcePatterns, packagePatterns));
+   }
+
+   /**
+    * Create a new MockClassLoaderPolicy filtering the given patterns
+    *
+    * @param name         the logical name of the policy
+    * @param nonJDKFilter the filter for nonJDK classes
+    * @throws IllegalArgumentException for a null filter
+    */
+   public MockClassLoaderPolicy(String name, ClassFilter nonJDKFilter)
+   {
+      if (name == null)
+         name = "mock";
+      this.name = name;
+      if (nonJDKFilter == null)
+         throw new IllegalArgumentException("Null filter");
+      this.nonJDKFilter = nonJDKFilter;
+   }
+
+   public String getName()
+   {
+      return name;
+   }
+
+   public DelegateLoader getExported()
+   {
+      return null;
+   }
+
+   @Override
+   public List<? extends DelegateLoader> getDelegates()
+   {
+      return delegates;
+   }
+
+   /**
+    * Set the delegates
+    *
+    * @param delegates the delegate imports
+    */
+   public void setDelegates(List<? extends DelegateLoader> delegates)
+   {
+      this.delegates = delegates;
+   }
+
+   @Override
+   public boolean isImportAll()
+   {
+      return importAll;
+   }
+
+   /**
+    * Set the importAll.
+    *
+    * @param importAll the importAll.
+    */
+   public void setImportAll(boolean importAll)
+   {
+      this.importAll = importAll;
+   }
+
+   public VirtualFile getRoot()
+   {
+      return root;
+   }
+
+   public void setRoot(VirtualFile root)
+   {
+      this.root = root;
+   }
+
+   protected VirtualFile findChild(String path)
+   {
+      try
+      {
+         return root.getChild(path);
+      }
+      catch (Exception ignored)
+      {
+         // not found
+      }
+      return null;
+   }
+
+   protected VirtualFile findRoot(String path)
+   {
+      try
+      {
+         if (root.getChild(path) != null)
+            return root;
+      }
+      catch (Exception ignored)
+      {
+         // not found
+      }
+      return null;
+   }
+
+   protected URL findFileURL(String path)
+   {
+      try
+      {
+         VirtualFile child = findChild(path);
+         if (child != null)
+            return child.toURL();
+      }
+      catch (Exception ignored)
+      {
+      }
+      return null;
+   }
+
+   @Override
+   public URL getResource(String path)
+   {
+      return findFileURL(path);
+   }
+
+   @Override
+   public void getResources(String path, Set<URL> urls) throws IOException
+   {
+      URL url = findFileURL(path);
+      if (url != null)
+         urls.add(url);
+   }
+
+   @Override
+   public PackageInformation getPackageInformation(String packageName)
+   {
+      String path = packageName.replace('.', '/');
+      VirtualFile root = findRoot(path);
+      Manifest manifest = null;
+      URL rootURL = null;
+      if (root != null)
+      {
+         try
+         {
+            rootURL = root.toURL();
+            manifest = manifestCache.get(rootURL);
+            if (manifest == null)
+            {
+               manifest = VFSUtils.getManifest(root);
+               if (manifest == null)
+                  manifestCache.put(rootURL, NO_MANIFEST);
+               else
+                  manifestCache.put(rootURL, manifest);
+            }
+
+            if (manifest == NO_MANIFEST)
+               manifest = null;
+         }
+         catch (Exception ignored)
+         {
+            if (log.isTraceEnabled())
+               log.trace("Unable to retrieve manifest for " + path + " url=" + rootURL + " error=" + ignored.getMessage());
+         }
+      }
+      return new PackageInformation(packageName, manifest);
+   }
+
+   @Override
+   protected ProtectionDomain getProtectionDomain(String className, String path)
+   {
+      VirtualFile clazz = findChild(path);
+      if (clazz == null)
+      {
+         log.trace("Unable to determine class file for " + className);
+         return null;
+      }
+      try
+      {
+         VirtualFile root = clazz.getVFS().getRoot();
+         URL codeSourceURL = root.toURL();
+         Certificate[] certs = null;
+         CodeSource cs = new CodeSource(codeSourceURL, certs);
+         PermissionCollection permissions = Policy.getPolicy().getPermissions(cs);
+         return new ProtectionDomain(cs, permissions);
+      }
+      catch (Exception e)
+      {
+         throw new Error("Error determining protection domain for " + clazz, e);
+      }
+   }
+
+   /*
+    * Overridden to not expose classes in the nonJDKFilter
+    * this is so we don't expose classes from the classpath
+    * that we haven't explicitly declared in the policy
+    */
+   @Override
+   protected ClassLoader isJDKRequest(String name)
+   {
+      if (nonJDKFilter.matchesClassName(name))
+         return null;
+      return super.isJDKRequest(name);
+   }
+
+   @Override
+   public void toLongString(StringBuilder builder)
+   {
+      builder.append(" name=").append(name);
+      builder.append(" root=").append(root);
+      super.toLongString(builder);
+   }
+
+   @Override
+   public String toString()
+   {
+      return name;
+   }
+}

Added: projects/demos/trunk/bootstrap/src/main/org/jboss/demos/system/classloader/NoAnnotationURLClassLoader.java
===================================================================
--- projects/demos/trunk/bootstrap/src/main/org/jboss/demos/system/classloader/NoAnnotationURLClassLoader.java	                        (rev 0)
+++ projects/demos/trunk/bootstrap/src/main/org/jboss/demos/system/classloader/NoAnnotationURLClassLoader.java	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,119 @@
+/*
+* 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.demos.system.classloader;
+
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.net.URLStreamHandlerFactory;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class NoAnnotationURLClassLoader extends URLClassLoader
+{
+   /**
+    * The value returned by {@link getURLs}.
+    */
+   private static final URL[] EMPTY_URL_ARRAY = {};
+
+   /**
+    * Create a classloader with the context classloader as parent
+    *
+    * @param urls the urls
+    * @return the classloader
+    */
+   public static NoAnnotationURLClassLoader createClassLoader(URL... urls)
+   {
+      return createClassLoader(Thread.currentThread().getContextClassLoader(), urls);
+   }
+
+   /**
+    * Create a classloader
+    *
+    * @param parent the parent classloader
+    * @param urls   the urls
+    * @return the classloader
+    */
+   public static NoAnnotationURLClassLoader createClassLoader(ClassLoader parent, URL... urls)
+   {
+      return new NoAnnotationURLClassLoader(urls, parent);
+   }
+
+   /**
+    * Construct a <tt>URLClassLoader</tt>
+    *
+    * @param urls the URLs to load classes from.
+    */
+   public NoAnnotationURLClassLoader(URL[] urls)
+   {
+      super(urls);
+   }
+
+   /**
+    * Construct a <tt>URLClassLoader</tt>
+    *
+    * @param urls   the URLs to load classes from.
+    * @param parent the parent classloader.
+    */
+   public NoAnnotationURLClassLoader(URL[] urls, ClassLoader parent)
+   {
+      super(urls, parent);
+   }
+
+   /**
+    * Construct a <tt>URLClassLoader</tt>
+    *
+    * @param urls    the URLs to load classes from.
+    * @param parent  the parent classloader.
+    * @param factory the url stream factory.
+    */
+   public NoAnnotationURLClassLoader(URL[] urls, ClassLoader parent,
+                                     URLStreamHandlerFactory factory)
+   {
+      super(urls, parent, factory);
+   }
+
+   /**
+    * Return all library URLs
+    * <p/>
+    * <p>Do not remove this method without running the WebIntegrationTestSuite
+    *
+    * @return the urls
+    */
+   public URL[] getAllURLs()
+   {
+      return super.getURLs();
+   }
+
+   /**
+    * Return an empty URL array to force the RMI marshalling subsystem to
+    * use the <tt>java.server.codebase</tt> property as the annotated codebase.
+    * <p/>
+    * <p>Do not remove this method without discussing it on the dev list.
+    *
+    * @return Empty URL[]
+    */
+   public URL[] getURLs()
+   {
+      return EMPTY_URL_ARRAY;
+   }
+}

Added: projects/demos/trunk/bootstrap/src/main/org/jboss/demos/system/deployers/ClassloadingDescribeDeployer.java
===================================================================
--- projects/demos/trunk/bootstrap/src/main/org/jboss/demos/system/deployers/ClassloadingDescribeDeployer.java	                        (rev 0)
+++ projects/demos/trunk/bootstrap/src/main/org/jboss/demos/system/deployers/ClassloadingDescribeDeployer.java	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,80 @@
+/*
+* 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.demos.system.deployers;
+
+import java.util.List;
+
+import org.jboss.classloader.spi.ClassLoaderPolicy;
+import org.jboss.classloader.spi.DelegateLoader;
+import org.jboss.classloader.spi.filter.FilteredDelegateLoader;
+import org.jboss.classloading.spi.dependency.Module;
+import org.jboss.classloading.spi.dependency.policy.ClassLoaderPolicyModule;
+import org.jboss.classloading.spi.metadata.Capability;
+import org.jboss.classloading.spi.metadata.ClassLoadingMetaData;
+import org.jboss.classloading.spi.metadata.Requirement;
+import org.jboss.demos.system.classloader.CapabilityFilter;
+import org.jboss.demos.system.classloader.MockClassLoaderPolicy;
+import org.jboss.deployers.plugins.classloading.AbstractClassLoaderDescribeDeployer;
+import org.jboss.deployers.plugins.classloading.AbstractDeploymentClassLoaderPolicyModule;
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class ClassloadingDescribeDeployer extends AbstractClassLoaderDescribeDeployer
+{
+   protected ClassLoaderPolicyModule createModule(final DeploymentUnit unit, ClassLoadingMetaData metaData) throws DeploymentException
+   {
+      if (unit instanceof VFSDeploymentUnit == false)
+         throw new IllegalArgumentException("Can only take VFS deployments: " + unit);
+
+      return new AbstractDeploymentClassLoaderPolicyModule(unit)
+      {
+         protected ClassLoaderPolicy determinePolicy()
+         {
+            MockClassLoaderPolicy policy = new MockClassLoaderPolicy(unit.getSimpleName());
+            VFSDeploymentUnit vfsUnit = (VFSDeploymentUnit)unit;
+            policy.setRoot(vfsUnit.getRoot());
+            policy.setDelegates(getDelegates());
+            return policy;
+         }
+
+         public DelegateLoader getDelegateLoader(Module module, Requirement requirement)
+         {
+            List<Capability> capabilities = getCapabilities();
+            if (capabilities != null && capabilities.isEmpty() == false)
+            {
+               for (Capability capability : capabilities)
+               {
+                  if (capability.resolves(this, requirement))
+                     return new FilteredDelegateLoader(getPolicy(), new CapabilityFilter(capability));
+               }
+               // none of the capabilities match - don't put it as delegate
+               return null;
+            }
+            return super.getDelegateLoader(module, requirement);
+         }
+      };
+   }
+}

Added: projects/demos/trunk/bootstrap/src/main/org/jboss/demos/system/deployers/PropertyClassloaderMetaDataDeployer.java
===================================================================
--- projects/demos/trunk/bootstrap/src/main/org/jboss/demos/system/deployers/PropertyClassloaderMetaDataDeployer.java	                        (rev 0)
+++ projects/demos/trunk/bootstrap/src/main/org/jboss/demos/system/deployers/PropertyClassloaderMetaDataDeployer.java	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,116 @@
+/*
+* 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.demos.system.deployers;
+
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+
+import org.jboss.classloading.plugins.metadata.PackageCapability;
+import org.jboss.classloading.plugins.metadata.PackageRequirement;
+import org.jboss.classloading.spi.metadata.Capability;
+import org.jboss.classloading.spi.metadata.ClassLoadingMetaData;
+import org.jboss.classloading.spi.metadata.Requirement;
+import org.jboss.classloading.spi.version.Version;
+import org.jboss.classloading.spi.version.VersionRange;
+import org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer;
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+import org.jboss.virtual.VirtualFile;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class PropertyClassloaderMetaDataDeployer extends AbstractVFSParsingDeployer<ClassLoadingMetaData>
+{
+   public PropertyClassloaderMetaDataDeployer()
+   {
+      super(ClassLoadingMetaData.class);
+      setSuffix("-clmd.properties");
+   }
+
+   protected ClassLoadingMetaData parse(VFSDeploymentUnit unit, VirtualFile file, ClassLoadingMetaData clmd) throws Exception
+   {
+      Properties properties = new Properties();
+      InputStream inputStream = file.openStream();
+      try
+      {
+         properties.load(inputStream);
+      }
+      finally
+      {
+         inputStream.close();
+      }
+      ClassLoadingMetaData metaData = new ClassLoadingMetaData();
+      metaData.setName(unit.getName());
+      metaData.setDomain(properties.getProperty("domain", unit.getName()));
+      metaData.setParentDomain(properties.getProperty("parent_domain"));
+      metaData.setCapabilities(getCapabilities(properties));
+      List<Requirement> requirements = getRequirements(properties);
+      metaData.setRequirements(requirements);
+      metaData.setImportAll(requirements == null || requirements.isEmpty());
+      return metaData;
+   }
+
+   protected List<Capability> getCapabilities(Properties properties)
+   {
+      List<Capability> list = new ArrayList<Capability>();
+      String capabilities = properties.getProperty("capabilities");
+      if (capabilities != null)
+      {
+         String[] split = capabilities.split("\\|");
+         for (String c : split)
+         {
+            String[] pv = c.split(":");
+            String pckg = pv[0];
+            Version version = pv.length > 1 ? Version.parseVersion(pv[1]) : Version.DEFAULT_VERSION;
+            list.add(new PackageCapability(pckg, version));
+         }
+      }
+      return list;
+   }
+
+   protected List<Requirement> getRequirements(Properties properties)
+   {
+      List<Requirement> list = new ArrayList<Requirement>();
+      String requirements = properties.getProperty("requirements");
+      if (requirements != null)
+      {
+         String[] split = requirements.split("\\|");
+         for (String c : split)
+         {
+            String[] pv = c.split(":");
+            String pckg = pv[0];
+            VersionRange range = VersionRange.ALL_VERSIONS;
+            if (pv.length > 1)
+            {
+               String[] vr = pv[1].split(",");
+               Version low = Version.parseVersion(vr[0].substring(1));
+               Version high = Version.parseVersion(vr[1].substring(0, vr[1].length() - 1));
+               range = new VersionRange(low, vr[0].charAt(0) == '[', high, vr[1].charAt(vr[1].length() - 1) == ']');
+            }
+            list.add(new PackageRequirement(pckg, range));
+         }
+      }
+      return list;
+   }
+}

Added: projects/demos/trunk/bootstrap/src/resources/bootstrap-beans-bak.xml
===================================================================
--- projects/demos/trunk/bootstrap/src/resources/bootstrap-beans-bak.xml	                        (rev 0)
+++ projects/demos/trunk/bootstrap/src/resources/bootstrap-beans-bak.xml	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+   The bootstrap of the server. This should only have the minimum
+   needed to bootstrap the mc kernel and profile service.
+   $Id:$
+-->
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+   <!-- The MainDeployer -->
+   <bean name="MainDeployer" class="org.jboss.deployers.plugins.main.MainDeployerImpl">
+      <property name="structuralDeployers"><inject bean="StructuralDeployers"/></property>
+      <property name="deployers"><inject bean="Deployers"/></property>
+      <property name="mgtDeploymentCreator"><inject bean="ManagedDeploymentCreator"/></property>
+   </bean>
+
+   <!-- The ManagedDeploymentCreator implementation -->
+   <bean name="ManagedDeploymentCreator" class="org.jboss.deployers.plugins.managed.DefaultManagedDeploymentCreator" />
+
+   <!-- The holder for deployers that determine structure -->
+   <bean name="StructuralDeployers" class="org.jboss.deployers.vfs.plugins.structure.VFSStructuralDeployersImpl">
+      <property name="structureBuilder">
+         <!-- The consolidator of the structure information -->
+         <bean name="StructureBuilder" class="org.jboss.deployers.vfs.plugins.structure.VFSStructureBuilder"/>
+      </property>
+      <!-- Accept any implementor of structure deployer -->
+      <incallback method="addDeployer"/>
+      <uncallback method="removeDeployer"/>
+   </bean>
+
+   <!-- The holder for deployers that do real deployment -->
+   <bean name="Deployers" class="org.jboss.deployers.plugins.deployers.DeployersImpl">
+      <constructor><parameter><inject bean="jboss.kernel:service=KernelController"/></parameter></constructor>
+      <!-- Accept any implementor of deployer -->
+      <incallback method="addDeployer"/>
+      <uncallback method="removeDeployer"/>
+   </bean>
+
+   <!-- A declared structure descriptor deployer -->
+   <bean name="DeclaredStructure" class="org.jboss.deployers.vfs.plugins.structure.explicit.DeclaredStructure"/>
+
+    <!-- JAR Structure -->
+    <bean name="JARStructure" class="org.jboss.deployers.vfs.plugins.structure.jar.JARStructure">
+       <!-- Unless specified the default list of suffixes is .zip, .ear, .jar, ,.rar, .war, .sar, .har, .aop -->
+       <constructor>
+          <parameter>
+             <set elementClass="java.lang.String">
+                <value>.zip</value>
+                <value>.ear</value>
+                <value>.jar</value>
+                <value>.rar</value>
+                <value>.war</value>
+                <value>.sar</value>
+                <value>.har</value>
+                <value>.aop</value>
+                <value>.deployer</value>
+                <value>.beans</value>
+             </set>
+          </parameter>
+       </constructor>
+       <property name="candidateStructureVisitorFactory">
+          <!-- Any file that is not an ordinary directory is a candidate -->
+          <bean name="JARStructureCandidates" class="org.jboss.deployers.vfs.spi.structure.helpers.DefaultCandidateStructureVisitorFactory">
+             <!-- A filter to exclude some obvious non-subdeployments -->
+             <property name="filter">
+                <bean name="JARFilter" class="org.jboss.virtual.plugins.vfs.helpers.SuffixesExcludeFilter">
+                   <constructor><parameter>
+                      <list elementClass="java.lang.String">
+                         <!-- Exclude class files as subdeployments -->
+                         <value>.class</value>
+                      </list>
+                   </parameter></constructor>
+                </bean>
+             </property>
+          </bean>
+       </property>
+    </bean>
+
+    <!-- File Structure -->
+    <bean name="FileStructure" class="org.jboss.deployers.vfs.plugins.structure.file.FileStructure">
+       <!-- Unless specified the default list of suffixes is -service.xml, -beans.xml, -ds.xml, -aop.xml -->
+       <constructor>
+          <parameter>
+             <set elementClass="java.lang.String">
+                <value>-service.xml</value>
+                <value>-beans.xml</value>
+                <value>-ds.xml</value>
+                <value>-aop.xml</value>
+             </set>
+          </parameter>
+       </constructor>
+    </bean>
+
+   <!-- POJO Deployment -->
+   <bean name="BeanDeployer" class="org.jboss.deployers.vfs.deployer.kernel.BeanDeployer">
+      <property name="type">beans</property>
+   </bean>
+   <bean name="KernelDeploymentDeployer" class="org.jboss.deployers.vfs.deployer.kernel.KernelDeploymentDeployer">
+      <property name="type">beans</property>
+   </bean>
+   <bean name="BeanMetaDataDeployer" class="org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer">
+      <constructor><parameter><inject bean="jboss.kernel:service=Kernel"/></parameter></constructor>
+      <property name="type">beans</property>
+   </bean>
+
+   <!-- VFS ClassLoader -->
+   <bean name="ClassLoaderSystem" class="org.jboss.classloader.spi.ClassLoaderSystem">
+      <constructor factoryClass="org.jboss.classloader.spi.ClassLoaderSystem" factoryMethod="getInstance"/>
+   </bean>
+   <bean name="ClassLoading" class="org.jboss.classloading.spi.dependency.ClassLoading">
+      <incallback method="addModule" state="Configured"/>
+      <uncallback method="removeModule" state="Configured"/>
+   </bean>
+
+   <!--<bean name="CustomClassLoadingMetaDataParser" class="org.jboss.demos.system.deployers.PropertyClassloaderMetaDataDeployer"/>-->
+
+<!--
+   <bean name="ManifestParser" class="org.jboss.osgi.plugins.deployers.OSGiMetaDataDeployer"/>
+   <bean name="OSGi2ClassLoadingMetaDataDeployer" class="org.jboss.osgi.plugins.deployers.OSGiMetaData2ClassLoadingMetaDataDeployer"/>
+-->
+
+   <bean name="ClassLoadingMetaDataParser" class="org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer">
+      <constructor>
+         <parameter>org.jboss.classloading.spi.metadata.ClassLoadingMetaData</parameter>
+      </constructor>
+      <property name="name">jboss-classloading.xml</property>
+   </bean>
+
+   <bean name="ClassloadingDeployer" class="org.jboss.demos.system.deployers.ClassloadingDescribeDeployer">
+     <property name="classLoading"><inject bean="ClassLoading"/></property>
+   </bean>
+   <bean name="VFSClassLoaderDeployer" class="org.jboss.deployers.plugins.classloading.AbstractLevelClassLoaderSystemDeployer">
+      <property name="classLoading"><inject bean="ClassLoading"/></property>
+      <property name="system"><inject bean="ClassLoaderSystem"/></property>
+   </bean>
+
+   <!-- Hotdeployment of applications -->
+
+   <bean name="MainDeployerHelper" class="org.jboss.demos.boostrap.MainDeployerHelper">
+      <constructor>
+         <parameter><inject bean="MainDeployer"/></parameter>
+      </constructor>
+   </bean>
+
+   <bean name="HDScanner" class="org.jboss.demos.boostrap.HDScanner">
+      <constructor>
+         <parameter><inject bean="MainDeployerHelper"/></parameter>
+         <parameter>C:\\projects\\demos\\osgi\\boot\\work</parameter>
+      </constructor>
+      <property name="scanPeriod">10000</property>
+      <property name="scanThreadName">HDScanner</property>
+   </bean>
+
+</deployment>

Added: projects/demos/trunk/bootstrap/src/resources/bootstrap-beans.xml
===================================================================
--- projects/demos/trunk/bootstrap/src/resources/bootstrap-beans.xml	                        (rev 0)
+++ projects/demos/trunk/bootstrap/src/resources/bootstrap-beans.xml	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,127 @@
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+   <!-- The MainDeployer -->
+   <bean name="MainDeployer" class="org.jboss.deployers.plugins.main.MainDeployerImpl">
+      <property name="structuralDeployers"><inject bean="StructuralDeployers"/></property>
+      <property name="deployers"><inject bean="Deployers"/></property>
+      <property name="mgtDeploymentCreator"><inject bean="ManagedDeploymentCreator"/></property>
+   </bean>
+
+   <!-- The ManagedDeploymentCreator implementation -->
+   <bean name="ManagedDeploymentCreator" class="org.jboss.deployers.plugins.managed.DefaultManagedDeploymentCreator" />
+
+   <!-- The holder for deployers that determine structure -->
+   <bean name="StructuralDeployers" class="org.jboss.deployers.vfs.plugins.structure.VFSStructuralDeployersImpl">
+      <property name="structureBuilder">
+         <!-- The consolidator of the structure information -->
+         <bean name="StructureBuilder" class="org.jboss.deployers.vfs.plugins.structure.VFSStructureBuilder"/>
+      </property>
+      <!-- Accept any implementor of structure deployer -->
+      <incallback method="addDeployer"/>
+      <uncallback method="removeDeployer"/>
+   </bean>
+
+   <!-- The holder for deployers that do real deployment -->
+   <bean name="Deployers" class="org.jboss.deployers.plugins.deployers.DeployersImpl">
+      <constructor><parameter><inject bean="jboss.kernel:service=KernelController"/></parameter></constructor>
+      <!-- Accept any implementor of deployer -->
+      <incallback method="addDeployer"/>
+      <uncallback method="removeDeployer"/>
+   </bean>
+
+   <!-- A declared structure descriptor deployer -->
+   <bean name="DeclaredStructure" class="org.jboss.deployers.vfs.plugins.structure.explicit.DeclaredStructure"/>
+
+    <!-- JAR Structure -->
+    <bean name="JARStructure" class="org.jboss.deployers.vfs.plugins.structure.jar.JARStructure">
+       <property name="candidateStructureVisitorFactory">
+          <!-- Any file that is not an ordinary directory is a candidate -->
+          <bean name="JARStructureCandidates" class="org.jboss.deployers.vfs.spi.structure.helpers.DefaultCandidateStructureVisitorFactory">
+             <!-- A filter to exclude some obvious non-subdeployments -->
+             <property name="filter">
+                <bean name="JARFilter" class="org.jboss.virtual.plugins.vfs.helpers.SuffixesExcludeFilter">
+                   <constructor><parameter>
+                      <list elementClass="java.lang.String">
+                         <!-- Exclude class files as subdeployments -->
+                         <value>.class</value>
+                      </list>
+                   </parameter></constructor>
+                </bean>
+             </property>
+          </bean>
+       </property>
+    </bean>
+
+    <!-- File Structure -->
+    <bean name="FileStructure" class="org.jboss.deployers.vfs.plugins.structure.file.FileStructure">
+       <!-- Unless specified the default list of suffixes is -service.xml, -beans.xml, -ds.xml, -aop.xml -->
+       <constructor>
+          <parameter>
+             <set elementClass="java.lang.String">
+                <value>-service.xml</value>
+                <value>-beans.xml</value>
+                <value>-ds.xml</value>
+                <value>-aop.xml</value>
+             </set>
+          </parameter>
+       </constructor>
+    </bean>
+
+   <!-- POJO Deployment -->
+   <bean name="BeanDeployer" class="org.jboss.deployers.vfs.deployer.kernel.BeanDeployer">
+      <property name="type">beans</property>
+   </bean>
+   <bean name="KernelDeploymentDeployer" class="org.jboss.deployers.vfs.deployer.kernel.KernelDeploymentDeployer">
+      <property name="type">beans</property>
+   </bean>
+   <bean name="BeanMetaDataDeployer" class="org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer">
+      <constructor><parameter class="org.jboss.kernel.Kernel"><inject bean="jboss.kernel:service=Kernel"/></parameter></constructor>
+      <property name="type">beans</property>
+   </bean>
+
+   <!-- VFS ClassLoader -->
+   <bean name="ClassLoaderSystem" class="org.jboss.classloader.spi.ClassLoaderSystem">
+      <constructor factoryClass="org.jboss.classloader.spi.ClassLoaderSystem" factoryMethod="getInstance"/>
+   </bean>
+   <bean name="ClassLoading" class="org.jboss.classloading.spi.dependency.ClassLoading">
+      <incallback method="addModule" state="Configured"/>
+      <uncallback method="removeModule" state="Configured"/>
+   </bean>
+   <bean name="ClassLoadingMetaDataParser" class="org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer">
+      <constructor>
+         <parameter>org.jboss.classloading.spi.metadata.ClassLoadingMetaData</parameter>
+      </constructor>
+      <property name="name">jboss-classloading.xml</property>
+      <property name="buildManagedObject">true</property>
+   </bean>
+   <bean name="ClassLoadingDefaultDeployer" class="org.jboss.deployers.plugins.classloading.ClassLoadingDefaultDeployer">
+      <property name="defaultMetaData">
+         <classloading xmlns="urn:jboss:classloading:1.0" export-all="NON_EMPTY" import-all="true"/>
+      </property>
+   </bean>
+   <bean name="ClassLoaderDescribeDeployer" class="org.jboss.deployers.vfs.plugins.classloader.VFSClassLoaderDescribeDeployer">
+      <property name="classLoading"><inject bean="ClassLoading"/></property>
+   </bean>
+   <bean name="ClassLoaderDeployer" class="org.jboss.deployers.plugins.classloading.AbstractLevelClassLoaderSystemDeployer">
+      <property name="classLoading"><inject bean="ClassLoading"/></property>
+      <property name="system"><inject bean="ClassLoaderSystem"/></property>
+   </bean>
+
+  <!-- HD scanner -->
+
+  <bean name="MainDeployerHelper" class="org.jboss.demos.boostrap.MainDeployerHelper">
+     <constructor>
+        <parameter><inject bean="MainDeployer"/></parameter>
+     </constructor>
+  </bean>
+
+  <bean name="HDScanner" class="org.jboss.demos.boostrap.HDScanner">
+     <constructor>
+        <parameter><inject bean="MainDeployerHelper"/></parameter>
+        <parameter>/projects/demos/sandbox</parameter>
+     </constructor>
+     <property name="scanPeriod">10000</property>
+     <property name="scanThreadName">HDScanner</property>
+  </bean>
+
+</deployment>

Added: projects/demos/trunk/build/JBossORG-EULA.txt
===================================================================
--- projects/demos/trunk/build/JBossORG-EULA.txt	                        (rev 0)
+++ projects/demos/trunk/build/JBossORG-EULA.txt	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,107 @@
+LICENSE AGREEMENT
+JBOSS(r)
+
+This License Agreement governs the use of the Software Packages and any updates to the Software 
+Packages, regardless of the delivery mechanism.  Each Software Package is a collective work 
+under U.S. Copyright Law.  Subject to the following terms, Red Hat, Inc. ("Red Hat") grants to 
+the user ("Client") a license to the applicable collective work(s) pursuant to the 
+GNU Lesser General Public License v. 2.1 except for the following Software Packages: 
+(a) JBoss Portal Forums and JBoss Transactions JTS, each of which is licensed pursuant to the 
+GNU General Public License v.2; 
+
+(b) JBoss Rules, which is licensed pursuant to the Apache  License v.2.0;
+
+(c) an optional download for JBoss Cache for the Berkeley DB for Java database, which is licensed under the 
+(open source) Sleepycat License (if Client does not wish to use the open source version of this database, 
+it may purchase a license from Sleepycat Software); 
+
+and (d) the BPEL extension for JBoss jBPM, which is licensed under the Common Public License v.1, 
+and, pursuant to the OASIS BPEL4WS standard, requires parties wishing to redistribute to enter various 
+royalty-free patent licenses.  
+
+Each of the foregoing licenses is available at http://www.opensource.org/licenses/index.php.
+
+1.  The Software.  "Software Packages" refer to the various software modules that are created and made available 
+for distribution by the JBoss.org open source community at http://www.jboss.org.   Each of the Software Packages 
+may be comprised of hundreds of software components.  The end user license agreement for each component is located in 
+the component's source code.  With the exception of certain image files identified in Section 2 below, 
+the license terms for the components permit Client to copy, modify, and redistribute the component, 
+in both source code and binary code forms.  This agreement does not limit Client's rights under, 
+or grant Client rights that supersede, the license terms of any particular component.
+
+2.  Intellectual Property Rights.  The Software Packages are owned by Red Hat and others and are protected under copyright 
+and other laws.  Title to the Software Packages and any component, or to any copy, modification, or merged portion shall 
+remain with the aforementioned, subject to the applicable license.  The "JBoss" trademark, "Red Hat" trademark, the 
+individual Software Package trademarks, and the "Shadowman" logo are registered trademarks of Red Hat and its affiliates 
+in the U.S. and other countries.  This agreement permits Client to distribute unmodified copies of the Software Packages 
+using the Red Hat trademarks that Red Hat has inserted in the Software Packages on the condition that Client follows Red Hat's 
+trademark guidelines for those trademarks located at http://www.redhat.com/about/corporate/trademark/.  Client must abide by 
+these trademark guidelines when distributing the Software Packages, regardless of whether the Software Packages have been modified. 
+If Client modifies the Software Packages, then Client must replace all Red Hat trademarks and logos identified at 
+http://www.jboss.com/company/logos, unless a separate agreement with Red Hat is executed or other permission granted.  
+Merely deleting the files containing the Red Hat trademarks may corrupt the Software Packages.  
+
+3.  Limited Warranty.  Except as specifically stated in this Paragraph 3 or a license for a particular 
+component, to the maximum extent permitted under applicable law, the Software Packages and the 
+components are provided and licensed "as is" without warranty of any kind, expressed or implied, 
+including the implied warranties of merchantability, non-infringement or fitness for a particular purpose.  
+Red Hat warrants that the media on which Software Packages may be furnished will be free from defects in 
+materials and manufacture under normal use for a period of 30 days from the date of delivery to Client.  
+Red Hat does not warrant that the functions contained in the Software Packages will meet Client's requirements 
+or that the operation of the Software Packages will be entirely error free or appear precisely as described 
+in the accompanying documentation. This warranty extends only to the party that purchases the Services 
+pertaining to the Software Packages from Red Hat or a Red Hat authorized distributor. 
+
+4.  Limitation of Remedies and Liability. To the maximum extent permitted by applicable law, the remedies 
+described below are accepted by Client as its only remedies.  Red Hat's entire liability, and Client's 
+exclusive remedies, shall be: If the Software media is defective, Client may return it within 30 days of 
+delivery along with a copy of Client's payment receipt and Red Hat, at its option, will replace it or 
+refund the money paid by Client for the Software.  To the maximum extent permitted by applicable law, 
+Red Hat or any Red Hat authorized dealer will not be liable to Client for any incidental or consequential 
+damages, including lost profits or lost savings arising out of the use or inability to use the Software, 
+even if Red Hat or such dealer has been advised of the possibility of such damages.  In no event shall 
+Red Hat's liability under this agreement exceed the amount that Client paid to Red Hat under this 
+Agreement during the twelve months preceding the action.
+
+5.  Export Control.  As required by U.S. law, Client represents and warrants that it: 
+(a) understands that the Software Packages are subject to export controls under the 
+U.S. Commerce Department's Export Administration Regulations ("EAR"); 
+
+(b) is not located in a prohibited destination country under the EAR or U.S. sanctions regulations 
+(currently Cuba, Iran, Iraq, Libya, North Korea, Sudan and Syria); 
+
+(c) will not export, re-export, or transfer the Software Packages to any prohibited destination, entity, 
+or individual without the necessary export license(s) or authorizations(s) from the U.S. Government; 
+
+(d) will not use or transfer the Software Packages for use in any sensitive nuclear, chemical or 
+biological weapons, or missile technology end-uses unless authorized by the U.S. Government by 
+regulation or specific license; 
+
+(e) understands and agrees that if it is in the United States and exports or transfers the Software 
+Packages to eligible end users, it will, as required by EAR Section 740.17(e), submit semi-annual 
+reports to the Commerce Department's Bureau of Industry & Security (BIS), which include the name and 
+address (including country) of each transferee; 
+
+and (f) understands that countries other than the United States may restrict the import, use, or 
+export of encryption products and that it shall be solely responsible for compliance with any such 
+import, use, or export restrictions.
+
+6.  Third Party Programs. Red Hat may distribute third party software programs with the Software Packages 
+that are not part of the Software Packages and which Client must install separately.  These third party 
+programs are subject to their own license terms.  The license terms either accompany the programs or 
+can be viewed at http://www.redhat.com/licenses/.  If Client does not agree to abide by the applicable 
+license terms for such programs, then Client may not install them.  If Client wishes to install the programs 
+on more than one system or transfer the programs to another party, then Client must contact the licensor 
+of the programs.
+
+7.  General.  If any provision of this agreement is held to be unenforceable, that shall not affect the 
+enforceability of the remaining provisions.  This License Agreement shall be governed by the laws of the 
+State of North Carolina and of the United States, without regard to any conflict of laws provisions, 
+except that the United Nations Convention on the International Sale of Goods shall not apply.
+
+Copyright 2006 Red Hat, Inc.  All rights reserved.  
+"JBoss" and the JBoss logo are registered trademarks of Red Hat, Inc.  
+All other trademarks are the property of their respective owners. 
+
+	Page 1 of 1	18 October 2006
+

Added: projects/demos/trunk/build/jboss-demos.iml
===================================================================
--- projects/demos/trunk/build/jboss-demos.iml	                        (rev 0)
+++ projects/demos/trunk/build/jboss-demos.iml	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module relativePaths="false" type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager" inherit-compiler-output="false">
+    <output url="file://$MODULE_DIR$/target/classes" />
+    <exclude-output />
+    <output-test url="file://$MODULE_DIR$/target/tests-classes" />
+    <content url="file://$MODULE_DIR$">
+      <excludeFolder url="file://$MODULE_DIR$/target" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntryProperties />
+  </component>
+</module>
+

Added: projects/demos/trunk/build/pom.xml
===================================================================
--- projects/demos/trunk/build/pom.xml	                        (rev 0)
+++ projects/demos/trunk/build/pom.xml	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,420 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <parent>
+    <groupId>org.jboss</groupId>
+    <artifactId>jboss-parent</artifactId>
+    <version>4-beta-2</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.jboss.demos</groupId>
+  <artifactId>jboss-demos</artifactId>
+  <version>2.0.0-SNAPSHOT</version>
+  <packaging>pom</packaging>
+  <name>JBoss Demos Build</name>
+  <url>http://www.jboss.com/products/jbossmc</url>
+  <description>
+    The JBoss MC Demos
+  </description>
+  <scm>
+    <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/demos/trunk/</connection>
+    <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/demos/trunk/</developerConnection>
+    <url>http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas/projects/demos/trunk/</url>
+  </scm>
+
+  <properties>
+    <version.jboss.jbossas>5.0.0.CR1</version.jboss.jbossas>
+    <version.jboss.man>2.0.0.Beta12</version.jboss.man>
+    <version.jboss.mdr>2.0.0.Beta15</version.jboss.mdr>
+    <version.jboss.microcontainer>2.0.0.Beta16</version.jboss.microcontainer>
+    <version.jboss.deployers>2.0.0.Beta18</version.jboss.deployers>
+    <version.jboss.classloader>2.0.0.Beta12</version.jboss.classloader>
+    <version.jboss.common.core>2.2.7.GA</version.jboss.common.core>
+    <version.jboss.common.logging.spi>2.0.5.GA</version.jboss.common.logging.spi>
+    <version.jboss.common.logging.log4j>2.0.5.GA</version.jboss.common.logging.log4j>
+    <version.jbossxb>2.0.0.CR10</version.jbossxb>
+    <version.jboss.aop>2.0.0.CR11</version.jboss.aop>
+    <version.jboss.vfs>2.0.0.Beta20</version.jboss.vfs>
+    <version.org.jboss.test>1.0.5.GA</version.org.jboss.test>
+    <version.junit>4.4</version.junit>
+    <version.javassist>3.7.1.GA</version.javassist>
+    <version.xerces>2.9.1</version.xerces>
+    <version.spring>2.5.5</version.spring>
+  </properties>
+
+  <build>
+    <sourceDirectory>src/main</sourceDirectory>
+    <resources>
+      <resource>
+        <targetPath/>
+        <filtering/>
+        <directory>src/resources</directory>
+        <includes/>
+        <excludes/>
+      </resource>
+    </resources>
+    <testSourceDirectory>src/tests</testSourceDirectory>
+    <outputDirectory>${microcontainer.outputDirectory}</outputDirectory>
+    <testOutputDirectory>${microcontainer.testOutputDirectory}</testOutputDirectory>
+    <finalName>${artifactId}</finalName>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <source>1.5</source>
+          <target>1.5</target>
+          <showDeprecation>true</showDeprecation>
+          <showWarnings>true</showWarnings>
+          <optimize>true</optimize>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.jboss.maven.plugins</groupId>
+        <artifactId>maven-jboss-deploy-plugin</artifactId>
+        <version>1.6</version>
+        <executions>
+          <execution>
+            <goals>
+              <goal>jboss-deploy</goal>
+            </goals>
+          </execution>
+        </executions>
+        <configuration>
+          <jbossDeployRoot>${jboss.repository.root}</jbossDeployRoot>
+        </configuration>
+      </plugin>
+    </plugins>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-assembly-plugin</artifactId>
+          <executions>
+            <execution>
+              <id>make-assembly</id>
+              <phase>package</phase>
+              <goals>
+                <goal>attached</goal>
+              </goals>
+            </execution>
+          </executions>
+        </plugin>
+        <plugin>
+          <artifactId>maven-idea-plugin</artifactId>
+          <configuration>
+            <downloadSources>true</downloadSources>
+          </configuration>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-jar-plugin</artifactId>
+          <version>2.2</version>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-surefire-plugin</artifactId>
+          <version>2.4.1</version>
+          <configuration>
+            <redirectTestOutputToFile>true</redirectTestOutputToFile>
+            <includes>
+              <include>org/jboss/test/**/*TestCase.java</include>
+            </includes>
+          </configuration>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+  </build>
+  <repositories>
+    <repository>
+      <id>repository.jboss.org</id>
+      <name>JBoss Repository</name>
+      <layout>default</layout>
+      <url>http://repository.jboss.org/maven2/</url>
+      <snapshots>
+        <enabled>false</enabled>
+      </snapshots>
+    </repository>
+    <repository>
+      <id>snapshots.jboss.org</id>
+      <name>JBoss Snapshots Repository</name>
+      <layout>default</layout>
+      <url>http://snapshots.jboss.org/maven2/</url>
+      <snapshots>
+        <enabled>true</enabled>
+      </snapshots>
+      <releases>
+        <enabled>false</enabled>
+      </releases>
+    </repository>
+  </repositories>
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-project-info-reports-plugin</artifactId>
+        <reportSets>
+          <reportSet>
+            <reports>
+              <report>dependencies</report>
+              <report>issue-tracking</report>
+              <report>license</report>
+              <report>scm</report>
+            </reports>
+          </reportSet>
+        </reportSets>
+      </plugin>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>findbugs-maven-plugin</artifactId>
+        <version>1.0.0</version>
+      </plugin>
+    </plugins>
+  </reporting>
+  <dependencyManagement>
+    <!-- The parent pom manages the inter-dependencies of the modules. -->
+    <dependencies>
+      <dependency>
+        <groupId>org.jboss.demos</groupId>
+        <artifactId>jboss-demos</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss.demos</groupId>
+        <artifactId>jboss-demos-bootstrap</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss.demos</groupId>
+        <artifactId>jboss-demos-jmx</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss.demos</groupId>
+        <artifactId>jboss-demos-models</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <!--
+      <dependency>
+        <groupId>org.jboss.demos</groupId>
+        <artifactId>jboss-demos-osgi</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      -->
+
+      <dependency>
+        <groupId>org.jboss.jbossas</groupId>
+        <artifactId>jboss-as-system-jmx</artifactId>
+        <version>${version.jboss.jbossas}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss.microcontainer</groupId>
+        <artifactId>jboss-dependency</artifactId>
+        <version>${version.jboss.microcontainer}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss.microcontainer</groupId>
+        <artifactId>jboss-kernel</artifactId>
+        <version>${version.jboss.microcontainer}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss.microcontainer</groupId>
+        <artifactId>jboss-aop-mc-int</artifactId>
+        <version>${version.jboss.microcontainer}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss.microcontainer</groupId>
+        <artifactId>jboss-spring-int</artifactId>
+        <version>${version.jboss.microcontainer}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss.microcontainer</groupId>
+        <artifactId>jboss-guice-int</artifactId>
+        <version>${version.jboss.microcontainer}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss.deployers</groupId>
+        <artifactId>jboss-deployers-client</artifactId>
+        <version>${version.jboss.deployers}</version>
+      </dependency>      
+      <dependency>
+        <groupId>org.jboss.deployers</groupId>
+        <artifactId>jboss-deployers-client-spi</artifactId>
+        <version>${version.jboss.deployers}</version>
+      </dependency>      
+      <dependency>
+        <groupId>org.jboss.deployers</groupId>
+        <artifactId>jboss-deployers-core-spi</artifactId>
+        <version>${version.jboss.deployers}</version>
+      </dependency>      
+      <dependency>
+        <groupId>org.jboss.deployers</groupId>
+        <artifactId>jboss-deployers-impl</artifactId>
+        <version>${version.jboss.deployers}</version>
+        <exclusions>
+          <exclusion>
+            <groupId>org.jboss</groupId>
+            <artifactId>javassist</artifactId>
+          </exclusion>
+        </exclusions>
+      </dependency>      
+      <dependency>
+        <groupId>org.jboss.deployers</groupId>
+        <artifactId>jboss-deployers-spi</artifactId>
+        <version>${version.jboss.deployers}</version>
+      </dependency>      
+      <dependency>
+        <groupId>org.jboss.deployers</groupId>
+        <artifactId>jboss-deployers-structure-spi</artifactId>
+        <version>${version.jboss.deployers}</version>
+      </dependency>      
+      <dependency>
+        <groupId>org.jboss.deployers</groupId>
+        <artifactId>jboss-deployers-vfs</artifactId>
+        <version>${version.jboss.deployers}</version>
+      </dependency>      
+      <dependency>
+        <groupId>org.jboss.deployers</groupId>
+        <artifactId>jboss-deployers-vfs-spi</artifactId>
+        <version>${version.jboss.deployers}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss.cl</groupId>
+        <artifactId>jboss-classloader</artifactId>
+        <version>${version.jboss.classloader}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss.cl</groupId>
+        <artifactId>jboss-classloading</artifactId>
+        <version>${version.jboss.classloader}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss.cl</groupId>
+        <artifactId>jboss-classloading-vfs</artifactId>
+        <version>${version.jboss.classloader}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss.man</groupId>
+        <artifactId>jboss-managed</artifactId>
+        <version>${version.jboss.man}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss.man</groupId>
+        <artifactId>jboss-metatype</artifactId>
+        <version>${version.jboss.man}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss</groupId>
+        <artifactId>jboss-mdr</artifactId>
+        <version>${version.jboss.mdr}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss</groupId>
+        <artifactId>jboss-common-core</artifactId>
+        <version>${version.jboss.common.core}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss.logging</groupId>
+        <artifactId>jboss-logging-spi</artifactId>
+        <version>${version.jboss.common.logging.spi}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss.logging</groupId>
+        <artifactId>jboss-logging-log4j</artifactId>
+        <version>${version.jboss.common.logging.log4j}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss</groupId>
+        <artifactId>jbossxb</artifactId>
+        <version>${version.jbossxb}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss</groupId>
+        <artifactId>jboss-vfs</artifactId>
+        <version>${version.jboss.vfs}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss.aop</groupId>
+        <artifactId>jboss-aop</artifactId>
+        <version>${version.jboss.aop}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss.jbossas</groupId>
+        <artifactId>jboss-as-aspects</artifactId>
+        <version>${version.jboss.jbossas}</version>
+      </dependency>      
+      <dependency>
+        <groupId>org.jboss</groupId>
+        <artifactId>javassist</artifactId>
+        <version>${version.javassist}</version>
+      </dependency>
+      <dependency>
+        <groupId>apache-xerces</groupId>
+        <artifactId>xml-apis</artifactId>
+        <version>${version.xerces}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.springframework</groupId>
+        <artifactId>spring-beans</artifactId>
+        <version>${version.spring}</version>
+      </dependency>
+      <dependency>
+        <groupId>aopalliance</groupId>
+        <artifactId>aopalliance</artifactId>
+        <version>1.0</version>
+      </dependency>
+      <!-- test dependencies -->
+      <dependency>
+        <groupId>org.jboss</groupId>
+        <artifactId>jboss-test</artifactId>
+        <version>${version.org.jboss.test}</version>
+        <scope>test</scope>
+      </dependency>
+      <dependency>
+        <groupId>junit</groupId>
+        <artifactId>junit</artifactId>
+        <version>${version.junit}</version>
+        <scope>test</scope>
+      </dependency>
+    </dependencies>
+  </dependencyManagement>
+
+  <profiles>
+    <profile>
+      <id>default</id>
+      <activation>
+        <activeByDefault>true</activeByDefault>
+      </activation>
+      <properties>
+        <microcontainer.outputDirectory>target/classes</microcontainer.outputDirectory>
+        <microcontainer.testOutputDirectory>target/tests-classes</microcontainer.testOutputDirectory>
+      </properties>
+    </profile>
+    <profile>
+      <id>eclipse</id>
+      <build>
+        <defaultGoal>process-test-resources</defaultGoal>
+        <plugins>
+          <plugin>
+            <artifactId>maven-eclipse-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>eclipse</id>
+                <phase>process-test-resources</phase>
+                <goals>
+                  <goal>eclipse</goal>
+                </goals>
+              </execution>
+            </executions>
+            <configuration>
+              <downloadSources>true</downloadSources>
+              <buildOutputDirectory>${microcontainer.outputDirectory}</buildOutputDirectory>
+            </configuration>
+          </plugin>
+        </plugins>
+      </build>
+      <properties>
+        <microcontainer.outputDirectory>eclipse-target/classes</microcontainer.outputDirectory>
+        <microcontainer.testOutputDirectory>eclipse-target/tests-classes</microcontainer.testOutputDirectory>
+      </properties>
+    </profile>
+  </profiles>
+</project>
\ No newline at end of file

Added: projects/demos/trunk/jmx/pom.xml
===================================================================
--- projects/demos/trunk/jmx/pom.xml	                        (rev 0)
+++ projects/demos/trunk/jmx/pom.xml	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,87 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <parent>
+    <groupId>org.jboss.demos</groupId>
+    <artifactId>jboss-demos</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.jboss.demos</groupId>
+  <artifactId>jboss-demos-jmx</artifactId>
+  <packaging>jar</packaging>
+  <name>JBoss MC Demos JMX</name>
+  <url>http://www.jboss.org/jbossmc</url>
+  <description>JBoss MC Demos</description>
+  <build>
+    <sourceDirectory>src/main</sourceDirectory>
+  </build>
+  <dependencies>
+    <dependency>
+      <groupId>org.jboss.demos</groupId>
+      <artifactId>jboss-demos-bootstrap</artifactId>
+    </dependency>
+    <!-- Compile (global dependencies) -->
+    <dependency>
+      <groupId>org.jboss.deployers</groupId>
+      <artifactId>jboss-deployers-vfs-spi</artifactId>
+      <exclusions>
+        <exclusion>
+          <groupId>jboss</groupId>
+          <artifactId>jboss-vfs</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>apache-xerces</groupId>
+      <artifactId>xml-apis</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss</groupId>
+      <artifactId>jboss-vfs</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss</groupId>
+      <artifactId>jboss-common-core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.logging</groupId>
+      <artifactId>jboss-logging-spi</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.microcontainer</groupId>
+      <artifactId>jboss-dependency</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.deployers</groupId>
+      <artifactId>jboss-deployers-spi</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.deployers</groupId>
+      <artifactId>jboss-deployers-structure-spi</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.deployers</groupId>
+      <artifactId>jboss-deployers-vfs</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.microcontainer</groupId>
+      <artifactId>jboss-kernel</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.deployers</groupId>
+      <artifactId>jboss-deployers-core-spi</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.aop</groupId>
+      <artifactId>jboss-aop</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.jbossas</groupId>
+      <artifactId>jboss-as-system-jmx</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.jbossas</groupId>
+      <artifactId>jboss-as-aspects</artifactId>
+    </dependency>
+  </dependencies>
+
+</project>
\ No newline at end of file

Added: projects/demos/trunk/jmx/src/main/log4j.properties
===================================================================
--- projects/demos/trunk/jmx/src/main/log4j.properties	                        (rev 0)
+++ projects/demos/trunk/jmx/src/main/log4j.properties	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,6 @@
+log4j.rootLogger=INFO, stdout
+
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+# Pattern to output the caller's file name and line number.
+log4j.appender.stdout.layout.ConversionPattern=JBoss-MC-Demo %5p [%d{dd-MM-yyyy HH:mm:ss}] %c{1} - %m%n

Added: projects/demos/trunk/jmx/src/main/org/jboss/demos/bootstrap/jmx/JMXMain.java
===================================================================
--- projects/demos/trunk/jmx/src/main/org/jboss/demos/bootstrap/jmx/JMXMain.java	                        (rev 0)
+++ projects/demos/trunk/jmx/src/main/org/jboss/demos/bootstrap/jmx/JMXMain.java	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,60 @@
+/*
+* 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.demos.bootstrap.jmx;
+
+import java.io.File;
+import java.net.URL;
+
+import org.jboss.demos.boostrap.Main;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class JMXMain
+{
+   public static void main(String[] args)
+   {
+      Main.main(args);
+
+      try
+      {
+         Main.deploy(getURL("/projects/demos/jmx/src/resources/system-jmx-beans.xml"));
+         Main.deploy(getURL("/projects/demos/jmx/src/resources/aop-beans.xml"));
+         Main.deploy(getURL("/projects/demos/jmx/src/resources/varia-deployers-beans.xml"));
+
+         Main.validate();
+      }
+      catch (Throwable t)
+      {
+         t.printStackTrace();
+      }
+   }
+
+   protected static URL getURL(String url) throws Exception
+   {
+      File file = new File(url);
+      if (file.exists() == false)
+         throw new IllegalArgumentException("No such file: " + url);
+
+      return file.toURL();
+   }
+}

Added: projects/demos/trunk/jmx/src/main/org/jboss/demos/system/jmx/JMXKernel.java
===================================================================
--- projects/demos/trunk/jmx/src/main/org/jboss/demos/system/jmx/JMXKernel.java	                        (rev 0)
+++ projects/demos/trunk/jmx/src/main/org/jboss/demos/system/jmx/JMXKernel.java	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,90 @@
+/*
+* 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.demos.system.jmx;
+
+import javax.management.MBeanServer;
+import javax.management.MBeanServerFactory;
+
+import org.jboss.beans.metadata.api.annotations.Constructor;
+import org.jboss.beans.metadata.api.annotations.Inject;
+import org.jboss.kernel.Kernel;
+import org.jboss.kernel.plugins.bootstrap.basic.KernelConstants;
+import org.jboss.system.ServiceController;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class JMXKernel
+{
+   private Kernel kernel;
+   private MBeanServer mbeanServer;
+   private boolean createdMBeanServer;
+   private ServiceController serviceController;
+
+   @Constructor
+   public JMXKernel(@Inject(bean = KernelConstants.KERNEL_NAME) Kernel kernel)
+   {
+      this.kernel = kernel;
+   }
+
+   public void create()
+   {
+      if (mbeanServer == null)
+      {
+         mbeanServer = MBeanServerFactory.createMBeanServer("jboss");
+         createdMBeanServer = true;
+      }
+   }
+
+   public void start()
+   {
+      serviceController = new ServiceController();
+      serviceController.setKernel(kernel);
+      serviceController.setMBeanServer(mbeanServer);
+   }
+
+   public void stop()
+   {
+      serviceController.shutdown();
+   }
+
+   public void destroy()
+   {
+      if (createdMBeanServer)
+         MBeanServerFactory.releaseMBeanServer(mbeanServer);
+   }
+
+   public void setMbeanServer(MBeanServer mbeanServer)
+   {
+      this.mbeanServer = mbeanServer;
+   }
+
+   public ServiceController getServiceController()
+   {
+      return serviceController;
+   }
+
+   public MBeanServer getMbeanServer()
+   {
+      return mbeanServer;
+   }
+}

Added: projects/demos/trunk/jmx/src/resources/aop-beans.xml
===================================================================
--- projects/demos/trunk/jmx/src/resources/aop-beans.xml	                        (rev 0)
+++ projects/demos/trunk/jmx/src/resources/aop-beans.xml	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+   AOP configuration
+-->
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+   <!-- Integration -->
+   <bean name="AOPClassLoaderScopingPolicy" class="org.jboss.aop.asintegration.jboss5.VFSClassLoaderScopingPolicy"/>
+   <bean name="AOPJBossIntegration" class="org.jboss.aop.asintegration.jboss5.JBoss5Integration">
+      <property name="scopingPolicy"><inject bean="AOPClassLoaderScopingPolicy"/></property>
+   </bean>
+
+   <!-- For use once the aop-mc-int metadata stuff goes live
+   <bean name="DefaultAspectManager" class="org.jboss.aop.microcontainer.beans.metadata.DefaultAspectManager">
+      <property name="managerBean">AspectManager</property>
+      <property name="managerProperty">aspectManager</property>
+   </bean>
+   -->
+
+
+   <!--
+      Valid values for the AspectManager bean for use with enableTransformer=true are:
+      * org.jboss.aop.deployers.AspectManagerJDK5 - works with the -javaagent:pluggable-instrumentor.jar switch
+      * org.jboss.aop.deployers.AspectManagerJRockit - works with JRockit and the -Xmanagement:class=org.jboss.aop.hook.JRockitPluggableClassPreProcessor switch
+   -->
+   <bean name="AspectManager" class="org.jboss.aop.deployers.AspectManagerJDK5">
+      <constructor>
+         <parameter><![CDATA[
+	         <aop>
+			      <aspect name="mainDeployer" class="org.jboss.profileservice.aop.MainDeployerAspect"/>
+					   <bind pointcut="execution(* $instanceof{org.jboss.deployers.spi.deployment.MainDeployer}->process(..))">
+				      <advice name="process" aspect="mainDeployer"/>
+				   </bind>
+					<aspect name="persist" class="org.jboss.profileservice.aop.PersistAspect"/>
+					<bind pointcut="execution(* $instanceof{org.jboss.managed.api.ManagedProperty}->setValue(..))">
+				      <advice name="setValue" aspect="persist"/>
+				   </bind>
+				</aop>]]>
+	      </parameter>
+      </constructor>
+
+      <property name="jbossIntegration"><inject bean="AOPJBossIntegration"/></property>
+
+      <property name="enableLoadtimeWeaving">false</property>
+      <!-- only relevant when EnableLoadtimeWeaving is true.
+           When transformer is on, every loaded class gets
+           transformed.  If AOP can't find the class, then it
+           throws an exception.  Sometimes, classes may not have
+           all the classes they reference.  So, the Suppressing
+           is needed.  (i.e. Jboss cache in the default configuration -->
+      <property name="suppressTransformationErrors">true</property>
+      <property name="prune">true</property>
+      <property name="include">org.jboss.test., org.jboss.injbossaop.</property>
+      <property name="exclude">org.jboss.</property>
+      <!-- This avoids instrumentation of hibernate cglib enhanced proxies
+      <property name="ignore">*$$EnhancerByCGLIB$$*</property> -->
+      <property name="optimized">true</property>
+      <property name="verbose">false</property>
+      <!--
+         Available choices for this attribute are:
+            org.jboss.aop.instrument.ClassicInstrumentor (default)
+            org.jboss.aop.instrument.GeneratedAdvisorInstrumentor
+       <property name="instrumentor">org.jboss.aop.instrument.ClassicInstrumentor</property>
+      -->
+   </bean>
+
+   <!-- Support for @JMX -->
+   <lifecycle-configure xmlns="urn:jboss:aop-beans:1.0"
+               name="JMXRegistrationAdvice"
+               class="org.jboss.system.microcontainer.jmx.ServiceControllerRegistrationLifecycleCallback"
+               classes="@org.jboss.aop.microcontainer.aspects.jmx.JMX"
+               manager-bean="AspectManager"
+               manager-property="aspectManager">
+      <property name="serviceController"><inject bean="JMXKernel" property="serviceController"/></property>
+   </lifecycle-configure>
+   <lifecycle-create xmlns="urn:jboss:aop-beans:1.0"
+               name="JMXCreateDestroyAdvice"
+               class="org.jboss.system.microcontainer.jmx.ServiceControllerCreateDestroyLifecycleCallback"
+               classes="@org.jboss.aop.microcontainer.aspects.jmx.JMX"
+               manager-bean="AspectManager"
+               manager-property="aspectManager">
+      <property name="serviceController"><inject bean="JMXKernel" property="serviceController"/></property>
+   </lifecycle-create>
+   <lifecycle-install xmlns="urn:jboss:aop-beans:1.0"
+               name="JMXStartStopAdvice"
+               class="org.jboss.system.microcontainer.jmx.ServiceControllerStartStopLifecycleCallback"
+               classes="@org.jboss.aop.microcontainer.aspects.jmx.JMX"
+               manager-bean="AspectManager"
+               manager-property="aspectManager">
+      <property name="serviceController"><inject bean="JMXKernel" property="serviceController"/></property>
+   </lifecycle-install>
+
+	<!-- MBean for making sure that the underlying AspectManagerService gets registered in JMX -->
+	<bean name="AspectManagerJMXRegistrar" class="org.jboss.aop.deployers.AspectManagerJMXRegistrar">
+	   <property name="mbeanServer"><inject bean="JMXKernel" property="mbeanServer"/></property>
+	   <property name="aspectManager"><inject bean="AspectManager"/></property>
+	</bean>
+
+</deployment>

Added: projects/demos/trunk/jmx/src/resources/system-jmx-beans.xml
===================================================================
--- projects/demos/trunk/jmx/src/resources/system-jmx-beans.xml	                        (rev 0)
+++ projects/demos/trunk/jmx/src/resources/system-jmx-beans.xml	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,20 @@
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+  <!-- JMX Deployment -->
+
+  <bean name="JMXKernel" class="org.jboss.demos.system.jmx.JMXKernel"/>
+
+  <bean name="ServiceMetaDataICF" class="org.jboss.system.deployers.managed.ServiceMetaDataICF">
+     <property name="mbeanServer"><inject bean="JMXKernel" property="mbeanServer"/></property>
+  </bean>
+  <bean name="SARDeployer" class="org.jboss.system.deployers.SARDeployer">
+     <property name="icf"><inject bean="ServiceMetaDataICF"/></property>
+  </bean>
+  <bean name="ServiceDeploymentDeployer" class="org.jboss.system.deployers.ServiceDeploymentDeployer">
+  </bean>
+  <bean name="ServiceDeployer" class="org.jboss.system.deployers.ServiceDeployer">
+      <constructor><parameter><inject bean="JMXKernel" property="serviceController"/></parameter></constructor>
+  </bean>
+  <bean name="HackClassLoaderMetaDataDeployer" class="org.jboss.system.deployers.HackClassloaderMetaDataDeployer"/>  
+
+</deployment>

Added: projects/demos/trunk/jmx/src/resources/varia-deployers-beans.xml
===================================================================
--- projects/demos/trunk/jmx/src/resources/varia-deployers-beans.xml	                        (rev 0)
+++ projects/demos/trunk/jmx/src/resources/varia-deployers-beans.xml	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,21 @@
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+  <bean name="AnnScanDeployer" class="org.jboss.deployers.plugins.annotations.GenericAnnotationDeployer"/>
+
+  <bean name="BeanScanDeployer" class="org.jboss.deployers.vfs.deployer.kernel.BeanScanningDeployer"/>
+
+  <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>
+
+  <!-- Adding @Spring annotation handler -->
+  <bean name="SpringAnnotationPlugin" class="org.jboss.spring.annotations.SpringBeanAnnotationPlugin" />
+
+</deployment>

Added: projects/demos/trunk/models/pom.xml
===================================================================
--- projects/demos/trunk/models/pom.xml	                        (rev 0)
+++ projects/demos/trunk/models/pom.xml	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,49 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <parent>
+    <groupId>org.jboss.demos</groupId>
+    <artifactId>jboss-demos</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.jboss.demos</groupId>
+  <artifactId>jboss-demos-models</artifactId>
+  <packaging>jar</packaging>
+  <name>JBoss MC Demos Models</name>
+  <url>http://www.jboss.org/jbossmc</url>
+  <description>JBoss MC Demos</description>
+  <build>
+    <sourceDirectory>src/main</sourceDirectory>
+  </build>
+  <dependencies>
+    <dependency>
+      <groupId>org.jboss.demos</groupId>
+      <artifactId>jboss-demos-jmx</artifactId>
+    </dependency>
+    <!-- Compile (global dependencies) -->
+    <dependency>
+      <groupId>org.jboss.microcontainer</groupId>
+      <artifactId>jboss-kernel</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.microcontainer</groupId>
+      <artifactId>jboss-aop-mc-int</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.microcontainer</groupId>
+      <artifactId>jboss-spring-int</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.microcontainer</groupId>
+      <artifactId>jboss-guice-int</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-beans</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>aopalliance</groupId>
+      <artifactId>aopalliance</artifactId>
+    </dependency>      
+  </dependencies>
+  
+</project>
\ No newline at end of file

Added: projects/demos/trunk/models/src/main/org/jboss/demos/models/AbstractPojo.java
===================================================================
--- projects/demos/trunk/models/src/main/org/jboss/demos/models/AbstractPojo.java	                        (rev 0)
+++ projects/demos/trunk/models/src/main/org/jboss/demos/models/AbstractPojo.java	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,42 @@
+/*
+* 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.demos.models;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public abstract class AbstractPojo implements IPojo
+{
+   private String name;
+
+   public String getName()
+   {
+      if (name == null)
+      {
+         Package pckg = getClass().getPackage();
+         String pckgName = pckg.getName();
+         int p = pckgName.lastIndexOf('.');
+         name = pckgName.substring(p + 1);
+      }
+      return name;
+   }
+}

Added: projects/demos/trunk/models/src/main/org/jboss/demos/models/IPojo.java
===================================================================
--- projects/demos/trunk/models/src/main/org/jboss/demos/models/IPojo.java	                        (rev 0)
+++ projects/demos/trunk/models/src/main/org/jboss/demos/models/IPojo.java	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,30 @@
+/*
+* 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.demos.models;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public interface IPojo
+{
+   String getName();
+}

Added: projects/demos/trunk/models/src/main/org/jboss/demos/models/annotated/Pojo.java
===================================================================
--- projects/demos/trunk/models/src/main/org/jboss/demos/models/annotated/Pojo.java	                        (rev 0)
+++ projects/demos/trunk/models/src/main/org/jboss/demos/models/annotated/Pojo.java	2008-07-14 16:55:32 UTC (rev 75793)
@@ -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.demos.models.annotated;
+
+import org.jboss.beans.info.spi.BeanAccessMode;
+import org.jboss.beans.metadata.api.annotations.Bean;
+import org.jboss.beans.metadata.api.annotations.Inject;
+import org.jboss.demos.models.AbstractPojo;
+import org.jboss.demos.models.IPojo;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+ at Bean(name = "annotated-pojo", accessMode = BeanAccessMode.ALL)
+public class Pojo extends AbstractPojo
+{
+   @Inject(bean = "SpringPojo")
+   protected IPojo pojo;
+
+   public IPojo getPojo()
+   {
+      return pojo;
+   }
+}

Added: projects/demos/trunk/models/src/main/org/jboss/demos/models/annotated/PojoRegistry.java
===================================================================
--- projects/demos/trunk/models/src/main/org/jboss/demos/models/annotated/PojoRegistry.java	                        (rev 0)
+++ projects/demos/trunk/models/src/main/org/jboss/demos/models/annotated/PojoRegistry.java	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,56 @@
+/*
+* 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.demos.models.annotated;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.jboss.beans.metadata.api.annotations.Bean;
+import org.jboss.beans.metadata.api.annotations.Install;
+import org.jboss.beans.metadata.api.annotations.Uninstall;
+import org.jboss.demos.models.IPojo;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+ at Bean(name = "pojoRegistry")
+public class PojoRegistry
+{
+   private Set<IPojo> pojos = new HashSet<IPojo>();
+
+   @Install
+   public void addPojo(IPojo pojo)
+   {
+      pojos.add(pojo);
+   }
+
+   @Uninstall
+   public void removePojo(IPojo pojo)
+   {
+      pojos.remove(pojo);
+   }
+
+   public Set<IPojo> getPojos()
+   {
+      return pojos;
+   }
+}

Added: projects/demos/trunk/models/src/main/org/jboss/demos/models/guice/FromMC.java
===================================================================
--- projects/demos/trunk/models/src/main/org/jboss/demos/models/guice/FromMC.java	                        (rev 0)
+++ projects/demos/trunk/models/src/main/org/jboss/demos/models/guice/FromMC.java	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,39 @@
+/*
+* 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.demos.models.guice;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import com.google.inject.BindingAnnotation;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+ at Target(ElementType.PARAMETER)
+ at Retention(RetentionPolicy.RUNTIME)
+ at BindingAnnotation
+public @interface FromMC
+{
+}
\ No newline at end of file

Added: projects/demos/trunk/models/src/main/org/jboss/demos/models/guice/Pojo.java
===================================================================
--- projects/demos/trunk/models/src/main/org/jboss/demos/models/guice/Pojo.java	                        (rev 0)
+++ projects/demos/trunk/models/src/main/org/jboss/demos/models/guice/Pojo.java	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,45 @@
+/*
+* 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.demos.models.guice;
+
+import com.google.inject.Inject;
+import org.jboss.demos.models.AbstractPojo;
+import org.jboss.demos.models.IPojo;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class Pojo extends AbstractPojo
+{
+   private IPojo mcPojo;
+
+   public IPojo getMcPojo()
+   {
+      return mcPojo;
+   }
+
+   @Inject
+   public void setMcPojo(@FromMC IPojo mcPojo)
+   {
+      this.mcPojo = mcPojo;
+   }
+}
\ No newline at end of file

Added: projects/demos/trunk/models/src/main/org/jboss/demos/models/guice/PojoModule.java
===================================================================
--- projects/demos/trunk/models/src/main/org/jboss/demos/models/guice/PojoModule.java	                        (rev 0)
+++ projects/demos/trunk/models/src/main/org/jboss/demos/models/guice/PojoModule.java	2008-07-14 16:55:32 UTC (rev 75793)
@@ -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.demos.models.guice;
+
+import com.google.inject.AbstractModule;
+import com.google.inject.Key;
+import com.google.inject.Scopes;
+import org.jboss.beans.metadata.api.annotations.Constructor;
+import org.jboss.beans.metadata.api.annotations.Inject;
+import org.jboss.demos.models.IPojo;
+import org.jboss.dependency.spi.Controller;
+import org.jboss.guice.spi.GuiceIntegration;
+import org.jboss.kernel.plugins.bootstrap.basic.KernelConstants;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class PojoModule extends AbstractModule
+{
+   private Controller controller;
+
+   @Constructor
+   public PojoModule(@Inject(bean = KernelConstants.KERNEL_CONTROLLER_NAME) Controller controller)
+   {
+      this.controller = controller;
+   }
+
+   protected void configure()
+   {
+      bind(Controller.class).toInstance(controller);
+      bind(IPojo.class).to(Pojo.class).in(Scopes.SINGLETON);
+      bind(IPojo.class).annotatedWith(FromMC.class).toProvider(GuiceIntegration.fromMicrocontainer(IPojo.class, "PlainPojo"));
+   }
+}

Added: projects/demos/trunk/models/src/main/org/jboss/demos/models/jmx/ExposePojo.java
===================================================================
--- projects/demos/trunk/models/src/main/org/jboss/demos/models/jmx/ExposePojo.java	                        (rev 0)
+++ projects/demos/trunk/models/src/main/org/jboss/demos/models/jmx/ExposePojo.java	2008-07-14 16:55:32 UTC (rev 75793)
@@ -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.demos.models.jmx;
+
+import org.jboss.aop.microcontainer.aspects.jmx.JMX;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class ExposePojo
+{
+   private PojoMBean pojo;
+
+   public ExposePojo(PojoMBean pojo)
+   {
+      this.pojo = pojo;
+   }
+
+   @JMX(exposedInterface = void.class, registerDirectly = true)
+   public PojoMBean getExposedPojo()
+   {
+      return pojo;
+   }
+}

Added: projects/demos/trunk/models/src/main/org/jboss/demos/models/jmx/Pojo.java
===================================================================
--- projects/demos/trunk/models/src/main/org/jboss/demos/models/jmx/Pojo.java	                        (rev 0)
+++ projects/demos/trunk/models/src/main/org/jboss/demos/models/jmx/Pojo.java	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,45 @@
+/*
+* 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.demos.models.jmx;
+
+import org.jboss.aop.microcontainer.aspects.jmx.JMX;
+import org.jboss.demos.models.AbstractPojo;
+import org.jboss.demos.models.IPojo;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+ at JMX(exposedInterface = PojoMBean.class, registerDirectly = true)
+public class Pojo extends AbstractPojo implements PojoMBean
+{
+   private IPojo otherPojo;
+
+   public IPojo getOtherPojo()
+   {
+      return otherPojo;
+   }
+
+   public void setOtherPojo(IPojo otherPojo)
+   {
+      this.otherPojo = otherPojo;
+   }
+}
\ No newline at end of file

Added: projects/demos/trunk/models/src/main/org/jboss/demos/models/jmx/PojoMBean.java
===================================================================
--- projects/demos/trunk/models/src/main/org/jboss/demos/models/jmx/PojoMBean.java	                        (rev 0)
+++ projects/demos/trunk/models/src/main/org/jboss/demos/models/jmx/PojoMBean.java	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,34 @@
+/*
+* 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.demos.models.jmx;
+
+import org.jboss.demos.models.IPojo;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public interface PojoMBean
+{
+   IPojo getOtherPojo();
+
+   void setOtherPojo(IPojo other);
+}
\ No newline at end of file

Added: projects/demos/trunk/models/src/main/org/jboss/demos/models/mbeans/Pojo.java
===================================================================
--- projects/demos/trunk/models/src/main/org/jboss/demos/models/mbeans/Pojo.java	                        (rev 0)
+++ projects/demos/trunk/models/src/main/org/jboss/demos/models/mbeans/Pojo.java	2008-07-14 16:55:32 UTC (rev 75793)
@@ -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.demos.models.mbeans;
+
+import org.jboss.demos.models.AbstractPojo;
+import org.jboss.demos.models.IPojo;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class Pojo extends AbstractPojo implements PojoMBean
+{
+   private IPojo otherPojo;
+
+   public IPojo getOtherPojo()
+   {
+      return otherPojo;
+   }
+
+   public void setOtherPojo(IPojo otherPojo)
+   {
+      this.otherPojo = otherPojo;
+   }
+}
\ No newline at end of file

Added: projects/demos/trunk/models/src/main/org/jboss/demos/models/mbeans/PojoMBean.java
===================================================================
--- projects/demos/trunk/models/src/main/org/jboss/demos/models/mbeans/PojoMBean.java	                        (rev 0)
+++ projects/demos/trunk/models/src/main/org/jboss/demos/models/mbeans/PojoMBean.java	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,34 @@
+/*
+* 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.demos.models.mbeans;
+
+import org.jboss.demos.models.IPojo;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public interface PojoMBean
+{
+   IPojo getOtherPojo();
+
+   void setOtherPojo(IPojo other);
+}

Added: projects/demos/trunk/models/src/main/org/jboss/demos/models/plain/FromGuice.java
===================================================================
--- projects/demos/trunk/models/src/main/org/jboss/demos/models/plain/FromGuice.java	                        (rev 0)
+++ projects/demos/trunk/models/src/main/org/jboss/demos/models/plain/FromGuice.java	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,51 @@
+/*
+* 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.demos.models.plain;
+
+import org.jboss.beans.metadata.api.annotations.Inject;
+import org.jboss.demos.models.IPojo;
+import org.jboss.demos.models.guice.Pojo;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class FromGuice
+{
+   private IPojo plainPojo;
+   private org.jboss.demos.models.guice.Pojo guicePojo;
+
+   public FromGuice(IPojo plainPojo)
+   {
+      this.plainPojo = plainPojo;
+   }
+
+   public void setGuicePojo(org.jboss.demos.models.guice.Pojo guicePojo)
+   {
+      this.guicePojo = guicePojo;
+   }
+
+   public void start()
+   {
+      if (plainPojo != guicePojo.getMcPojo())
+         throw new IllegalArgumentException("Pojos are not the same: " + plainPojo + "!=" + guicePojo.getMcPojo());
+   }
+}

Added: projects/demos/trunk/models/src/main/org/jboss/demos/models/plain/Pojo.java
===================================================================
--- projects/demos/trunk/models/src/main/org/jboss/demos/models/plain/Pojo.java	                        (rev 0)
+++ projects/demos/trunk/models/src/main/org/jboss/demos/models/plain/Pojo.java	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,31 @@
+/*
+* 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.demos.models.plain;
+
+import org.jboss.demos.models.AbstractPojo;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class Pojo extends AbstractPojo
+{
+}

Added: projects/demos/trunk/models/src/main/org/jboss/demos/models/plain/PojoFactory.java
===================================================================
--- projects/demos/trunk/models/src/main/org/jboss/demos/models/plain/PojoFactory.java	                        (rev 0)
+++ projects/demos/trunk/models/src/main/org/jboss/demos/models/plain/PojoFactory.java	2008-07-14 16:55:32 UTC (rev 75793)
@@ -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.demos.models.plain;
+
+import org.jboss.beans.metadata.spi.factory.AbstractBeanFactory;
+import org.jboss.kernel.spi.config.KernelConfigurator;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class PojoFactory extends AbstractBeanFactory
+{
+   public PojoFactory(KernelConfigurator configurator)
+   {
+      super(configurator);
+   }
+
+   public Object createBean() throws Throwable
+   {
+      return new Pojo();
+   }
+}

Added: projects/demos/trunk/models/src/main/org/jboss/demos/models/spring/Pojo.java
===================================================================
--- projects/demos/trunk/models/src/main/org/jboss/demos/models/spring/Pojo.java	                        (rev 0)
+++ projects/demos/trunk/models/src/main/org/jboss/demos/models/spring/Pojo.java	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,49 @@
+/*
+* 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.demos.models.spring;
+
+import org.jboss.demos.models.AbstractPojo;
+import org.springframework.beans.factory.BeanNameAware;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class Pojo extends AbstractPojo implements BeanNameAware
+{
+   private String beanName;
+
+   public void setBeanName(String name)
+   {
+      beanName = name;
+   }
+
+   public String getBeanName()
+   {
+      return beanName;
+   }
+
+   public void start()
+   {
+      if ("SpringPojo".equals(getBeanName()) == false)
+         throw new IllegalArgumentException("Name doesn't match: " + getBeanName());
+   }
+}

Added: projects/demos/trunk/models/src/resources/META-INF/guice-beans.xml
===================================================================
--- projects/demos/trunk/models/src/resources/META-INF/guice-beans.xml	                        (rev 0)
+++ projects/demos/trunk/models/src/resources/META-INF/guice-beans.xml	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,13 @@
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+  <bean name="GuicePlugin" class="org.jboss.guice.spi.GuiceKernelRegistryEntryPlugin">
+    <constructor>
+      <parameter>
+        <array elementClass="com.google.inject.Module">
+          <bean class="org.jboss.demos.models.guice.PojoModule"/>
+        </array>
+      </parameter>
+    </constructor>
+  </bean>
+
+</deployment>

Added: projects/demos/trunk/models/src/resources/META-INF/jmx-beans.xml
===================================================================
--- projects/demos/trunk/models/src/resources/META-INF/jmx-beans.xml	                        (rev 0)
+++ projects/demos/trunk/models/src/resources/META-INF/jmx-beans.xml	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,19 @@
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+<!--
+  <bean name="AnnotatedJMXPojo" class="org.jboss.demos.models.jmx.Pojo"/>
+
+  <bean name="XmlJMXPojo" class="org.jboss.demos.models.mbeans.Pojo">
+    <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(exposedInterface=org.jboss.demos.models.mbeans.PojoMBean.class, registerDirectly=true)</annotation>
+  </bean>
+
+  <bean name="ExposedPojo" class="org.jboss.demos.models.jmx.Pojo"/>
+
+  <bean name="AnnotatedExposePojo" class="org.jboss.demos.models.jmx.ExposePojo">
+    <constructor>
+      <parameter><inject bean="ExposedPojo"/></parameter>
+    </constructor>
+  </bean>
+-->
+
+</deployment>

Added: projects/demos/trunk/models/src/resources/META-INF/mbeans-service.xml
===================================================================
--- projects/demos/trunk/models/src/resources/META-INF/mbeans-service.xml	                        (rev 0)
+++ projects/demos/trunk/models/src/resources/META-INF/mbeans-service.xml	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<server>
+
+   <!--<mbean code="org.jboss.demos.models.mbeans.Pojo" name="jboss.demos:service=pojo"/>-->
+
+</server>

Added: projects/demos/trunk/models/src/resources/META-INF/plain-beans.xml
===================================================================
--- projects/demos/trunk/models/src/resources/META-INF/plain-beans.xml	                        (rev 0)
+++ projects/demos/trunk/models/src/resources/META-INF/plain-beans.xml	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,14 @@
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+  <bean name="PlainPojo" class="org.jboss.demos.models.plain.Pojo"/>
+
+  <beanfactory name="PojoFactory" class="org.jboss.demos.models.plain.Pojo">
+    <property name="factoryClass">org.jboss.demos.models.plain.PojoFactory</property>
+  </beanfactory>
+
+  <bean name="FromGuice" class="org.jboss.demos.models.plain.FromGuice">
+    <constructor><parameter><inject bean="PlainPojo"/></parameter></constructor>
+    <property name="guicePojo"><inject/></property>
+  </bean>
+
+</deployment>

Added: projects/demos/trunk/models/src/resources/META-INF/spring-beans.xml
===================================================================
--- projects/demos/trunk/models/src/resources/META-INF/spring-beans.xml	                        (rev 0)
+++ projects/demos/trunk/models/src/resources/META-INF/spring-beans.xml	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,5 @@
+<beans xmlns="urn:jboss:spring-beans:2.0">
+
+   <bean id="SpringPojo" class="org.jboss.demos.models.spring.Pojo"/>
+
+</beans>
\ No newline at end of file

Added: projects/demos/trunk/osgi/acme1/src/META-INF/MANIFEST.MF
===================================================================
--- projects/demos/trunk/osgi/acme1/src/META-INF/MANIFEST.MF	                        (rev 0)
+++ projects/demos/trunk/osgi/acme1/src/META-INF/MANIFEST.MF	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,7 @@
+Manifest-Version: 1.0
+Created-By: Ales Justin
+Implementation-Title: JBoss OSGi tests
+Implementation-Vendor: jboss.org
+Domain-Name: FooBarDomain
+Export-Package: org.jboss.acme.ales;org.jboss.acme.ales.impl;org.jboss.acme.scott;org.jboss.acme.scott.impl;org.jboss.acme.print;org.jboss.acme;version=1
+

Added: projects/demos/trunk/osgi/acme1/src/META-INF/acme-beans.xml
===================================================================
--- projects/demos/trunk/osgi/acme1/src/META-INF/acme-beans.xml	                        (rev 0)
+++ projects/demos/trunk/osgi/acme1/src/META-INF/acme-beans.xml	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+   <bean name="AlesService1" class="org.jboss.acme.ales.impl.AlesServiceImpl"/>
+   <bean name="ScottService1" class="org.jboss.acme.scott.impl.ScottServiceImpl"/>
+
+</deployment>

Added: projects/demos/trunk/osgi/acme1/src/META-INF/acme-clmd.properties
===================================================================
--- projects/demos/trunk/osgi/acme1/src/META-INF/acme-clmd.properties	                        (rev 0)
+++ projects/demos/trunk/osgi/acme1/src/META-INF/acme-clmd.properties	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,3 @@
+domain=FooBarDomain
+capabilities=org.jboss.acme.ales:1|org.jboss.acme.ales.impl:1|org.jboss.acme.scott:1|org.jboss.acme.scott.impl:1|org.jboss.acme.print:1|org.jboss.acme:1
+

Added: projects/demos/trunk/osgi/acme1/src/META-INF/jboss-classloading.xml
===================================================================
--- projects/demos/trunk/osgi/acme1/src/META-INF/jboss-classloading.xml	                        (rev 0)
+++ projects/demos/trunk/osgi/acme1/src/META-INF/jboss-classloading.xml	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,10 @@
+<classloading xmlns="urn:jboss:classloading:1.0" export-all="NON_EMPTY">
+  <capabilities>
+    <package name="org.jboss.acme.ales" version="1"/>
+    <package name="org.jboss.acme.ales.impl" version="1"/>
+    <package name="org.jboss.acme.scott" version="1"/>
+    <package name="org.jboss.acme.scott.impl" version="1"/>
+    <package name="org.jboss.acme.print" version="1"/>
+    <package name="org.jboss.acme" version="1"/>
+  </capabilities>
+</classloading>

Added: projects/demos/trunk/osgi/acme1/src/org/jboss/acme/CommonService.java
===================================================================
--- projects/demos/trunk/osgi/acme1/src/org/jboss/acme/CommonService.java	                        (rev 0)
+++ projects/demos/trunk/osgi/acme1/src/org/jboss/acme/CommonService.java	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,42 @@
+/*
+* 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.acme;
+
+import org.jboss.logging.Logger;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class CommonService
+{
+   private Logger log = Logger.getLogger(getClass());
+
+   public CommonService()
+   {
+      log.debug(getClass() + " -> " + getClass().getClassLoader());
+   }
+
+   public void start()
+   {
+      log.info("From Acme#1");
+   }
+}

Added: projects/demos/trunk/osgi/acme1/src/org/jboss/acme/ales/AlesService.java
===================================================================
--- projects/demos/trunk/osgi/acme1/src/org/jboss/acme/ales/AlesService.java	                        (rev 0)
+++ projects/demos/trunk/osgi/acme1/src/org/jboss/acme/ales/AlesService.java	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,30 @@
+/*
+* 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.acme.ales;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public interface AlesService
+{
+   void useFreeTime();
+}

Added: projects/demos/trunk/osgi/acme1/src/org/jboss/acme/ales/impl/AlesServiceImpl.java
===================================================================
--- projects/demos/trunk/osgi/acme1/src/org/jboss/acme/ales/impl/AlesServiceImpl.java	                        (rev 0)
+++ projects/demos/trunk/osgi/acme1/src/org/jboss/acme/ales/impl/AlesServiceImpl.java	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,37 @@
+/*
+* 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.acme.ales.impl;
+
+import org.jboss.acme.ales.AlesService;
+import org.jboss.acme.print.PrettyPrint;
+import org.jboss.acme.CommonService;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class AlesServiceImpl extends CommonService implements AlesService
+{
+   public void useFreeTime()
+   {
+      PrettyPrint.prettyPrint("Play basketball and have a beer.");
+   }
+}

Added: projects/demos/trunk/osgi/acme1/src/org/jboss/acme/print/PrettyPrint.java
===================================================================
--- projects/demos/trunk/osgi/acme1/src/org/jboss/acme/print/PrettyPrint.java	                        (rev 0)
+++ projects/demos/trunk/osgi/acme1/src/org/jboss/acme/print/PrettyPrint.java	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,33 @@
+/*
+* 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.acme.print;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class PrettyPrint
+{
+   public static void prettyPrint(String string)
+   {
+      System.out.println("PretyPrint: " + string);
+   }
+}

Added: projects/demos/trunk/osgi/acme1/src/org/jboss/acme/scott/ScottService.java
===================================================================
--- projects/demos/trunk/osgi/acme1/src/org/jboss/acme/scott/ScottService.java	                        (rev 0)
+++ projects/demos/trunk/osgi/acme1/src/org/jboss/acme/scott/ScottService.java	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,30 @@
+/*
+* 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.acme.scott;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public interface ScottService
+{
+   void snowTime();
+}

Added: projects/demos/trunk/osgi/acme1/src/org/jboss/acme/scott/impl/ScottServiceImpl.java
===================================================================
--- projects/demos/trunk/osgi/acme1/src/org/jboss/acme/scott/impl/ScottServiceImpl.java	                        (rev 0)
+++ projects/demos/trunk/osgi/acme1/src/org/jboss/acme/scott/impl/ScottServiceImpl.java	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,37 @@
+/*
+* 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.acme.scott.impl;
+
+import org.jboss.acme.scott.ScottService;
+import org.jboss.acme.print.PrettyPrint;
+import org.jboss.acme.CommonService;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class ScottServiceImpl extends CommonService implements ScottService
+{
+   public void snowTime()
+   {
+      PrettyPrint.prettyPrint("Ski, ski, ski ... :-)");
+   }
+}

Added: projects/demos/trunk/osgi/acme2/src/META-INF/MANIFEST.MF
===================================================================
--- projects/demos/trunk/osgi/acme2/src/META-INF/MANIFEST.MF	                        (rev 0)
+++ projects/demos/trunk/osgi/acme2/src/META-INF/MANIFEST.MF	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,6 @@
+Manifest-Version: 1.0
+Created-By: Ales Justin
+Implementation-Title: JBoss OSGi tests
+Implementation-Vendor: jboss.org
+Domain-Name: FooBarDomain
+Export-Package: org.jboss.acme.ales;org.jboss.acme.ales.impl;org.jboss.acme.print;org.jboss.acme;version=2,org.jboss.acme.scott;org.jboss.acme.scott.impl;version=3

Added: projects/demos/trunk/osgi/acme2/src/META-INF/acme-beans.xml
===================================================================
--- projects/demos/trunk/osgi/acme2/src/META-INF/acme-beans.xml	                        (rev 0)
+++ projects/demos/trunk/osgi/acme2/src/META-INF/acme-beans.xml	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+   <bean name="AlesService2" class="org.jboss.acme.ales.impl.AlesServiceImpl"/>
+   <bean name="ScottService2" class="org.jboss.acme.scott.impl.ScottServiceImpl"/>
+
+</deployment>

Added: projects/demos/trunk/osgi/acme2/src/META-INF/acme-clmd.properties
===================================================================
--- projects/demos/trunk/osgi/acme2/src/META-INF/acme-clmd.properties	                        (rev 0)
+++ projects/demos/trunk/osgi/acme2/src/META-INF/acme-clmd.properties	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,2 @@
+domain=FooBarDomain
+capabilities=org.jboss.acme.ales:2|org.jboss.acme.ales.impl:2|org.jboss.acme.scott:3|org.jboss.acme.scott.impl:3|org.jboss.acme.print:2|org.jboss.acme:2
\ No newline at end of file

Added: projects/demos/trunk/osgi/acme2/src/META-INF/jboss-classloading.xml
===================================================================
--- projects/demos/trunk/osgi/acme2/src/META-INF/jboss-classloading.xml	                        (rev 0)
+++ projects/demos/trunk/osgi/acme2/src/META-INF/jboss-classloading.xml	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,10 @@
+<classloading xmlns="urn:jboss:classloading:1.0" export-all="NON_EMPTY">
+  <capabilities>
+    <package name="org.jboss.acme.ales" version="2"/>
+    <package name="org.jboss.acme.ales.impl" version="2"/>
+    <package name="org.jboss.acme.scott" version="3"/>
+    <package name="org.jboss.acme.scott.impl" version="3"/>
+    <package name="org.jboss.acme.print" version="2"/>
+    <package name="org.jboss.acme" version="2"/>
+  </capabilities>
+</classloading>

Added: projects/demos/trunk/osgi/acme2/src/org/jboss/acme/CommonService.java
===================================================================
--- projects/demos/trunk/osgi/acme2/src/org/jboss/acme/CommonService.java	                        (rev 0)
+++ projects/demos/trunk/osgi/acme2/src/org/jboss/acme/CommonService.java	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,42 @@
+/*
+* 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.acme;
+
+import org.jboss.logging.Logger;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class CommonService
+{
+   private Logger log = Logger.getLogger(getClass());
+
+   public CommonService()
+   {
+      log.debug(getClass() + " -> " + getClass().getClassLoader());
+   }
+
+   public void start()
+   {
+      log.info("From Acme#2");
+   }
+}

Added: projects/demos/trunk/osgi/acme2/src/org/jboss/acme/ales/AlesService.java
===================================================================
--- projects/demos/trunk/osgi/acme2/src/org/jboss/acme/ales/AlesService.java	                        (rev 0)
+++ projects/demos/trunk/osgi/acme2/src/org/jboss/acme/ales/AlesService.java	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,30 @@
+/*
+* 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.acme.ales;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public interface AlesService
+{
+   void useFreeTime();
+}

Added: projects/demos/trunk/osgi/acme2/src/org/jboss/acme/ales/impl/AlesServiceImpl.java
===================================================================
--- projects/demos/trunk/osgi/acme2/src/org/jboss/acme/ales/impl/AlesServiceImpl.java	                        (rev 0)
+++ projects/demos/trunk/osgi/acme2/src/org/jboss/acme/ales/impl/AlesServiceImpl.java	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,37 @@
+/*
+* 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.acme.ales.impl;
+
+import org.jboss.acme.ales.AlesService;
+import org.jboss.acme.print.PrettyPrint;
+import org.jboss.acme.CommonService;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class AlesServiceImpl extends CommonService implements AlesService
+{
+   public void useFreeTime()
+   {
+      PrettyPrint.prettyPrint("No free time, CommunityOne demo to finish.");
+   }
+}

Added: projects/demos/trunk/osgi/acme2/src/org/jboss/acme/print/PrettyPrint.java
===================================================================
--- projects/demos/trunk/osgi/acme2/src/org/jboss/acme/print/PrettyPrint.java	                        (rev 0)
+++ projects/demos/trunk/osgi/acme2/src/org/jboss/acme/print/PrettyPrint.java	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,36 @@
+/*
+* 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.acme.print;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class PrettyPrint
+{
+   public static void prettyPrint(String string)
+   {
+      System.out.println("ImprovedPrettyPrint");
+      System.out.println("*******************");
+      System.out.println("*** " + string);
+      System.out.println("*******************");
+   }
+}

Added: projects/demos/trunk/osgi/acme2/src/org/jboss/acme/scott/ScottService.java
===================================================================
--- projects/demos/trunk/osgi/acme2/src/org/jboss/acme/scott/ScottService.java	                        (rev 0)
+++ projects/demos/trunk/osgi/acme2/src/org/jboss/acme/scott/ScottService.java	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,30 @@
+/*
+* 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.acme.scott;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public interface ScottService
+{
+   void snowTime();
+}

Added: projects/demos/trunk/osgi/acme2/src/org/jboss/acme/scott/impl/ScottServiceImpl.java
===================================================================
--- projects/demos/trunk/osgi/acme2/src/org/jboss/acme/scott/impl/ScottServiceImpl.java	                        (rev 0)
+++ projects/demos/trunk/osgi/acme2/src/org/jboss/acme/scott/impl/ScottServiceImpl.java	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,37 @@
+/*
+* 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.acme.scott.impl;
+
+import org.jboss.acme.scott.ScottService;
+import org.jboss.acme.print.PrettyPrint;
+import org.jboss.acme.CommonService;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class ScottServiceImpl extends CommonService implements ScottService
+{
+   public void snowTime()
+   {
+      PrettyPrint.prettyPrint("Showel snow. :-(");
+   }
+}

Added: projects/demos/trunk/osgi/boot/acme2.jar
===================================================================
(Binary files differ)


Property changes on: projects/demos/trunk/osgi/boot/acme2.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: projects/demos/trunk/osgi/boot/backup/foo.jar
===================================================================
(Binary files differ)


Property changes on: projects/demos/trunk/osgi/boot/backup/foo.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: projects/demos/trunk/osgi/boot/backup/foo_11.jar
===================================================================
(Binary files differ)


Property changes on: projects/demos/trunk/osgi/boot/backup/foo_11.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: projects/demos/trunk/osgi/boot/backup/foo_13.jar
===================================================================
(Binary files differ)


Property changes on: projects/demos/trunk/osgi/boot/backup/foo_13.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: projects/demos/trunk/osgi/boot/backup/foo_23.jar
===================================================================
(Binary files differ)


Property changes on: projects/demos/trunk/osgi/boot/backup/foo_23.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: projects/demos/trunk/osgi/boot/bootstrap-beans.xml
===================================================================
--- projects/demos/trunk/osgi/boot/bootstrap-beans.xml	                        (rev 0)
+++ projects/demos/trunk/osgi/boot/bootstrap-beans.xml	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,193 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+   The bootstrap of the server. This should only have the minimum
+   needed to bootstrap the mc kernel and profile service.
+   $Id:$
+-->
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+   <!-- All beans use the bootstrap classloader -->
+   <classloader><inject bean="BootstrapClassLoader"/></classloader>
+
+   <!-- TODO Should split this file up and use the new classloader -->
+   <bean name="BootstrapClassLoader" class="org.jboss.demos.system.classloader.NoAnnotationURLClassLoader">
+      <classloader><null/></classloader>
+      <constructor factoryClass="org.jboss.demos.system.classloader.NoAnnotationURLClassLoader" factoryMethod="createClassLoader">
+        <parameter>
+           <array elementClass="java.net.URL">
+             <!-- Deployers -->
+             <value>${jboss.lib.url}/jboss-deployers-core-spi.jar</value>
+             <value>${jboss.lib.url}/jboss-deployers-core.jar</value>
+             <value>${jboss.lib.url}/jboss-deployers-client-spi.jar</value>
+             <value>${jboss.lib.url}/jboss-deployers-client.jar</value>
+             <value>${jboss.lib.url}/jboss-deployers-structure-spi.jar</value>
+             <value>${jboss.lib.url}/jboss-deployers-spi.jar</value>
+             <value>${jboss.lib.url}/jboss-deployers-impl.jar</value>
+             <value>${jboss.lib.url}/jboss-deployers-vfs-spi.jar</value>
+             <value>${jboss.lib.url}/jboss-deployers-vfs.jar</value>
+             <!-- System -->
+             <value>${jboss.lib.url}/jboss-system.jar</value>
+             <!-- JMX -->
+             <value>${jboss.lib.url}/jboss-j2se.jar</value>
+             <value>${jboss.lib.url}/jboss-mbeans.jar</value>
+             <value>${jboss.lib.url}/jboss-jmx.jar</value>
+             <value>${jboss.lib.url}/jboss-system-jmx.jar</value>
+             <value>${jboss.lib.url}/dom4j.jar</value>
+             <!-- AOP -->
+             <value>${jboss.lib.url}/jboss-aop-deployer-jdk50.jar</value>
+             <value>${jboss.lib.url}/jboss-aop-jboss4-jdk50.jar</value>
+             <value>${jboss.lib.url}/jboss-aop-jboss5.jar</value>
+             <!-- JAXB - shouldn't this be in endorsed? -->
+             <value>${jboss.lib.url}/activation.jar</value>
+             <value>${jboss.lib.url}/jaxb-impl.jar</value>
+             <value>${jboss.lib.url}/stax-api.jar</value>
+             <value>${jboss.lib.url}/wstx.jar</value>
+           </array>
+        </parameter>
+      </constructor>
+   </bean>
+
+   <!-- The MainDeployer -->
+   <bean name="MainDeployer" class="org.jboss.deployers.plugins.main.MainDeployerImpl">
+      <property name="structuralDeployers"><inject bean="StructuralDeployers"/></property>
+      <property name="deployers"><inject bean="Deployers"/></property>
+      <property name="mgtDeploymentCreator"><inject bean="ManagedDeploymentCreator"/></property>
+   </bean>
+
+   <!-- The ManagedDeploymentCreator implementation -->
+   <bean name="ManagedDeploymentCreator" class="org.jboss.deployers.plugins.managed.DefaultManagedDeploymentCreator" />
+
+   <!-- The holder for deployers that determine structure -->
+   <bean name="StructuralDeployers" class="org.jboss.deployers.vfs.plugins.structure.VFSStructuralDeployersImpl">
+      <property name="structureBuilder">
+         <!-- The consolidator of the structure information -->
+         <bean name="StructureBuilder" class="org.jboss.deployers.vfs.plugins.structure.VFSStructureBuilder"/>
+      </property>
+      <!-- Accept any implementor of structure deployer -->
+      <incallback method="addDeployer"/>
+      <uncallback method="removeDeployer"/>
+   </bean>
+
+   <!-- The holder for deployers that do real deployment -->
+   <bean name="Deployers" class="org.jboss.deployers.plugins.deployers.DeployersImpl">
+      <constructor><parameter><inject bean="jboss.kernel:service=KernelController"/></parameter></constructor>
+      <!-- Accept any implementor of deployer -->
+      <incallback method="addDeployer"/>
+      <uncallback method="removeDeployer"/>
+   </bean>
+
+   <!-- A declared structure descriptor deployer -->
+   <bean name="DeclaredStructure" class="org.jboss.deployers.vfs.plugins.structure.explicit.DeclaredStructure"/>
+
+    <!-- JAR Structure -->
+    <bean name="JARStructure" class="org.jboss.deployers.vfs.plugins.structure.jar.JARStructure">
+       <!-- Unless specified the default list of suffixes is .zip, .ear, .jar, ,.rar, .war, .sar, .har, .aop -->
+       <constructor>
+          <parameter>
+             <set elementClass="java.lang.String">
+                <value>.zip</value>
+                <value>.ear</value>
+                <value>.jar</value>
+                <value>.rar</value>
+                <value>.war</value>
+                <value>.sar</value>
+                <value>.har</value>
+                <value>.aop</value>
+                <value>.deployer</value>
+                <value>.beans</value>
+             </set>
+          </parameter>
+       </constructor>
+       <property name="candidateStructureVisitorFactory">
+          <!-- Any file that is not an ordinary directory is a candidate -->
+          <bean name="JARStructureCandidates" class="org.jboss.deployers.vfs.spi.structure.helpers.DefaultCandidateStructureVisitorFactory">
+             <!-- A filter to exclude some obvious non-subdeployments -->
+             <property name="filter">
+                <bean name="JARFilter" class="org.jboss.virtual.plugins.vfs.helpers.SuffixesExcludeFilter">
+                   <constructor><parameter>
+                      <list elementClass="java.lang.String">
+                         <!-- Exclude class files as subdeployments -->
+                         <value>.class</value>
+                      </list>
+                   </parameter></constructor>
+                </bean>
+             </property>
+          </bean>
+       </property>
+    </bean>
+
+    <!-- File Structure -->
+    <bean name="FileStructure" class="org.jboss.deployers.vfs.plugins.structure.file.FileStructure">
+       <!-- Unless specified the default list of suffixes is -service.xml, -beans.xml, -ds.xml, -aop.xml -->
+       <constructor>
+          <parameter>
+             <set elementClass="java.lang.String">
+                <value>-service.xml</value>
+                <value>-beans.xml</value>
+                <value>-ds.xml</value>
+                <value>-aop.xml</value>
+             </set>
+          </parameter>
+       </constructor>
+    </bean>
+
+   <!-- POJO Deployment -->
+   <bean name="BeanDeployer" class="org.jboss.deployers.vfs.deployer.kernel.BeanDeployer">
+      <property name="type">beans</property>
+   </bean>
+   <bean name="KernelDeploymentDeployer" class="org.jboss.deployers.vfs.deployer.kernel.KernelDeploymentDeployer">
+      <property name="type">beans</property>
+   </bean>
+   <bean name="BeanMetaDataDeployer" class="org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer">
+      <constructor><parameter><inject bean="jboss.kernel:service=Kernel"/></parameter></constructor>
+      <property name="type">beans</property>
+   </bean>
+
+   <!-- VFS ClassLoader -->
+   <bean name="ClassLoaderSystem" class="org.jboss.classloader.spi.ClassLoaderSystem">
+      <constructor factoryClass="org.jboss.classloader.spi.ClassLoaderSystem" factoryMethod="getInstance"/>
+   </bean>
+   <bean name="ClassLoading" class="org.jboss.classloading.spi.dependency.ClassLoading">
+      <incallback method="addModule" state="Configured"/>
+      <uncallback method="removeModule" state="Configured"/>
+   </bean>
+
+   <!--<bean name="HackClassLoaderMetaDataDeployer" class="org.jboss.demos.system.deployers.PropertyClassloaderMetaDataDeployer"/>-->
+
+<!--
+   <bean name="ManifestDeployer" class="org.jboss.osgi.plugins.deployers.OSGiMetaDataDeployer"/>
+   <bean name="HackClassLoaderMetaDataDeployer" class="org.jboss.osgi.plugins.deployers.OSGiMetaData2ClassLoadingMetaDataDeployer"/>
+-->
+
+   <bean name="ClassLoadingMetaDataParser" class="org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer">
+      <constructor>
+         <parameter>org.jboss.classloading.spi.metadata.ClassLoadingMetaData</parameter>
+      </constructor>
+      <property name="name">jboss-classloading.xml</property>
+   </bean>
+
+   <bean name="ClassloadingDeployer" class="org.jboss.demos.system.deployers.ClassloadingDescribeDeployer">
+     <property name="classLoading"><inject bean="ClassLoading"/></property>
+   </bean>
+   <bean name="VFSClassLoaderDeployer" class="org.jboss.deployers.plugins.classloading.AbstractLevelClassLoaderSystemDeployer">
+      <property name="classLoading"><inject bean="ClassLoading"/></property>
+      <property name="system"><inject bean="ClassLoaderSystem"/></property>
+   </bean>
+
+   <!-- Hotdeployment of applications -->
+   <bean name="MainDeployerHelper" class="org.jboss.demos.boostrap.MainDeployerHelper">
+      <constructor>
+         <parameter><inject bean="MainDeployer"/></parameter>
+      </constructor>
+   </bean>
+
+   <bean name="HDScanner" class="org.jboss.demos.boostrap.HDScanner">
+      <constructor>
+         <parameter><inject bean="MainDeployerHelper"/></parameter>
+         <parameter>C:\\projects\\demos\\osgi\\boot\\work</parameter>
+      </constructor>
+      <property name="scanPeriod">10000</property>
+      <property name="scanThreadName">HDScanner</property>
+   </bean>
+</deployment>

Added: projects/demos/trunk/osgi/boot/work/acme1.jar
===================================================================
(Binary files differ)


Property changes on: projects/demos/trunk/osgi/boot/work/acme1.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: projects/demos/trunk/osgi/boot/work/acme2.jar
===================================================================
(Binary files differ)


Property changes on: projects/demos/trunk/osgi/boot/work/acme2.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: projects/demos/trunk/osgi/boot/work/foo.jar
===================================================================
(Binary files differ)


Property changes on: projects/demos/trunk/osgi/boot/work/foo.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: projects/demos/trunk/osgi/foo/src/META-INF/MANIFEST.MF
===================================================================
--- projects/demos/trunk/osgi/foo/src/META-INF/MANIFEST.MF	                        (rev 0)
+++ projects/demos/trunk/osgi/foo/src/META-INF/MANIFEST.MF	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,7 @@
+Manifest-Version: 1.0
+Created-By: Ales Justin
+Implementation-Title: JBoss OSGi tests
+Implementation-Vendor: jboss.org
+Domain-Name: FooBarDomain
+Export-Package: org.jboss.acme.foo;version="[1,2)"
+Import-Package: org.jboss.acme.ales;version="[1,2)",org.jboss.acme.scott;version="[3,4)"

Added: projects/demos/trunk/osgi/foo/src/META-INF/foo-beans.xml
===================================================================
--- projects/demos/trunk/osgi/foo/src/META-INF/foo-beans.xml	                        (rev 0)
+++ projects/demos/trunk/osgi/foo/src/META-INF/foo-beans.xml	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+   <bean name="FooBarService" class="org.jboss.foo.FooBarService">
+      <property name="alesService"><inject/></property>
+      <property name="scottService"><inject/></property>
+   </bean>
+
+</deployment>

Added: projects/demos/trunk/osgi/foo/src/META-INF/foo-clmd.properties
===================================================================
--- projects/demos/trunk/osgi/foo/src/META-INF/foo-clmd.properties	                        (rev 0)
+++ projects/demos/trunk/osgi/foo/src/META-INF/foo-clmd.properties	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,3 @@
+domain=FooBarDomain
+requirements=org.jboss.acme.ales:[1,2)|org.jboss.acme.scott:[3,4)
+capabilities=org.jboss.foo

Added: projects/demos/trunk/osgi/foo/src/META-INF/jboss-classloading.xml
===================================================================
--- projects/demos/trunk/osgi/foo/src/META-INF/jboss-classloading.xml	                        (rev 0)
+++ projects/demos/trunk/osgi/foo/src/META-INF/jboss-classloading.xml	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,9 @@
+<classloading xmlns="urn:jboss:classloading:1.0" export-all="NON_EMPTY">
+  <capabilities>
+    <package name="org.jboss.acme.foo" version="1"/>
+  </capabilities>
+  <requirements>
+    <package name="org.jboss.acme.ales" from="1" to="2" from-inclusive="true"/>
+    <package name="org.jboss.acme.scott" from="3" to="4"  from-inclusive="true"/>
+  </requirements>
+</classloading>

Added: projects/demos/trunk/osgi/foo/src/org/jboss/foo/FooBarService.java
===================================================================
--- projects/demos/trunk/osgi/foo/src/org/jboss/foo/FooBarService.java	                        (rev 0)
+++ projects/demos/trunk/osgi/foo/src/org/jboss/foo/FooBarService.java	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,61 @@
+/*
+* 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.foo;
+
+import org.jboss.acme.ales.AlesService;
+import org.jboss.acme.scott.ScottService;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class FooBarService
+{
+   private AlesService alesService;
+   private ScottService scottService;
+
+   public void setAlesService(AlesService alesService)
+   {
+      this.alesService = alesService;
+   }
+
+   public void setScottService(ScottService scottService)
+   {
+      this.scottService = scottService;
+   }
+
+   public void create()
+   {
+      if (alesService == null)
+         throw new IllegalArgumentException("Ales service is null.");
+      if (scottService == null)
+         throw new IllegalArgumentException("Scott service is null.");
+   }
+
+   public void start()
+   {
+      System.out.println("Ales's free time activity: ");
+      alesService.useFreeTime();
+      System.out.println("-------------------------");
+      System.out.println("Scott's snow time activity: ");
+      scottService.snowTime();
+   }
+}

Added: projects/demos/trunk/pom.xml
===================================================================
--- projects/demos/trunk/pom.xml	                        (rev 0)
+++ projects/demos/trunk/pom.xml	2008-07-14 16:55:32 UTC (rev 75793)
@@ -0,0 +1,53 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <parent>
+    <groupId>org.jboss</groupId>
+    <artifactId>jboss-parent</artifactId>
+    <version>4-beta-2</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.jboss.demos</groupId>
+  <artifactId>jboss-demos-aggregator</artifactId>
+  <version>2.0.0-SNAPSHOT</version>
+  <packaging>pom</packaging>
+  <name>JBoss Demos Aggregator</name>
+  <url>http://www.jboss.com/products/jbossmc</url>
+  <description>
+    The JBoss MC Demos
+  </description>
+  <scm>
+    <connection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/demos/trunk</connection>
+  </scm>
+
+  <modules>
+    <module>build</module>
+    <module>bootstrap</module>
+    <module>jmx</module>
+    <module>models</module>
+    <!-- <module>osgi</module> -->
+  </modules>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-release-plugin</artifactId>
+        <version>2.0-beta-7</version>
+        <configuration>
+          <generateReleasePoms>false</generateReleasePoms>
+          <tagBase>https://svn.jboss.org/repos/jbossas/projects/jboss-deployers/tags</tagBase>
+          <autoVersionSubmodules>true</autoVersionSubmodules>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+  
+  <profiles>
+    <profile>
+      <id>eclipse</id>
+      <build>
+        <defaultGoal>process-test-resources</defaultGoal>
+      </build>
+    </profile>
+  </profiles>
+
+</project>
\ No newline at end of file




More information about the jboss-cvs-commits mailing list