geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r667970 [1/8] - in /geronimo/plugins/james: ./ branches/ log/ tags/ trunk/ trunk/geronimo-james/ trunk/geronimo-james/src/ trunk/geronimo-james/src/main/ trunk/geronimo-james/src/main/java/ trunk/geronimo-james/src/main/java/org/ trunk/gero...
Date Sun, 15 Jun 2008 16:33:23 GMT
Author: djencks
Date: Sun Jun 15 09:33:21 2008
New Revision: 667970

URL: http://svn.apache.org/viewvc?rev=667970&view=rev
Log:
GERONIMO-4117 JAMES plugin

Added:
    geronimo/plugins/james/
    geronimo/plugins/james/branches/
    geronimo/plugins/james/log/
    geronimo/plugins/james/log/james-server.log
    geronimo/plugins/james/tags/
    geronimo/plugins/james/trunk/
    geronimo/plugins/james/trunk/geronimo-james/
    geronimo/plugins/james/trunk/geronimo-james/pom.xml   (with props)
    geronimo/plugins/james/trunk/geronimo-james/src/
    geronimo/plugins/james/trunk/geronimo-james/src/main/
    geronimo/plugins/james/trunk/geronimo-james/src/main/java/
    geronimo/plugins/james/trunk/geronimo-james/src/main/java/org/
    geronimo/plugins/james/trunk/geronimo-james/src/main/java/org/apache/
    geronimo/plugins/james/trunk/geronimo-james/src/main/java/org/apache/geronimo/
    geronimo/plugins/james/trunk/geronimo-james/src/main/java/org/apache/geronimo/plugins/
    geronimo/plugins/james/trunk/geronimo-james/src/main/java/org/apache/geronimo/plugins/james/
    geronimo/plugins/james/trunk/geronimo-james/src/main/java/org/apache/geronimo/plugins/james/FileSystemBridge.java
  (with props)
    geronimo/plugins/james/trunk/geronimo-james/src/main/java/org/apache/geronimo/plugins/james/JamesGBean.java
  (with props)
    geronimo/plugins/james/trunk/geronimo-james/src/test/
    geronimo/plugins/james/trunk/geronimo-james/src/test/java/
    geronimo/plugins/james/trunk/geronimo-james/src/test/java/org/
    geronimo/plugins/james/trunk/geronimo-james/src/test/java/org/apache/
    geronimo/plugins/james/trunk/geronimo-james/src/test/java/org/apache/geronimo/
    geronimo/plugins/james/trunk/geronimo-james/src/test/java/org/apache/geronimo/plugins/
    geronimo/plugins/james/trunk/geronimo-james/src/test/java/org/apache/geronimo/plugins/james/
    geronimo/plugins/james/trunk/geronimo-james/src/test/java/org/apache/geronimo/plugins/james/JamesGBeanTest.java
  (with props)
    geronimo/plugins/james/trunk/geronimo-james/src/test/java/org/apache/geronimo/plugins/james/TestFileSystemBridge.java
  (with props)
    geronimo/plugins/james/trunk/geronimo-james/src/test/resources/
    geronimo/plugins/james/trunk/geronimo-james/src/test/resources/var/
    geronimo/plugins/james/trunk/geronimo-james/src/test/resources/var/james/
    geronimo/plugins/james/trunk/geronimo-james/src/test/resources/var/james/config/
    geronimo/plugins/james/trunk/geronimo-james/src/test/resources/var/james/config/README
    geronimo/plugins/james/trunk/geronimo-james/src/test/resources/var/james/config/james-assembly.xml
  (with props)
    geronimo/plugins/james/trunk/geronimo-james/src/test/resources/var/james/config/james-config.xml
  (with props)
    geronimo/plugins/james/trunk/geronimo-james/src/test/resources/var/james/config/james-fetchmail.xml
  (with props)
    geronimo/plugins/james/trunk/geronimo-james/src/test/resources/var/james/config/james-jms.xml
  (with props)
    geronimo/plugins/james/trunk/geronimo-james/src/test/resources/var/james/config/james-listmanager.xml
  (with props)
    geronimo/plugins/james/trunk/geronimo-james/src/test/resources/var/james/config/james-liststores.xml
  (with props)
    geronimo/plugins/james/trunk/geronimo-james/src/test/resources/var/james/config/james-smtphandlerchain.xml
  (with props)
    geronimo/plugins/james/trunk/geronimo-james/src/test/resources/var/james/config/log4j.properties
  (with props)
    geronimo/plugins/james/trunk/geronimo-james/src/test/resources/var/james/config/mailboxManagerSqlResources.xml
  (with props)
    geronimo/plugins/james/trunk/geronimo-james/src/test/resources/var/james/config/miResources.xml
  (with props)
    geronimo/plugins/james/trunk/geronimo-james/src/test/resources/var/james/config/spring-beans.xml
  (with props)
    geronimo/plugins/james/trunk/geronimo-james/src/test/resources/var/james/config/sqlResources.xml
  (with props)
    geronimo/plugins/james/trunk/james/
    geronimo/plugins/james/trunk/james-server/
    geronimo/plugins/james/trunk/james-server/pom.xml   (with props)
    geronimo/plugins/james/trunk/james-server/src/
    geronimo/plugins/james/trunk/james-server/src/main/
    geronimo/plugins/james/trunk/james-server/src/main/resources/
    geronimo/plugins/james/trunk/james/pom.xml   (with props)
    geronimo/plugins/james/trunk/james/src/
    geronimo/plugins/james/trunk/james/src/main/
    geronimo/plugins/james/trunk/james/src/main/plan/
    geronimo/plugins/james/trunk/james/src/main/plan/plan.xml   (with props)
    geronimo/plugins/james/trunk/james/src/main/resources/
    geronimo/plugins/james/trunk/james/src/main/resources/var/
    geronimo/plugins/james/trunk/james/src/main/resources/var/james/
    geronimo/plugins/james/trunk/james/src/main/resources/var/james/config/
    geronimo/plugins/james/trunk/james/src/main/resources/var/james/config/README
    geronimo/plugins/james/trunk/james/src/main/resources/var/james/config/james-assembly.xml
  (with props)
    geronimo/plugins/james/trunk/james/src/main/resources/var/james/config/james-config.xml
  (with props)
    geronimo/plugins/james/trunk/james/src/main/resources/var/james/config/james-fetchmail.xml
  (with props)
    geronimo/plugins/james/trunk/james/src/main/resources/var/james/config/james-jms.xml 
 (with props)
    geronimo/plugins/james/trunk/james/src/main/resources/var/james/config/james-listmanager.xml
  (with props)
    geronimo/plugins/james/trunk/james/src/main/resources/var/james/config/james-liststores.xml
  (with props)
    geronimo/plugins/james/trunk/james/src/main/resources/var/james/config/james-smtphandlerchain.xml
  (with props)
    geronimo/plugins/james/trunk/james/src/main/resources/var/james/config/log4j.properties
  (with props)
    geronimo/plugins/james/trunk/james/src/main/resources/var/james/config/mailboxManagerSqlResources.xml
  (with props)
    geronimo/plugins/james/trunk/james/src/main/resources/var/james/config/miResources.xml
  (with props)
    geronimo/plugins/james/trunk/james/src/main/resources/var/james/config/spring-beans.xml
  (with props)
    geronimo/plugins/james/trunk/james/src/main/resources/var/james/config/sqlResources.xml
  (with props)
    geronimo/plugins/james/trunk/pom.xml   (with props)

Added: geronimo/plugins/james/log/james-server.log
URL: http://svn.apache.org/viewvc/geronimo/plugins/james/log/james-server.log?rev=667970&view=auto
==============================================================================
--- geronimo/plugins/james/log/james-server.log (added)
+++ geronimo/plugins/james/log/james-server.log Sun Jun 15 09:33:21 2008
@@ -0,0 +1 @@
+INFO  10:06:42,102 | org.apache.james.container.spring.beanfactory.AvalonApplicationContext
| Refreshing org.apache.james.container.spring.beanfactory.AvalonApplicationContext@842e74:
display name [org.apache.james.container.spring.beanfactory.AvalonApplicationContext@842e74];
startup date [Fri Jun 13 10:06:42 PDT 2008]; root of context hierarchy

Added: geronimo/plugins/james/trunk/geronimo-james/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/plugins/james/trunk/geronimo-james/pom.xml?rev=667970&view=auto
==============================================================================
--- geronimo/plugins/james/trunk/geronimo-james/pom.xml (added)
+++ geronimo/plugins/james/trunk/geronimo-james/pom.xml Sun Jun 15 09:33:21 2008
@@ -0,0 +1,95 @@
+<?xml version="1.0"?>
+<project>
+    <parent>
+        <artifactId>james-parent</artifactId>
+        <groupId>org.apache.geronimo.plugins</groupId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>geronimo-james</artifactId>
+    <name>geronimo-james</name>
+    <version>1.0-SNAPSHOT</version>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.geronimo.framework</groupId>
+            <artifactId>geronimo-system</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.james</groupId>
+            <artifactId>james-server-spring-deployment</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-log4j12</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.testng</groupId>
+            <artifactId>testng</artifactId>
+            <classifier>jdk15</classifier>
+        </dependency>
+        <!-- unstated transitive dependencies of james -->
+        <dependency>
+            <groupId>spice</groupId>
+            <artifactId>spice-configkit</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.james</groupId>
+            <artifactId>james-server-spoolmanager-function</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.james</groupId>
+            <artifactId>james-server-avalon-user-function</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.james</groupId>
+            <artifactId>james-server-phoenix-deployment</artifactId>
+        </dependency>
+
+
+        <dependency>
+            <groupId>org.apache.avalon.cornerstone.datasources</groupId>
+            <artifactId>cornerstone-datasources-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.avalon.cornerstone.datasources</groupId>
+            <artifactId>cornerstone-datasources-impl</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.avalon.cornerstone.sockets</groupId>
+            <artifactId>cornerstone-sockets-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.avalon.cornerstone.sockets</groupId>
+            <artifactId>cornerstone-sockets-impl</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.avalon.cornerstone.scheduler</groupId>
+            <artifactId>cornerstone-scheduler-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.avalon.cornerstone.scheduler</groupId>
+            <artifactId>cornerstone-scheduler-impl</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.avalon.cornerstone.threads</groupId>
+            <artifactId>cornerstone-threads-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.avalon.cornerstone.threads</groupId>
+            <artifactId>cornerstone-threads-impl</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>commons-lang</groupId>
+            <artifactId>commons-lang</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.modules</groupId>
+            <artifactId>geronimo-derby</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+</project>
\ No newline at end of file

Propchange: geronimo/plugins/james/trunk/geronimo-james/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/plugins/james/trunk/geronimo-james/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/plugins/james/trunk/geronimo-james/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/plugins/james/trunk/geronimo-james/src/main/java/org/apache/geronimo/plugins/james/FileSystemBridge.java
URL: http://svn.apache.org/viewvc/geronimo/plugins/james/trunk/geronimo-james/src/main/java/org/apache/geronimo/plugins/james/FileSystemBridge.java?rev=667970&view=auto
==============================================================================
--- geronimo/plugins/james/trunk/geronimo-james/src/main/java/org/apache/geronimo/plugins/james/FileSystemBridge.java
(added)
+++ geronimo/plugins/james/trunk/geronimo-james/src/main/java/org/apache/geronimo/plugins/james/FileSystemBridge.java
Sun Jun 15 09:33:21 2008
@@ -0,0 +1,104 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+package org.apache.geronimo.plugins.james;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URI;
+import java.util.Collections;
+import java.util.Set;
+
+import org.apache.geronimo.gbean.AbstractName;
+import org.apache.geronimo.gbean.AbstractNameQuery;
+import org.apache.geronimo.kernel.GBeanNotFoundException;
+import org.apache.geronimo.kernel.Kernel;
+import org.apache.geronimo.kernel.KernelRegistry;
+import org.apache.geronimo.system.serverinfo.ServerInfo;
+import org.apache.james.services.FileSystem;
+
+/**
+ * @version $Rev:$ $Date:$
+ */
+public class FileSystemBridge implements FileSystem {
+
+    private static final AbstractNameQuery SERVER_INFO_QUERY = new AbstractNameQuery(null,
Collections.EMPTY_MAP, ServerInfo.class.getName());
+    private final ServerInfo serverInfo;
+    private URI baseDir = URI.create("");
+    private static final String FILE = "file://";
+
+    public FileSystemBridge(ServerInfo serverInfo) {
+        this.serverInfo = serverInfo;
+    }
+
+    public FileSystemBridge() {
+        Kernel kernel = KernelRegistry.getSingleKernel();
+        Set<AbstractName> names = kernel.listGBeans(SERVER_INFO_QUERY);
+        if (names.size() != 1) {
+            throw new IllegalStateException("Wrong number of server infos found: " + names);
+        }
+        try {
+            serverInfo = (ServerInfo) kernel.getGBean(names.iterator().next());
+        } catch (GBeanNotFoundException e) {
+            throw new IllegalStateException("Could not find server info by its name", e);
+        }
+    }
+
+    public void setBaseDir(URI baseDir) {
+        this.baseDir = baseDir;
+    }
+
+    public InputStream getResource(String url) throws IOException {
+        if (url.startsWith("classpath:")) {
+            String resourceName = url.substring("classpath:".length());
+            InputStream resourceAsStream = getClass().getClassLoader().getResourceAsStream(resourceName);
+            if (resourceAsStream == null) {
+                throw new IOException("Resource '" + resourceName + "' not found in the classpath!");
+            }
+            return resourceAsStream;
+        }
+        return new FileInputStream(getFile(url));
+    }
+
+    public File getFile(String s) throws FileNotFoundException {
+        if (s.startsWith(FILE)) {
+            s = s.substring(FILE.length());
+        }
+        URI relative;
+        if (baseDir != null) {
+            relative = baseDir.resolve(s);
+        } else {
+            relative = URI.create(s);
+        }
+
+        File file = new File(serverInfo.resolveServer(relative));
+        if (!file.exists()) {
+            throw new FileNotFoundException("Could not locate file based on " + s + " at
resolved location: " + file.getAbsolutePath());
+        }
+        return file;
+    }
+
+    public File getBasedir() throws FileNotFoundException {
+        return new File(serverInfo.resolveServer(baseDir));
+    }
+}

Propchange: geronimo/plugins/james/trunk/geronimo-james/src/main/java/org/apache/geronimo/plugins/james/FileSystemBridge.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/plugins/james/trunk/geronimo-james/src/main/java/org/apache/geronimo/plugins/james/FileSystemBridge.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/plugins/james/trunk/geronimo-james/src/main/java/org/apache/geronimo/plugins/james/FileSystemBridge.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/plugins/james/trunk/geronimo-james/src/main/java/org/apache/geronimo/plugins/james/JamesGBean.java
URL: http://svn.apache.org/viewvc/geronimo/plugins/james/trunk/geronimo-james/src/main/java/org/apache/geronimo/plugins/james/JamesGBean.java?rev=667970&view=auto
==============================================================================
--- geronimo/plugins/james/trunk/geronimo-james/src/main/java/org/apache/geronimo/plugins/james/JamesGBean.java
(added)
+++ geronimo/plugins/james/trunk/geronimo-james/src/main/java/org/apache/geronimo/plugins/james/JamesGBean.java
Sun Jun 15 09:33:21 2008
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+package org.apache.geronimo.plugins.james;
+
+import org.apache.geronimo.gbean.GBeanLifecycle;
+import org.apache.geronimo.gbean.annotation.GBean;
+import org.apache.geronimo.gbean.annotation.ParamAttribute;
+import org.apache.geronimo.gbean.annotation.ParamReference;
+import org.apache.geronimo.system.serverinfo.ServerInfo;
+import org.apache.james.container.spring.beanfactory.AvalonApplicationContext;
+import org.springframework.core.io.FileSystemResource;
+
+/**
+ * @version $Rev:$ $Date:$
+ */
+@GBean
+public class JamesGBean implements GBeanLifecycle {
+
+    private final AvalonApplicationContext jamesContext;
+
+    public JamesGBean(@ParamAttribute(name = "jamesSpringConfig")String jamesSpringConfig,
+                      @ParamAttribute(name = "jamesConfigFile")String jamesConfigFile,
+                      @ParamReference(name = "ServerInfo")ServerInfo serverInfo) {
+        FileSystemResource jamesConfigResource = new FileSystemResource(serverInfo.resolveServer(jamesConfigFile));
+        FileSystemResource jamesSpringConfigResource = new FileSystemResource(serverInfo.resolveServer(jamesSpringConfig));
+        jamesContext = new AvalonApplicationContext(jamesSpringConfigResource, jamesConfigResource);
+    }
+
+    public void doStart() throws Exception {
+    }
+
+    public void doStop() throws Exception {
+        jamesContext.close();
+    }
+
+    public void doFail() {
+        jamesContext.close();
+    }
+}

Propchange: geronimo/plugins/james/trunk/geronimo-james/src/main/java/org/apache/geronimo/plugins/james/JamesGBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/plugins/james/trunk/geronimo-james/src/main/java/org/apache/geronimo/plugins/james/JamesGBean.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/plugins/james/trunk/geronimo-james/src/main/java/org/apache/geronimo/plugins/james/JamesGBean.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/plugins/james/trunk/geronimo-james/src/test/java/org/apache/geronimo/plugins/james/JamesGBeanTest.java
URL: http://svn.apache.org/viewvc/geronimo/plugins/james/trunk/geronimo-james/src/test/java/org/apache/geronimo/plugins/james/JamesGBeanTest.java?rev=667970&view=auto
==============================================================================
--- geronimo/plugins/james/trunk/geronimo-james/src/test/java/org/apache/geronimo/plugins/james/JamesGBeanTest.java
(added)
+++ geronimo/plugins/james/trunk/geronimo-james/src/test/java/org/apache/geronimo/plugins/james/JamesGBeanTest.java
Sun Jun 15 09:33:21 2008
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+package org.apache.geronimo.plugins.james;
+
+import java.net.URL;
+
+import org.apache.geronimo.system.serverinfo.BasicServerInfo;
+import org.apache.geronimo.system.serverinfo.ServerInfo;
+import org.testng.annotations.Test;
+
+/**
+ * @version $Rev:$ $Date:$
+ */
+public class JamesGBeanTest {
+
+    @Test
+    public void testJamesGBean() throws Exception {
+        ClassLoader cl = this.getClass().getClassLoader();
+        URL configURL = cl.getResource("var/james/config/james-assembly.xml");
+        if (configURL == null) {
+            throw new Exception("Can't find config file on classpath");
+        }
+        String path = configURL.getPath();
+        path = path.substring(0, path.lastIndexOf("/"));
+        ServerInfo serverInfo = new BasicServerInfo(path);
+
+        TestFileSystemBridge.serverInfo = serverInfo;
+        JamesGBean jamesGBean = new JamesGBean("spring-beans.xml", "james-assembly.xml",
serverInfo);
+        jamesGBean.doStop();
+    }
+}

Propchange: geronimo/plugins/james/trunk/geronimo-james/src/test/java/org/apache/geronimo/plugins/james/JamesGBeanTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/plugins/james/trunk/geronimo-james/src/test/java/org/apache/geronimo/plugins/james/JamesGBeanTest.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/plugins/james/trunk/geronimo-james/src/test/java/org/apache/geronimo/plugins/james/JamesGBeanTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/plugins/james/trunk/geronimo-james/src/test/java/org/apache/geronimo/plugins/james/TestFileSystemBridge.java
URL: http://svn.apache.org/viewvc/geronimo/plugins/james/trunk/geronimo-james/src/test/java/org/apache/geronimo/plugins/james/TestFileSystemBridge.java?rev=667970&view=auto
==============================================================================
--- geronimo/plugins/james/trunk/geronimo-james/src/test/java/org/apache/geronimo/plugins/james/TestFileSystemBridge.java
(added)
+++ geronimo/plugins/james/trunk/geronimo-james/src/test/java/org/apache/geronimo/plugins/james/TestFileSystemBridge.java
Sun Jun 15 09:33:21 2008
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+package org.apache.geronimo.plugins.james;
+
+import org.apache.geronimo.system.serverinfo.ServerInfo;
+
+/**
+ * @version $Rev:$ $Date:$
+ */
+public class TestFileSystemBridge extends FileSystemBridge {
+
+    static ServerInfo serverInfo;
+
+    public TestFileSystemBridge() {
+        super(serverInfo);
+    }
+    
+}

Propchange: geronimo/plugins/james/trunk/geronimo-james/src/test/java/org/apache/geronimo/plugins/james/TestFileSystemBridge.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/plugins/james/trunk/geronimo-james/src/test/java/org/apache/geronimo/plugins/james/TestFileSystemBridge.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/plugins/james/trunk/geronimo-james/src/test/java/org/apache/geronimo/plugins/james/TestFileSystemBridge.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/plugins/james/trunk/geronimo-james/src/test/resources/var/james/config/README
URL: http://svn.apache.org/viewvc/geronimo/plugins/james/trunk/geronimo-james/src/test/resources/var/james/config/README?rev=667970&view=auto
==============================================================================
--- geronimo/plugins/james/trunk/geronimo-james/src/test/resources/var/james/config/README
(added)
+++ geronimo/plugins/james/trunk/geronimo-james/src/test/resources/var/james/config/README
Sun Jun 15 09:33:21 2008
@@ -0,0 +1,2 @@
+The files in this directory are from
+https://svn.apache.org/repos/asf/james/server/trunk/spring-deployment/src/main/config/james
\ No newline at end of file

Added: geronimo/plugins/james/trunk/geronimo-james/src/test/resources/var/james/config/james-assembly.xml
URL: http://svn.apache.org/viewvc/geronimo/plugins/james/trunk/geronimo-james/src/test/resources/var/james/config/james-assembly.xml?rev=667970&view=auto
==============================================================================
--- geronimo/plugins/james/trunk/geronimo-james/src/test/resources/var/james/config/james-assembly.xml
(added)
+++ geronimo/plugins/james/trunk/geronimo-james/src/test/resources/var/james/config/james-assembly.xml
Sun Jun 15 09:33:21 2008
@@ -0,0 +1,343 @@
+<?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one   
+  or more contributor license agreements.  See the NOTICE file 
+  distributed with this work for additional information        
+  regarding copyright ownership.  The ASF licenses this file   
+  to you under the Apache License, Version 2.0 (the            
+  "License"); you may not use this file except in compliance   
+  with the License.  You may obtain a copy of the License at   
+                                                               
+    http://www.apache.org/licenses/LICENSE-2.0                 
+                                                               
+  Unless required by applicable law or agreed to in writing,   
+  software distributed under the License is distributed on an  
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       
+  KIND, either express or implied.  See the License for the    
+  specific language governing permissions and limitations      
+  under the License.                                           
+ -->
+<assembly>
+
+  <!-- The list of blocks being run in this Phoenix server. -->
+  <!-- -->
+  <!-- Each block element has a name attribute that is unique -->
+  <!-- among the blocks. It also has a class attribute that -->
+  <!-- specifies the class providing that block-->
+  <!-- -->
+  <!-- The block element may have one or more provide sub-elements. -->
+  <!-- Each provide element represents another block on which this -->
+  <!-- block depends.  Phoenix will calculate a dependency chain when it -->
+  <!-- reads this file, and will load and start the blocks in the order -->
+  <!-- specified by that chain.  Each provide element has a name attribute, -->
+  <!-- which matches the name of a block defined in this file.  It also -->
+  <!-- has a role attribute.  This attribute is the string by which the -->
+  <!-- enclosing block will identify the required block. -->
+  <!-- -->
+
+  <!-- The James block  -->
+  <block name="James" class="org.apache.james.James" >
+
+    <!-- Specify which components will provide the services required by this
+    block. The roles are specified in the code and the .xinfo file. The names
+    here must match the names specified for a Block in this xml file.   -->
+    <provide name="dnsserver" role="org.apache.james.services.DNSServer"/>
+    <provide name="mailstore" role="org.apache.avalon.cornerstone.services.store.Store"/>
+    <provide name="users-store" role="org.apache.james.services.UsersStore"/>
+    <provide name="localusersrepository" role="org.apache.james.services.UsersRepository"/>
+    <provide name="spoolrepository" role="org.apache.james.services.SpoolRepository"/>
+    <provide name="filesystem" role="org.apache.james.services.FileSystem" />
+    <provide name="domainlist" role="org.apache.james.services.DomainList" />
+    <provide name="sockets"
+             role="org.apache.avalon.cornerstone.services.sockets.SocketManager"/>
+    <provide name="scheduler"
+             role="org.apache.avalon.cornerstone.services.scheduler.TimeScheduler"/>
+    <provide name="database-connections"
+             role="org.apache.avalon.cornerstone.services.datasources.DataSourceSelector"
/>
+    <provide name="mailboxmanager"
+             role="org.apache.james.mailboxmanager.manager.MailboxManagerProvider" />
        
+  </block>
+
+    
+  <block name="mailboxmanager" class="org.apache.james.mailboxmanager.impl.DefaultMailboxManagerProvider">
+      <provide name="filesystem" role="org.apache.james.services.FileSystem" />   

+  </block>  
+   
+  <!-- The James Spool Manager block  -->
+  <block name="spoolmanager" class="org.apache.james.transport.JamesSpoolManager" >
+    <provide name="spoolrepository" role="org.apache.james.services.SpoolRepository"/>
+    <provide name="matcherpackages" role="org.apache.james.services.MatcherLoader"/>
+    <provide name="mailetpackages" role="org.apache.james.services.MailetLoader"/>
+  </block>
+
+  <block name="matcherpackages" class="org.apache.james.transport.JamesMatcherLoader"
>
+    <provide name="James" role="org.apache.mailet.MailetContext"/>
+    <provide name="filesystem" role="org.apache.james.services.FileSystem" />
+  </block>
+
+  <block name="mailetpackages" class="org.apache.james.transport.JamesMailetLoader" >
+    <provide name="James" role="org.apache.mailet.MailetContext"/>
+    <provide name="filesystem" role="org.apache.james.services.FileSystem" />
+  </block>
+
+  <block name="dnsserver" class="org.apache.james.dnsserver.DNSServer" />
+
+  <!-- The Spool Management block  -->
+  <block name="spoolmanagement" class="org.apache.james.management.SpoolManagement" >
+      <provide name="mailstore" role="org.apache.avalon.cornerstone.services.store.Store"/>
+  </block>
+  
+  <block name="processormanagement" class="org.apache.james.management.ProcessorManagement"
>
+      <provide name="spoolmanager" role="org.apache.james.services.SpoolManager"/>
+  </block>
+
+  <block name="bayesiananalyzermanagement" class="org.apache.james.management.BayesianAnalyzerManagement"
>
+      <provide name="database-connections"
+             role="org.apache.avalon.cornerstone.services.datasources.DataSourceSelector"
/>
+    <provide name="filesystem" role="org.apache.james.services.FileSystem" />
+  </block>
+
+  <block name="remotemanager" class="org.apache.james.remotemanager.RemoteManager" >
+    <provide name="mailstore" role="org.apache.avalon.cornerstone.services.store.Store"/>
+    <provide name="users-store" role="org.apache.james.services.UsersStore"/>
+    <provide name="localusersrepository" role="org.apache.james.services.UsersRepository"/>
+    <provide name="sockets"
+             role="org.apache.avalon.cornerstone.services.sockets.SocketManager"/>
+    <provide name="connections"
+             role="org.apache.james.services.JamesConnectionManager"/>
+    <provide name="James" role="org.apache.james.services.MailServer"/>
+    <provide name="thread-manager"
+             role="org.apache.avalon.cornerstone.services.threads.ThreadManager" />
+    <provide name="spoolmanagement" 
+             role="org.apache.james.services.SpoolManagementService"/>
+    <provide name="bayesiananalyzermanagement"
+             role="org.apache.james.services.BayesianAnalyzerManagementService"/>
+    <provide name="dnsserver" role="org.apache.james.services.DNSServer"/>
+    <provide name="processormanagement" role="org.apache.james.services.ProcessorManagementService"/>
+    <provide name="virtualusertablemanagement" role="org.apache.james.services.VirtualUserTableManagementService"/>
+    <provide name="domainlistmanagement" role="org.apache.james.services.DomainListManagementService"/>
+</block>
+
+  <!-- The User Management block  -->
+  <block name="usermanagement" class="org.apache.james.management.UserManagement" >
+    <provide name="localusersrepository" role="org.apache.james.services.UsersRepository"/>
+    <provide name="users-store" role="org.apache.james.services.UsersStore"/>
+  </block>
+    
+    <!-- IMAP Server -->
+  <block name="imap-connections"
+         class="org.apache.james.util.connection.SimpleConnectionManager" >
+    <provide name="thread-manager"
+             role="org.apache.avalon.cornerstone.services.threads.ThreadManager" />
+  </block>  
+    
+  <block name="imapserver" class="org.apache.james.imapserver.ImapServer" >
+    <provide name="localusersrepository" role="org.apache.james.services.UsersRepository"/>
+    <provide name="sockets"
+             role="org.apache.avalon.cornerstone.services.sockets.SocketManager"/>
+    <provide name="imap-connections"
+             role="org.apache.james.services.JamesConnectionManager"/>
+    <provide name="James" role="org.apache.james.services.MailServer"/>
+    <provide name="thread-manager"
+             role="org.apache.avalon.cornerstone.services.threads.ThreadManager" />
+    <provide name="mailboxmanager"
+             role="org.apache.james.mailboxmanager.manager.MailboxManagerProvider" />
   
+    <provide name="dnsserver" role="org.apache.james.services.DNSServer"/>    
+  </block>      
+    
+  <!-- POP3 Server -->
+  <block name="pop3server" class="org.apache.james.pop3server.POP3Server" >
+    <provide name="localusersrepository" role="org.apache.james.services.UsersRepository"/>
+    <provide name="sockets"
+             role="org.apache.avalon.cornerstone.services.sockets.SocketManager"/>
+    <provide name="connections"
+             role="org.apache.james.services.JamesConnectionManager"/>
+    <provide name="James" role="org.apache.james.services.MailServer"/>
+    <provide name="thread-manager"
+             role="org.apache.avalon.cornerstone.services.threads.ThreadManager" />
+    <provide name="dnsserver" role="org.apache.james.services.DNSServer"/>
+  </block>
+
+  <!-- SMTP Server -->
+  <block name="smtpserver" class="org.apache.james.smtpserver.SMTPServer" >
+    <provide name="James" role="org.apache.mailet.MailetContext"/>
+    <provide name="localusersrepository" role="org.apache.james.services.UsersRepository"/>
+    <provide name="dnsserver" role="org.apache.james.services.DNSServer"/>
+    <provide name="sockets"
+             role="org.apache.avalon.cornerstone.services.sockets.SocketManager"/>
+    <provide name="connections"
+             role="org.apache.james.services.JamesConnectionManager"/>
+    <provide name="James" role="org.apache.james.services.MailServer"/>
+    <provide name="thread-manager"
+             role="org.apache.avalon.cornerstone.services.threads.ThreadManager" />
+    <provide name="database-connections"
+             role="org.apache.avalon.cornerstone.services.datasources.DataSourceSelector"
/>
+    <provide name="filesystem" role="org.apache.james.services.FileSystem" />
+    <provide name="defaultvirtualusertable"
+             role="org.apache.james.services.VirtualUserTable" />
+  </block>
+
+  <!-- NNTP Server -->
+  <block name="nntpserver" class="org.apache.james.nntpserver.NNTPServer" >
+    <provide name="localusersrepository" role="org.apache.james.services.UsersRepository"/>
+    <provide name="sockets"
+             role="org.apache.avalon.cornerstone.services.sockets.SocketManager"/>
+    <provide name="connections"
+             role="org.apache.james.services.JamesConnectionManager"/>
+    <provide name="nntp-repository"
+             role="org.apache.james.nntpserver.repository.NNTPRepository"/>
+    <provide name="thread-manager"
+             role="org.apache.avalon.cornerstone.services.threads.ThreadManager" />
+    <provide name="dnsserver" role="org.apache.james.services.DNSServer"/>
+    <provide name="James" role="org.apache.james.services.MailServer"/>
+  </block>
+
+  <!-- NNTP Repository -->
+  <block name="nntp-repository" class="org.apache.james.nntpserver.repository.NNTPRepositoryImpl">
+    <provide name="filesystem" role="org.apache.james.services.FileSystem" />
+  </block>
+
+  <!-- FetchMail Service -->
+  <block name="fetchmail" class="org.apache.james.fetchmail.FetchScheduler" >
+    <provide name="scheduler"
+             role="org.apache.avalon.cornerstone.services.scheduler.TimeScheduler"/> 
+    <provide name="James" role="org.apache.james.services.MailServer"/>      
+    <provide name="localusersrepository" role="org.apache.james.services.UsersRepository"/>
+    <provide name="dnsserver" role="org.apache.james.services.DNSServer"/>
+  </block>
+  
+  <!-- JMS Service 
+  EXPERIMENTAL JMS Service: uncomment before use
+  <block name="jms" class="org.apache.james.phoenix.jms.activemq.JMSService" >
+    <provide name="James" role="org.apache.james.services.MailServer"/>   
+  </block>
+  -->
+
+  <!-- The High Level Storage block -->
+    
+  <block name="mailstore" class="org.apache.james.core.AvalonMailStore" >
+    <provide name="database-connections"
+             role="org.apache.avalon.cornerstone.services.datasources.DataSourceSelector"
/>
+    <provide name="filesystem" role="org.apache.james.services.FileSystem" />     
+  </block>  
+        
+  <!-- The main SpoolRepository -->
+  <block name="spoolrepository" class="org.apache.james.mailrepository.MailStoreSpoolRepository"
>
+    <provide name="mailstore"
+             role="org.apache.avalon.cornerstone.services.store.Store" />
+  </block>
+
+  <!-- The User Storage block -->
+  <block name="users-store" class="org.apache.james.core.AvalonUsersStore" >
+    <!-- Configure file based user store here, defaults should be fine -->
+    <provide name="mailstore"
+             role="org.apache.avalon.cornerstone.services.store.Store"/>
+    <provide name="database-connections"
+             role="org.apache.avalon.cornerstone.services.datasources.DataSourceSelector"
/>
+    <provide name="filesystem" role="org.apache.james.services.FileSystem" />
+  </block>
+
+  <!-- This is needed to link the smtpserver to the local user repository -->
+  <!-- LocalJamesUsersRepository is used for backward compatibility with James 2.3.0 -->
+  <!-- This is needed to support <usernames> configuraion inside James -->
+  <!-- If backward compatibility is not need the LocalUsersRepository implementaion -->
+  <!-- could be safely used -->
+  <block name="localusersrepository" class="org.apache.james.core.LocalJamesUsersRepository">
+    <provide name="users-store"
+             role="org.apache.james.services.UsersStore"/>
+  </block>
+
+  <!-- The context FileSystem implementation -->
+  <block name="filesystem" class="org.apache.james.context.AvalonFileSystem">
+  </block>
+  
+  <!-- The VirtualUserTable Management block  -->
+  <block name="virtualusertablemanagement" class="org.apache.james.management.VirtualUserTableManagement"
>
+    <provide name="virtualusertable-store" role="org.apache.james.services.VirtualUserTableStore"/>
+    <provide name="defaultvirtualusertable" role="org.apache.james.services.VirtualUserTableManagement"
/>
+  </block>
+  
+  <!-- VirtualUserTable Store -->
+  <block name="virtualusertable-store" class="org.apache.james.core.AvalonVirtualUserTableStore">
+    <provide name="database-connections"
+             role="org.apache.avalon.cornerstone.services.datasources.DataSourceSelector"/>
+    <provide name="filesystem" role="org.apache.james.services.FileSystem"/>
+    <provide name="dnsserver" role="org.apache.james.services.DNSServer"/>
+  </block>
+  
+  <block name="defaultvirtualusertable" class="org.apache.james.core.DefaultVirtualUserTable">
+    <provide name="virtualusertable-store"
+             role="org.apache.james.services.VirtualUserTableStore"/>
+  </block>
+  
+  
+  <!-- ######################################################################## -->
+  <!-- The context domainlist implementation -->
+  <block name="domainlist" class="org.apache.james.domain.XMLDomainList">
+      <provide name="dnsserver" role="org.apache.james.services.DNSServer"/>
+  </block>
+  
+  <!--  JDBC implementation of the domainlist service-->
+  <!--
+  <block name="domainlist" class="org.apache.james.domain.JDBCDomainList">
+      <provide name="database-connections"
+             role="org.apache.avalon.cornerstone.services.datasources.DataSourceSelector"/>
+      <provide name="filesystem" role="org.apache.james.services.FileSystem"/>
+      <provide name="dnsserver" role="org.apache.james.services.DNSServer"/>
+  </block>
+  -->
+  
+  <!-- JDBC VirtualUserTable implementation of the domainlist service -->
+  <!--
+  <block name="domainlist" class="org.apache.james.vut.JDBCVirtualUserTable">
+    <provide name="database-connections"
+             role="org.apache.avalon.cornerstone.services.datasources.DataSourceSelector"/>
+    <provide name="filesystem" role="org.apache.james.services.FileSystem"/>
+    <provide name="dnsserver" role="org.apache.james.services.DNSServer"/>
+  </block>
+  -->
+  
+  <!-- XML VirtualUserTable implementation of the domainlist service -->
+  <!--
+  <block name="domainlist" class="org.apache.james.vut.XMLVirtualUserTable">
+      <provide name="dnsserver" role="org.apache.james.services.DNSServer"/>
+  </block>
+  -->
+  <!-- #################################################################### -->
+  
+  <block name="domainlistmanagement" class="org.apache.james.management.DomainListManagement">
+    <provide name="domainlist"
+             role="org.apache.james.services.DomainList"/>
+  </block>
+  
+  <!-- Configuration for Cornerstone Blocks only after here
+       NOTHING BELOW THIS SHOULD NEED CHANGING,
+       (unless you want secure sockets (TLS)) -->
+
+  <!-- The Connection Manager block -->
+  <block name="connections"
+         class="org.apache.james.util.connection.SimpleConnectionManager" >
+    <provide name="thread-manager"
+             role="org.apache.avalon.cornerstone.services.threads.ThreadManager" />
+  </block>
+
+  <!-- The Socket Manager block -->
+  <block name="sockets"
+         class="org.apache.avalon.cornerstone.blocks.sockets.DefaultSocketManager"/>
+
+  <!-- The Time Scheduler block -->
+  <block name="scheduler"
+         class="org.apache.avalon.cornerstone.blocks.scheduler.DefaultTimeScheduler" >
+    <provide name="thread-manager"
+             role="org.apache.avalon.cornerstone.services.threads.ThreadManager" />
+  </block>
+
+  <!-- The DataSourceSelector block -->
+  <block name="database-connections"
+         class="org.apache.avalon.cornerstone.blocks.datasources.DefaultDataSourceSelector"
/>
+
+  <!-- The ThreadManager block -->
+  <block name="thread-manager"
+         class="org.apache.avalon.cornerstone.blocks.threads.DefaultThreadManager" />
+
+</assembly>

Propchange: geronimo/plugins/james/trunk/geronimo-james/src/test/resources/var/james/config/james-assembly.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/plugins/james/trunk/geronimo-james/src/test/resources/var/james/config/james-assembly.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/plugins/james/trunk/geronimo-james/src/test/resources/var/james/config/james-assembly.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml



Mime
View raw message