[jboss-cvs] JBossAS SVN: r76106 - in projects/demos/trunk: build and 24 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Jul 22 11:48:18 EDT 2008
Author: alesj
Date: 2008-07-22 11:48:18 -0400 (Tue, 22 Jul 2008)
New Revision: 76106
Added:
projects/demos/trunk/classloading/
projects/demos/trunk/classloading/pom.xml
projects/demos/trunk/classloading/src/
projects/demos/trunk/classloading/src/main/
projects/demos/trunk/classloading/src/main/log4j.properties
projects/demos/trunk/classloading/src/main/org/
projects/demos/trunk/classloading/src/main/org/jboss/
projects/demos/trunk/classloading/src/main/org/jboss/demos/
projects/demos/trunk/classloading/src/main/org/jboss/demos/bootstrap/
projects/demos/trunk/classloading/src/main/org/jboss/demos/bootstrap/cl/
projects/demos/trunk/classloading/src/main/org/jboss/demos/bootstrap/cl/ClassLoadingMain.java
projects/demos/trunk/classloading/src/main/org/jboss/demos/classloading/
projects/demos/trunk/classloading/src/main/org/jboss/demos/classloading/deployers/
projects/demos/trunk/classloading/src/main/org/jboss/demos/classloading/deployers/SuffixIntegrationDeployer.java
projects/demos/trunk/classloading/src/resources/
projects/demos/trunk/classloading/src/resources/META-INF/
projects/demos/trunk/classloading/src/resources/META-INF/classloading-beans.xml
projects/demos/trunk/classpath/
projects/demos/trunk/classpath/pom.xml
projects/demos/trunk/classpath/src/
projects/demos/trunk/classpath/src/main/
projects/demos/trunk/classpath/src/main/org/
projects/demos/trunk/classpath/src/main/org/jboss/
projects/demos/trunk/classpath/src/main/org/jboss/demos/
projects/demos/trunk/classpath/src/main/org/jboss/demos/classpath/
projects/demos/trunk/classpath/src/main/org/jboss/demos/classpath/integration/
projects/demos/trunk/classpath/src/main/org/jboss/demos/classpath/integration/TouchExternalPojo.java
projects/demos/trunk/classpath/src/resources/
projects/demos/trunk/classpath/src/resources/META-INF/
projects/demos/trunk/classpath/src/resources/META-INF/classpath-external-beans.xml
Modified:
projects/demos/trunk/build/pom.xml
projects/demos/trunk/ioc/pom.xml
projects/demos/trunk/models/pom.xml
projects/demos/trunk/pom.xml
Log:
Classpath demo.
Modified: projects/demos/trunk/build/pom.xml
===================================================================
--- projects/demos/trunk/build/pom.xml 2008-07-22 15:09:29 UTC (rev 76105)
+++ projects/demos/trunk/build/pom.xml 2008-07-22 15:48:18 UTC (rev 76106)
@@ -25,14 +25,14 @@
<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.deployers>2.0.0-SNAPSHOT</version.jboss.deployers>
+ <version.jboss.classloader>2.0.0-SNAPSHOT</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.jboss.vfs>2.0.0-SNAPSHOT</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>
Added: projects/demos/trunk/classloading/pom.xml
===================================================================
--- projects/demos/trunk/classloading/pom.xml (rev 0)
+++ projects/demos/trunk/classloading/pom.xml 2008-07-22 15:48:18 UTC (rev 76106)
@@ -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-classloading</artifactId>
+ <packaging>jar</packaging>
+ <name>JBoss MC Demos Classloading</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</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/classloading/src/main/log4j.properties
===================================================================
--- projects/demos/trunk/classloading/src/main/log4j.properties (rev 0)
+++ projects/demos/trunk/classloading/src/main/log4j.properties 2008-07-22 15:48:18 UTC (rev 76106)
@@ -0,0 +1,6 @@
+log4j.rootLogger=DEBUG, 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/classloading/src/main/org/jboss/demos/bootstrap/cl/ClassLoadingMain.java
===================================================================
--- projects/demos/trunk/classloading/src/main/org/jboss/demos/bootstrap/cl/ClassLoadingMain.java (rev 0)
+++ projects/demos/trunk/classloading/src/main/org/jboss/demos/bootstrap/cl/ClassLoadingMain.java 2008-07-22 15:48:18 UTC (rev 76106)
@@ -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.bootstrap.cl;
+
+import org.jboss.demos.boostrap.Main;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class ClassLoadingMain
+{
+ public static void main(String[] args)
+ {
+ Main.main(args);
+
+ try
+ {
+ Main.deploy("${demos.home}/classloading/src/resources/META-INF/classloading-beans.xml");
+ Main.validate();
+ }
+ catch (Throwable t)
+ {
+ t.printStackTrace();
+ }
+ }
+}
Added: projects/demos/trunk/classloading/src/main/org/jboss/demos/classloading/deployers/SuffixIntegrationDeployer.java
===================================================================
--- projects/demos/trunk/classloading/src/main/org/jboss/demos/classloading/deployers/SuffixIntegrationDeployer.java (rev 0)
+++ projects/demos/trunk/classloading/src/main/org/jboss/demos/classloading/deployers/SuffixIntegrationDeployer.java 2008-07-22 15:48:18 UTC (rev 76106)
@@ -0,0 +1,52 @@
+/*
+* 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.classloading.deployers;
+
+import java.util.List;
+
+import org.jboss.deployers.vfs.plugins.classloader.FilesUrlIntegrationDeployer;
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+import org.jboss.kernel.spi.deployment.KernelDeployment;
+import org.jboss.virtual.VirtualFile;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class SuffixIntegrationDeployer extends FilesUrlIntegrationDeployer<KernelDeployment>
+{
+ public SuffixIntegrationDeployer()
+ {
+ super(KernelDeployment.class);
+ }
+
+ protected boolean isIntegrationDeployment(VFSDeploymentUnit unit)
+ {
+ String[] suffixes = getFiles();
+ for(String sufix : suffixes)
+ {
+ List<VirtualFile> files = unit.getMetaDataFiles(null, sufix);
+ if (files != null && files.isEmpty() == false)
+ return true;
+ }
+ return false;
+ }
+}
Added: projects/demos/trunk/classloading/src/resources/META-INF/classloading-beans.xml
===================================================================
--- projects/demos/trunk/classloading/src/resources/META-INF/classloading-beans.xml (rev 0)
+++ projects/demos/trunk/classloading/src/resources/META-INF/classloading-beans.xml 2008-07-22 15:48:18 UTC (rev 76106)
@@ -0,0 +1,12 @@
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="IntegrationDeployer" class="org.jboss.demos.classloading.deployers.SuffixIntegrationDeployer">
+ <property name="integrationURL">${demos.home}/models/target/jboss-demos-models.jar</property>
+ <property name="files">
+ <array elementClass="java.lang.String">
+ <value>-external-beans.xml</value>
+ </array>
+ </property>
+ </bean>
+
+</deployment>
Added: projects/demos/trunk/classpath/pom.xml
===================================================================
--- projects/demos/trunk/classpath/pom.xml (rev 0)
+++ projects/demos/trunk/classpath/pom.xml 2008-07-22 15:48:18 UTC (rev 76106)
@@ -0,0 +1,25 @@
+<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-classpath</artifactId>
+ <packaging>jar</packaging>
+ <name>JBoss MC Demos IoC</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.microcontainer</groupId>
+ <artifactId>jboss-kernel</artifactId>
+ </dependency>
+ </dependencies>
+
+</project>
\ No newline at end of file
Added: projects/demos/trunk/classpath/src/main/org/jboss/demos/classpath/integration/TouchExternalPojo.java
===================================================================
--- projects/demos/trunk/classpath/src/main/org/jboss/demos/classpath/integration/TouchExternalPojo.java (rev 0)
+++ projects/demos/trunk/classpath/src/main/org/jboss/demos/classpath/integration/TouchExternalPojo.java 2008-07-22 15:48:18 UTC (rev 76106)
@@ -0,0 +1,40 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.demos.classpath.integration;
+
+import org.jboss.logging.Logger;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class TouchExternalPojo
+{
+ private static Logger log = Logger.getLogger(TouchExternalPojo.class);
+
+ public void start() throws Throwable
+ {
+ ClassLoader cl = getClass().getClassLoader();
+ Class<?> pojo = cl.loadClass("org.jboss.demos.models.plain.Pojo");
+ Object instance = pojo.newInstance();
+ log.info("Pojo instance: " + instance);
+ }
+}
Added: projects/demos/trunk/classpath/src/resources/META-INF/classpath-external-beans.xml
===================================================================
--- projects/demos/trunk/classpath/src/resources/META-INF/classpath-external-beans.xml (rev 0)
+++ projects/demos/trunk/classpath/src/resources/META-INF/classpath-external-beans.xml 2008-07-22 15:48:18 UTC (rev 76106)
@@ -0,0 +1,5 @@
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="ExternalTouch" class="org.jboss.demos.classpath.integration.TouchExternalPojo"/>
+
+</deployment>
Modified: projects/demos/trunk/ioc/pom.xml
===================================================================
--- projects/demos/trunk/ioc/pom.xml 2008-07-22 15:09:29 UTC (rev 76105)
+++ projects/demos/trunk/ioc/pom.xml 2008-07-22 15:48:18 UTC (rev 76106)
@@ -15,10 +15,6 @@
<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>
Modified: projects/demos/trunk/models/pom.xml
===================================================================
--- projects/demos/trunk/models/pom.xml 2008-07-22 15:09:29 UTC (rev 76105)
+++ projects/demos/trunk/models/pom.xml 2008-07-22 15:48:18 UTC (rev 76106)
@@ -15,10 +15,6 @@
<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>
Modified: projects/demos/trunk/pom.xml
===================================================================
--- projects/demos/trunk/pom.xml 2008-07-22 15:09:29 UTC (rev 76105)
+++ projects/demos/trunk/pom.xml 2008-07-22 15:48:18 UTC (rev 76106)
@@ -24,6 +24,8 @@
<module>jmx</module>
<module>models</module>
<module>ioc</module>
+ <module>classloading</module>
+ <module>classpath</module>
<!-- <module>osgi</module> -->
</modules>
More information about the jboss-cvs-commits
mailing list