[jboss-cvs] JBossAS SVN: r104189 - in projects/demos/microcontainer/trunk: infinispan and 9 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Apr 23 06:09:18 EDT 2010


Author: alesj
Date: 2010-04-23 06:09:17 -0400 (Fri, 23 Apr 2010)
New Revision: 104189

Added:
   projects/demos/microcontainer/trunk/infinispan/
   projects/demos/microcontainer/trunk/infinispan/pom.xml
   projects/demos/microcontainer/trunk/infinispan/src/
   projects/demos/microcontainer/trunk/infinispan/src/main/
   projects/demos/microcontainer/trunk/infinispan/src/main/java/
   projects/demos/microcontainer/trunk/infinispan/src/main/java/org/
   projects/demos/microcontainer/trunk/infinispan/src/main/java/org/jboss/
   projects/demos/microcontainer/trunk/infinispan/src/main/java/org/jboss/demos/
   projects/demos/microcontainer/trunk/infinispan/src/main/java/org/jboss/demos/infinispan/
   projects/demos/microcontainer/trunk/infinispan/src/main/java/org/jboss/demos/infinispan/gfs/
   projects/demos/microcontainer/trunk/infinispan/src/main/java/org/jboss/demos/infinispan/gfs/GridFileSystem.java
   projects/demos/microcontainer/trunk/infinispan/src/main/resources/
Modified:
   projects/demos/microcontainer/trunk/pom.xml
   projects/demos/microcontainer/trunk/vfs/src/main/java/org/jboss/demos/vfs/gzip/GZipFileSystem.java
Log:
Add Infinispan into demos; initial GFS facade over VFS.

Added: projects/demos/microcontainer/trunk/infinispan/pom.xml
===================================================================
--- projects/demos/microcontainer/trunk/infinispan/pom.xml	                        (rev 0)
+++ projects/demos/microcontainer/trunk/infinispan/pom.xml	2010-04-23 10:09:17 UTC (rev 104189)
@@ -0,0 +1,27 @@
+<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-infinispan</artifactId>
+  <packaging>jar</packaging>
+  <name>JBoss MC Demos Infinispan</name>
+  <url>http://www.jboss.org/jbossmc</url>
+  <description>JBoss MC Demos</description>
+
+  <dependencies>
+    <!-- Compile (global dependencies) -->
+    <dependency>
+      <groupId>org.jboss</groupId>
+      <artifactId>jboss-vfs</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.infinispan</groupId>
+      <artifactId>infinispan-core</artifactId>
+    </dependency>
+  </dependencies>
+  
+</project>
\ No newline at end of file

Added: projects/demos/microcontainer/trunk/infinispan/src/main/java/org/jboss/demos/infinispan/gfs/GridFileSystem.java
===================================================================
--- projects/demos/microcontainer/trunk/infinispan/src/main/java/org/jboss/demos/infinispan/gfs/GridFileSystem.java	                        (rev 0)
+++ projects/demos/microcontainer/trunk/infinispan/src/main/java/org/jboss/demos/infinispan/gfs/GridFileSystem.java	2010-04-23 10:09:17 UTC (rev 104189)
@@ -0,0 +1,105 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.demos.infinispan.gfs;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.security.CodeSigner;
+import java.util.List;
+
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.spi.FileSystem;
+
+/**
+ * Infinispan's Grid file system.
+ *
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+public class GridFileSystem implements FileSystem
+{
+   public File getFile(VirtualFile mountPoint, VirtualFile target) throws IOException
+   {
+      return null;  //To change body of implemented methods use File | Settings | File Templates.
+   }
+
+   public InputStream openInputStream(VirtualFile mountPoint, VirtualFile target) throws IOException
+   {
+      return null;  //To change body of implemented methods use File | Settings | File Templates.
+   }
+
+   public boolean isReadOnly()
+   {
+      return false;  //To change body of implemented methods use File | Settings | File Templates.
+   }
+
+   public boolean delete(VirtualFile mountPoint, VirtualFile target)
+   {
+      return false;  //To change body of implemented methods use File | Settings | File Templates.
+   }
+
+   public long getSize(VirtualFile mountPoint, VirtualFile target)
+   {
+      return 0;  //To change body of implemented methods use File | Settings | File Templates.
+   }
+
+   public long getLastModified(VirtualFile mountPoint, VirtualFile target)
+   {
+      return 0;  //To change body of implemented methods use File | Settings | File Templates.
+   }
+
+   public boolean exists(VirtualFile mountPoint, VirtualFile target)
+   {
+      return false;  //To change body of implemented methods use File | Settings | File Templates.
+   }
+
+   public boolean isFile(VirtualFile mountPoint, VirtualFile target)
+   {
+      return false;  //To change body of implemented methods use File | Settings | File Templates.
+   }
+
+   public boolean isDirectory(VirtualFile mountPoint, VirtualFile target)
+   {
+      return false;  //To change body of implemented methods use File | Settings | File Templates.
+   }
+
+   public List<String> getDirectoryEntries(VirtualFile mountPoint, VirtualFile target)
+   {
+      return null;  //To change body of implemented methods use File | Settings | File Templates.
+   }
+
+   public CodeSigner[] getCodeSigners(VirtualFile mountPoint, VirtualFile target)
+   {
+      return new CodeSigner[0];  //To change body of implemented methods use File | Settings | File Templates.
+   }
+
+   public void close() throws IOException
+   {
+      //To change body of implemented methods use File | Settings | File Templates.
+   }
+
+   public File getMountSource()
+   {
+      return null;  //To change body of implemented methods use File | Settings | File Templates.
+   }
+}

Modified: projects/demos/microcontainer/trunk/pom.xml
===================================================================
--- projects/demos/microcontainer/trunk/pom.xml	2010-04-23 09:33:40 UTC (rev 104188)
+++ projects/demos/microcontainer/trunk/pom.xml	2010-04-23 10:09:17 UTC (rev 104189)
@@ -2,7 +2,7 @@
   <parent>
     <groupId>org.jboss</groupId>
     <artifactId>jboss-parent</artifactId>
-    <version>4</version>
+    <version>5</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.jboss.demos</groupId>
@@ -34,6 +34,7 @@
     <module>vfs</module>
     <module>policy</module>
     <module>threads</module>
+    <module>infinispan</module>
     <!-- <module>osgi</module> -->
     <module>build</module>
   </modules>
@@ -53,6 +54,7 @@
     <version.org.jboss.threads>2.0.0.CR3</version.org.jboss.threads>
     <version.org.jboss.aop>2.0.1.GA</version.org.jboss.aop>
     <version.org.jboss.test>1.0.5.GA</version.org.jboss.test>
+    <version.org.infinispan>4.1.0-SNAPSHOT</version.org.infinispan>
     <version.junit>4.4</version.junit>
     <version.javassist>3.12.0.GA</version.javassist>
     <version.xerces>2.9.1</version.xerces>
@@ -134,7 +136,7 @@
     </pluginManagement>
   </build>
   
-  <repositories>
+  <!-- repositories>
     <repository>
       <id>repository.jboss.org</id>
       <name>JBoss Repository</name>
@@ -156,7 +158,7 @@
         <enabled>false</enabled>
       </releases>
     </repository>
-  </repositories>
+  </repositories -->
   
   <dependencyManagement>
     <!-- The parent pom manages the inter-dependencies of the modules. -->
@@ -448,6 +450,12 @@
         </exclusions>
       </dependency>
 
+        <dependency>
+          <groupId>org.infinispan</groupId>
+          <artifactId>infinispan-core</artifactId>
+            <version>${version.org.infinispan}</version>
+        </dependency>
+
       <dependency>
         <groupId>org.jboss.mx</groupId>
         <artifactId>jboss-j2se</artifactId>

Modified: projects/demos/microcontainer/trunk/vfs/src/main/java/org/jboss/demos/vfs/gzip/GZipFileSystem.java
===================================================================
--- projects/demos/microcontainer/trunk/vfs/src/main/java/org/jboss/demos/vfs/gzip/GZipFileSystem.java	2010-04-23 09:33:40 UTC (rev 104188)
+++ projects/demos/microcontainer/trunk/vfs/src/main/java/org/jboss/demos/vfs/gzip/GZipFileSystem.java	2010-04-23 10:09:17 UTC (rev 104189)
@@ -116,4 +116,9 @@
    public void close() throws IOException
    {
    }
+
+   public File getMountSource()
+   {
+      return realRoot;
+   }
 }




More information about the jboss-cvs-commits mailing list