incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r734113 [4/6] - in /incubator/sling/whiteboard/fmeschbe/launchpad: ./ app/ app/src/ app/src/main/ app/src/main/assembly/ app/src/main/dist/ app/src/main/dist/bin/ app/src/main/dist/dos/ app/src/main/dist/unix/ app/src/main/java/ app/src/mai...
Date Tue, 13 Jan 2009 12:06:20 GMT
Added: incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/java/org/apache/sling/launcher/app/SlingFelix.java
URL: http://svn.apache.org/viewvc/incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/java/org/apache/sling/launcher/app/SlingFelix.java?rev=734113&view=auto
==============================================================================
--- incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/java/org/apache/sling/launcher/app/SlingFelix.java (added)
+++ incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/java/org/apache/sling/launcher/app/SlingFelix.java Tue Jan 13 04:04:51 2009
@@ -0,0 +1,114 @@
+/*
+ * $Url: $
+ * $Id$
+ *
+ * Copyright 1997-2005 Day Management AG
+ * Barfuesserplatz 6, 4001 Basel, Switzerland
+ * All Rights Reserved.
+ *
+ * This software is the confidential and proprietary information of
+ * Day Management AG, ("Confidential Information"). You shall not
+ * disclose such Confidential Information and shall use it only in
+ * accordance with the terms of the license agreement you entered into
+ * with Day.
+ */
+package org.apache.sling.launcher.app;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.felix.framework.Felix;
+import org.apache.felix.framework.Logger;
+import org.apache.sling.launchpad.base.shared.Loader;
+import org.apache.sling.launchpad.base.shared.Notifiable;
+import org.osgi.framework.BundleException;
+
+public class SlingFelix extends Felix {
+
+    private final Notifiable notifiable;
+    
+    private Notifier notifierThread;
+    
+    public SlingFelix(Notifiable notifiable, Logger arg0, Map<?, ?> arg1, List<?> arg2) {
+        super(arg0, arg1, arg2);
+        this.notifiable = notifiable;
+    }
+
+    public SlingFelix(Notifiable notifiable, Map<?, ?> arg1, List<?> arg2) {
+        super(arg1, arg2);
+        this.notifiable = notifiable;
+    }
+
+    @Override
+    public void update() throws BundleException {
+        update(null);
+    }
+    
+    @Override
+    public void update(InputStream is) throws BundleException {
+        // get the update file
+        startNotifier(true, is);
+        
+        // just stop the framework now
+        super.stop();
+    }
+    
+    @Override
+    public void stop() throws BundleException {
+        startNotifier(false, null);
+        super.stop();
+    }
+
+    public void stop(int status) throws BundleException {
+        startNotifier(false, null);
+        super.stop(/*TODO status*/);
+    }
+    
+    private synchronized void startNotifier(boolean restart, InputStream ins) {
+        if (notifierThread == null) {
+            notifierThread = new Notifier(restart, ins);
+            notifierThread.setDaemon(false);
+            notifierThread.start();
+        }
+    }
+    
+    private class Notifier extends Thread {
+
+        private final boolean restart;
+        
+        private final File updateFile;
+        
+        private Notifier(boolean restart, InputStream ins) {
+            super("Sling Notifier");
+            this.restart = restart;
+            
+            if (ins != null) {
+                File tmpFile;
+                try {
+                    tmpFile = File.createTempFile("slingupdate", ".jar");
+                    Loader.spool(ins, tmpFile);
+                } catch (IOException ioe) {
+                    // TOOD: log
+                    tmpFile = null;
+                }
+                updateFile = tmpFile;
+            } else {
+                updateFile = null;
+            }
+        }
+        
+        @Override
+        public void run() {
+            stopAndWait();
+            
+            if (restart) {
+                notifiable.updated(updateFile);
+            } else {
+                notifiable.stopped();
+            }
+        }
+    }
+}

Propchange: incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/java/org/apache/sling/launcher/app/SlingFelix.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/java/org/apache/sling/launcher/app/SlingFelix.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev Url

Added: incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/java/org/apache/sling/launchpad/base/main/SlingMain.java
URL: http://svn.apache.org/viewvc/incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/java/org/apache/sling/launchpad/base/main/SlingMain.java?rev=734113&view=auto
==============================================================================
--- incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/java/org/apache/sling/launchpad/base/main/SlingMain.java (added)
+++ incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/java/org/apache/sling/launchpad/base/main/SlingMain.java Tue Jan 13 04:04:51 2009
@@ -0,0 +1,346 @@
+/*
+ * 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.sling.launchpad.base.main;
+
+import static org.apache.felix.framework.util.FelixConstants.LOG_LEVEL_PROP;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.felix.framework.Logger;
+import org.apache.sling.commons.log.LogManager;
+import org.apache.sling.launcher.app.ClassLoaderResourceProvider;
+import org.apache.sling.launcher.app.ResourceProvider;
+import org.apache.sling.launcher.app.Sling;
+import org.apache.sling.launchpad.base.shared.Launcher;
+import org.apache.sling.launchpad.base.shared.Notifiable;
+import org.osgi.framework.BundleException;
+import org.osgi.framework.Constants;
+
+/**
+ * The <code>Main</code> class is a simple Java Application which interprests
+ * the command line and creates the {@link Sling} launcher class and thus starts
+ * the OSGi framework. In addition a shutdown thread is registered to ensure
+ * proper shutdown on VM termination.
+ * <p>
+ * The supported command line options are:
+ * <dl>
+ * <dt>-l loglevel</dt>
+ * <dd>Sets the initial loglevel as an integer in the range 0 to 4 or as one of
+ * the well known level strings FATAL, ERROR, WARN, INFO or DEBUG. This option
+ * overwrites the <code>org.apache.sling.osg.log.level</code> setting the
+ * <code>sling.properties</code> file.</dd>
+ * <dt>-f logfile</dt>
+ * <dd>The log file, \"-\" for stdout (default logs/error.log). This option
+ * overwrites the <code>org.apache.sling.osg.log.file</code> setting the
+ * <code>sling.properties</code> file.</dd>
+ * <dt>-c slinghome</dt>
+ * <dd>The directory in which Sling locates its initial configuration file
+ * <code>sling.properties</code> and where files of Sling itself such as the
+ * Apache Felix bundle archive or the JCR repository files are stored (default
+ * sling).</dd>
+ * <dt>-a address</dt>
+ * <dd>The interfact to bind to (use 0.0.0.0 for any). This option is not
+ * implemented yet.</dd>
+ * <dt>-p port</dt>
+ * <dd>The port to listen (default 8080) to handle HTTP requests. This option
+ * overwrites the <code>org.osgi.service.http.port</code> setting the
+ * <code>sling.properties</code> file.</dd>
+ * <dt>-h</dt>
+ * <dd>Prints a simple usage message listing all available command line
+ * options.</dd>
+ * </dl>
+ */
+public class SlingMain implements Launcher {
+
+    /** Mapping between log level numbers and names */
+    private static final String[] logLevels = { "FATAL", "ERROR", "WARN",
+        "INFO", "DEBUG" };
+
+    /** The Sling configuration property name setting the initial log level */
+    private static final String PROP_LOG_LEVEL = LogManager.LOG_LEVEL;
+
+    /** The Sling configuration property name setting the initial log file */
+    private static final String PROP_LOG_FILE = LogManager.LOG_FILE;
+
+    /** Default log level setting if no set on command line (value is "INFO"). */
+    private static final int DEFAULT_LOG_LEVEL = Logger.LOG_INFO;
+
+    /**
+     * The configuration property setting the port on which the HTTP service
+     * listens
+     */
+    private static final String PROP_PORT = "org.osgi.service.http.port";
+
+    /** The default port on which the HTTP service listens. */
+    private static final String DEFAULT_PORT = "8080";
+
+    /**
+     * The property value to export the Servlet API 2.5 from the system
+     * bundle.
+     */
+    private static final String SERVLET_API_EXPORT =
+        "javax.servlet;javax.servlet.http;javax.servlet.resources; version=2.5";
+
+    private Notifiable notifiable;
+    
+    /** The parsed command line mapping (Sling) option name to option value */
+    private Map<String, String> commandLine;
+    
+    private String slingHome;
+
+    private Sling sling;
+    
+    public void setNotifiable(Notifiable notifiable) {
+        this.notifiable = notifiable;
+    }
+    
+    public void setCommandLine(String[] args) {
+        commandLine = new HashMap<String, String>();
+        commandLine.put(PROP_PORT, DEFAULT_PORT);
+        parseCommandLine(args, commandLine);
+    }
+
+    public void setSlingHome(String slingHome) {
+        this.slingHome = slingHome;
+    }
+    
+    public boolean start() {
+        
+        Map<String, String> props = new HashMap<String, String>();
+
+        // parse the command line (exit in case of failure)
+        if (commandLine == null) {
+            setCommandLine(new String[0]);
+        }
+
+        // if sling.home was set on the command line, set it in the properties
+        if (slingHome != null) {
+            props.put(Sling.SLING_HOME, slingHome);
+        } else if (commandLine.containsKey(Sling.SLING_HOME)) {
+            props.put(Sling.SLING_HOME, commandLine.get(Sling.SLING_HOME));
+        }
+
+        // set up and configure Felix Logger
+        int logLevel;
+        if (!commandLine.containsKey(PROP_LOG_LEVEL)) {
+            logLevel = DEFAULT_LOG_LEVEL;
+        } else {
+            logLevel = toLogLevelInt(commandLine.get(PROP_LOG_LEVEL),
+                DEFAULT_LOG_LEVEL);
+            commandLine.put(LOG_LEVEL_PROP, String.valueOf(logLevel));
+        }
+        Logger logger = new Logger();
+
+        // prevent tons of needless WARN from the framework
+        logger.setLogLevel(Logger.LOG_ERROR);
+
+        try {
+            ResourceProvider resProvider = new ClassLoaderResourceProvider(
+                SlingMain.class.getClassLoader());
+            
+            // creating the instance launches the framework and we are done here ..
+            sling = new Sling(notifiable, logger, resProvider, props) {
+            	
+                // overwrite the loadPropertiesOverride method to inject the command
+                // line arguments unconditionally. These will not be persisted in any
+                // properties file, though
+                protected void loadPropertiesOverride(
+                        Map<String, String> properties) {
+                    if (commandLine != null) {
+                        properties.putAll(commandLine);
+                    }
+
+                    // add Servlet API to the system bundle exports
+                    String sysExport = properties.get(Constants.FRAMEWORK_SYSTEMPACKAGES);
+                    if (sysExport == null) {
+                        sysExport = SERVLET_API_EXPORT;
+                    } else {
+                        sysExport += "," + SERVLET_API_EXPORT;
+                    }
+                    properties.put(Constants.FRAMEWORK_SYSTEMPACKAGES,
+                        sysExport);
+                }
+            };
+            
+            // we successfully started it
+            return true;
+
+        } catch (BundleException be) {
+            log("Failed to Start OSGi framework");
+            be.printStackTrace(System.err);
+        }
+
+        // we failed to start
+        return false;
+    }
+
+    public void stop() {
+        if (sling != null) {
+            sling.destroy();
+            sling = null;
+        }
+    }
+
+    /**
+     * Parses the command line in <code>args</code> and sets appropriate Sling
+     * configuration options in the <code>props</code> map.
+     */
+    private static void parseCommandLine(String[] args,
+            Map<String, String> props) {
+        for (int argc = 0; argc < args.length; argc++) {
+            String arg = args[argc];
+            if (arg.startsWith("-")) {
+
+                // require at least another character naming the option
+                if (arg.length() != 2) {
+                    usage("Missing option name", 1);
+                }
+
+                // option argument is following the current option
+                argc++;
+                String value = argc < args.length ? args[argc] : null;
+
+                switch (arg.charAt(1)) {
+                    case 'l':
+                        if (value == null) {
+                            usage("Missing log level value", 1);
+                            continue;
+                        }
+                        try {
+                            int logLevel = Integer.parseInt(value);
+                            value = toLogLevel(logLevel);
+                        } catch (NumberFormatException nfe) {
+                            // might be a log level string
+                            value = checkLogLevel(value);
+                        }
+                        if (value != null) {
+                            props.put(PROP_LOG_LEVEL, value);
+                        }
+                        break;
+
+                    case 'f':
+                        if (value == null) {
+                            usage("Missing log file value", 1);
+                            continue;
+                        } else if ("-".equals(value)) {
+                            value = "";
+                        }
+                        props.put(PROP_LOG_FILE, value);
+                        break;
+
+                    case 'c':
+                        if (value == null) {
+                            usage("Missing directory value", 1);
+                            continue;
+                        }
+                        props.put(Sling.SLING_HOME, value);
+                        break;
+
+                    case 'p':
+                        if (value == null) {
+                            usage("Missing port value", 1);
+                            continue;
+                        }
+                        try {
+                            // just to verify it is a number
+                            Integer.parseInt(value);
+                            props.put(PROP_PORT, value);
+                        } catch (RuntimeException e) {
+                            usage("Bad port: " + value, 1);
+                        }
+                        break;
+
+                    case 'a':
+                        if (value == null) {
+                            usage("Missing address value", 1);
+                            continue;
+                        }
+                        log("Setting the address to bind to is not supported, binding to 0.0.0.0");
+                        break;
+
+                    case 'h':
+                        usage(null, 0);
+
+                    default:
+                        usage("Unrecognized option " + arg, 1);
+                        break;
+                }
+            }
+        }
+    }
+
+    /** prints a simple usage plus optional error message and exists with code */
+    private static void usage(String message, int code) {
+        if (message != null) {
+            log(message);
+            log("");
+        }
+
+        log("usage: "
+            + SlingMain.class.getName()
+            + " [ -l loglevel ] [ -f logfile ] [ -c slinghome ] [ -a address ] [ -p port ] [ -h ]");
+
+        log("    -l loglevel   the initial loglevel (0..4, FATAL, ERROR, WARN, INFO, DEBUG)");
+        log("    -f logfile    the log file, \"-\" for stdout (default logs/error.log)");
+        log("    -c slinghome  the sling context directory (default sling)");
+        log("    -a address    the interfact to bind to (use 0.0.0.0 for any) (not supported yet)");
+        log("    -p port       the port to listen to (default 8080)");
+        log("    -h            prints this usage message");
+
+        // exiting now
+        System.exit(code);
+    }
+
+    /** Writes the message to stderr output */
+    private static void log(String message) {
+        System.err.println(message);
+    }
+
+    /** Converts the loglevel code to a loglevel string name */
+    private static String toLogLevel(int level) {
+        if (level >= 0 && level < logLevels.length) {
+            return logLevels[level];
+        }
+
+        usage("Bad log level: " + level, 1);
+        return null;
+    }
+
+    /** Verifies the log level is one of the known values, returns null otherwise */
+    private static String checkLogLevel(String level) {
+        for (int i = 0; i < logLevels.length; i++) {
+            if (logLevels[i].equalsIgnoreCase(level)) {
+                return logLevels[i];
+            }
+        }
+
+        usage("Bad log level: " + level, 1);
+        return null;
+    }
+
+    /** Return the log level code for the string */
+    private static int toLogLevelInt(String level, int defaultLevel) {
+        for (int i = 0; i < logLevels.length; i++) {
+            if (logLevels[i].equalsIgnoreCase(level)) {
+                return i;
+            }
+        }
+
+        return defaultLevel;
+    }
+}

Propchange: incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/java/org/apache/sling/launchpad/base/main/SlingMain.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/java/org/apache/sling/launchpad/base/main/SlingMain.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev Url

Added: incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/java/org/apache/sling/launchpad/base/shared/Launcher.java
URL: http://svn.apache.org/viewvc/incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/java/org/apache/sling/launchpad/base/shared/Launcher.java?rev=734113&view=auto
==============================================================================
--- incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/java/org/apache/sling/launchpad/base/shared/Launcher.java (added)
+++ incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/java/org/apache/sling/launchpad/base/shared/Launcher.java Tue Jan 13 04:04:51 2009
@@ -0,0 +1,38 @@
+/*
+ * 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.sling.launchpad.base.shared;
+
+public interface Launcher {
+
+    public void setSlingHome(String slingHome);
+    
+    public void setNotifiable(Notifiable notifiable);
+
+    public void setCommandLine(String[] args);
+
+    // starts the framework
+    // sets command line arguments, mainly used by the main class
+    public boolean start();
+
+    // stops the framework
+    // this method only returns when the framework has actually been stopped.
+    // this method may be used by the main class or servlet to initiate a
+    // shutdown of the framework
+    public void stop();
+}

Propchange: incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/java/org/apache/sling/launchpad/base/shared/Launcher.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/java/org/apache/sling/launchpad/base/shared/Launcher.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev Url

Added: incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/java/org/apache/sling/launchpad/base/shared/Loader.java
URL: http://svn.apache.org/viewvc/incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/java/org/apache/sling/launchpad/base/shared/Loader.java?rev=734113&view=auto
==============================================================================
--- incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/java/org/apache/sling/launchpad/base/shared/Loader.java (added)
+++ incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/java/org/apache/sling/launchpad/base/shared/Loader.java Tue Jan 13 04:04:51 2009
@@ -0,0 +1,177 @@
+/*
+ * 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.sling.launchpad.base.shared;
+
+import java.beans.Introspector;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.net.URLConnection;
+
+public class Loader {
+
+    public static final String LAUNCHER_JAR_REL_PATH = "slinglauncher.jar";
+
+    public static final String SLING_HOME_DEFAULT = "sling";
+
+    public static final String DEFAULT_SLING_MAIN = "org.apache.sling.launchpad.base.main.SlingMain";
+
+    public static final String DEFAULT_SLING_SERVLET = "org.apache.sling.launchpad.base.webapp.SlingServlet";
+
+    public static final String DEFAULT_SLING_LAUNCHER_JAR = "/resources/org.apache.sling.launchpad.base-2.0.3-incubator-SNAPSHOT.jar";
+
+    /**
+     * Creates an URLClassLoader from a _launcher JAR_ file in the given
+     * slingHome directory and loads and returns the launcher class identified
+     * by the launcherClassName.
+     * 
+     * @param launcherClassName The fully qualified name of a class implementing
+     *            the Launcher interface. This class must have a public
+     *            constructor taking no arguments.
+     * @param slingHome The value to be used as ${slingHome}. This may be null
+     *            in which case the sling folder in the current working
+     *            directory is assumed. If this name is empty, the current
+     *            working directory is assumed to be used as ${slingHome}.
+     * @return the Launcher instance loaded from the newly created classloader
+     * @throws NullPointerException if launcherClassName is null
+     * @throws IllegalArgumentException if the launcherClassName cannot be
+     *             instantiated. The cause of the failure is contained as the
+     *             cause of the exception.
+     */
+    public static Object loadLauncher(String launcherClassName, String slingHome) {
+
+        File launcherJarFile = getLauncherJarFile(slingHome);
+        if (!launcherJarFile.canRead()) {
+            throw new IllegalArgumentException("Sling Launcher JAR "
+                + launcherJarFile + " cannot is not accessible");
+        }
+
+        URL launcherJarURL;
+        try {
+            launcherJarURL = launcherJarFile.toURL();
+        } catch (MalformedURLException e) {
+            throw new IllegalArgumentException(
+                "Cannot create an URL from the Sling Launcher JAR path name", e);
+        }
+
+        ClassLoader loader = new URLClassLoader(new URL[] { launcherJarURL },
+            Loader.class.getClassLoader());
+
+        try {
+            Class<?> launcherClass = loader.loadClass(launcherClassName);
+            return launcherClass.newInstance();
+        } catch (ClassNotFoundException cnfe) {
+            throw new IllegalArgumentException("Cannot find class "
+                + launcherClassName + " in " + launcherJarFile, cnfe);
+        } catch (InstantiationException e) {
+            throw new IllegalArgumentException(
+                "Cannot instantiate launcher class " + launcherClassName, e);
+        } catch (IllegalAccessException e) {
+            throw new IllegalArgumentException(
+                "Cannot access constructor of class " + launcherClassName, e);
+        }
+    }
+
+    /**
+     * Tries to remove as many traces of class loaded by the framework from the
+     * Java VM as possible. Most notably the following traces are removed:
+     * <ul>
+     * <li>JavaBeans property caches
+     * <li>Java Logging caches
+     * </ul>
+     * <p>
+     * This method must be called when the notifier is called.
+     */
+    public static void cleanupVM() {
+
+        // ensure the JavaBeans introspector lets go of any classes it
+        // may haved cached after introspection
+        Introspector.flushCaches();
+
+    }
+
+    public static boolean installLauncherJar(URL launcherJar, String slingHome)
+            throws IOException {
+        File launcherJarDestFile = getLauncherJarFile(slingHome);
+
+        // check whether we have to overwrite
+        URLConnection launcherJarConn = launcherJar.openConnection();
+        long lastModifTime = launcherJarConn.getLastModified();
+        if (launcherJarDestFile.exists()) {
+            if (lastModifTime <= launcherJarDestFile.lastModified()) {
+                return false;
+            }
+            launcherJarDestFile.delete();
+        }
+
+        spool(launcherJarConn.getInputStream(), launcherJarDestFile);
+
+        launcherJarDestFile.setLastModified(lastModifTime);
+        return true;
+    }
+
+    public static void spool(InputStream ins, File destFile) throws IOException {
+        OutputStream out = null;
+        try {
+            out = new FileOutputStream(destFile);
+            byte[] buf = new byte[8192];
+            int rd;
+            while ((rd = ins.read(buf)) >= 0) {
+                out.write(buf, 0, rd);
+            }
+        } finally {
+            if (ins != null) {
+                try {
+                    ins.close();
+                } catch (IOException ignore) {
+                }
+            }
+            if (out != null) {
+                try {
+                    out.close();
+                } catch (IOException ignore) {
+                }
+            }
+        }
+    }
+
+    private static File getLauncherJarFile(String slingHome) {
+        if (slingHome == null) {
+            slingHome = SLING_HOME_DEFAULT;
+        }
+
+        File slingDir = new File(slingHome).getAbsoluteFile();
+        if (slingDir.exists()) {
+            if (!slingDir.isDirectory()) {
+                throw new IllegalArgumentException("Sling Home " + slingDir
+                    + " exists but is not a directory");
+            }
+        } else if (!slingDir.mkdirs()) {
+            throw new IllegalArgumentException("Sling Home " + slingDir
+                + " cannot be created as a directory");
+        }
+
+        return new File(slingDir, LAUNCHER_JAR_REL_PATH);
+    }
+}

Propchange: incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/java/org/apache/sling/launchpad/base/shared/Loader.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/java/org/apache/sling/launchpad/base/shared/Loader.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev Url

Added: incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/java/org/apache/sling/launchpad/base/shared/Notifiable.java
URL: http://svn.apache.org/viewvc/incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/java/org/apache/sling/launchpad/base/shared/Notifiable.java?rev=734113&view=auto
==============================================================================
--- incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/java/org/apache/sling/launchpad/base/shared/Notifiable.java (added)
+++ incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/java/org/apache/sling/launchpad/base/shared/Notifiable.java Tue Jan 13 04:04:51 2009
@@ -0,0 +1,29 @@
+/*
+ * 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.sling.launchpad.base.shared;
+
+import java.io.File;
+
+public interface Notifiable {
+
+    void stopped();
+
+    void updated(File tmpFile);
+
+}

Propchange: incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/java/org/apache/sling/launchpad/base/shared/Notifiable.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/java/org/apache/sling/launchpad/base/shared/Notifiable.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev Url

Added: incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/java/org/apache/sling/launchpad/base/webapp/SlingBridge.java
URL: http://svn.apache.org/viewvc/incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/java/org/apache/sling/launchpad/base/webapp/SlingBridge.java?rev=734113&view=auto
==============================================================================
--- incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/java/org/apache/sling/launchpad/base/webapp/SlingBridge.java (added)
+++ incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/java/org/apache/sling/launchpad/base/webapp/SlingBridge.java Tue Jan 13 04:04:51 2009
@@ -0,0 +1,64 @@
+/*
+ * 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.sling.launchpad.base.webapp;
+
+import java.util.Map;
+
+import org.apache.felix.framework.Logger;
+import org.apache.sling.launcher.app.ResourceProvider;
+import org.apache.sling.launcher.app.Sling;
+import org.apache.sling.launchpad.base.shared.Notifiable;
+import org.eclipse.equinox.http.servlet.internal.Activator;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleException;
+
+/**
+ * The <code>SlingBridge</code> extends the base <code>Sling</code> class
+ * calling the Eclipse Equinox Http Service activator for the proxy servlet to
+ * be able to handle requests.
+ */
+public class SlingBridge extends Sling {
+
+    // The Equinox Http Service activator
+    private BundleActivator httpServiceActivator;
+
+    public SlingBridge(Notifiable notifiable, Logger logger,
+            ResourceProvider resourceProvider, Map<String, String> propOverwrite)
+            throws BundleException {
+        super(notifiable, logger, resourceProvider, propOverwrite);
+    }
+
+    @Override
+    protected void doStartBundle() throws Exception {
+        // activate the HttpService
+        this.httpServiceActivator = new Activator();
+        this.httpServiceActivator.start(this.getBundleContext());
+    }
+
+    @Override
+    protected void doStopBundle() {
+        if (this.httpServiceActivator != null) {
+            try {
+                this.httpServiceActivator.stop(this.getBundleContext());
+            } catch (Exception e) {
+                logger.log(Logger.LOG_ERROR,
+                    "Unexpected problem stopping HttpService", e);
+            }
+            this.httpServiceActivator = null;
+        }
+    }
+}

Propchange: incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/java/org/apache/sling/launchpad/base/webapp/SlingBridge.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/java/org/apache/sling/launchpad/base/webapp/SlingBridge.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev Url

Added: incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/java/org/apache/sling/launchpad/base/webapp/SlingServlet.java
URL: http://svn.apache.org/viewvc/incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/java/org/apache/sling/launchpad/base/webapp/SlingServlet.java?rev=734113&view=auto
==============================================================================
--- incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/java/org/apache/sling/launchpad/base/webapp/SlingServlet.java (added)
+++ incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/java/org/apache/sling/launchpad/base/webapp/SlingServlet.java Tue Jan 13 04:04:51 2009
@@ -0,0 +1,550 @@
+/*
+ * 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.sling.launchpad.base.webapp;
+
+import static org.apache.felix.framework.util.FelixConstants.LOG_LEVEL_PROP;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+
+import javax.servlet.GenericServlet;
+import javax.servlet.Servlet;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.felix.framework.Logger;
+import org.apache.sling.launcher.app.ClassLoaderResourceProvider;
+import org.apache.sling.launcher.app.ResourceProvider;
+import org.apache.sling.launcher.app.Sling;
+import org.apache.sling.launchpad.base.shared.Launcher;
+import org.apache.sling.launchpad.base.shared.Notifiable;
+import org.eclipse.equinox.http.servlet.HttpServiceServlet;
+import org.osgi.framework.BundleException;
+import org.osgi.framework.ServiceReference;
+
+/**
+ * The <code>SlingServlet</code> serves as a basic servlet for Project Sling.
+ * The tasks of this servlet are as follows:
+ * <ul>
+ * <li>The {@link #init()} method launches Apache <code>Felix</code> as the
+ * OSGi framework implementation we use.
+ * <li>Registers as a service listener interested for services of type
+ * <code>javax.servlet.Servlet</code>.
+ * <li>Handles requests by delegating to a servlet which is expected to be
+ * registered with the framework as a service of type
+ * <code>javax.servlet.Servlet</code>. If no delegatee servlet has been
+ * registered request handlings results in a temporary unavailability of the
+ * servlet.
+ * </ul>
+ * <p>
+ * <b>Request Handling</b>
+ * <p>
+ * This servlet handles request by forwarding to a delegatee servlet. The
+ * delegatee servlet is automatically retrieved from the service registry by the
+ * {@link #getDelegatee()}. This method also makes sure, the such a servlet
+ * actually exits by throwing an <code>UnvailableException</code> if not and
+ * also makes sure the servlet is initialized.
+ * <p>
+ * <b>Launch Configuration</b>
+ * <p>
+ * The Apache <code>Felix</code> framework requires configuration parameters
+ * to be specified for startup. This servlet builds the list of parameters from
+ * three locations:
+ * <ol>
+ * <li>The <code>com/day/osgi/servlet/SlingServlet.properties</code> is read
+ * from the servlet class path. This properties file contains default settings.</li>
+ * <li>Extensions of this servlet may provide additional properties to be
+ * loaded overwriting the {@link #loadConfigProperties()} method.
+ * <li>Finally, web application init parameters are added to the properties and
+ * may overwrite existing properties of the same name(s).
+ * </ol>
+ * <p>
+ * After loading all properties, variable substitution takes place on the
+ * property values. A variable is indicated as <code>${&lt;prop-name&gt;}</code>
+ * where <code>&lt;prop-name&gt;</code> is the name of a system or
+ * configuration property (configuration properties override system properties).
+ * Variables may be nested and are resolved from inner-most to outer-most. For
+ * example, the property value <code>${outer-${inner}}</code> is resolved by
+ * first resolving <code>${inner}</code> and then resolving the property whose
+ * name is the catenation of <code>outer-</code> and the result of resolving
+ * <code>${inner}</code>.
+ * <p>
+ * <b>Logging</b>
+ * <p>
+ * This servlet logs through the servlet container logging mechanism by calling
+ * the <code>GenericServlet.log</code> methods. Bundles launched within the
+ * framework provided by this servlet may use whatever logging mechanism they
+ * choose to use. The Day Commons OSGI Log Bundle provides an OSGi Log Service
+ * implementation, which also provides access to Apache Commons Logging, SLF4J
+ * and Log4J logging. It is recommended that this bundle is used to setup and
+ * configure logging for systems based on this servlet.
+ */
+public class SlingServlet extends GenericServlet implements Launcher {
+
+    /** Pseduo class version ID to keep the IDE quite. */
+    private static final long serialVersionUID = 1L;
+
+    /** Mapping between log level numbers and names */
+    private static final String[] logLevels = { "FATAL", "ERROR", "WARN",
+        "INFO", "DEBUG" };
+
+    /**
+     * The Sling configuration property name setting the initial log level
+     * (corresponds to LogbackManager.LOG_LEVEL constant)
+     */
+    private static final String PROP_LOG_LEVEL = "org.apache.sling.commons.log.level";
+
+    /**
+     * The name of the configuration property defining the obr repository.
+     */
+    private static final String OBR_REPOSITORY_URL = "obr.repository.url";
+    
+    /**
+     * Flag set by the {@link #destroy()} method to indicate the servlet has
+     * been destroyed. This flag is used by the {@link #startSling(String)}
+     * method to check whether the SlingServlet has been destroyed while Sling
+     * was starting up.
+     */
+    private boolean servletDestroyed = false;
+    
+    /**
+     * The <code>Felix</code> instance loaded on {@link #init()} and stopped
+     * on {@link #destroy()}.
+     */
+    private SlingBridge sling;
+
+    /**
+     * The map of delegatee servlets to which requests are delegated. This map
+     * is managed through the
+     * {@link #serviceChanged(ServiceEvent) service listener} based on servlets
+     * registered.
+     *
+     * @see #getDelegatee()
+     * @see #ungetDelegatee(Object)
+     */
+    private Servlet delegatee;
+
+    private Notifiable notifiable;
+
+    private String slingHome;
+    
+    public void setNotifiable(Notifiable notifiable) {
+        this.notifiable = notifiable;
+    }
+
+    public void setCommandLine(String[] args) {
+        // ignore this for now
+    }
+
+    public void setSlingHome(String slingHome) {
+        this.slingHome = slingHome;
+    }
+    
+    public boolean start() {
+        // might want to log, why we don't start !
+        return false;
+    }
+
+    public void stop() {
+        destroy();
+    }
+
+   /**
+     * Initializes this servlet by loading the framework configuration
+     * properties, starting the OSGi framework (Apache Felix) and exposing the
+     * system bundle context and the <code>Felix</code> instance as servlet
+     * context attributes.
+     *
+     * @throws ServletException if the framework cannot be initialized.
+     */
+    public final void init() throws ServletException {
+        // temporary holders control final setup and ensure proper
+        // disposal in case of setup errors
+        SlingBridge tmpSling = null;
+        Servlet tmpDelegatee = null;
+        
+        try {
+            
+            log("Starting Sling in " + slingHome);
+
+            // read the default parameters
+            Map<String, String> props = loadConfigProperties(slingHome);
+    
+            Logger logger = new ServletContextLogger(getServletContext());
+            ResourceProvider rp = new ServletContextResourceProvider(
+                getServletContext());
+            tmpSling = new SlingBridge(notifiable, logger, rp, props);
+
+            // set up the OSGi HttpService proxy servlet
+            tmpDelegatee = new HttpServiceServlet();
+            tmpDelegatee.init(getServletConfig());
+            
+            // set the fields only if the SlingServlet has no been destroyed
+            // while Sling has been starting up. Otherwise we do not set the
+            // fields and leave the temporary variables assigned to have
+            // them destroyed in the finally clause.
+            if (servletDestroyed) {
+                
+                log("SlingServlet destroyed while starting Sling, shutting Sling down");
+                
+            } else {
+                
+                // set the fields now
+                sling = tmpSling;
+                delegatee = tmpDelegatee;
+                
+                // reset temporary holders to prevent destroyal
+                tmpSling = null;
+                tmpDelegatee = null;
+                
+                log("Sling successfully started in " + slingHome);
+            }
+            
+        } catch (BundleException be) {
+            
+            throw new ServletException("Failed to start Sling in " + slingHome, be);
+            
+        } catch (ServletException se) {
+            
+            throw new ServletException("Failed to start bridge servlet for Sling", se);
+            
+        } catch (Throwable t) {
+            
+            throw new ServletException("Uncaught Failure starting Sling", t);
+            
+        } finally {
+            
+            // clean up temporary fields
+            if (tmpDelegatee != null) {
+                tmpDelegatee.destroy();
+            }
+            if (tmpSling != null) {
+                tmpSling.destroy();
+            }
+        }
+    }
+
+    /**
+     * Services the request by delegating to the delegatee servlet. If no
+     * delegatee servlet is available, a <code>UnavailableException</code> is
+     * thrown.
+     *
+     * @param req the <code>ServletRequest</code> object that contains the
+     *            client's request
+     * @param res the <code>ServletResponse</code> object that will contain
+     *            the servlet's response
+     * @throws UnavailableException if the no delegatee servlet is currently
+     *             available
+     * @throws ServletException if an exception occurs that interferes with the
+     *             servlet's normal operation occurred
+     * @throws IOException if an input or output exception occurs
+     */
+    public final void service(ServletRequest req, ServletResponse res)
+            throws ServletException, IOException {
+
+        // delegate the request to the registered delegatee servlet
+        Servlet delegatee = getDelegatee();
+        if (delegatee == null) {
+            ((HttpServletResponse) res).sendError(HttpServletResponse.SC_NOT_FOUND);
+        } else {
+            delegatee.service(req, res);
+        }
+    }
+
+    /**
+     * Destroys this servlet by shutting down the OSGi framework and hence the
+     * delegatee servlet if one is set at all.
+     */
+    public final void destroy() {
+
+        // set the destroyed flag to signal to the startSling method
+        // that Sling should be terminated immediately
+        servletDestroyed = true;
+        
+        // destroy the delegatee
+        if (delegatee != null) {
+            delegatee.destroy();
+            delegatee = null;
+        }
+
+        // shutdown the Felix container
+        if (sling != null) {
+            sling.destroy();
+            sling = null;
+        }
+
+        // finally call the base class destroy method
+        super.destroy();
+    }
+
+    Servlet getDelegatee() {
+        return delegatee;
+    }
+
+    // ---------- Configuration Loading ----------------------------------------
+
+    /**
+     * Loads the configuration properties in the configuration property file
+     * associated with the framework installation; these properties are
+     * accessible to the framework and to bundles and are intended for
+     * configuration purposes. By default, the configuration property file is
+     * located in the <tt>conf/</tt> directory of the Felix installation
+     * directory and is called "<tt>config.properties</tt>". The
+     * installation directory of Felix is assumed to be the parent directory of
+     * the <tt>felix.jar</tt> file as found on the system class path property.
+     * The precise file from which to load configuration properties can be set
+     * by initializing the "<tt>felix.config.properties</tt>" system
+     * property to an arbitrary URL.
+     * 
+     * @param slingHome The value to be used as the "sling.home" property in the
+     *            returned map. This parameter is expected to be non-<code>null</code>.
+     * @return A <tt>Properties</tt> instance.
+     */
+    private Map<String, String> loadConfigProperties(String slingHome) {
+        // The config properties file is either specified by a system
+        // property or it is in the same directory as the Felix JAR file.
+        // Try to load it from one of these places.
+        Map<String, String> props = new HashMap<String, String>();
+
+        // The following property must start with a comma!
+        final String servletVersion = getServletContext().getMajorVersion() + "." +
+                                      getServletContext().getMinorVersion();
+        props.put(
+            Sling.PROP_SYSTEM_PACKAGES,
+            ",javax.servlet;javax.servlet.http;javax.servlet.resources; version=" + servletVersion);
+
+        // prevent system properties from being considered
+        props.put(Sling.SLING_IGNORE_SYSTEM_PROPERTIES, "true");
+
+        // add optional boot delegation for JCR and Jackrabbit API
+        props.put("sling.include.jcr-client", "jcr-client.properties");
+
+        // copy context init parameters
+        @SuppressWarnings("unchecked")
+        Enumeration<String> pe = getServletContext().getInitParameterNames();
+        while (pe.hasMoreElements()) {
+            String name = pe.nextElement();
+            props.put(name, getServletContext().getInitParameter(name));
+        }
+
+        // copy servlet init parameters
+        pe = getInitParameterNames();
+        while (pe.hasMoreElements()) {
+            String name = pe.nextElement();
+            props.put(name, getInitParameter(name));
+        }
+
+        // ensure the Felix Logger loglevel matches the Sling log level
+        checkLogSettings(props);
+
+        // if the specified obr location is not a url and starts with a '/', we
+        // assume that this location is inside the webapp and create the correct
+        // full url
+        final String repoLocation = props.get(OBR_REPOSITORY_URL);
+        if (insideWebapp(repoLocation)) {
+            final URL url = getUrl(repoLocation);
+            // only if we get back a resource url, we update it
+            if (url != null)
+                props.put(OBR_REPOSITORY_URL, url.toExternalForm());
+        }
+        
+        // set sling home
+        props.put(Sling.SLING_HOME, slingHome);
+        
+        return props;
+    }
+
+    private void checkLogSettings(Map<String, String> props) {
+        String logLevelString = props.get(PROP_LOG_LEVEL);
+        if (logLevelString != null) {
+            int logLevel = 1;
+            try {
+                logLevel = Integer.parseInt(logLevelString);
+            } catch (NumberFormatException nfe) {
+                // might be a loglevel name
+                for (int i=0; i < logLevels.length; i++) {
+                    if (logLevels[i].equalsIgnoreCase(logLevelString)) {
+                        logLevel = i;
+                        break;
+                    }
+                }
+            }
+            props.put(LOG_LEVEL_PROP, String.valueOf(logLevel));
+        }
+    }
+    
+    private boolean insideWebapp(String path) {
+        return path != null && path.indexOf(":/") < 1 && path.startsWith("/");
+    }
+    
+    private URL getUrl(String path) {
+        try {
+            return getServletContext().getResource(path);
+        } catch (MalformedURLException e) {
+            return null;
+        }
+    }
+
+    private static class ServletContextLogger extends Logger {
+        private ServletContext servletContext;
+
+        private ServletContextLogger(ServletContext servletContext) {
+            this.servletContext = servletContext;
+        }
+
+        @Override
+        protected void doLog(ServiceReference sr, int level, String msg,
+                Throwable throwable) {
+
+            // unwind throwable if it is a BundleException
+            if ((throwable instanceof BundleException)
+                && (((BundleException) throwable).getNestedException() != null)) {
+                throwable = ((BundleException) throwable).getNestedException();
+            }
+
+            String s = (sr == null) ? null : "SvcRef " + sr;
+            s = (s == null) ? msg : s + " " + msg;
+            s = (throwable == null) ? s : s + " (" + throwable + ")";
+
+            switch (level) {
+                case LOG_DEBUG:
+                    servletContext.log("DEBUG: " + s);
+                    break;
+                case LOG_ERROR:
+                    servletContext.log("ERROR: " + s, throwable);
+                    break;
+                case LOG_INFO:
+                    servletContext.log("INFO: " + s);
+                    break;
+                case LOG_WARNING:
+                    servletContext.log("WARNING: " + s);
+                    break;
+                default:
+                    servletContext.log("UNKNOWN[" + level + "]: " + s);
+            }
+        }
+    }
+
+    private static class ServletContextResourceProvider extends
+            ClassLoaderResourceProvider {
+
+        /**
+         * The root folder for internal web application files (value is
+         * "/WEB-INF/").
+         */
+        private static final String WEB_INF = "/WEB-INF";
+
+        private ServletContext servletContext;
+        
+        private ServletContextResourceProvider(ServletContext servletContext) {
+            super(SlingServlet.class.getClassLoader());
+            this.servletContext = servletContext;
+        }
+
+        @SuppressWarnings("unchecked")
+        @Override
+        public Iterator<String> getChildren(String path) {
+            // ensure leading slash
+            if (path.charAt(0) != '/') {
+                path = "/" + path;
+            }
+
+            Set resources = servletContext.getResourcePaths(path); // unchecked
+            if (resources == null || resources.isEmpty()) {
+                resources = servletContext.getResourcePaths(WEB_INF + path); // unchecked
+            }
+
+            Iterator resourceIterator;
+            if ( resources == null || resources.isEmpty() ) {
+                // fall back to the class path
+                resourceIterator = super.getChildren(path);
+                
+                if(resourceIterator.hasNext()) {
+                    return resourceIterator;
+                }
+
+                // fall back to WEB-INF within the class path
+                resourceIterator = super.getChildren(WEB_INF + path);
+
+                if(resourceIterator.hasNext()) {
+                    return resourceIterator;
+                }
+            }
+            
+            if ( resources == null ) {
+                return Collections.EMPTY_LIST.iterator();
+            }
+            return resources.iterator(); // unchecked
+        }
+
+        public URL getResource(String path) {
+            // nothing for empty or null path
+            if (path == null || path.length() == 0) {
+                return null;
+            }
+
+            // ensure leading slash
+            if (path.charAt(0) != '/') {
+                path = "/" + path;
+            }
+
+            try {
+                // try direct path
+                URL resource = servletContext.getResource(path);
+                if (resource != null) {
+                    return resource;
+                }
+
+                // otherwise try WEB-INF location
+                resource = servletContext.getResource(WEB_INF + path);
+                if(resource != null) {
+                    return resource;
+                }
+                
+                // try classpath
+                resource = super.getResource(path);
+                if(resource != null) {
+                    return resource;
+                }
+
+                // try WEB-INF within the classpath
+                resource = super.getResource(WEB_INF + path);
+                if(resource != null) {
+                    return resource;
+                }
+
+            } catch (MalformedURLException mue) {
+                servletContext.log("Failure to get resource " + path, mue);
+            }
+
+            // fall back to no resource found
+            return null;
+        }
+
+    }
+}

Propchange: incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/java/org/apache/sling/launchpad/base/webapp/SlingServlet.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/java/org/apache/sling/launchpad/base/webapp/SlingServlet.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev Url

Added: incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/resources/META-INF/DISCLAIMER
URL: http://svn.apache.org/viewvc/incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/resources/META-INF/DISCLAIMER?rev=734113&view=auto
==============================================================================
--- incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/resources/META-INF/DISCLAIMER (added)
+++ incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/resources/META-INF/DISCLAIMER Tue Jan 13 04:04:51 2009
@@ -0,0 +1,7 @@
+Apache Sling is an effort undergoing incubation at The Apache Software Foundation (ASF),
+sponsored by the Apache Jackrabbit PMC. Incubation is required of all newly accepted
+projects until a further review indicates that the infrastructure, communications,
+and decision making process have stabilized in a manner consistent with other
+successful ASF projects. While incubation status is not necessarily a reflection of
+the completeness or stability of the code, it does indicate that the project has yet
+to be fully endorsed by the ASF.
\ No newline at end of file

Added: incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/resources/META-INF/LICENSE
URL: http://svn.apache.org/viewvc/incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/resources/META-INF/LICENSE?rev=734113&view=auto
==============================================================================
--- incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/resources/META-INF/LICENSE (added)
+++ incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/resources/META-INF/LICENSE Tue Jan 13 04:04:51 2009
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed 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.

Added: incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/resources/META-INF/NOTICE
URL: http://svn.apache.org/viewvc/incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/resources/META-INF/NOTICE?rev=734113&view=auto
==============================================================================
--- incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/resources/META-INF/NOTICE (added)
+++ incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/resources/META-INF/NOTICE Tue Jan 13 04:04:51 2009
@@ -0,0 +1,9 @@
+Apache Sling Launchpad Base
+Copyright 2008-2009 The Apache Software Foundation
+
+Apache Sling is based on source code originally developed 
+by Day Software (http://www.day.com/).
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+

Added: incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/resources/WEB-INF/jcr-client.properties
URL: http://svn.apache.org/viewvc/incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/resources/WEB-INF/jcr-client.properties?rev=734113&view=auto
==============================================================================
--- incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/resources/WEB-INF/jcr-client.properties (added)
+++ incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/resources/WEB-INF/jcr-client.properties Tue Jan 13 04:04:51 2009
@@ -0,0 +1,45 @@
+#
+#  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.
+#
+
+#
+# The JCR API packages for boot delegation
+sling.bootdelegation.class.javax.jcr.Repository = \
+ javax.jcr, \
+ javax.jcr.lock, \
+ javax.jcr.nodetype, \
+ javax.jcr.observation, \
+ javax.jcr.query, \
+ javax.jcr.util, \
+ javax.jcr.version
+ 
+#
+# The Jackrabbit API packages for boot delegation
+sling.bootdelegation.class.org.apache.jackrabbit.api.JackrabbitRepository = \
+ org.apache.jackrabbit.api, \
+ org.apache.jackrabbit.api.observation, \
+ org.apache.jackrabbit.api.security.principal, \
+ org.apache.jackrabbit.api.security.user
+ 
+#
+# The Jackrabbit 283 preview API packages for boot delegation
+sling.bootdelegation.class.org.apache.jackrabbit.api.jsr283.Node = \
+ org.apache.jackrabbit.api.jsr283, \
+ org.apache.jackrabbit.api.jsr283.nodetype, \
+ org.apache.jackrabbit.api.jsr283.retention, \
+ org.apache.jackrabbit.api.jsr283.security
\ No newline at end of file

Propchange: incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/resources/WEB-INF/jcr-client.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/resources/jre-1.5.properties
URL: http://svn.apache.org/viewvc/incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/resources/jre-1.5.properties?rev=734113&view=auto
==============================================================================
--- incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/resources/jre-1.5.properties (added)
+++ incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/resources/jre-1.5.properties Tue Jan 13 04:04:51 2009
@@ -0,0 +1,145 @@
+#
+#  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.
+#
+
+# The file contains the Java 1.5 platform packages used as system packages
+# for the current platform.
+
+jre-1.5= \
+ javax.accessibility,\
+ javax.activity,\
+ javax.crypto,\
+ javax.crypto.interfaces,\
+ javax.crypto.spec,\
+ javax.imageio,\
+ javax.imageio.event,\
+ javax.imageio.metadata,\
+ javax.imageio.plugins.bmp,\
+ javax.imageio.plugins.jpeg,\
+ javax.imageio.spi,\
+ javax.imageio.stream,\
+ javax.management,\
+ javax.management.loading,\
+ javax.management.modelmbean,\
+ javax.management.monitor,\
+ javax.management.openmbean,\
+ javax.management.relation,\
+ javax.management.remote,\
+ javax.management.remote.rmi,\
+ javax.management.timer,\
+ javax.naming,\
+ javax.naming.directory,\
+ javax.naming.event,\
+ javax.naming.ldap,\
+ javax.naming.spi,\
+ javax.net,\
+ javax.net.ssl,\
+ javax.print,\
+ javax.print.attribute,\
+ javax.print.attribute.standard,\
+ javax.print.event,\
+ javax.rmi,\
+ javax.rmi.CORBA,\
+ javax.rmi.ssl,\
+ javax.security.auth,\
+ javax.security.auth.callback,\
+ javax.security.auth.kerberos,\
+ javax.security.auth.login,\
+ javax.security.auth.spi,\
+ javax.security.auth.x500,\
+ javax.security.cert,\
+ javax.security.sasl,\
+ javax.sound.midi,\
+ javax.sound.midi.spi,\
+ javax.sound.sampled,\
+ javax.sound.sampled.spi,\
+ javax.sql,\
+ javax.sql.rowset,\
+ javax.sql.rowset.serial,\
+ javax.sql.rowset.spi,\
+ javax.swing,\
+ javax.swing.border,\
+ javax.swing.colorchooser,\
+ javax.swing.event,\
+ javax.swing.filechooser,\
+ javax.swing.plaf,\
+ javax.swing.plaf.basic,\
+ javax.swing.plaf.metal,\
+ javax.swing.plaf.multi,\
+ javax.swing.plaf.synth,\
+ javax.swing.table,\
+ javax.swing.text,\
+ javax.swing.text.html,\
+ javax.swing.text.html.parser,\
+ javax.swing.text.rtf,\
+ javax.swing.tree,\
+ javax.swing.undo,\
+ javax.transaction,\
+ javax.transaction.xa,\
+ javax.xml,\
+ javax.xml.datatype,\
+ javax.xml.namespace,\
+ javax.xml.parsers,\
+ javax.xml.transform,\
+ javax.xml.transform.dom,\
+ javax.xml.transform.sax,\
+ javax.xml.transform.stream,\
+ javax.xml.validation,\
+ javax.xml.xpath,\
+ org.ietf.jgss,\
+ org.omg.CORBA,\
+ org.omg.CORBA_2_3,\
+ org.omg.CORBA_2_3.portable,\
+ org.omg.CORBA.DynAnyPackage,\
+ org.omg.CORBA.ORBPackage,\
+ org.omg.CORBA.portable,\
+ org.omg.CORBA.TypeCodePackage,\
+ org.omg.CosNaming,\
+ org.omg.CosNaming.NamingContextExtPackage,\
+ org.omg.CosNaming.NamingContextPackage,\
+ org.omg.Dynamic,\
+ org.omg.DynamicAny,\
+ org.omg.DynamicAny.DynAnyFactoryPackage,\
+ org.omg.DynamicAny.DynAnyPackage,\
+ org.omg.IOP,\
+ org.omg.IOP.CodecFactoryPackage,\
+ org.omg.IOP.CodecPackage,\
+ org.omg.Messaging,\
+ org.omg.PortableInterceptor,\
+ org.omg.PortableInterceptor.ORBInitInfoPackage,\
+ org.omg.PortableServer,\
+ org.omg.PortableServer.CurrentPackage,\
+ org.omg.PortableServer.POAManagerPackage,\
+ org.omg.PortableServer.POAPackage,\
+ org.omg.PortableServer.portable,\
+ org.omg.PortableServer.ServantLocatorPackage,\
+ org.omg.SendingContext,\
+ org.omg.stub.java.rmi,\
+ org.w3c.dom,\
+ org.w3c.dom.bootstrap,\
+ org.w3c.dom.css,\
+ org.w3c.dom.events,\
+ org.w3c.dom.html,\
+ org.w3c.dom.ls,\
+ org.w3c.dom.ranges,\
+ org.w3c.dom.stylesheets,\
+ org.w3c.dom.traversal,\
+ org.w3c.dom.views,\
+ org.xml.sax,\
+ org.xml.sax.ext,\
+ org.xml.sax.helpers

Propchange: incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/resources/jre-1.5.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/resources/jre-1.6.properties
URL: http://svn.apache.org/viewvc/incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/resources/jre-1.6.properties?rev=734113&view=auto
==============================================================================
--- incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/resources/jre-1.6.properties (added)
+++ incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/resources/jre-1.6.properties Tue Jan 13 04:04:51 2009
@@ -0,0 +1,182 @@
+#
+#  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.
+#
+
+# The file contains the Java 1.6 platform packages used as system packages
+# for the current platform.
+
+jre-1.6= \
+ javax.accessibility,\
+ javax.activation,\
+ javax.activity,\
+ javax.annotation,\
+ javax.annotation.processing,\
+ javax.crypto,\
+ javax.crypto.interfaces,\
+ javax.crypto.spec,\
+ javax.imageio,\
+ javax.imageio.event,\
+ javax.imageio.metadata,\
+ javax.imageio.plugins.bmp,\
+ javax.imageio.plugins.jpeg,\
+ javax.imageio.spi,\
+ javax.imageio.stream,\
+ javax.jws,\
+ javax.jws.soap,\
+ javax.lang.model,\
+ javax.lang.model.element,\
+ javax.lang.model.type,\
+ javax.lang.model.util,\
+ javax.management,\
+ javax.management.loading,\
+ javax.management.modelmbean,\
+ javax.management.monitor,\
+ javax.management.openmbean,\
+ javax.management.relation,\
+ javax.management.remote,\
+ javax.management.remote.rmi,\
+ javax.management.timer,\
+ javax.naming,\
+ javax.naming.directory,\
+ javax.naming.event,\
+ javax.naming.ldap,\
+ javax.naming.spi,\
+ javax.net,\
+ javax.net.ssl,\
+ javax.print,\
+ javax.print.attribute,\
+ javax.print.attribute.standard,\
+ javax.print.event,\
+ javax.rmi,\
+ javax.rmi.CORBA,\
+ javax.rmi.ssl,\
+ javax.script,\
+ javax.security.auth,\
+ javax.security.auth.callback,\
+ javax.security.auth.kerberos,\
+ javax.security.auth.login,\
+ javax.security.auth.spi,\
+ javax.security.auth.x500,\
+ javax.security.cert,\
+ javax.security.sasl,\
+ javax.smartcardio,\
+ javax.sound.midi,\
+ javax.sound.midi.spi,\
+ javax.sound.sampled,\
+ javax.sound.sampled.spi,\
+ javax.sql,\
+ javax.sql.rowset,\
+ javax.sql.rowset.serial,\
+ javax.sql.rowset.spi,\
+ javax.swing,\
+ javax.swing.border,\
+ javax.swing.colorchooser,\
+ javax.swing.event,\
+ javax.swing.filechooser,\
+ javax.swing.plaf,\
+ javax.swing.plaf.basic,\
+ javax.swing.plaf.metal,\
+ javax.swing.plaf.multi,\
+ javax.swing.plaf.synth,\
+ javax.swing.table,\
+ javax.swing.text,\
+ javax.swing.text.html,\
+ javax.swing.text.html.parser,\
+ javax.swing.text.rtf,\
+ javax.swing.tree,\
+ javax.swing.undo,\
+ javax.tools,\
+ javax.transaction,\
+ javax.transaction.xa,\
+ javax.xml,\
+ javax.xml.bind,\
+ javax.xml.bind.annotation,\
+ javax.xml.bind.annotation.adapters,\
+ javax.xml.bind.attachment,\
+ javax.xml.bind.helpers,\
+ javax.xml.bind.util,\
+ javax.xml.crypto,\
+ javax.xml.crypto.dom,\
+ javax.xml.crypto.dsig,\
+ javax.xml.crypto.dsig.dom,\
+ javax.xml.crypto.dsig.keyinfo,\
+ javax.xml.crypto.dsig.spec,\
+ javax.xml.datatype,\
+ javax.xml.namespace,\
+ javax.xml.parsers,\
+ javax.xml.soap,\
+ javax.xml.stream,\
+ javax.xml.stream.events,\
+ javax.xml.stream.util,\
+ javax.xml.transform,\
+ javax.xml.transform.dom,\
+ javax.xml.transform.sax,\
+ javax.xml.transform.stax,\
+ javax.xml.transform.stream,\
+ javax.xml.validation,\
+ javax.xml.ws,\
+ javax.xml.ws.handler,\
+ javax.xml.ws.handler.soap,\
+ javax.xml.ws.http,\
+ javax.xml.ws.soap,\
+ javax.xml.ws.spi,\
+ javax.xml.xpath,\
+ org.ietf.jgss,\
+ org.omg.CORBA,\
+ org.omg.CORBA_2_3,\
+ org.omg.CORBA_2_3.portable,\
+ org.omg.CORBA.DynAnyPackage,\
+ org.omg.CORBA.ORBPackage,\
+ org.omg.CORBA.portable,\
+ org.omg.CORBA.TypeCodePackage,\
+ org.omg.CosNaming,\
+ org.omg.CosNaming.NamingContextExtPackage,\
+ org.omg.CosNaming.NamingContextPackage,\
+ org.omg.Dynamic,\
+ org.omg.DynamicAny,\
+ org.omg.DynamicAny.DynAnyFactoryPackage,\
+ org.omg.DynamicAny.DynAnyPackage,\
+ org.omg.IOP,\
+ org.omg.IOP.CodecFactoryPackage,\
+ org.omg.IOP.CodecPackage,\
+ org.omg.Messaging,\
+ org.omg.PortableInterceptor,\
+ org.omg.PortableInterceptor.ORBInitInfoPackage,\
+ org.omg.PortableServer,\
+ org.omg.PortableServer.CurrentPackage,\
+ org.omg.PortableServer.POAManagerPackage,\
+ org.omg.PortableServer.POAPackage,\
+ org.omg.PortableServer.portable,\
+ org.omg.PortableServer.ServantLocatorPackage,\
+ org.omg.SendingContext,\
+ org.omg.stub.java.rmi,\
+ org.omg.stub.javax.management.remote.rmi,\
+ org.w3c.dom,\
+ org.w3c.dom.bootstrap,\
+ org.w3c.dom.css,\
+ org.w3c.dom.events,\
+ org.w3c.dom.html,\
+ org.w3c.dom.ls,\
+ org.w3c.dom.ranges,\
+ org.w3c.dom.stylesheets,\
+ org.w3c.dom.traversal,\
+ org.w3c.dom.views,\
+ org.w3c.dom.xpath,\
+ org.xml.sax,\
+ org.xml.sax.ext,\
+ org.xml.sax.helpers

Propchange: incubator/sling/whiteboard/fmeschbe/launchpad/base/src/main/resources/jre-1.6.properties
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message