ace-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1188957 - in /incubator/ace/trunk: ./ ace-glassfish-launcher/ ace-glassfish-launcher/.settings/ ace-glassfish-launcher/src/ ace-glassfish-launcher/src/main/ ace-glassfish-launcher/src/main/java/ ace-glassfish-launcher/src/main/java/org/ ac...
Date Tue, 25 Oct 2011 22:46:03 GMT
Author: marrs
Date: Tue Oct 25 22:46:02 2011
New Revision: 1188957

URL: http://svn.apache.org/viewvc?rev=1188957&view=rev
Log:
ACE-191 applied the patch and modified it a bit

Added:
    incubator/ace/trunk/ace-glassfish-launcher/
    incubator/ace/trunk/ace-glassfish-launcher/.classpath
    incubator/ace/trunk/ace-glassfish-launcher/.project
    incubator/ace/trunk/ace-glassfish-launcher/.settings/
    incubator/ace/trunk/ace-glassfish-launcher/.settings/org.eclipse.jdt.core.prefs
    incubator/ace/trunk/ace-glassfish-launcher/pom.xml
    incubator/ace/trunk/ace-glassfish-launcher/src/
    incubator/ace/trunk/ace-glassfish-launcher/src/main/
    incubator/ace/trunk/ace-glassfish-launcher/src/main/java/
    incubator/ace/trunk/ace-glassfish-launcher/src/main/java/org/
    incubator/ace/trunk/ace-glassfish-launcher/src/main/java/org/apache/
    incubator/ace/trunk/ace-glassfish-launcher/src/main/java/org/apache/ace/
    incubator/ace/trunk/ace-glassfish-launcher/src/main/java/org/apache/ace/glassfishlauncher/
    incubator/ace/trunk/ace-glassfish-launcher/src/main/java/org/apache/ace/glassfishlauncher/Main.java
    incubator/ace/trunk/ace-glassfish-launcher/src/main/resources/
    incubator/ace/trunk/ace-glassfish-launcher/src/main/resources/domain.xml
    incubator/ace/trunk/ace-glassfish-launcher/src/main/resources/osgi.properties
Modified:
    incubator/ace/trunk/ace-nodelauncher-amazon/pom.xml
    incubator/ace/trunk/ace-nodelauncher-amazon/src/main/java/org/apache/ace/nodelauncher/amazon/AmazonNodeLauncher.java
    incubator/ace/trunk/ace-target-devserver/pom.xml
    incubator/ace/trunk/pom.xml
    incubator/ace/trunk/pom/pom.xml

Added: incubator/ace/trunk/ace-glassfish-launcher/.classpath
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/ace-glassfish-launcher/.classpath?rev=1188957&view=auto
==============================================================================
--- incubator/ace/trunk/ace-glassfish-launcher/.classpath (added)
+++ incubator/ace/trunk/ace-glassfish-launcher/.classpath Tue Oct 25 22:46:02 2011
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry including="**/*.java" kind="src" path="src/main/java"/>
+	<classpathentry excluding="**/*.java" kind="src" path="src/main/resources"/>
+	<classpathentry excluding="**/*.java" kind="src" path="target/maven-shared-archive-resources"/>
+	<classpathentry kind="var" path="M2_REPO/javax/servlet/servlet-api/2.4/servlet-api-2.4.jar"/>
+	<classpathentry kind="var" path="M2_REPO/concurrent/concurrent/1.3.4/concurrent-1.3.4.jar"/>
+	<classpathentry kind="var" path="M2_REPO/junit/junit/4.4/junit-4.4.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-artifact/2.0/maven-artifact-2.0.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/mockito/mockito-all/1.8.1/mockito-all-1.8.1.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/ace/org.apache.ace.deployment.api/0.8.1-incubator-SNAPSHOT/org.apache.ace.deployment.api-0.8.1-incubator-SNAPSHOT.jar" sourcepath="M2_REPO/org/apache/ace/org.apache.ace.deployment.api/0.8.1-incubator-SNAPSHOT/org.apache.ace.deployment.api-0.8.1-incubator-SNAPSHOT-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/ace/org.apache.ace.deployment.deploymentadmin/0.8.1-incubator-SNAPSHOT/org.apache.ace.deployment.deploymentadmin-0.8.1-incubator-SNAPSHOT.jar" sourcepath="M2_REPO/org/apache/ace/org.apache.ace.deployment.deploymentadmin/0.8.1-incubator-SNAPSHOT/org.apache.ace.deployment.deploymentadmin-0.8.1-incubator-SNAPSHOT-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/ace/org.apache.ace.deployment.provider.api/0.8.1-incubator-SNAPSHOT/org.apache.ace.deployment.provider.api-0.8.1-incubator-SNAPSHOT.jar" sourcepath="M2_REPO/org/apache/ace/org.apache.ace.deployment.provider.api/0.8.1-incubator-SNAPSHOT/org.apache.ace.deployment.provider.api-0.8.1-incubator-SNAPSHOT-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/ace/org.apache.ace.deployment.task/0.8.1-incubator-SNAPSHOT/org.apache.ace.deployment.task-0.8.1-incubator-SNAPSHOT.jar" sourcepath="M2_REPO/org/apache/ace/org.apache.ace.deployment.task/0.8.1-incubator-SNAPSHOT/org.apache.ace.deployment.task-0.8.1-incubator-SNAPSHOT-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/ace/org.apache.ace.discovery.api/0.8.1-incubator-SNAPSHOT/org.apache.ace.discovery.api-0.8.1-incubator-SNAPSHOT.jar" sourcepath="M2_REPO/org/apache/ace/org.apache.ace.discovery.api/0.8.1-incubator-SNAPSHOT/org.apache.ace.discovery.api-0.8.1-incubator-SNAPSHOT-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/ace/org.apache.ace.discovery.property/0.8.1-incubator-SNAPSHOT/org.apache.ace.discovery.property-0.8.1-incubator-SNAPSHOT.jar" sourcepath="M2_REPO/org/apache/ace/org.apache.ace.discovery.property/0.8.1-incubator-SNAPSHOT/org.apache.ace.discovery.property-0.8.1-incubator-SNAPSHOT-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/ace/org.apache.ace.gateway.log/0.8.1-incubator-SNAPSHOT/org.apache.ace.gateway.log-0.8.1-incubator-SNAPSHOT.jar" sourcepath="M2_REPO/org/apache/ace/org.apache.ace.gateway.log/0.8.1-incubator-SNAPSHOT/org.apache.ace.gateway.log-0.8.1-incubator-SNAPSHOT-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/ace/org.apache.ace.gateway.log.store/0.8.1-incubator-SNAPSHOT/org.apache.ace.gateway.log.store-0.8.1-incubator-SNAPSHOT.jar" sourcepath="M2_REPO/org/apache/ace/org.apache.ace.gateway.log.store/0.8.1-incubator-SNAPSHOT/org.apache.ace.gateway.log.store-0.8.1-incubator-SNAPSHOT-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/ace/org.apache.ace.identification.api/0.8.1-incubator-SNAPSHOT/org.apache.ace.identification.api-0.8.1-incubator-SNAPSHOT.jar" sourcepath="M2_REPO/org/apache/ace/org.apache.ace.identification.api/0.8.1-incubator-SNAPSHOT/org.apache.ace.identification.api-0.8.1-incubator-SNAPSHOT-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/ace/org.apache.ace.identification.property/0.8.1-incubator-SNAPSHOT/org.apache.ace.identification.property-0.8.1-incubator-SNAPSHOT.jar" sourcepath="M2_REPO/org/apache/ace/org.apache.ace.identification.property/0.8.1-incubator-SNAPSHOT/org.apache.ace.identification.property-0.8.1-incubator-SNAPSHOT-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/ace/org.apache.ace.log/0.8.1-incubator-SNAPSHOT/org.apache.ace.log-0.8.1-incubator-SNAPSHOT.jar" sourcepath="M2_REPO/org/apache/ace/org.apache.ace.log/0.8.1-incubator-SNAPSHOT/org.apache.ace.log-0.8.1-incubator-SNAPSHOT-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/ace/org.apache.ace.log.listener/0.8.1-incubator-SNAPSHOT/org.apache.ace.log.listener-0.8.1-incubator-SNAPSHOT.jar" sourcepath="M2_REPO/org/apache/ace/org.apache.ace.log.listener/0.8.1-incubator-SNAPSHOT/org.apache.ace.log.listener-0.8.1-incubator-SNAPSHOT-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/ace/org.apache.ace.managementagent/0.8.1-incubator-SNAPSHOT/org.apache.ace.managementagent-0.8.1-incubator-SNAPSHOT.jar" sourcepath="M2_REPO/org/apache/ace/org.apache.ace.managementagent/0.8.1-incubator-SNAPSHOT/org.apache.ace.managementagent-0.8.1-incubator-SNAPSHOT-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/ace/org.apache.ace.range.api/0.8.1-incubator-SNAPSHOT/org.apache.ace.range.api-0.8.1-incubator-SNAPSHOT.jar" sourcepath="M2_REPO/org/apache/ace/org.apache.ace.range.api/0.8.1-incubator-SNAPSHOT/org.apache.ace.range.api-0.8.1-incubator-SNAPSHOT-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/ace/org.apache.ace.scheduler/0.8.1-incubator-SNAPSHOT/org.apache.ace.scheduler-0.8.1-incubator-SNAPSHOT.jar" sourcepath="M2_REPO/org/apache/ace/org.apache.ace.scheduler/0.8.1-incubator-SNAPSHOT/org.apache.ace.scheduler-0.8.1-incubator-SNAPSHOT-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/ace/org.apache.ace.scheduler.api/0.8.1-incubator-SNAPSHOT/org.apache.ace.scheduler.api-0.8.1-incubator-SNAPSHOT.jar" sourcepath="M2_REPO/org/apache/ace/org.apache.ace.scheduler.api/0.8.1-incubator-SNAPSHOT/org.apache.ace.scheduler.api-0.8.1-incubator-SNAPSHOT-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/ace/org.apache.ace.util/0.8.1-incubator-SNAPSHOT/org.apache.ace.util-0.8.1-incubator-SNAPSHOT.jar" sourcepath="M2_REPO/org/apache/ace/org.apache.ace.util/0.8.1-incubator-SNAPSHOT/org.apache.ace.util-0.8.1-incubator-SNAPSHOT-sources.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/felix/org.apache.felix.configadmin/1.2.8/org.apache.felix.configadmin-1.2.8.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/felix/org.apache.felix.dependencymanager/3.0.0/org.apache.felix.dependencymanager-3.0.0.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/felix/org.apache.felix.deploymentadmin/0.9.0/org.apache.felix.deploymentadmin-0.9.0.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/felix/org.apache.felix.eventadmin/1.2.8/org.apache.felix.eventadmin-1.2.8.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/felix/org.apache.felix.framework/3.0.8/org.apache.felix.framework-3.0.8.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/osgi/org.osgi.compendium/4.2.0/org.osgi.compendium-4.2.0.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/osgi/org.osgi.core/4.2.0/org.osgi.core-4.2.0.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/codehaus/plexus/plexus-utils/1.0.4/plexus-utils-1.0.4.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/maven/surefire/surefire-api/2.5/surefire-api-2.5.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/apache/maven/surefire/surefire-testng/2.5/surefire-testng-2.5.jar"/>
+	<classpathentry kind="var" path="M2_REPO/org/testng/testng/5.7/testng-5.7-jdk15.jar"/>
+	<classpathentry kind="con" path="org.scala-ide.sdt.launching.SCALA_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="output" path="target/classes"/>
+</classpath>

Added: incubator/ace/trunk/ace-glassfish-launcher/.project
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/ace-glassfish-launcher/.project?rev=1188957&view=auto
==============================================================================
--- incubator/ace/trunk/ace-glassfish-launcher/.project (added)
+++ incubator/ace/trunk/ace-glassfish-launcher/.project Tue Oct 25 22:46:02 2011
@@ -0,0 +1,13 @@
+<projectDescription>
+  <name>ace-glassfish-launcher</name>
+  <comment>This pom provides project information that is common to all ACE sub-projects. NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>
+  <projects/>
+  <buildSpec>
+    <buildCommand>
+      <name>org.eclipse.jdt.core.javabuilder</name>
+    </buildCommand>
+  </buildSpec>
+  <natures>
+    <nature>org.eclipse.jdt.core.javanature</nature>
+  </natures>
+</projectDescription>
\ No newline at end of file

Added: incubator/ace/trunk/ace-glassfish-launcher/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/ace-glassfish-launcher/.settings/org.eclipse.jdt.core.prefs?rev=1188957&view=auto
==============================================================================
--- incubator/ace/trunk/ace-glassfish-launcher/.settings/org.eclipse.jdt.core.prefs (added)
+++ incubator/ace/trunk/ace-glassfish-launcher/.settings/org.eclipse.jdt.core.prefs Tue Oct 25 22:46:02 2011
@@ -0,0 +1,9 @@
+#Tue Oct 25 23:16:29 CEST 2011
+encoding//src/test/java=UTF-8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+eclipse.preferences.version=1
+encoding//src/test/resources=UTF-8
+org.eclipse.jdt.core.compiler.source=1.5
+encoding//src/main/java=UTF-8
+encoding//src/main/resources=UTF-8
+org.eclipse.jdt.core.compiler.compliance=1.5

Added: incubator/ace/trunk/ace-glassfish-launcher/pom.xml
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/ace-glassfish-launcher/pom.xml?rev=1188957&view=auto
==============================================================================
--- incubator/ace/trunk/ace-glassfish-launcher/pom.xml (added)
+++ incubator/ace/trunk/ace-glassfish-launcher/pom.xml Tue Oct 25 22:46:02 2011
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <groupId>org.apache.ace</groupId>
+        <artifactId>ace-pom</artifactId>
+        <version>0.8.1-incubator-SNAPSHOT</version>
+        <relativePath>../pom/pom.xml</relativePath>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>ace-glassfish-launcher</artifactId>
+
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>make-my-jar-with-dependencies</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>single</goal>
+                        </goals>
+                        <configuration>
+                            <descriptorRefs>
+                                <descriptorRef>jar-with-dependencies</descriptorRef>
+                            </descriptorRefs>
+                            <appendAssemblyId>false</appendAssemblyId>
+                            <archive>
+                                <manifest>
+                                    <mainClass>org.apache.ace.glassfishlauncher.Main</mainClass>
+                                </manifest>
+                            </archive>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.ace</groupId>
+            <artifactId>org.apache.ace.managementagent</artifactId>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.apache.felix</groupId>
+                    <artifactId>org.osgi.foundation</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.framework</artifactId>
+            <scope>compile</scope>
+        </dependency>
+    </dependencies>
+</project>
\ No newline at end of file

Added: incubator/ace/trunk/ace-glassfish-launcher/src/main/java/org/apache/ace/glassfishlauncher/Main.java
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/ace-glassfish-launcher/src/main/java/org/apache/ace/glassfishlauncher/Main.java?rev=1188957&view=auto
==============================================================================
--- incubator/ace/trunk/ace-glassfish-launcher/src/main/java/org/apache/ace/glassfishlauncher/Main.java (added)
+++ incubator/ace/trunk/ace-glassfish-launcher/src/main/java/org/apache/ace/glassfishlauncher/Main.java Tue Oct 25 22:46:02 2011
@@ -0,0 +1,324 @@
+/*
+ * 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.ace.glassfishlauncher;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Properties;
+import java.util.Scanner;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipInputStream;
+
+/**
+ * A simple launcher, that launches Glassfish and installs the Management Agent.
+ */
+public class Main {
+    private static final int BUFFER_SIZE = 4096;
+    private String m_identification;
+    private String m_discovery;
+
+    private Argument m_identificationArgument = new KeyValueArgument() {
+        @Override
+        public void handle(final String key, final String value) {
+            if (key.equals("identification")) {
+                m_identification = value;
+            }
+        }
+
+        public String getDescription() {
+            return "identification: sets the target ID to use";
+        }
+    };
+
+    private Argument m_discoveryArgument = new KeyValueArgument() {
+        @Override
+        public void handle(final String key, final String value) {
+            if (key.equals("discovery")) {
+                m_discovery = value;
+            }
+        }
+
+        public String getDescription() {
+            return "discovery: sets the ACE server to connect to";
+        }
+    };
+
+    private Argument m_agentsArgument = new KeyValueArgument() {
+        @Override
+        public void handle(final String key, final String value) {
+            if (key.equals("agents")) {
+                System.setProperty("agents", value);
+            }
+        }
+
+        public String getDescription() {
+            return "agents: configures multiple management agents: agent-id,identification,discovery[;agent-id,identification,discovery]*";
+        }
+    };
+
+    private Argument m_helpArgument = new Argument() {
+        public void handle(final String argument) {
+            if (argument.equals("help")) {
+                showHelp();
+                System.exit(0);
+            }
+        }
+
+        public String getDescription() {
+            return "help: prints this help message";
+        }
+    };
+
+    private FrameworkOption m_fwOptionHandler = new FrameworkOption();
+
+    private final List<Argument> m_arguments = Arrays.asList(
+            m_identificationArgument,
+            m_discoveryArgument,
+            m_agentsArgument,
+            m_fwOptionHandler,
+            m_helpArgument);
+
+    public static void main(final String[] args) throws Exception {
+        new Main(args).run();
+    }
+
+    public Main(final String[] args) {
+        for (String arg : args) {
+            for (Argument argument : m_arguments) {
+                argument.handle(arg);
+            }
+        }
+    }
+
+    public void run() throws Exception {
+        unzip();
+        runCommand("chmod 755 glassfish3/bin/asadmin");
+        replaceDomainXml();
+        String bundledir = "glassfish3/glassfish/modules/autostart/";
+        copyResource("ace-managementagent.jar", bundledir + "ace-managementagent.jar");
+        copyClasspathResource("osgi.properties", "glassfish3/glassfish/config/osgi.properties");
+        runCommand("glassfish3/bin/asadmin start-domain domain1");
+    }
+
+    private void replaceDomainXml() throws IOException {
+        InputStream inputStream = getClass().getClassLoader().getResourceAsStream("domain.xml");
+        StringBuilder fileContents = new StringBuilder();
+        Scanner scanner = new Scanner(inputStream);
+        String lineSeparator = System.getProperty("line.separator");
+
+        try {
+            while (scanner.hasNextLine()) {
+                fileContents.append(scanner.nextLine()).append(lineSeparator);
+            }
+        }
+        finally {
+            scanner.close();
+            inputStream.close();
+        }
+
+        String domainXML = fileContents.toString()
+            .replace("GLASSFISHIDENTITY", m_identification)
+            .replace("GLASSFISHPORT", "8080")
+            .replace("DISCOVERY", m_discovery);
+
+        FileOutputStream fileOutputStream = null;
+        try {
+            fileOutputStream = new FileOutputStream("glassfish3/glassfish/domains/domain1/config/domain.xml");
+            fileOutputStream.write(domainXML.getBytes());
+        }
+        finally {
+            if (fileOutputStream != null) {
+                fileOutputStream.close();
+            }
+        }
+    }
+
+    private void copyResource(final String resource, final String to) throws IOException {
+        InputStream in = null;
+        BufferedOutputStream out = null;
+        try {
+            in = new FileInputStream(resource);
+            out = new BufferedOutputStream(new FileOutputStream(to));
+    
+            copy(in, out);
+        }
+        finally {
+            if (in != null) {
+                in.close();
+            }
+            if (out != null) {
+                out.close();
+            }
+        }
+    }
+
+    private void copy(InputStream inputStream, OutputStream out) throws IOException {
+        byte[] buf = new byte[BUFFER_SIZE];
+        int len;
+        while ((len = inputStream.read(buf)) > 0) {
+            out.write(buf, 0, len);
+        }
+    }
+
+    private void copyClasspathResource(final String resource, final String to) throws IOException {
+        InputStream in = null;
+        BufferedOutputStream out = null;
+        try {
+            in = getClass().getClassLoader().getResourceAsStream(resource);
+            out = new BufferedOutputStream(new FileOutputStream(to));
+            copy(in, out);
+        }
+        finally {
+            if (in != null) {
+                in.close();
+            }
+            if (out != null) {
+                out.close();
+            }
+        }
+    }
+
+    public void runCommand(final String command) throws IOException {
+        Process process = Runtime.getRuntime().exec(command);
+        StreamReader in = new StreamReader(process.getInputStream());
+        StreamReader err = new StreamReader(process.getErrorStream());
+        in.start();
+        err.start();
+    }
+
+    /**
+     * Thread that can be run in the background to keep reading from a stream.
+     */
+    private static class StreamReader extends Thread {
+        private final InputStream m_in;
+        
+        public StreamReader(InputStream is) {
+            super("StreamReader");
+            setDaemon(true);
+            m_in = is;
+        }
+        
+        public void run() {
+            try {
+                InputStreamReader isr = new InputStreamReader(m_in);
+                BufferedReader br = new BufferedReader(isr);
+                String line = null;
+                while ( (line = br.readLine()) != null) {}
+            }
+            catch (IOException ioe) {
+                ioe.printStackTrace();
+            }
+        }
+    }
+    
+    private void unzip() throws IOException {
+        ZipInputStream zis = null;
+        try {
+            zis = new ZipInputStream(new BufferedInputStream(new FileInputStream("glassfish.zip")));
+            ZipEntry entry;
+            while ((entry = zis.getNextEntry()) != null) {
+                if (entry.isDirectory()) {
+                    new File(entry.getName()).mkdir();
+                }
+                else {
+                    BufferedOutputStream dest = null;
+                    try {
+                        dest = new BufferedOutputStream(new FileOutputStream(entry.getName()));
+                        copy(zis, dest);
+                    }
+                    finally {
+                        if (dest != null) {
+                            dest.flush();
+                            dest.close();
+                        }
+                    }
+                }
+            }
+        }
+        finally {
+            if (zis != null) {
+                zis.close();
+            }
+        }
+    }
+
+    private void showHelp() {
+        System.out.println("Apache ACE Launcher\n"
+            + "Usage:\n"
+            + "  java -jar ace-launcher.jar [identification=<id>] [discovery=<ace-server>] [options...]");
+
+        System.out.println("All known options are,");
+        for (Argument argument : m_arguments) {
+            System.out.println("  " + argument.getDescription());
+        }
+
+        System.out.println("Example:\n"
+            + "  java -jar ace-launcher.jar identification=MyTarget discovery=http://provisioning.company.com:8080 "
+            + "fwOption=org.osgi.framework.system.packages.extra=sun.misc,com.sun.management");
+    }
+
+    private static interface Argument {
+        void handle(String argument);
+        String getDescription();
+    }
+
+    private static abstract class KeyValueArgument implements Argument {
+        public void handle(final String argument) {
+            Pattern pattern = Pattern.compile("(\\w*)=(.*)");
+            Matcher m = pattern.matcher(argument);
+            if (m.matches()) {
+                handle(m.group(1), m.group(2));
+            }
+        }
+
+        protected abstract void handle(String key, String value);
+    }
+
+    private static class FrameworkOption extends KeyValueArgument {
+        private Properties m_properties = new Properties();
+
+        @Override
+        protected void handle(final String key, final String value) {
+            if (key.equals("fwOption")) {
+                Pattern pattern = Pattern.compile("([^=]*)=(.*)");
+                Matcher m = pattern.matcher(value);
+                if (!m.matches()) {
+                    throw new IllegalArgumentException(value + " is not a valid framework option.");
+                }
+                m_properties.put(m.group(1), m.group(2));
+            }
+        }
+
+        public String getDescription() {
+            return "fwOption: sets framework options for the OSGi framework to be created. This argument may be repeated";
+        }
+    }
+}

Added: incubator/ace/trunk/ace-glassfish-launcher/src/main/resources/domain.xml
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/ace-glassfish-launcher/src/main/resources/domain.xml?rev=1188957&view=auto
==============================================================================
--- incubator/ace/trunk/ace-glassfish-launcher/src/main/resources/domain.xml (added)
+++ incubator/ace/trunk/ace-glassfish-launcher/src/main/resources/domain.xml Tue Oct 25 22:46:02 2011
@@ -0,0 +1,417 @@
+<domain log-root="${com.sun.aas.instanceRoot}/logs" application-root="${com.sun.aas.instanceRoot}/applications" version="5">
+  <system-applications>
+    <application context-root="" location="${com.sun.aas.installRootURI}/lib/install/applications/__admingui" name="__admingui" directory-deployed="true" object-type="system-admin">
+      <module name="__admingui">
+        <engine sniffer="web"></engine>
+        <engine sniffer="security"></engine>
+      </module>
+    </application>
+  </system-applications>
+  <applications></applications>
+  <resources>
+    <jdbc-resource pool-name="__TimerPool" jndi-name="jdbc/__TimerPool" object-type="system-admin"></jdbc-resource>
+    <jdbc-resource pool-name="DerbyPool" jndi-name="jdbc/__default"></jdbc-resource>
+    <jdbc-connection-pool datasource-classname="org.apache.derby.jdbc.EmbeddedXADataSource" res-type="javax.sql.XADataSource" name="__TimerPool">
+      <property name="databaseName" value="${com.sun.aas.instanceRoot}/lib/databases/ejbtimer"></property>
+      <property name="connectionAttributes" value=";create=true"></property>
+    </jdbc-connection-pool>
+    <jdbc-connection-pool is-isolation-level-guaranteed="false" datasource-classname="org.apache.derby.jdbc.ClientDataSource" res-type="javax.sql.DataSource" name="DerbyPool">
+      <property name="PortNumber" value="1527"></property>
+      <property name="Password" value="APP"></property>
+      <property name="User" value="APP"></property>
+      <property name="serverName" value="localhost"></property>
+      <property name="DatabaseName" value="sun-appserv-samples"></property>
+      <property name="connectionAttributes" value=";create=true"></property>
+    </jdbc-connection-pool>
+  </resources>
+  <servers>
+    <server name="server" config-ref="server-config">
+      <application-ref ref="__admingui" virtual-servers="__asadmin"></application-ref>
+      <resource-ref ref="jdbc/__TimerPool"></resource-ref>
+      <resource-ref ref="jdbc/__default"></resource-ref>
+    </server>
+  </servers>
+  <nodes>
+    <node node-host="localhost" name="localhost-domain1" type="CONFIG" install-dir="${com.sun.aas.productRoot}"></node>
+  </nodes>
+  <configs>
+    <config name="server-config">
+      <system-property name="identification" value="GLASSFISHIDENTITY"></system-property>
+      <system-property name="discovery" value="DISCOVERY"></system-property>
+      <http-service>
+        <access-log></access-log>
+        <virtual-server id="server" network-listeners="http-listener-1,http-listener-2"></virtual-server>
+        <virtual-server id="__asadmin" network-listeners="admin-listener"></virtual-server>
+      </http-service>
+      <iiop-service>
+        <orb use-thread-pool-ids="thread-pool-1"></orb>
+        <iiop-listener port="3700" id="orb-listener-1" address="0.0.0.0" lazy-init="true"></iiop-listener>
+        <iiop-listener port="3820" id="SSL" address="0.0.0.0" security-enabled="true">
+          <ssl classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" cert-nickname="s1as"></ssl>
+        </iiop-listener>
+        <iiop-listener port="3920" id="SSL_MUTUALAUTH" address="0.0.0.0" security-enabled="true">
+          <ssl classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" cert-nickname="s1as" client-auth-enabled="true"></ssl>
+        </iiop-listener>
+      </iiop-service>
+      <admin-service system-jmx-connector-name="system" type="das-and-server">
+        <jmx-connector port="8686" address="0.0.0.0" security-enabled="false" auth-realm-name="admin-realm" name="system"></jmx-connector>
+        <property name="adminConsoleContextRoot" value="/admin"></property>
+        <property name="adminConsoleDownloadLocation" value="${com.sun.aas.installRoot}/lib/install/applications/admingui.war"></property>
+        <property name="ipsRoot" value="${com.sun.aas.installRoot}/.."></property>
+        <das-config></das-config>
+      </admin-service>
+      <connector-service></connector-service>
+      <web-container>
+        <session-config>
+          <session-manager>
+            <manager-properties></manager-properties>
+            <store-properties></store-properties>
+          </session-manager>
+          <session-properties></session-properties>
+        </session-config>
+      </web-container>
+      <ejb-container session-store="${com.sun.aas.instanceRoot}/session-store">
+        <ejb-timer-service></ejb-timer-service>
+      </ejb-container>
+      <mdb-container></mdb-container>
+      <jms-service default-jms-host="default_JMS_host">
+        <jms-host host="localhost" name="default_JMS_host"></jms-host>
+      </jms-service>
+      <security-service>
+        <auth-realm classname="com.sun.enterprise.security.auth.realm.file.FileRealm" name="admin-realm">
+          <property name="file" value="${com.sun.aas.instanceRoot}/config/admin-keyfile"></property>
+          <property name="jaas-context" value="fileRealm"></property>
+        </auth-realm>
+        <auth-realm classname="com.sun.enterprise.security.auth.realm.file.FileRealm" name="file">
+          <property name="file" value="${com.sun.aas.instanceRoot}/config/keyfile"></property>
+          <property name="jaas-context" value="fileRealm"></property>
+        </auth-realm>
+        <auth-realm classname="com.sun.enterprise.security.auth.realm.certificate.CertificateRealm" name="certificate"></auth-realm>
+        <jacc-provider policy-provider="com.sun.enterprise.security.provider.PolicyWrapper" name="default" policy-configuration-factory-provider="com.sun.enterprise.security.provider.PolicyConfigurationFactoryImpl">
+          <property name="repository" value="${com.sun.aas.instanceRoot}/generated/policy"></property>
+        </jacc-provider>
+        <jacc-provider policy-provider="com.sun.enterprise.security.jacc.provider.SimplePolicyProvider" name="simple" policy-configuration-factory-provider="com.sun.enterprise.security.jacc.provider.SimplePolicyConfigurationFactory"></jacc-provider>
+        <audit-module classname="com.sun.enterprise.security.Audit" name="default">
+          <property name="auditOn" value="false"></property>
+        </audit-module>
+        <message-security-config auth-layer="SOAP">
+          <provider-config provider-type="client" provider-id="XWS_ClientProvider" class-name="com.sun.xml.wss.provider.ClientSecurityAuthModule">
+            <request-policy auth-source="content"></request-policy>
+            <response-policy auth-source="content"></response-policy>
+            <property name="encryption.key.alias" value="s1as"></property>
+            <property name="signature.key.alias" value="s1as"></property>
+            <property name="dynamic.username.password" value="false"></property>
+            <property name="debug" value="false"></property>
+          </provider-config>
+          <provider-config provider-type="client" provider-id="ClientProvider" class-name="com.sun.xml.wss.provider.ClientSecurityAuthModule">
+            <request-policy auth-source="content"></request-policy>
+            <response-policy auth-source="content"></response-policy>
+            <property name="encryption.key.alias" value="s1as"></property>
+            <property name="signature.key.alias" value="s1as"></property>
+            <property name="dynamic.username.password" value="false"></property>
+            <property name="debug" value="false"></property>
+            <property name="security.config" value="${com.sun.aas.instanceRoot}/config/wss-server-config-1.0.xml"></property>
+          </provider-config>
+          <provider-config provider-type="server" provider-id="XWS_ServerProvider" class-name="com.sun.xml.wss.provider.ServerSecurityAuthModule">
+            <request-policy auth-source="content"></request-policy>
+            <response-policy auth-source="content"></response-policy>
+            <property name="encryption.key.alias" value="s1as"></property>
+            <property name="signature.key.alias" value="s1as"></property>
+            <property name="debug" value="false"></property>
+          </provider-config>
+          <provider-config provider-type="server" provider-id="ServerProvider" class-name="com.sun.xml.wss.provider.ServerSecurityAuthModule">
+            <request-policy auth-source="content"></request-policy>
+            <response-policy auth-source="content"></response-policy>
+            <property name="encryption.key.alias" value="s1as"></property>
+            <property name="signature.key.alias" value="s1as"></property>
+            <property name="debug" value="false"></property>
+            <property name="security.config" value="${com.sun.aas.instanceRoot}/config/wss-server-config-1.0.xml"></property>
+          </provider-config>
+        </message-security-config>
+        <message-security-config auth-layer="HttpServlet">
+          <provider-config provider-type="server" provider-id="GFConsoleAuthModule" class-name="org.glassfish.admingui.common.security.AdminConsoleAuthModule">
+            <request-policy auth-source="sender"></request-policy>
+            <response-policy></response-policy>
+            <property name="restAuthURL" value="http://localhost:${ADMIN_LISTENER_PORT}/management/sessions"></property>
+            <property name="loginPage" value="/login.jsf"></property>
+            <property name="loginErrorPage" value="/loginError.jsf"></property>
+          </provider-config>
+        </message-security-config>
+        <property name="default-digest-algorithm" value="SHA-256"></property>
+      </security-service>
+      <transaction-service tx-log-dir="${com.sun.aas.instanceRoot}/logs"></transaction-service>
+      <java-config debug-options="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9009" system-classpath="" classpath-suffix="">
+        <jvm-options>-XX:MaxPermSize=192m</jvm-options>
+        <jvm-options>-client</jvm-options>
+        <jvm-options>-Djava.awt.headless=true</jvm-options>
+        <jvm-options>-Djavax.management.builder.initial=com.sun.enterprise.v3.admin.AppServerMBeanServerBuilder</jvm-options>
+        <jvm-options>-XX:+UnlockDiagnosticVMOptions</jvm-options>
+        <jvm-options>-Djava.endorsed.dirs=${com.sun.aas.installRoot}/modules/endorsed${path.separator}${com.sun.aas.installRoot}/lib/endorsed</jvm-options>
+        <jvm-options>-Djava.security.policy=${com.sun.aas.instanceRoot}/config/server.policy</jvm-options>
+        <jvm-options>-Djava.security.auth.login.config=${com.sun.aas.instanceRoot}/config/login.conf</jvm-options>
+        <jvm-options>-Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as</jvm-options>
+        <jvm-options>-Xmx512m</jvm-options>
+        <jvm-options>-Djavax.net.ssl.keyStore=${com.sun.aas.instanceRoot}/config/keystore.jks</jvm-options>
+        <jvm-options>-Djavax.net.ssl.trustStore=${com.sun.aas.instanceRoot}/config/cacerts.jks</jvm-options>
+        <jvm-options>-Djava.ext.dirs=${com.sun.aas.javaRoot}/lib/ext${path.separator}${com.sun.aas.javaRoot}/jre/lib/ext${path.separator}${com.sun.aas.instanceRoot}/lib/ext</jvm-options>
+        <jvm-options>-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver</jvm-options>
+        <jvm-options>-DANTLR_USE_DIRECT_CLASS_LOADING=true</jvm-options>
+        <jvm-options>-Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory</jvm-options>
+        <jvm-options>-Dosgi.shell.telnet.port=6666</jvm-options>
+        <jvm-options>-Dosgi.shell.telnet.maxconn=1</jvm-options>
+        <jvm-options>-Dosgi.shell.telnet.ip=127.0.0.1</jvm-options>
+        <jvm-options>-Dgosh.args=--nointeractive</jvm-options>
+        <jvm-options>-Dfelix.fileinstall.dir=${com.sun.aas.installRoot}/modules/autostart/</jvm-options>
+        <jvm-options>-Dfelix.fileinstall.poll=5000</jvm-options>
+        <jvm-options>-Dfelix.fileinstall.log.level=2</jvm-options>
+        <jvm-options>-Dfelix.fileinstall.bundles.new.start=true</jvm-options>
+        <jvm-options>-Dfelix.fileinstall.bundles.startTransient=true</jvm-options>
+        <jvm-options>-Dfelix.fileinstall.disableConfigSave=false</jvm-options>
+        <jvm-options>-XX:NewRatio=2</jvm-options>
+      </java-config>
+      <network-config>
+        <protocols>
+          <protocol name="http-listener-1">
+            <http default-virtual-server="server" max-connections="250">
+              <file-cache></file-cache>
+            </http>
+          </protocol>
+          <protocol security-enabled="true" name="http-listener-2">
+            <http default-virtual-server="server" max-connections="250">
+              <file-cache></file-cache>
+            </http>
+            <ssl classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" ssl3-enabled="false" cert-nickname="s1as"></ssl>
+          </protocol>
+          <protocol name="admin-listener">
+            <http default-virtual-server="__asadmin" max-connections="250" encoded-slash-enabled="true">
+              <file-cache></file-cache>
+            </http>
+          </protocol>
+        </protocols>
+        <network-listeners>
+          <network-listener port="GLASSFISHPORT" protocol="http-listener-1" transport="tcp" name="http-listener-1" thread-pool="http-thread-pool"></network-listener>
+          <network-listener port="8181" protocol="http-listener-2" transport="tcp" name="http-listener-2" thread-pool="http-thread-pool"></network-listener>
+          <network-listener port="4848" protocol="admin-listener" transport="tcp" name="admin-listener" thread-pool="admin-thread-pool"></network-listener>
+        </network-listeners>
+        <transports>
+          <transport name="tcp"></transport>
+        </transports>
+      </network-config>
+      <thread-pools>
+        <thread-pool name="admin-thread-pool" max-thread-pool-size="50" max-queue-size="256"></thread-pool>
+        <thread-pool name="http-thread-pool"></thread-pool>
+        <thread-pool name="thread-pool-1" max-thread-pool-size="200"></thread-pool>
+      </thread-pools>
+      <monitoring-service>
+        <module-monitoring-levels></module-monitoring-levels>
+      </monitoring-service>
+      <group-management-service>
+        <failure-detection></failure-detection>
+      </group-management-service>
+    </config>
+    <config name="default-config">
+      <http-service>
+        <access-log></access-log>
+        <virtual-server id="server" network-listeners="http-listener-1, http-listener-2">
+          <property name="default-web-xml" value="${com.sun.aas.instanceRoot}/config/default-web.xml"></property>
+        </virtual-server>
+        <virtual-server id="__asadmin" network-listeners="admin-listener"></virtual-server>
+      </http-service>
+      <iiop-service>
+        <orb use-thread-pool-ids="thread-pool-1"></orb>
+        <iiop-listener port="${IIOP_LISTENER_PORT}" id="orb-listener-1" address="0.0.0.0"></iiop-listener>
+        <iiop-listener port="${IIOP_SSL_LISTENER_PORT}" id="SSL" address="0.0.0.0" security-enabled="true">
+          <ssl classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" cert-nickname="s1as"></ssl>
+        </iiop-listener>
+        <iiop-listener port="${IIOP_SSL_MUTUALAUTH_PORT}" id="SSL_MUTUALAUTH" address="0.0.0.0" security-enabled="true">
+          <ssl classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" cert-nickname="s1as" client-auth-enabled="true"></ssl>
+        </iiop-listener>
+      </iiop-service>
+      <admin-service system-jmx-connector-name="system">
+        <jmx-connector port="${JMX_SYSTEM_CONNECTOR_PORT}" address="0.0.0.0" security-enabled="false" auth-realm-name="admin-realm" name="system"></jmx-connector>
+        <property name="adminConsoleDownloadLocation" value="${com.sun.aas.installRoot}/lib/install/applications/admingui.war"></property>
+        <das-config></das-config>
+      </admin-service>
+      <web-container>
+        <session-config>
+          <session-manager>
+            <manager-properties></manager-properties>
+            <store-properties></store-properties>
+          </session-manager>
+          <session-properties></session-properties>
+        </session-config>
+      </web-container>
+      <ejb-container session-store="${com.sun.aas.instanceRoot}/session-store">
+        <ejb-timer-service></ejb-timer-service>
+      </ejb-container>
+      <mdb-container></mdb-container>
+      <jms-service addresslist-behavior="priority" default-jms-host="default_JMS_host">
+        <jms-host port="${JMS_PROVIDER_PORT}" host="localhost" name="default_JMS_host"></jms-host>
+      </jms-service>
+      <log-service log-rotation-limit-in-bytes="2000000" file="${com.sun.aas.instanceRoot}/logs/server.log">
+        <module-log-levels></module-log-levels>
+      </log-service>
+      <security-service>
+        <auth-realm classname="com.sun.enterprise.security.auth.realm.file.FileRealm" name="admin-realm">
+          <property name="file" value="${com.sun.aas.instanceRoot}/config/admin-keyfile"></property>
+          <property name="jaas-context" value="fileRealm"></property>
+        </auth-realm>
+        <auth-realm classname="com.sun.enterprise.security.auth.realm.file.FileRealm" name="file">
+          <property name="file" value="${com.sun.aas.instanceRoot}/config/keyfile"></property>
+          <property name="jaas-context" value="fileRealm"></property>
+        </auth-realm>
+        <auth-realm classname="com.sun.enterprise.security.auth.realm.certificate.CertificateRealm" name="certificate"></auth-realm>
+        <jacc-provider policy-provider="com.sun.enterprise.security.provider.PolicyWrapper" name="default" policy-configuration-factory-provider="com.sun.enterprise.security.provider.PolicyConfigurationFactoryImpl">
+          <property name="repository" value="${com.sun.aas.instanceRoot}/generated/policy"></property>
+        </jacc-provider>
+        <jacc-provider policy-provider="com.sun.enterprise.security.jacc.provider.SimplePolicyProvider" name="simple" policy-configuration-factory-provider="com.sun.enterprise.security.jacc.provider.SimplePolicyConfigurationFactory"></jacc-provider>
+        <audit-module classname="com.sun.enterprise.security.Audit" name="default">
+          <property name="auditOn" value="false"></property>
+        </audit-module>
+        <message-security-config auth-layer="SOAP">
+          <provider-config provider-type="client" provider-id="XWS_ClientProvider" class-name="com.sun.xml.wss.provider.ClientSecurityAuthModule">
+            <request-policy auth-source="content"></request-policy>
+            <response-policy auth-source="content"></response-policy>
+            <property name="encryption.key.alias" value="s1as"></property>
+            <property name="signature.key.alias" value="s1as"></property>
+            <property name="dynamic.username.password" value="false"></property>
+            <property name="debug" value="false"></property>
+          </provider-config>
+          <provider-config provider-type="client" provider-id="ClientProvider" class-name="com.sun.xml.wss.provider.ClientSecurityAuthModule">
+            <request-policy auth-source="content"></request-policy>
+            <response-policy auth-source="content"></response-policy>
+            <property name="encryption.key.alias" value="s1as"></property>
+            <property name="signature.key.alias" value="s1as"></property>
+            <property name="dynamic.username.password" value="false"></property>
+            <property name="debug" value="false"></property>
+            <property name="security.config" value="${com.sun.aas.instanceRoot}/config/wss-server-config-1.0.xml"></property>
+          </provider-config>
+          <provider-config provider-type="server" provider-id="XWS_ServerProvider" class-name="com.sun.xml.wss.provider.ServerSecurityAuthModule">
+            <request-policy auth-source="content"></request-policy>
+            <response-policy auth-source="content"></response-policy>
+            <property name="encryption.key.alias" value="s1as"></property>
+            <property name="signature.key.alias" value="s1as"></property>
+            <property name="debug" value="false"></property>
+          </provider-config>
+          <provider-config provider-type="server" provider-id="ServerProvider" class-name="com.sun.xml.wss.provider.ServerSecurityAuthModule">
+            <request-policy auth-source="content"></request-policy>
+            <response-policy auth-source="content"></response-policy>
+            <property name="encryption.key.alias" value="s1as"></property>
+            <property name="signature.key.alias" value="s1as"></property>
+            <property name="debug" value="false"></property>
+            <property name="security.config" value="${com.sun.aas.instanceRoot}/config/wss-server-config-1.0.xml"></property>
+          </provider-config>
+        </message-security-config>
+      </security-service>
+      <transaction-service tx-log-dir="${com.sun.aas.instanceRoot}/logs" automatic-recovery="true"></transaction-service>
+      <diagnostic-service></diagnostic-service>
+      <java-config debug-options="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=${JAVA_DEBUGGER_PORT}" system-classpath="" classpath-suffix="">
+        <jvm-options>-XX:MaxPermSize=192m</jvm-options>
+        <jvm-options>-server</jvm-options>
+        <jvm-options>-Djava.awt.headless=true</jvm-options>
+        <jvm-options>-XX:+UnlockDiagnosticVMOptions</jvm-options>
+        <jvm-options>-Djava.endorsed.dirs=${com.sun.aas.installRoot}/modules/endorsed${path.separator}${com.sun.aas.installRoot}/lib/endorsed</jvm-options>
+        <jvm-options>-Djava.security.policy=${com.sun.aas.instanceRoot}/config/server.policy</jvm-options>
+        <jvm-options>-Djava.security.auth.login.config=${com.sun.aas.instanceRoot}/config/login.conf</jvm-options>
+        <jvm-options>-Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as</jvm-options>
+        <jvm-options>-Djavax.net.ssl.keyStore=${com.sun.aas.instanceRoot}/config/keystore.jks</jvm-options>
+        <jvm-options>-Djavax.net.ssl.trustStore=${com.sun.aas.instanceRoot}/config/cacerts.jks</jvm-options>
+        <jvm-options>-Djava.ext.dirs=${com.sun.aas.javaRoot}/lib/ext${path.separator}${com.sun.aas.javaRoot}/jre/lib/ext${path.separator}${com.sun.aas.instanceRoot}/lib/ext</jvm-options>
+        <jvm-options>-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver</jvm-options>
+        <jvm-options>-DANTLR_USE_DIRECT_CLASS_LOADING=true</jvm-options>
+        <jvm-options>-Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory</jvm-options>
+        <jvm-options>-XX:NewRatio=2</jvm-options>
+        <jvm-options>-Xmx512m</jvm-options>
+        <jvm-options>-Dosgi.shell.telnet.port=${OSGI_SHELL_TELNET_PORT}</jvm-options>
+        <jvm-options>-Dosgi.shell.telnet.maxconn=1</jvm-options>
+        <jvm-options>-Dosgi.shell.telnet.ip=127.0.0.1</jvm-options>
+        <jvm-options>-Dgosh.args=--noshutdown -c noop=true</jvm-options>
+        <jvm-options>-Dfelix.fileinstall.dir=${com.sun.aas.installRoot}/modules/autostart/</jvm-options>
+        <jvm-options>-Dfelix.fileinstall.poll=5000</jvm-options>
+        <jvm-options>-Dfelix.fileinstall.log.level=3</jvm-options>
+        <jvm-options>-Dfelix.fileinstall.bundles.new.start=true</jvm-options>
+        <jvm-options>-Dfelix.fileinstall.bundles.startTransient=true</jvm-options>
+        <jvm-options>-Dfelix.fileinstall.disableConfigSave=false</jvm-options>
+      </java-config>
+      <availability-service>
+        <web-container-availability></web-container-availability>
+        <ejb-container-availability sfsb-store-pool-name="jdbc/hastore"></ejb-container-availability>
+        <jms-availability></jms-availability>
+      </availability-service>
+      <network-config>
+        <protocols>
+          <protocol name="http-listener-1">
+            <http default-virtual-server="server">
+              <file-cache></file-cache>
+            </http>
+          </protocol>
+          <protocol security-enabled="true" name="http-listener-2">
+            <http default-virtual-server="server">
+              <file-cache></file-cache>
+            </http>
+            <ssl classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" ssl3-enabled="false" cert-nickname="s1as"></ssl>
+          </protocol>
+          <protocol name="admin-listener">
+            <http default-virtual-server="__asadmin" max-connections="250">
+              <file-cache></file-cache>
+            </http>
+          </protocol>
+          <protocol security-enabled="true" name="sec-admin-listener">
+            <http default-virtual-server="__asadmin" encoded-slash-enabled="true">
+              <file-cache></file-cache>
+            </http>
+            <ssl client-auth="want" ssl3-enabled="false" classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" cert-nickname="glassfish-instance"></ssl>
+          </protocol>
+          <protocol name="admin-http-redirect">
+            <http-redirect secure="true"></http-redirect>
+          </protocol>
+          <protocol name="pu-protocol">
+            <port-unification>
+              <protocol-finder protocol="sec-admin-listener" name="http-finder" classname="com.sun.grizzly.config.HttpProtocolFinder"></protocol-finder>
+              <protocol-finder protocol="admin-http-redirect" name="admin-http-redirect" classname="com.sun.grizzly.config.HttpProtocolFinder"></protocol-finder>
+            </port-unification>
+          </protocol>
+        </protocols>
+        <network-listeners>
+          <network-listener port="${HTTP_LISTENER_PORT}" protocol="http-listener-1" transport="tcp" name="http-listener-1" thread-pool="http-thread-pool"></network-listener>
+          <network-listener port="${HTTP_SSL_LISTENER_PORT}" protocol="http-listener-2" transport="tcp" name="http-listener-2" thread-pool="http-thread-pool"></network-listener>
+          <network-listener port="${ASADMIN_LISTENER_PORT}" protocol="pu-protocol" transport="tcp" name="admin-listener" thread-pool="http-thread-pool"></network-listener>
+        </network-listeners>
+        <transports>
+          <transport name="tcp"></transport>
+        </transports>
+      </network-config>
+      <thread-pools>
+        <thread-pool name="http-thread-pool"></thread-pool>
+        <thread-pool max-thread-pool-size="200" name="thread-pool-1"></thread-pool>
+        <thread-pool name="admin-thread-pool" max-thread-pool-size="50" max-queue-size="256"></thread-pool>
+      </thread-pools>
+      <group-management-service>
+        <failure-detection></failure-detection>
+      </group-management-service>
+      <management-rules></management-rules>
+      <system-property name="ASADMIN_LISTENER_PORT" value="24848"></system-property>
+      <system-property name="HTTP_LISTENER_PORT" value="28080"></system-property>
+      <system-property name="HTTP_SSL_LISTENER_PORT" value="28181"></system-property>
+      <system-property name="JMS_PROVIDER_PORT" value="27676"></system-property>
+      <system-property name="IIOP_LISTENER_PORT" value="23700"></system-property>
+      <system-property name="IIOP_SSL_LISTENER_PORT" value="23820"></system-property>
+      <system-property name="IIOP_SSL_MUTUALAUTH_PORT" value="23920"></system-property>
+      <system-property name="JMX_SYSTEM_CONNECTOR_PORT" value="28686"></system-property>
+      <system-property name="OSGI_SHELL_TELNET_PORT" value="26666"></system-property>
+      <system-property name="JAVA_DEBUGGER_PORT" value="29009"></system-property>
+      <monitoring-service>
+        <module-monitoring-levels></module-monitoring-levels>
+      </monitoring-service>
+      <connector-service></connector-service>
+    </config>
+  </configs>
+  <property name="administrative.domain.name" value="domain1"></property>
+  <secure-admin special-admin-indicator="2552304d-1585-4f74-a9b2-61823441c458">
+    <secure-admin-principal dn="CN=localhost,OU=GlassFish,O=Oracle Corporation,L=Santa Clara,ST=California,C=US"></secure-admin-principal>
+    <secure-admin-principal dn="CN=localhost-instance,OU=GlassFish,O=Oracle Corporation,L=Santa Clara,ST=California,C=US"></secure-admin-principal>
+  </secure-admin>
+  <load-balancers></load-balancers>
+  <lb-configs></lb-configs>
+  <clusters></clusters>
+</domain>
\ No newline at end of file

Added: incubator/ace/trunk/ace-glassfish-launcher/src/main/resources/osgi.properties
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/ace-glassfish-launcher/src/main/resources/osgi.properties?rev=1188957&view=auto
==============================================================================
--- incubator/ace/trunk/ace-glassfish-launcher/src/main/resources/osgi.properties (added)
+++ incubator/ace/trunk/ace-glassfish-launcher/src/main/resources/osgi.properties Tue Oct 25 22:46:02 2011
@@ -0,0 +1,376 @@
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+#
+# Copyright (c) 2010-2011 Oracle and/or its affiliates. All rights reserved.
+#
+# The contents of this file are subject to the terms of either the GNU
+# General Public License Version 2 only ("GPL") or the Common Development
+# and Distribution License("CDDL") (collectively, the "License").  You
+# may not use this file except in compliance with the License.  You can
+# obtain a copy of the License at
+# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
+# or packager/legal/LICENSE.txt.  See the License for the specific
+# language governing permissions and limitations under the License.
+#
+# When distributing the software, include this License Header Notice in each
+# file and include the License file at packager/legal/LICENSE.txt.
+#
+# GPL Classpath Exception:
+# Oracle designates this particular file as subject to the "Classpath"
+# exception as provided by Oracle in the GPL Version 2 section of the License
+# file that accompanied this code.
+#
+# Modifications:
+# If applicable, add the following below the License Header, with the fields
+# enclosed by brackets [] replaced by your own identifying information:
+# "Portions Copyright [year] [name of copyright owner]"
+#
+# Contributor(s):
+# If you wish your version of this file to be governed by only the CDDL or
+# only the GPL Version 2, indicate your decision by adding "[Contributor]
+# elects to include this software in this distribution under the [CDDL or GPL
+# Version 2] license."  If you don't indicate a single choice of license, a
+# recipient has the option to distribute your version of this file under
+# either the CDDL, the GPL Version 2 or to extend the choice of license to
+# its licensees as provided above.  However, if you add GPL Version 2 code
+# and therefore, elected the GPL Version 2 license, then the option applies
+# only if the new code is made subject to such option by the copyright
+# holder.
+#
+#
+# This file incorporates work covered by the following copyright and
+# permission notice:
+#
+# 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.
+#
+
+
+#
+# Framework config properties.
+#
+
+# Packages exported by system bundle when framework is Felix.
+# Unlike Equinox, Felix requires us to list all packages from felix.jar 
+# while using org.osgi.framework.system.packages property.
+Felix.system.packages=\
+ org.osgi.framework; version=1.5.0, \
+ org.osgi.framework.launch; version=1.0.0, \
+ org.osgi.framework.hooks.service; version=1.0.0, \
+ org.osgi.service.packageadmin; version=1.2.0, \
+ org.osgi.service.startlevel; version=1.1.0, \
+ org.osgi.service.url; version=1.0.0, \
+ org.osgi.util.tracker; version=1.4.0, \
+ ${extra-system-packages}
+
+# Packages exported by system bundle when framework is Equinox.
+# Unlike Felix, It is not required to explicitly mention the packages exported by equinox framework jar.
+# Equinox automatically adds packages from equinox.jar to exported package list.
+Equinox.system.packages=${extra-system-packages}
+
+org.osgi.framework.system.packages=${${GlassFish_Platform}.system.packages}
+
+# embeddable package version must match what is found in core/bootstrap/osgi.bundle file. See that file more details.
+extra-system-packages=${jre-${java.specification.version}}, org.glassfish.embeddable;org.glassfish.embeddable.spi;version=3.1.1
+
+# Although Eclipselink imports these packages, in typical GlassFish installation,
+# Oracle JDBC driver may not be available as a bundle, so we ask user to install it in 
+# java.ext.dirs and the bootdelegation helps there.
+eclipselink.bootdelegation=oracle.sql, oracle.sql.*
+
+# There is no need to use bootdelegation except for the following issues:
+# 1. EclipseLink
+# 4. NetBeans profiler packages exist in parent class loader (see issue #8612)
+# 5. BTrace exists in bootclasspath.
+org.osgi.framework.bootdelegation=${eclipselink.bootdelegation}, \
+                                  com.sun.btrace, com.sun.btrace.*, \
+                                  org.netbeans.lib.profiler, org.netbeans.lib.profiler.*
+                                  
+# The OSGi R4.2 spec says boot delegation uses the boot class loader by default. We need
+# to configure it to use the framework class loader because that class loader is
+# configured with extra classes like jdk tools.jar, derby jars, etc. that must be
+# made available in GlassFish to work.
+org.osgi.framework.bundle.parent=framework
+
+# We don't set this value here, as expanding GlassFish_Platform gives us a file name with upper case
+# char in it. GlassFish file layout does not recommend use of upper case char, because some 
+# platforms like Windows don't honor case in file names. So, we don't set the cache dir here.
+# Instead, it is set in various PlatformHelper implementations.
+#org.osgi.framework.storage=${com.sun.aas.instanceRoot}/osgi-cache/${GlassFish_Platform}/
+
+# This is where we cache the inhabitants information
+com.sun.enterprise.hk2.cacheDir=${org.osgi.framework.storage}
+
+# Important Note about glassfish.osgi.auto.* properties.
+# These properties are interpreted by our autoprocessor to install and start the configured list of bundles.
+# There are three properties:
+# glassfish.osgi.auto.install, glassfish.osgi.auto.start, glassfish.osgi.auto.start.level[.N]
+# to control what gets installed in which order, what gets started and what should be the bundle's start level.
+# glassfish.osgi.auto.install is used to configure a list of locations from where bundles will be installed.
+# The order is important as bundle installation order is an input to package resolution process in OSGi.
+# Since we want packages from endorsed bundles to be preferred over those exported by system bundle for 
+# overlapping packages, we need to install and start endorsed bundles first. 
+# Then we autostart GlassFish core bundles followed by optional services.
+# The reason for using installRootURI is to make sure any char like white space is properly encoded.
+glassfish.osgi.auto.install=${com.sun.aas.installRootURI}modules/endorsed/ \
+                       ${com.sun.aas.installRootURI}modules/ \
+                       ${com.sun.aas.installRootURI}modules/autostart/
+
+core.bundles=${com.sun.aas.installRootURI}modules/osgi-adapter.jar \
+             ${com.sun.aas.installRootURI}modules/glassfish.jar
+
+osgi-ee.bundles=${com.sun.aas.installRootURI}modules/osgi-resource-locator.jar \
+                             ${com.sun.aas.installRootURI}modules/org.apache.felix.configadmin.jar \
+                             ${com.sun.aas.installRootURI}modules/autostart/ \
+                             ${com.sun.aas.installRootURI}modules/org.apache.felix.fileinstall.jar
+
+osgi-shell.bundles=\
+                             ${com.sun.aas.installRootURI}modules/org.apache.felix.gogo.runtime.jar \
+                             ${com.sun.aas.installRootURI}modules/org.apache.felix.gogo.command.jar \
+                             ${com.sun.aas.installRootURI}modules/org.apache.felix.gogo.shell.jar \
+                             ${com.sun.aas.installRootURI}modules/org.apache.felix.shell.remote.jar
+
+
+# This property is used to configure a list of bundles to be started by our autoprocessor.
+# Eventual activation of the bundles depend on bundle's start level and activation policy.
+glassfish.osgi.auto.start=${com.sun.aas.installRootURI}modules/endorsed/ \
+		     ${core.bundles} \
+		     ${osgi-ee.bundles} \
+		     ${osgi-shell.bundles}
+
+# List of bundles whose start level is 1
+glassfish.osgi.auto.start.level.1=${core.bundles}
+
+# List of bundles whose start level is 2
+# For start up performance, we don't start optional bundles before start level 2.
+glassfish.osgi.auto.start.level.2=${osgi-ee.bundles}
+
+# List of bundles whose start level is 3
+glassfish.osgi.auto.start.level.3=${osgi-shell.bundles}
+
+# Final start level of OSGi framework. This is used by GlassFish launcher code
+# to set the start level of the OSGi framework once server is up and running so that
+# optional services can start. The initial start level of framework is controlled using
+# the standard framework property called org.osgi.framework.startlevel.beginning
+glassfish.osgi.start.level.final=3
+
+# What should be the initial start level of framework. 
+# For performance reason, initially we set the start level to 1 so that no optional
+# bundles can get activated while server is still starting. Once server is started,
+# the framework's start level is set to whatever is configured in glassfish.osgi.start.level.final property.
+org.osgi.framework.startlevel.beginning=1
+
+# Set bundle start level to be same or less than that of framework, 
+# otherwise HK2 installed bundles won't be activated.
+# See issue #5934
+felix.startlevel.bundle=1
+
+# log level 1: error, 2: warning, 3: info, 4: debug
+felix.log.level=1
+
+# The Felix launcher registers a shutdown hook to cleanly stop the framework
+# by default, uncomment the following line to disable it.
+# Since, GlassFish uses its own shutdown hook to stop the framework, we don't need this.
+felix.shutdown.hook=false
+
+#felix.service.urlhandlers=false
+
+# See equinox bug #329314
+osgi.resolver.preferSystemPackages=false
+
+# See equinox bug #344850
+osgi.compatibility.bootdelegation=false
+
+#
+# Java SE 6 platform packages. Taken from: http://java.sun.com/javase/6/docs/api/
+# Don't add/remove any new package unless you find bugs.
+# Since we don't know the actual package versions,
+# we export most of them with default version.
+jre-1.6=\
+ javax.accessibility, \
+ javax.activation, \
+ javax.activity, \
+ 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.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.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.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.xpath, \
+ org.ietf.jgss, \
+ org.omg.CORBA, \
+ org.omg.CORBA.DynAnyPackage, \
+ org.omg.CORBA.ORBPackage, \
+ org.omg.CORBA.TypeCodePackage, \
+ org.omg.CORBA.portable, \
+ org.omg.CORBA_2_3, \
+ org.omg.CORBA_2_3.portable, \
+ 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.ServantLocatorPackage, \
+ org.omg.PortableServer.portable, \
+ org.omg.SendingContext, \
+ org.w3c.dom, \
+ org.w3c.dom.bootstrap, \
+ org.w3c.dom.events, \
+ org.w3c.dom.ls, \
+ org.xml.sax, \
+ org.xml.sax.ext, \
+ org.xml.sax.helpers, ${endorsed-standard-packages}
+
+endorsed-standard-packages=\
+ javax.annotation, \
+ 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.jws, \
+ javax.jws.soap, \
+ 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.ws.wsaddressing
+
+#dtrace support 
+jre-1.7=${jre-1.6},com.sun.tracing
+
+# Bundle information optimization to improve performance
+felix.cache.singlebundlefile=true
+
+# Set this to true if you want to use JPA in Java SE mode in your OSGi bundles.
+# See GLASSFISH-14134 for more details.
+org.glassfish.osgjpa.extension.useHybridPersistenceProviderResolver=false
+
+# When HybridPersistenceProviderResolver is used, it can be configured to use a cache. 
+# Setting the next property to false, disables caching of providers.
+org.glassfish.osgjpa.extension.hybridPersistenceProviderResolver.cachingEnabled=true
+
+# We have stopped using FileInstall to monitor autostart/. Because we can't change domain.xml
+# in 3.1.1, we have to rely on configuring FileInstall using this file.
+felix.fileinstall.dir=${com.sun.aas.instanceRoot}/autodeploy/bundles/
+felix.fileinstall.poll=5000
+felix.fileinstall.log.level=3
+felix.fileinstall.bundles.new.start=true
+felix.fileinstall.bundles.startTransient=true
+felix.fileinstall.disableConfigSave=false
+
+# If we don't set this, when we run our tests in embedded mode, gogo shell stops the framework after running the login command.
+gosh.args=--nointeractive

Modified: incubator/ace/trunk/ace-nodelauncher-amazon/pom.xml
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/ace-nodelauncher-amazon/pom.xml?rev=1188957&r1=1188956&r2=1188957&view=diff
==============================================================================
--- incubator/ace/trunk/ace-nodelauncher-amazon/pom.xml (original)
+++ incubator/ace/trunk/ace-nodelauncher-amazon/pom.xml Tue Oct 25 22:46:02 2011
@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 
     <!--
 
@@ -33,11 +34,12 @@
     <packaging>bundle</packaging>
 
     <name>Apache ACE :: NodeLauncher :: Amazon provider</name>
-    <description />
+    <description/>
 
     <scm>
         <connection>scm:svn:http://svn.apache.org/repos/asf/incubator/ace/trunk/ace-nodelauncher-amazon</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/incubator/ace/trunk/ace-nodelauncher-amazon</developerConnection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/incubator/ace/trunk/ace-nodelauncher-amazon
+        </developerConnection>
         <url>http://svn.apache.org/repos/asf/incubator/ace/trunk/ace-nodelauncher-amazon</url>
     </scm>
 
@@ -84,17 +86,27 @@
             <groupId>org.apache.ace</groupId>
             <artifactId>org.apache.ace.nodelauncher.api</artifactId>
         </dependency>
-       <dependency>
+        <dependency>
             <groupId>org.jclouds.driver</groupId>
             <artifactId>jclouds-jsch</artifactId>
             <version>1.2.1</version>
             <scope>compile</scope>
         </dependency>
+        <dependency>
+            <groupId>org.jclouds</groupId>
+            <artifactId>jclouds-allcompute</artifactId>
+            <version>1.2.1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+            <version>1.5.11</version>
+        </dependency>
          <dependency>
-        <groupId>org.jclouds</groupId>
-        <artifactId>jclouds-allcompute</artifactId>
-        <version>1.2.1</version>
-   </dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-simple</artifactId>
+            <version>1.5.11</version>
+        </dependency>
         <dependency>
             <groupId>com.jcraft</groupId>
             <artifactId>jsch</artifactId>

Modified: incubator/ace/trunk/ace-nodelauncher-amazon/src/main/java/org/apache/ace/nodelauncher/amazon/AmazonNodeLauncher.java
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/ace-nodelauncher-amazon/src/main/java/org/apache/ace/nodelauncher/amazon/AmazonNodeLauncher.java?rev=1188957&r1=1188956&r2=1188957&view=diff
==============================================================================
--- incubator/ace/trunk/ace-nodelauncher-amazon/src/main/java/org/apache/ace/nodelauncher/amazon/AmazonNodeLauncher.java (original)
+++ incubator/ace/trunk/ace-nodelauncher-amazon/src/main/java/org/apache/ace/nodelauncher/amazon/AmazonNodeLauncher.java Tue Oct 25 22:46:02 2011
@@ -29,7 +29,6 @@ import org.jclouds.compute.domain.Templa
 import org.jclouds.compute.options.RunScriptOptions;
 import org.jclouds.ec2.compute.options.EC2TemplateOptions;
 import org.jclouds.ec2.domain.InstanceType;
-import org.jclouds.ec2.reference.EC2Constants;
 import org.jclouds.scriptbuilder.domain.Statements;
 import org.jclouds.ssh.jsch.config.JschSshClientModule;
 import org.osgi.service.cm.ConfigurationException;
@@ -120,7 +119,13 @@ public class AmazonNodeLauncher implemen
      * Default set of ports to open on a node.
      */
     public static final int[] DEFAULT_PORTS = new int[] {22, 80, 8080};
-    
+
+    public static final String ACE_LAUNCHER = "aceLauncher";
+
+    public static final String ADDITIONAL_OBR_DOWNLOADS = "additionalObrDownloads";
+
+    public static final String EXERNAL_DOWNLOAD_URLS = "externalDownloadUrls";
+
     private URL m_server;
     private String m_amiId; 
     private String m_location;
@@ -133,6 +138,10 @@ public class AmazonNodeLauncher implemen
     private String m_launcherArguments;
     private String m_extraPorts;
     private boolean m_runAsRoot;
+    private String m_aceLauncher;
+    private String m_additionalObrDownloads;
+    private String m_externalDownloadUrls;
+
 
 
     private ComputeServiceContext m_computeServiceContext;
@@ -191,9 +200,18 @@ public class AmazonNodeLauncher implemen
         if (m_nodeBootstrap != null) {
             script.append(m_nodeBootstrap).append(" ; ");
         }
-        script.append("wget ").append(new URL(m_server, "/obr/ace-launcher.jar")).append(" ;");
 
-        script.append("nohup java -jar ace-launcher.jar ");
+        script.append("wget ").append(new URL(m_server, "/obr/" + m_aceLauncher)).append(" ;");
+
+        for(String additonalDownload : m_additionalObrDownloads.split(",")) {
+            script.append("wget ").append(new URL(m_server, "/obr/" + additonalDownload.trim())).append(" ;");
+        }
+
+        for(String additonalDownload : m_externalDownloadUrls.split(",")) {
+            script.append("wget ").append(additonalDownload.trim()).append(" ;");
+        }
+
+        script.append("nohup java -jar ").append(m_aceLauncher).append(" ");
         script.append("discovery=").append(m_server.toExternalForm()).append(" ");
         script.append("identification=").append(id).append(" ");
         script.append(m_vmOptions).append(" ");
@@ -250,6 +268,9 @@ public class AmazonNodeLauncher implemen
             String launcherArguments = getConfigProperty(properties, LAUNCHER_ARGUMENTS, "");
             String extraPorts = getConfigProperty(properties, EXTRA_PORTS, "");
             String runAsRoot = getConfigProperty(properties, RUN_AS_ROOT, "false");
+            String aceLauncher = getConfigProperty(properties, ACE_LAUNCHER, "ace-launcher.jar");
+            String additionalObrDownloads = getConfigProperty(properties, ADDITIONAL_OBR_DOWNLOADS);
+            String externalDownloadUrls = getConfigProperty(properties, EXERNAL_DOWNLOAD_URLS);
 
             m_server = server;
             m_amiId = amiId;
@@ -263,6 +284,9 @@ public class AmazonNodeLauncher implemen
             m_launcherArguments = launcherArguments;
             m_extraPorts = extraPorts;
             m_runAsRoot = "true".equals(runAsRoot);
+            m_aceLauncher = aceLauncher;
+            m_additionalObrDownloads = additionalObrDownloads;
+            m_externalDownloadUrls = externalDownloadUrls;
         }
     }
 

Modified: incubator/ace/trunk/ace-target-devserver/pom.xml
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/ace-target-devserver/pom.xml?rev=1188957&r1=1188956&r2=1188957&view=diff
==============================================================================
--- incubator/ace/trunk/ace-target-devserver/pom.xml (original)
+++ incubator/ace/trunk/ace-target-devserver/pom.xml Tue Oct 25 22:46:02 2011
@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 
     <!--
 
@@ -33,11 +34,12 @@
     <packaging>pom</packaging>
 
     <name>Apache ACE :: Target :: Dev Server</name>
-    <description />
+    <description/>
 
     <scm>
         <connection>scm:svn:http://svn.apache.org/repos/asf/incubator/ace/trunk/ace-target-devserver</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/incubator/ace/trunk/ace-target-devserver</developerConnection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/incubator/ace/trunk/ace-target-devserver
+        </developerConnection>
         <url>http://svn.apache.org/repos/asf/incubator/ace/trunk/ace-target-devserver</url>
     </scm>
 
@@ -64,32 +66,48 @@
             </plugin>
 
 
-			<plugin>
-			        <groupId>org.apache.maven.plugins</groupId>
-			        <artifactId>maven-dependency-plugin</artifactId>
-			        <executions>
-			          <execution>
-			            <id>copy</id>
-			            <phase>generate-resources</phase>
-			            <goals>
-			              <goal>copy</goal>
-			            </goals>
-			            <configuration>
-			              <artifactItems>
-					<artifactItem>
-			                  <groupId>${pom.groupId}</groupId>
-			                  <artifactId>org.apache.ace.launcher</artifactId>
-			                  <type>jar</type>
-			                  <overWrite>true</overWrite>
-			                  <outputDirectory>${project.basedir}/store</outputDirectory>
-					  <destFileName>ace-launcher.jar</destFileName>
-			                </artifactItem>
-			              </artifactItems>
-			            </configuration>
-			          </execution>
-			        </executions>
-			      </plugin>
-			
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>copy</id>
+                        <phase>generate-resources</phase>
+                        <goals>
+                            <goal>copy</goal>
+                        </goals>
+                        <configuration>
+                            <artifactItems>
+                                <artifactItem>
+                                    <groupId>${pom.groupId}</groupId>
+                                    <artifactId>org.apache.ace.launcher</artifactId>
+                                    <type>jar</type>
+                                    <overWrite>true</overWrite>
+                                    <outputDirectory>${project.basedir}/store</outputDirectory>
+                                    <destFileName>ace-launcher.jar</destFileName>
+                                </artifactItem>
+                                <artifactItem>
+                                    <groupId>${pom.groupId}</groupId>
+                                    <artifactId>ace-glassfish-launcher</artifactId>
+                                    <type>jar</type>
+                                    <overWrite>true</overWrite>
+                                    <outputDirectory>${project.basedir}/store</outputDirectory>
+                                    <destFileName>ace-glassfish-launcher.jar</destFileName>
+                                </artifactItem>
+                                <artifactItem>
+                                    <groupId>${pom.groupId}</groupId>
+                                    <artifactId>org.apache.ace.managementagent</artifactId>
+                                    <type>jar</type>
+                                    <overWrite>true</overWrite>
+                                    <outputDirectory>${project.basedir}/store</outputDirectory>
+                                    <destFileName>ace-managementagent.jar</destFileName>
+                                </artifactItem>
+                            </artifactItems>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
         </plugins>
     </build>
 
@@ -229,7 +247,7 @@
             <artifactId>org.apache.ace.deployment.streamgenerator</artifactId>
             <scope>runtime</scope>
         </dependency>
-         <dependency>
+        <dependency>
             <groupId>org.apache.ace</groupId>
             <artifactId>org.apache.ace.deployment.verifier</artifactId>
             <scope>runtime</scope>

Modified: incubator/ace/trunk/pom.xml
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/pom.xml?rev=1188957&r1=1188956&r2=1188957&view=diff
==============================================================================
--- incubator/ace/trunk/pom.xml (original)
+++ incubator/ace/trunk/pom.xml Tue Oct 25 22:46:02 2011
@@ -126,6 +126,7 @@
         <module>ace-target-devserver</module>
 
         <module>ace-integrationtests</module>
+        <module>ace-glassfish-launcher</module>
     </modules>
 
     <scm>

Modified: incubator/ace/trunk/pom/pom.xml
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/pom/pom.xml?rev=1188957&r1=1188956&r2=1188957&view=diff
==============================================================================
--- incubator/ace/trunk/pom/pom.xml (original)
+++ incubator/ace/trunk/pom/pom.xml Tue Oct 25 22:46:02 2011
@@ -495,6 +495,11 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.ace</groupId>
+                <artifactId>ace-glassfish-launcher</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.ace</groupId>
                 <artifactId>org.apache.ace.location.upnp</artifactId>
                 <version>${project.version}</version>
             </dependency>



Mime
View raw message