river-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtra...@apache.org
Subject [16/40] git commit: Ongoing work to add client profile and run browser inside it.
Date Mon, 13 Jan 2014 03:35:23 GMT
Ongoing work to add client profile and run browser inside it.

Project: http://git-wip-us.apache.org/repos/asf/river-container/repo
Commit: http://git-wip-us.apache.org/repos/asf/river-container/commit/36463b4a
Tree: http://git-wip-us.apache.org/repos/asf/river-container/tree/36463b4a
Diff: http://git-wip-us.apache.org/repos/asf/river-container/diff/36463b4a

Branch: refs/heads/master
Commit: 36463b4a7128dc70ea5ec64a29508b32e5e0be08
Parents: dc58e6e
Author: Greg Trasuk <gtrasuk@apache.org>
Authored: Mon Nov 18 05:08:01 2013 -0500
Committer: Greg Trasuk <gtrasuk@apache.org>
Committed: Mon Nov 18 05:08:01 2013 -0500

----------------------------------------------------------------------
 .gitignore                                      |   1 +
 LICENSE                                         | 201 +++++++++++++++++++
 NOTICE                                          |   7 +
 browser-module/pom.xml                          |  73 +++++++
 browser-module/src/assemble/module.xml          |  61 ++++++
 browser-module/src/main/root/browser.config     |  22 ++
 browser-module/src/main/root/start.properties   |  20 ++
 pom.xml                                         |  34 +++-
 river-container-core/pom.xml                    |   1 +
 .../apache/river/container/MessageNames.java    |   4 +
 .../river/container/MessagesResource.java       |  40 ++++
 .../org/apache/river/container/Strings.java     |   2 +
 .../river/container/codebase/ClassServer.java   |   7 +-
 .../container/deployer/ClientAppDeployer.java   | 172 ++++++++++++++++
 .../container/deployer/ServiceLifeCycle.java    |   2 +
 .../deployer/StarterServiceDeployer.java        |   8 +-
 .../deployer/StarterServiceLifeCycleSM.java     |  42 +++-
 .../apache/river/container/el/ArgsParser.java   |   2 +-
 .../river/container/el/ArgsParserImpl.java      |  13 +-
 .../container/security/ContainerCodePolicy.java |  56 ++++--
 .../apache/river/container/Messages.properties  |   4 +
 .../org/apache/river/container/core-config.xml  |   1 +
 .../src/site/markdown/Bootstrap.md              |  26 +++
 .../src/site/markdown/ClientProfile.md          |  25 +++
 .../src/site/markdown/Management.md             |   7 +
 .../src/site/markdown/Security.md               |  48 +++++
 .../src/site/markdown/ServiceStarterServices.md |  57 ++++++
 .../src/site/markdown/StateMachine.md           |  45 +++++
 .../src/site/markdown/SurrogateDeployment.md    |  20 ++
 river-container-core/src/site/markdown/Todo.md  |   4 +
 river-container-core/src/site/markdown/index.md |  44 ++++
 .../river/container/el/ArgParserTest.java       |  17 +-
 test-container/pom.xml                          |   6 +
 test-container/src/assemble/test-container.xml  |  11 +
 .../src/main/root/bin/logging.properties        |   2 +-
 .../root/profile/client/class-server.properties |  17 ++
 .../src/main/root/profile/client/config.xml     |  56 ++++++
 .../profile/client/deploy-privileged/readme.txt |   2 +
 .../main/root/profile/client/deploy/readme.txt  |   2 +
 .../root/profile/client/service-starter.cfg     |  85 ++++++++
 .../root/profile/default/service-starter.cfg    |   2 +
 41 files changed, 1204 insertions(+), 45 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/river-container/blob/36463b4a/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index 0c93635..b2ae2aa 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,4 @@
 *.jar
 *.war
 *.ear
+/target/
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/river-container/blob/36463b4a/LICENSE
----------------------------------------------------------------------
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,201 @@
+                                 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.

http://git-wip-us.apache.org/repos/asf/river-container/blob/36463b4a/NOTICE
----------------------------------------------------------------------
diff --git a/NOTICE b/NOTICE
new file mode 100644
index 0000000..34a81ab
--- /dev/null
+++ b/NOTICE
@@ -0,0 +1,7 @@
+Apache River Surrogate Container
+Copyright 2009 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+This product uses code generated by JavaCC tool (https://javacc.dev.java.net).
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/river-container/blob/36463b4a/browser-module/pom.xml
----------------------------------------------------------------------
diff --git a/browser-module/pom.xml b/browser-module/pom.xml
new file mode 100644
index 0000000..63e6d94
--- /dev/null
+++ b/browser-module/pom.xml
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+
+-->
+<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">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <artifactId>river-container</artifactId>
+        <groupId>org.apache.river.container</groupId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+    <groupId>org.apache.river.container</groupId>
+    <artifactId>browser-module</artifactId>
+    <version>1.0-SNAPSHOT</version>
+    <packaging>pom</packaging>
+    <name>browser-module</name>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.river</groupId>
+            <artifactId>browser</artifactId>
+            <version>2.2.2</version>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.river</groupId>
+            <artifactId>browser-dl</artifactId>
+            <version>2.2.2</version>
+            <scope>compile</scope>
+        </dependency>
+
+    </dependencies>
+  
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <configuration>
+                    <descriptor>src/assemble/module.xml</descriptor>
+                    <appendAssemblyId>false</appendAssemblyId>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>ssar</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>single</goal>
+                        </goals>
+                        
+                    </execution>
+                </executions>
+            </plugin>
+            
+        </plugins>
+    </build>
+
+</project>

http://git-wip-us.apache.org/repos/asf/river-container/blob/36463b4a/browser-module/src/assemble/module.xml
----------------------------------------------------------------------
diff --git a/browser-module/src/assemble/module.xml b/browser-module/src/assemble/module.xml
new file mode 100644
index 0000000..e85ea9b
--- /dev/null
+++ b/browser-module/src/assemble/module.xml
@@ -0,0 +1,61 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
+          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+          xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
+    
+    <id>ssar</id>
+    
+    <formats>
+        <format>jar</format>
+    </formats>
+    <includeBaseDirectory>false</includeBaseDirectory>
+
+  <fileSets>
+
+        <fileSet>
+            <directory>${basedir}/src/main/root</directory>
+            <includes>
+                <include>**/**</include>
+                <include>*</include>
+            </includes>
+            <outputDirectory>/</outputDirectory>
+        </fileSet>
+  
+  </fileSets>    
+  <dependencySets>
+     
+        <dependencySet>
+            <useProjectArtifact>false</useProjectArtifact>
+            <outputDirectory>/lib</outputDirectory>
+            <includes>
+                <include>org.apache.river:browser</include>
+            </includes>
+        </dependencySet>
+        
+        <dependencySet>
+            <useProjectArtifact>false</useProjectArtifact>
+            <outputDirectory>/lib-dl</outputDirectory>
+            <includes>
+                <include>org.apache.river:browser-dl</include>
+            </includes>
+        </dependencySet>
+    </dependencySets>
+
+</assembly>

http://git-wip-us.apache.org/repos/asf/river-container/blob/36463b4a/browser-module/src/main/root/browser.config
----------------------------------------------------------------------
diff --git a/browser-module/src/main/root/browser.config b/browser-module/src/main/root/browser.config
new file mode 100644
index 0000000..105a29b
--- /dev/null
+++ b/browser-module/src/main/root/browser.config
@@ -0,0 +1,22 @@
+import java.security.Permission;
+import net.jini.constraint.BasicMethodConstraints;
+import net.jini.core.constraint.InvocationConstraints;
+import net.jini.jeri.BasicILFactory;
+import net.jini.jeri.BasicJeriExporter;
+import net.jini.jeri.tcp.TcpServerEndpoint;
+import net.jini.security.BasicProxyPreparer;
+
+com.sun.jini.example.browser {
+	
+    initialLookupGroups = new String[] {$discoveryGroup};
+    initialMemberGroups = new String[] {$discoveryGroup};
+
+    serverExporter = new BasicJeriExporter(TcpServerEndpoint.getInstance(0),
+                                     new BasicILFactory());
+
+    serviceInvocationConstraints=InvocationConstraints.EMPTY;
+        
+    servicePreparer = 
+        new BasicProxyPreparer(true, new BasicMethodConstraints(serviceInvocationConstraints),
+            new Permission[] { new RuntimePermission("accessClassInPackage.com.sun.proxy") } );
+}

http://git-wip-us.apache.org/repos/asf/river-container/blob/36463b4a/browser-module/src/main/root/start.properties
----------------------------------------------------------------------
diff --git a/browser-module/src/main/root/start.properties b/browser-module/src/main/root/start.properties
new file mode 100644
index 0000000..f2d75ce
--- /dev/null
+++ b/browser-module/src/main/root/start.properties
@@ -0,0 +1,20 @@
+
+ # 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.
+ #
+
+startClass=com.sun.jini.example.browser.Browser
+startParameters=browser.config $*

http://git-wip-us.apache.org/repos/asf/river-container/blob/36463b4a/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index fe9fe4c..b0cfd61 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,14 +1,26 @@
 <?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">
-  <modelVersion>4.0.0</modelVersion>
-  <groupId>org.apache.river.container</groupId>
-  <artifactId>river-container</artifactId>
-  <version>1.0-SNAPSHOT</version>
-  <packaging>pom</packaging>
-  <name>river-container</name>
-  <modules>
-    <module>river-container-core</module>
-    <module>test-container</module>
-    <module>reggie-module</module>
-  </modules>
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>org.apache.river.container</groupId>
+    <artifactId>river-container</artifactId>
+    <version>1.0-SNAPSHOT</version>
+    <packaging>pom</packaging>
+    <name>river-container</name>
+    <modules>
+        <module>river-container-core</module>
+        <module>test-container</module>
+        <module>reggie-module</module>
+        <module>browser-module</module>
+    </modules>
+  
+    <build>
+        <pluginManagement>
+            <plugins>             
+                <plugin>
+                    <artifactId>maven-site-plugin</artifactId>
+                    <version>3.3</version>
+                </plugin>
+            </plugins>        
+        </pluginManagement>
+    </build>
 </project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/river-container/blob/36463b4a/river-container-core/pom.xml
----------------------------------------------------------------------
diff --git a/river-container-core/pom.xml b/river-container-core/pom.xml
index 64ae443..d071a3a 100644
--- a/river-container-core/pom.xml
+++ b/river-container-core/pom.xml
@@ -140,6 +140,7 @@
                     </execution>
                 </executions>
             </plugin>
+ 
         </plugins>
    
     </build>

http://git-wip-us.apache.org/repos/asf/river-container/blob/36463b4a/river-container-core/src/main/java/org/apache/river/container/MessageNames.java
----------------------------------------------------------------------
diff --git a/river-container-core/src/main/java/org/apache/river/container/MessageNames.java b/river-container-core/src/main/java/org/apache/river/container/MessageNames.java
index bc4ff9f..2ffa0d5 100644
--- a/river-container-core/src/main/java/org/apache/river/container/MessageNames.java
+++ b/river-container-core/src/main/java/org/apache/river/container/MessageNames.java
@@ -66,6 +66,7 @@ public class MessageNames {
             CLASS_SERVER_RECEIVED_PROBE="classServerReceivedProbe",    
             CLASS_SERVER_REJECTED_PATH="classServerRejectedPath",
             CLASS_SERVER_TERMINATED="classServerTerminated",
+            CLIENT_APP_USAGE="clientAppUsage",
             CODESOURCE_IS="codeSourceIs",
             COMPLETED_SERVICE_DEPLOYMENT="completedServiceDeployment",
             CONFIG_FILE="configFile",
@@ -93,8 +94,10 @@ public class MessageNames {
             MISSING_SPECIAL_VALUE="missingSpecialValue",
             N_THREADS_LEFT="nThreadsLeft",
             NO_DEPLOYMENT_DIRECTORY="noDeploymentDirectory",
+            NO_SUCH_CLIENT_APP="noSuchClientApp",
             PARENT_CLASS_LOADER_IS="parentClassLoaderIs",
             POLICY_DECLINED="policyDeclined",
+            PORT_IN_USE="portInUse",
             PROFILE_CONFIG_EXCEPTION="profileConfigurationException",
             PROFILE_CONFIG_LOADING="profileConfigLoading",
             READ_PROPERTIES="readProperties",
@@ -104,6 +107,7 @@ public class MessageNames {
             READING_OBJECT_ANNOTATED_MEMBER_FOUND="readingObject.annotatedMemberFound",
             READING_OBJECT_NON_ANNOTATED_MEMBER_FOUND="readingObject.nonAnnotatedMemberFound",
             RECEIVED_START="receivedStart",
+            RECEIVED_START_WITH_ARGS="receivedStartWithArgs",
             SECURITY_INIT_FAILED="securityInitializationFailed",
             SECURITY_INIT_SUCCEEDED="securityInitializationSucceeded",
             SECURITY_INIT_WRONG_POLICY="securityInitializationWrongPolicy",

http://git-wip-us.apache.org/repos/asf/river-container/blob/36463b4a/river-container-core/src/main/java/org/apache/river/container/MessagesResource.java
----------------------------------------------------------------------
diff --git a/river-container-core/src/main/java/org/apache/river/container/MessagesResource.java b/river-container-core/src/main/java/org/apache/river/container/MessagesResource.java
new file mode 100644
index 0000000..4d5b45f
--- /dev/null
+++ b/river-container-core/src/main/java/org/apache/river/container/MessagesResource.java
@@ -0,0 +1,40 @@
+/*
+ * 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.river.container;
+
+import java.util.ResourceBundle;
+
+/**
+ * Load the messages resource bundle into the context.
+ * @author trasukg
+ */
+public class MessagesResource {
+    
+    @Injected(style = InjectionStyle.BY_TYPE)
+    Context context;
+    
+    /**
+     * Load the resource bundle that contains messages, and put it into the 
+     * context.
+     */
+    @Init
+    public void init() {
+        ResourceBundle messages=ResourceBundle.getBundle(MessageNames.BUNDLE_NAME);
+        context.put(Strings.MESSAGES,messages);
+    }
+}

http://git-wip-us.apache.org/repos/asf/river-container/blob/36463b4a/river-container-core/src/main/java/org/apache/river/container/Strings.java
----------------------------------------------------------------------
diff --git a/river-container-core/src/main/java/org/apache/river/container/Strings.java b/river-container-core/src/main/java/org/apache/river/container/Strings.java
index 0e7a9a0..8528ab9 100644
--- a/river-container-core/src/main/java/org/apache/river/container/Strings.java
+++ b/river-container-core/src/main/java/org/apache/river/container/Strings.java
@@ -38,6 +38,7 @@ public class Strings {
             DEFAULT_DEPLOY_DIRECTORY="deploy",
             DEFAULT_DISCOVERY_CONTEXT = "defaultDiscoveryContext",
             DOLLAR="$",
+            DOLLAR_STAR="$*",
             DOT=".",
             DOT_CLASS=".class",
             DOT_JAR=".jar",
@@ -52,6 +53,7 @@ public class Strings {
             LIB_DL="lib-dl",
             LIFECYCLE_CLASS="com.sun.jini.start.LifeCycle",
             MAIN="main",
+            MESSAGES="messages",
             NAME="name",
             PLATFORM_JARS="platformJars",
             PLATFORM_CODEBASE="platformCodebase",

http://git-wip-us.apache.org/repos/asf/river-container/blob/36463b4a/river-container-core/src/main/java/org/apache/river/container/codebase/ClassServer.java
----------------------------------------------------------------------
diff --git a/river-container-core/src/main/java/org/apache/river/container/codebase/ClassServer.java b/river-container-core/src/main/java/org/apache/river/container/codebase/ClassServer.java
index c99d1ea..8a6ffff 100644
--- a/river-container-core/src/main/java/org/apache/river/container/codebase/ClassServer.java
+++ b/river-container-core/src/main/java/org/apache/river/container/codebase/ClassServer.java
@@ -118,14 +118,15 @@ public class ClassServer implements CodebaseHandler {
                     });
         }
         int initialPort = Integer.parseInt(initialPortStr);
+        for(int port=initialPort; port<initialPort+100 ;port++)
         try {
-            server.bind(new InetSocketAddress(initialPort));
+            server.bind(new InetSocketAddress(port));
             logger.log(Level.INFO, MessageNames.CLASS_SERVER_ESTABLISHED,
                     new Object[]{server.getLocalSocketAddress(),
                         server.getLocalPort()});
+            break;
         } catch (BindException be) {
-            IOException ioe = new IOException("failure to bind to port: " + initialPort, be);
-            throw ioe;
+            logger.log(Level.FINE, MessageNames.PORT_IN_USE, new Integer[] {port});
         }
     }
 

http://git-wip-us.apache.org/repos/asf/river-container/blob/36463b4a/river-container-core/src/main/java/org/apache/river/container/deployer/ClientAppDeployer.java
----------------------------------------------------------------------
diff --git a/river-container-core/src/main/java/org/apache/river/container/deployer/ClientAppDeployer.java b/river-container-core/src/main/java/org/apache/river/container/deployer/ClientAppDeployer.java
new file mode 100644
index 0000000..31e4c64
--- /dev/null
+++ b/river-container-core/src/main/java/org/apache/river/container/deployer/ClientAppDeployer.java
@@ -0,0 +1,172 @@
+/*
+ * 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.river.container.deployer;
+
+import java.io.IOException;
+import java.text.MessageFormat;
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
+import java.util.ResourceBundle;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import javax.management.InstanceAlreadyExistsException;
+import javax.management.MBeanRegistrationException;
+import javax.management.MalformedObjectNameException;
+import javax.management.NotCompliantMBeanException;
+import javax.management.ObjectName;
+import org.apache.commons.vfs2.FileObject;
+import org.apache.commons.vfs2.FileType;
+import org.apache.river.container.ConfigurationException;
+import org.apache.river.container.Context;
+import org.apache.river.container.FileUtility;
+import org.apache.river.container.Init;
+import org.apache.river.container.Injected;
+import org.apache.river.container.InjectionStyle;
+import org.apache.river.container.MBeanRegistrar;
+import org.apache.river.container.MessageNames;
+import org.apache.river.container.Name;
+import org.apache.river.container.Utils;
+
+/**
+ *
+ * A Deployer task that deploys all the applications in a given directory when
+ * the container is started up.
+ */
+public class ClientAppDeployer {
+
+    private static final Logger log =
+            Logger.getLogger(ClientAppDeployer.class.getName(), MessageNames.BUNDLE_NAME);
+    
+    @Injected 
+    ResourceBundle messages;
+    
+    @Injected
+    public String[] commandLineArguments=null;
+
+    @Injected(style= InjectionStyle.BY_TYPE)
+    Context context=null;
+
+    private String deployDirectory = org.apache.river.container.Strings.DEFAULT_DEPLOY_DIRECTORY;
+    
+    @Injected(style = InjectionStyle.BY_TYPE)
+    private FileUtility fileUtility = null;
+        
+    @Injected(style = InjectionStyle.BY_TYPE)
+    private StarterServiceDeployer deployer;
+    
+    @Injected(style = InjectionStyle.BY_TYPE)
+    private MBeanRegistrar mbeanRegistrar;
+    
+    @Name
+    private String myName = null;
+
+    private List<ApplicationEnvironment> applicationEnvironments =
+            new ArrayList<ApplicationEnvironment>();
+
+    public String getDeployDirectory() {
+        return deployDirectory;
+    }
+
+    public void setDeployDirectory(String deployDirectory) {
+        this.deployDirectory = deployDirectory;
+    }
+
+    FileObject deploymentDirectoryFile=null;
+    
+    @Init
+    public void init() {
+        try {
+            tryInitialize();
+        } catch (Throwable ex) {
+            log.log(Level.SEVERE, MessageNames.STARTUP_DEPLOYER_FAILED_INIT,
+                    ex);
+            throw new ConfigurationException(ex,
+                    MessageNames.STARTUP_DEPLOYER_FAILED_INIT);
+        }
+    }
+
+    private void tryInitialize() throws IOException, ParseException {
+        log.log(Level.FINE, MessageNames.STARTER_SERVICE_DEPLOYER_STARTING, myName);
+        
+        /*
+         Establish the deployment directory.
+         */
+        deploymentDirectoryFile = fileUtility.getProfileDirectory().resolveFile(deployDirectory);
+        if (deploymentDirectoryFile == null
+                || deploymentDirectoryFile.getType() != FileType.FOLDER) {
+            log.log(Level.WARNING, MessageNames.NO_DEPLOYMENT_DIRECTORY,
+                    new Object[]{deployDirectory, fileUtility.getProfileDirectory()});
+        }
+        /*
+         * Find the name of the client we need to deploy.  
+         */
+        /* First argument was the profile name.  Second argument is the name of 
+         * the client app to run.  All the rest are paramters to the client
+         * app.
+         */
+        if (commandLineArguments.length < 2) {
+            System.out.println(messages.getString(MessageNames.CLIENT_APP_USAGE));
+            System.exit(1);
+        }
+        String clientAppName=commandLineArguments[1];
+        String[] clientAppArgs=new String[commandLineArguments.length-2];
+        System.arraycopy(commandLineArguments,2, clientAppArgs, 0,
+                clientAppArgs.length);
+        // Locate the service archive that has the client's name.
+        // First get all the jar files.
+        List<FileObject> serviceArchives =
+                Utils.findChildrenWithSuffix(deploymentDirectoryFile,
+                org.apache.river.container.Strings.JAR);
+        //Then find the one that starts with the client name
+        FileObject serviceArchive=null;
+        for (FileObject fo:serviceArchives) {
+            if (fo.getName().getBaseName().startsWith(clientAppName+ org.apache.river.container.Strings.DASH)) {
+                serviceArchive=fo;
+                break;
+            }
+            
+        }
+        
+        if (serviceArchive==null) {
+            System.err.println(MessageFormat.format(messages.getString(MessageNames.NO_SUCH_CLIENT_APP), clientAppName));
+            System.exit(1);
+        }
+        // Deploy the service
+        deployServiceArchive(serviceArchive, clientAppArgs);
+        // Run the main method with the remaining command line parameters.
+    }
+
+    private void deployServiceArchive(FileObject archiveFile, String[] commandLineArgs) {
+        try {
+            /* Try the archive in all the deployers to see if someone can 
+             * handle it. For now there's only one.
+             */
+            
+            /*
+             * Create the ApplicationEnvironment for the archive.
+             */
+            ServiceLifeCycle deployedApp=deployer.deployServiceArchive(archiveFile);
+            
+            deployedApp.startWithArgs(commandLineArgs);
+        } catch (Throwable t) {
+            log.log(Level.WARNING, MessageNames.FAILED_DEPLOY_SERVICE, archiveFile.toString());
+            log.log(Level.WARNING, MessageNames.EXCEPTION_THROWN, Utils.stackTrace(t));
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/river-container/blob/36463b4a/river-container-core/src/main/java/org/apache/river/container/deployer/ServiceLifeCycle.java
----------------------------------------------------------------------
diff --git a/river-container-core/src/main/java/org/apache/river/container/deployer/ServiceLifeCycle.java b/river-container-core/src/main/java/org/apache/river/container/deployer/ServiceLifeCycle.java
index b7c39a9..91e08a2 100644
--- a/river-container-core/src/main/java/org/apache/river/container/deployer/ServiceLifeCycle.java
+++ b/river-container-core/src/main/java/org/apache/river/container/deployer/ServiceLifeCycle.java
@@ -29,6 +29,8 @@ public interface ServiceLifeCycle {
     
     public void start();
     
+    public void startWithArgs(String[] args);
+    
     public void stop();
     
     public void prepare();

http://git-wip-us.apache.org/repos/asf/river-container/blob/36463b4a/river-container-core/src/main/java/org/apache/river/container/deployer/StarterServiceDeployer.java
----------------------------------------------------------------------
diff --git a/river-container-core/src/main/java/org/apache/river/container/deployer/StarterServiceDeployer.java b/river-container-core/src/main/java/org/apache/river/container/deployer/StarterServiceDeployer.java
index 036441f..46911e3 100644
--- a/river-container-core/src/main/java/org/apache/river/container/deployer/StarterServiceDeployer.java
+++ b/river-container-core/src/main/java/org/apache/river/container/deployer/StarterServiceDeployer.java
@@ -121,12 +121,12 @@ public class StarterServiceDeployer implements StarterServiceDeployerMXBean {
         }
     }
 
-    public String[] constructArgs(String argLine) {
+    public String[] constructArgs(String argLine, String[] serviceArgs) {
         String[] args = null;
         if (argLine == null) {
             args = new String[0];
         } else {
-            args = argsParser.toArgs(argLine);
+            args = argsParser.toArgs(argLine, serviceArgs);
         }
         return args;
     }
@@ -366,10 +366,10 @@ public class StarterServiceDeployer implements StarterServiceDeployerMXBean {
         env.setWorkingContext(contextualWorkManager.createContext(env.getServiceName()));
     }
     
-    void launchService(ApplicationEnvironment env) throws FileSystemException, IOException {
+    void launchService(ApplicationEnvironment env, String[] serviceArgs) throws FileSystemException, IOException {
         Properties startProps = readStartProperties(env.getServiceRoot());
         String argLine = startProps.getProperty(Strings.START_PARAMETERS);
-        final String[] args = constructArgs(argLine);
+        final String[] args = constructArgs(argLine, serviceArgs);
 
         launchService(env, startProps, args);
         log.log(Level.INFO, MessageNames.COMPLETED_SERVICE_DEPLOYMENT, env.getServiceName());

http://git-wip-us.apache.org/repos/asf/river-container/blob/36463b4a/river-container-core/src/main/java/org/apache/river/container/deployer/StarterServiceLifeCycleSM.java
----------------------------------------------------------------------
diff --git a/river-container-core/src/main/java/org/apache/river/container/deployer/StarterServiceLifeCycleSM.java b/river-container-core/src/main/java/org/apache/river/container/deployer/StarterServiceLifeCycleSM.java
index 94a55eb..6eb4ed9 100644
--- a/river-container-core/src/main/java/org/apache/river/container/deployer/StarterServiceLifeCycleSM.java
+++ b/river-container-core/src/main/java/org/apache/river/container/deployer/StarterServiceLifeCycleSM.java
@@ -82,6 +82,11 @@ public class StarterServiceLifeCycleSM {
                 new String[]{ getStatus() });
     }
     
+    public void startWithArgs(String[] args) {
+        logger.log(Level.FINE,MessageNames.RECEIVED_START_WITH_ARGS,
+                new String[]{ getStatus() });
+    }
+    
     public class Idle {
         /*
          * To start from idle means to prepare, and then start.
@@ -106,6 +111,24 @@ public class StarterServiceLifeCycleSM {
         }
 
         @Transition(Preparing.class)
+        public void startWithArgs(final String[] args) {
+            exceptions.clear();
+            Runnable command = new Runnable() {
+                public void run() {
+                    /* Prepare the application environment. */
+                    try {
+                        deployer.prepareService(appEnv);
+                        eventProxy.prepareSucceeded();
+                        lifeCycleProxy.startWithArgs(args);
+                    } catch (Exception ex) {
+                        eventProxy.exception(ex);
+                    }
+                }
+            };
+            deployer.workManager.queueTask(null, command);
+        }
+
+        @Transition(Preparing.class)
         public void prepare() {
             exceptions.clear();
             Runnable command = new Runnable() {
@@ -145,7 +168,24 @@ public class StarterServiceLifeCycleSM {
                 public void run() {
                     /* Prepare the application environment. */
                     try {
-                        deployer.launchService(appEnv);
+                        deployer.launchService(appEnv, new String[0]);
+                        eventProxy.startSucceeded();
+                    } catch (Exception ex) {
+                        eventProxy.exception(ex);
+                    }
+                }
+            };
+            deployer.workManager.queueTask( null, command);
+
+        }
+        
+        @Transition(Starting.class)
+        public void startWithArgs(final String[] args) {
+            Runnable command = new Runnable() {
+                public void run() {
+                    /* Prepare the application environment. */
+                    try {
+                        deployer.launchService(appEnv, args);
                         eventProxy.startSucceeded();
                     } catch (Exception ex) {
                         eventProxy.exception(ex);

http://git-wip-us.apache.org/repos/asf/river-container/blob/36463b4a/river-container-core/src/main/java/org/apache/river/container/el/ArgsParser.java
----------------------------------------------------------------------
diff --git a/river-container-core/src/main/java/org/apache/river/container/el/ArgsParser.java b/river-container-core/src/main/java/org/apache/river/container/el/ArgsParser.java
index b0c7a14..78914d8 100644
--- a/river-container-core/src/main/java/org/apache/river/container/el/ArgsParser.java
+++ b/river-container-core/src/main/java/org/apache/river/container/el/ArgsParser.java
@@ -30,6 +30,6 @@ public interface ArgsParser {
      * @param input
      * @return
      */
-    String[] toArgs(String input);
+    String[] toArgs(String input, String[] args);
     
 }

http://git-wip-us.apache.org/repos/asf/river-container/blob/36463b4a/river-container-core/src/main/java/org/apache/river/container/el/ArgsParserImpl.java
----------------------------------------------------------------------
diff --git a/river-container-core/src/main/java/org/apache/river/container/el/ArgsParserImpl.java b/river-container-core/src/main/java/org/apache/river/container/el/ArgsParserImpl.java
index 2e7c1fe..dc0e91a 100644
--- a/river-container-core/src/main/java/org/apache/river/container/el/ArgsParserImpl.java
+++ b/river-container-core/src/main/java/org/apache/river/container/el/ArgsParserImpl.java
@@ -20,6 +20,7 @@ package org.apache.river.container.el;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.StringTokenizer;
+import org.apache.river.container.Strings;
 
 /**
  *
@@ -34,11 +35,19 @@ public class ArgsParserImpl implements ArgsParser {
     @return 
     */
     @Override
-    public String[] toArgs(String input) {
+    public String[] toArgs(String input, String[] inputArgs) {
         List<String> args=new ArrayList<String>();
         StringTokenizer tok=new StringTokenizer(input," ");
         while(tok.hasMoreTokens()) {
-            args.add(tok.nextToken());
+            String token=tok.nextToken();
+            
+            if (Strings.DOLLAR_STAR.equals(token)) {
+                for(String arg: inputArgs) {
+                    args.add(arg);
+                }
+            } else {
+                args.add(token);
+            }
         }
         return args.toArray(new String[0]);
     }

http://git-wip-us.apache.org/repos/asf/river-container/blob/36463b4a/river-container-core/src/main/java/org/apache/river/container/security/ContainerCodePolicy.java
----------------------------------------------------------------------
diff --git a/river-container-core/src/main/java/org/apache/river/container/security/ContainerCodePolicy.java b/river-container-core/src/main/java/org/apache/river/container/security/ContainerCodePolicy.java
index 713455d..e927e0d 100644
--- a/river-container-core/src/main/java/org/apache/river/container/security/ContainerCodePolicy.java
+++ b/river-container-core/src/main/java/org/apache/river/container/security/ContainerCodePolicy.java
@@ -26,51 +26,65 @@ import java.util.logging.Logger;
 import org.apache.river.container.MessageNames;
 
 /**
- Implements the base policy for the container: Anything loaded by the same
-classloader (or one of its ancestors) as this policy has AllPermission.  
-Anything loaded by a different classloader has no permissions (and will 
-assumedly be granted appropriate permissions dynamically).
- @author trasukg
+ * Implements the base policy for the container: Anything loaded by the same
+ * classloader (or one of its ancestors) as this policy has AllPermission.
+ * Anything loaded by a different classloader has no permissions (and will
+ * assumedly be granted appropriate permissions dynamically).
+ *
+ * @author trasukg
  */
 public class ContainerCodePolicy extends Policy {
-    private static final Logger log=
+
+    private static final Logger log =
             Logger.getLogger(ContainerCodePolicy.class.getName(),
             MessageNames.BUNDLE_NAME);
-    
-    List<ClassLoader> privilegedClassLoaders=new ArrayList<ClassLoader>();
+    List<ClassLoader> privilegedClassLoaders = new ArrayList<ClassLoader>();
 
     public ContainerCodePolicy(ClassLoader bootstrapClassLoader) {
         privilegedClassLoaders.add(bootstrapClassLoader);
-        ClassLoader cl=this.getClass().getClassLoader();
+        ClassLoader cl = this.getClass().getClassLoader();
         while (cl != null) {
             privilegedClassLoaders.add(cl);
-            cl=cl.getParent();
+            cl = cl.getParent();
         }
         allPermissions.add(new AllPermission());
         allPermissions.setReadOnly();
         noPermissions.setReadOnly();
     }
-   
-    private PermissionCollection allPermissions=new Permissions();
-    private PermissionCollection noPermissions=new Permissions();
-    
+    private PermissionCollection allPermissions = new Permissions();
+    private PermissionCollection noPermissions = new Permissions();
+
     @Override
     public PermissionCollection getPermissions(ProtectionDomain domain) {
-        if (privilegedClassLoaders.contains(domain.getClassLoader()) ) {
+        if (privilegedClassLoaders.contains(domain.getClassLoader())) {
             return copyPermissions(allPermissions);
         } else {
             log.log(Level.FINE, MessageNames.POLICY_DECLINED,
-                    new Object[] { domain.getClassLoader() });
+                    new Object[]{domain.getClassLoader()});
             return copyPermissions(noPermissions);
         }
     }
-    
+
+    /**
+     * This seems to be necessary to allow the com.sun.rmi.server.LoaderHandler
+     * class to read the marshalled object.  LoaderHandler will call 
+     * this method to get the permissions that are granted to all classes, which
+     * in the case of the container, is none.  But the permissions collection
+     * must be writable.
+     * @param codesource
+     * @return 
+     */
+    @Override
+    public PermissionCollection getPermissions(CodeSource codesource) {
+        return copyPermissions(noPermissions);
+    }
+
     PermissionCollection copyPermissions(PermissionCollection orig) {
-        PermissionCollection pc=new Permissions();
-        Enumeration perms=orig.elements();
-        while(perms.hasMoreElements()) {
+        PermissionCollection pc = new Permissions();
+        Enumeration perms = orig.elements();
+        while (perms.hasMoreElements()) {
             pc.add((Permission) perms.nextElement());
         }
-        return pc; 
+        return pc;
     }
 }

http://git-wip-us.apache.org/repos/asf/river-container/blob/36463b4a/river-container-core/src/main/resources/org/apache/river/container/Messages.properties
----------------------------------------------------------------------
diff --git a/river-container-core/src/main/resources/org/apache/river/container/Messages.properties b/river-container-core/src/main/resources/org/apache/river/container/Messages.properties
index cdfddcd..e80be2b 100644
--- a/river-container-core/src/main/resources/org/apache/river/container/Messages.properties
+++ b/river-container-core/src/main/resources/org/apache/river/container/Messages.properties
@@ -45,6 +45,7 @@ classServerRejectedPath=Rejected request for path ''{0}'' (returning 404).
 classServerReceivedProbe={0} probed from {1}:{2}
 classServerReceivedRequest={0} requested from {1}:{2}
 classServerTerminated=Class Server terminated as part of normal shutdown on host {0} port {1}.
+clientAppUsage=Usage: run.sh client <app-name> [parameters*]
 codeSourceIs=CodeSource for service in ''{0}'' is ''{1}''.
 completedServiceDeployment=Completed deployment of service in {0}.
 configFile=Configuration file is ''{0}''.
@@ -78,8 +79,10 @@ value ''{2}'' in other configurations or command line parameters.
 nThreadsLeft=Application ''{0}'' has {1} threads currently running.
 noDeploymentDirectory=No deployment directory called {0} found in {1}; \
 skipping deployment.
+noSuchClientApp=There is no client app ''{0}'' installed.
 parentClassLoaderIs=Parent class loader is {0}.
 policyDeclined=No permissions granted to protection domain with classloader {0}.
+portInUse=Port {0} in use, trying next one.
 profileConfigurationException=Failed to read the configuration for profile {0}.
 profileConfigLoading=Loading the profile configuration with classloader {0}.
 readProperties=...properties read were {0}.
@@ -89,6 +92,7 @@ readingObject.memberCount={0} members found.
 readingObject.annotatedMemberFound=Member ''{0}'' is annotated @Injected.
 readingObject.nonAnnotatedMemberFound=Member ''{0}'' is not annotated @Injected.
 receivedStart=Received start event while in state {0}.
+receivedStartWithArgs=Received start with arguments event while in state {0}.
 securityInitializationFailed=Failed to initialize security subsystem.
 securityInitializationSucceeded=Security Manager and Dynamic Policy successfully installed.            
 securityInitializationWrongPolicy=After security manager setup, the wrong policy is installed: {0}.

http://git-wip-us.apache.org/repos/asf/river-container/blob/36463b4a/river-container-core/src/main/resources/org/apache/river/container/core-config.xml
----------------------------------------------------------------------
diff --git a/river-container-core/src/main/resources/org/apache/river/container/core-config.xml b/river-container-core/src/main/resources/org/apache/river/container/core-config.xml
index 51bd2f4..03a333d 100644
--- a/river-container-core/src/main/resources/org/apache/river/container/core-config.xml
+++ b/river-container-core/src/main/resources/org/apache/river/container/core-config.xml
@@ -64,6 +64,7 @@
     
     <cfg:property name="deploymentDirectory" value="deploy"/>
 
+    <cfg:component class="org.apache.river.container.MessagesResource"/>
     <cfg:component class="org.apache.river.container.SystemClassloaderInitializer"/>
     <cfg:component class="org.apache.river.container.CommandLineArgumentParser"/>
     <cfg:component class="org.apache.river.container.MBeanRegistrar"/>

http://git-wip-us.apache.org/repos/asf/river-container/blob/36463b4a/river-container-core/src/site/markdown/Bootstrap.md
----------------------------------------------------------------------
diff --git a/river-container-core/src/site/markdown/Bootstrap.md b/river-container-core/src/site/markdown/Bootstrap.md
new file mode 100644
index 0000000..b60e34b
--- /dev/null
+++ b/river-container-core/src/site/markdown/Bootstrap.md
@@ -0,0 +1,26 @@
+
+The bootstrap process looks like this:
+
+- The bootstrapper creates the overall container context object
+- Core configuration is read from the classpath at "o.a.r.c.core-config.xml".
+- Each component called out in the core configuration is instantiated and put
+into the context.  
+- The core config includes component callouts for the following:
+    - AnnotatedClassDeployer, which sets up dependency injection for the container
+    components.
+    - CommandLineArgumentParser, which reads the command line and sets appropriate
+    values into the context (mainly the profile directory).
+    - MBeanRegistrar, which takes note of any manageable components placed in 
+    the context, and registers them with the MBeanContainer.
+    - ShutdownListener, which acts as an MBean to allow shutdown of the 
+    container from a JMX console.
+    - FileUtilityImpl, which provides file services to other components.
+    - PropertiesFileReader, which reads all the '.properties' files in the 
+    profile directory, and puts them into the context under their file names.
+        - This facility allows components to simply declare a Properties object
+        and use the @Injected annotation to get their config files loaded.
+    - ProfileConfigReader, which reads the profile configuration and
+    sets up all the components in that config.
+        - The profile configuration is subject to more editing and customization
+        than the core config.
+    

http://git-wip-us.apache.org/repos/asf/river-container/blob/36463b4a/river-container-core/src/site/markdown/ClientProfile.md
----------------------------------------------------------------------
diff --git a/river-container-core/src/site/markdown/ClientProfile.md b/river-container-core/src/site/markdown/ClientProfile.md
new file mode 100644
index 0000000..a8297d3
--- /dev/null
+++ b/river-container-core/src/site/markdown/ClientProfile.md
@@ -0,0 +1,25 @@
+
+Client Profile - Running clients inside the River Container
+===========================================================
+
+Client programs (i.e. consumers of Jini services) also need an environment that
+is somewhat customized.  They need to run with appropriate security permissions,
+plus they often need to attach codebase annotations to classes and make the 
+appropriate files available as downloads.  In addition, they need to access
+configurations, and may want to use the same configuration files as a server
+container.
+
+Client programs will be the only program running in the container, so they can 
+go ahead and call System.exit() when they're done.
+
+When client programs are run, they might need parameters from the command line.
+So, we should call main() with any parameters that are supplied, less any that
+are used for the configuration of the container.
+
+To provide this functionality, we can have a "client" profile.  This profile will
+be configured with a different startup system that reads the command line to
+find out which client program to run.  We will likely have a container with
+multiple client programs, so we'll allow more than one client program in the 
+profile.  The invocation will be
+
+    run.sh -client AppName <params>*
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/river-container/blob/36463b4a/river-container-core/src/site/markdown/Management.md
----------------------------------------------------------------------
diff --git a/river-container-core/src/site/markdown/Management.md b/river-container-core/src/site/markdown/Management.md
new file mode 100644
index 0000000..9c9de66
--- /dev/null
+++ b/river-container-core/src/site/markdown/Management.md
@@ -0,0 +1,7 @@
+Management of the container using JMX
+=====================================
+
+- Perhaps the managed objects (e.g. classloaders, app environments, etc) should
+implement the MBean protocol/annotation.  JSR160 provides for registration of
+proxies in the lookup service, and it looks like it isn't too hard to integrate
+JMX.

http://git-wip-us.apache.org/repos/asf/river-container/blob/36463b4a/river-container-core/src/site/markdown/Security.md
----------------------------------------------------------------------
diff --git a/river-container-core/src/site/markdown/Security.md b/river-container-core/src/site/markdown/Security.md
new file mode 100644
index 0000000..ba03a3d
--- /dev/null
+++ b/river-container-core/src/site/markdown/Security.md
@@ -0,0 +1,48 @@
+
+Security in the Container
+=========================
+
+- We need to provide the following:
+    - All permissions for container implementation code.
+    - Limited permissions as defined for surrogates in each surrogate
+    operating environment.  It's possible that different surrogates might have
+    different permissions sets according to some criteria (don't know what that
+    might be, perhaps different permissions for different connectors)
+    - Limited permissions for other applications loaded into the container
+    - Support for dynamic assignment of permissions to proxies by the proxy
+    verifiers, such as would be allowed by DynamicPolicyProvider.
+    - Should probably still support UmbrellaGrant, same as FilePolicyProvider.
+
+- Some observations:
+    - we have a more complicated class loader structure than contemplated by
+    the PolicyFile provider.
+    - in particular, in a Jini environment, grants to a codebase are pretty
+    meaningless.  Grants to code signed by a particular entity are OK, but the
+    keystore setup is more appropriate at the container-admin level.  Hence the
+    'keystore' declaration in a policy file is not needed.
+    - In all likelihood, we would have a policy file per application deployed
+    to the container.
+    - Would probably like to support a default application policy and then
+    allow the container admin to replace that with a customized policy file for
+    a particular application.
+    - Since we are creating the classloader as an instance of our own
+    classloader, we can provide a customized protection domain as well.
+    - Applications and surrogates may come and go.  In order to prevent
+    memory leaks, the policy provider will need to be informed of the
+    ProtectionDomain shutdown (assuming that it needs to keep track of the
+    protection domain) so it can clear out its references and allow the
+    protection domain or classloader to be garbage-collected.
+        - Perhaps we could store data in the protection domain, but what about
+        the RMIClassLoader etc?  Can we make it use our custom domain?
+
+- Tentative plan:
+    - Create a parser that reads a limited version of the permissions file
+    (like no codebase, no keystore lines) and creates permissions set from it.
+    - Each application gets a protection domain; protection domain is taken
+    from a per-app security config.
+    - Default config provided, but is overridden by per-app config.
+    - Maybe: app can have its own config file in META-INF.  When app is started,
+    that file will be used unless it over-reaches the permissions allowed by the
+    default or per-app config.
+    - Implement a Policy that includes functions of DynamicPolicyProvider, but
+    otherwise goes to the protection domain for the permissions.

http://git-wip-us.apache.org/repos/asf/river-container/blob/36463b4a/river-container-core/src/site/markdown/ServiceStarterServices.md
----------------------------------------------------------------------
diff --git a/river-container-core/src/site/markdown/ServiceStarterServices.md b/river-container-core/src/site/markdown/ServiceStarterServices.md
new file mode 100644
index 0000000..4dc6570
--- /dev/null
+++ b/river-container-core/src/site/markdown/ServiceStarterServices.md
@@ -0,0 +1,57 @@
+Deploying Services Designed for ServiceStarter API
+==================================================
+
+Partly for compatability, but mainly so we can host the "core" River services
+like Reggie, the container needs to be able to deploy services written for the
+service starter interface.
+
+Under service starter, a service is started by creating an instance of it
+using a constructor that includes configuration options.  The first
+configuration option is the name of a configuration file that would be read
+by the ConfigurationFile configuration provider.
+
+Under the container, the service cannot directly read the configuration file
+since it doesn't know the actual location of the file relative to the startup
+directory.  Additionally, we might want to supplement the configuration with
+global config from the container; for instance, if we're deploying several
+services plus reggie, we would probably want to specify the discovery groups
+in just one location, rather than in every config file.
+
+River's ConfigurationProvider allows us to substitute a different configuration
+instance class in place of ConfigurationFile (see ConfigurationProvider javadoc)
+so we can create a different provider that reads the file through the container.
+This replacement configuration provider can also access global configuration.
+
+The class loader hierarchy for the service-starter deployment looks like:
+
+System CL
+  |
+  v
+Service CL (River API's, container-liaison classes, service jars)
+
+Packaging the Service Implementation
+------------------------------------
+Deployment jar file contains:
+
+- Service jar files, in the "lib" directory.
+- jar files for codebase, in the "lib-dl" directory.
+- Configuration file
+    - Indicates the service class and the name of the permissions file
+- deployment descriptor (e.g. 'transient-reggie.config').
+
+The file should be named ending in a '.ssar' extension (service starter archive)
+and placed in the appropriate container profile's deployment directory (e.g.
+default/deploy/reggie.ssar).
+
+Deployment
+----------
+When the starter service deployer finds the archive, it:
+- Creates a classloader that includes the jar files called out in the
+starter service deployer's configuration file (this will typically include
+'jsk-platform.jar', 'jsk-lib.jar', and 'RiverContainerLiaison.jar', plus the
+jar files contained in the deployed service's 'lib' directory.  This
+classloader will be annotated with a codebase that allows all the jar files in
+the deployer config file's codebase element, plus all the jar files contained
+in the service's 'lib-dl' directory.
+- Registers the appropriate codebase files with the codebase service.
+- Instantiates the service and runs it (on a separate thread from the deployer).

http://git-wip-us.apache.org/repos/asf/river-container/blob/36463b4a/river-container-core/src/site/markdown/StateMachine.md
----------------------------------------------------------------------
diff --git a/river-container-core/src/site/markdown/StateMachine.md b/river-container-core/src/site/markdown/StateMachine.md
new file mode 100644
index 0000000..9fb9711
--- /dev/null
+++ b/river-container-core/src/site/markdown/StateMachine.md
@@ -0,0 +1,45 @@
+Some thinking on the Hierarchical State Machine
+===============================================
+
+The application deployment system includes a hierarchical state machine
+implementation that is intended to be used to help control the deployment of 
+applications.
+
+Use cases:
+
+For instance, an application exists in one of several states: Created, 
+Resolved, Starting, Started, Stopping Gracefully, Stopped, Stopping Forcefully,
+Failed to Stop.  If we have an application that started successfully, then
+we attempt to stop it, it may shut all its threads down properly, which puts it
+into the Stopped state.  Or it may fail to stop all its threads, in which case, 
+we would attempt to interrupt the thread group (Stopping Forcefully).  After a 
+while, if the thread group's active thread count didn't go to zero, it would
+enter the "Failed to Stop" state.  In this state, we would interrupt the thread
+group at regular intervals.  If the thread count happened to go to zero, it
+would go to the Stopped state, otherwise it would just sit there in the "Failed 
+to Stop" state.
+
+The model for the HSM is as follows:
+
+- events on the state machine are expressed as methods defined in the interface.
+- User sends an event by calling a method on a proxy that implements the machine.
+- An event is "run" on the current state hierarchy (top-level state and all
+active substates).
+- Each event can trigger a transition (actually one or more) by invoking a method
+that has an @Transition annotation that lists the set of states that should be
+activated after the event is run.
+- The state can have sub-states, so when we transition to a state, a sub-state
+may also become active, and will need to have its entry code run.  The sub-state
+might be a fresh state on entry, or might have been retained from the last time
+the state was active.  
+- Each state may have an "on-entry" and "on-exit" function, which will be executed
+by the transition code.  Entry and exit code 
+typically sets up timers or toggles outputs.
+- Each state can have zero or more "guard" methods, each specifying a transition.
+A guard method is run after every event is executed, and determines whether the
+transition is taken.  If the
+guard method returns true, the corresponding transition is executed.  These 
+could also be seen as "anonymous" transitions, as they are not attached to any
+particular event.
+
+

http://git-wip-us.apache.org/repos/asf/river-container/blob/36463b4a/river-container-core/src/site/markdown/SurrogateDeployment.md
----------------------------------------------------------------------
diff --git a/river-container-core/src/site/markdown/SurrogateDeployment.md b/river-container-core/src/site/markdown/SurrogateDeployment.md
new file mode 100644
index 0000000..4074531
--- /dev/null
+++ b/river-container-core/src/site/markdown/SurrogateDeployment.md
@@ -0,0 +1,20 @@
+
+Surrogate Deployment
+====================
+
+- So far as the container is concerned, a Surrogate is just another kind of
+application that is handled by a deployer.
+- The surrogate deployer sets up on an interface of some kind looking for 
+surrogates to deploy.  As per the surrogate over IP spec, this will involve
+setting up a multicast listener that responds to requests on the surrogate
+interface.
+- One thing to note - the surrogate deployer might be listening to a  different
+interface than the Jini workgroup is running on.  In the case of a non-TCP/IP
+surrogate, this is guaranteed to be the case.
+- For instance, let's say we have a PBX or asterisk implementation that wants
+to publish a Jini service by means of a surrogate.  The scenario is that the 
+surrogate talks to the PBX by means of UDP or simple TCP sockets.  If the PBX
+was unable to support a secured protocol, then a node might 
+have a connection on a private network to the PBX, but then might have a normal
+network connection for other clients of the PBX surrogate.  Since the surrogate 
+runs in the Java/Jini environment, it can use the full JERI security stack.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/river-container/blob/36463b4a/river-container-core/src/site/markdown/Todo.md
----------------------------------------------------------------------
diff --git a/river-container-core/src/site/markdown/Todo.md b/river-container-core/src/site/markdown/Todo.md
new file mode 100644
index 0000000..8de9867
--- /dev/null
+++ b/river-container-core/src/site/markdown/Todo.md
@@ -0,0 +1,4 @@
+
+- DONE 20120518 20120329 ClassServer comes up with address 0.0.0.0:8080 instead of hostname or IP.
+- DONE 20120518 20120329 Add security manager setup.
+- TODO 20120329 Add remote deployment capability (will require privileged application infrastructure).

http://git-wip-us.apache.org/repos/asf/river-container/blob/36463b4a/river-container-core/src/site/markdown/index.md
----------------------------------------------------------------------
diff --git a/river-container-core/src/site/markdown/index.md b/river-container-core/src/site/markdown/index.md
new file mode 100644
index 0000000..9ed0e7f
--- /dev/null
+++ b/river-container-core/src/site/markdown/index.md
@@ -0,0 +1,44 @@
+River Container Core
+====================
+
+Introduction
+------------
+
+This is the core code that implements the Apache River Container.  The purpose
+of the Apache River Container is to host Jini services and clients using
+the libraries provided by Apache River.
+
+Jini services and clients have some special requirements.  
+
+First, they need to
+have particular control over the codebase.  For exported objects, the download
+code needs to be made available through a web server (there is talk that in the
+future, the clients might be able to load code directly from a repository server
+like Maven does.  There's no reason this can't be added to the River Container),
+and the location of that web server needs to be included in the codebase 
+annotation generated by the RMIClassLoader.  Also the codebase generally doesn't
+call out the same jar file that contains the implementation code.  Rather, it
+calls out a special "download jar" that only contains the classes that should be 
+present on the client.  Further, the API should be downloadable.
+
+Second, Jini clients and services make heavy use of remote code, so they need 
+to be run in a VM with security enabled.
+
+So, the River Container has provisions for this.  Also, it has the flexibility
+to allow deployments to take various forms.
+
+The following documents describe parts of the River Container architecture:
+
+- [Bootstrap](Bootstrap.html) How the container starts up and loads all its modules.
+- [Management](Management.html) Use of the JMX management facilities.
+- [Security](Security.html) Details on the security environment and security 
+manager.
+- [Service Starter Services](ServiceStarterServices.html) Support for existing 
+services (like Reggie) that were designed to be run using the ServiceStarter
+classes.
+- [State Machine](StateMachine.html) Information on the annotation-based state
+machine implementation used in various places in the container.
+- [Surrogate Deployment](SurrogateDeployment.html) Deployer used to host 
+Jini Surrogates.
+- [To Do](Todo.html) To-do list for the development.
+

http://git-wip-us.apache.org/repos/asf/river-container/blob/36463b4a/river-container-core/src/test/java/org/apache/river/container/el/ArgParserTest.java
----------------------------------------------------------------------
diff --git a/river-container-core/src/test/java/org/apache/river/container/el/ArgParserTest.java b/river-container-core/src/test/java/org/apache/river/container/el/ArgParserTest.java
index 353357e..f514640 100644
--- a/river-container-core/src/test/java/org/apache/river/container/el/ArgParserTest.java
+++ b/river-container-core/src/test/java/org/apache/river/container/el/ArgParserTest.java
@@ -56,11 +56,26 @@ public class ArgParserTest {
         String input = "A B C";
         String[] expected = {"A", "B", "C"};
 
-        String[] actual = UUT.toArgs(input);
+        String[] actual = UUT.toArgs(input, new String[0]);
 
         checkStringArray(expected, actual);
     }
 
+    /**
+     * The arg parser should be called with a string array of input arguments
+     * as well as a "command line".  Where the command line includes "$*",
+     * the input arguments should be added.
+     */
+    @Test
+    public void testArgsSubstitution() {
+        String input ="A B $*";
+        String[] args = {"C", "D"};
+        String[] expected={"A", "B", "C", "D"};
+        
+        String[] actual=UUT.toArgs(input, args);
+        checkStringArray(expected, actual);
+    }
+    
     private void checkStringArray(String[] expected, String[] actual) {
         boolean fail = false;
         if (actual.length != expected.length) {

http://git-wip-us.apache.org/repos/asf/river-container/blob/36463b4a/test-container/pom.xml
----------------------------------------------------------------------
diff --git a/test-container/pom.xml b/test-container/pom.xml
index 8a8f81e..daa8c71 100644
--- a/test-container/pom.xml
+++ b/test-container/pom.xml
@@ -35,6 +35,12 @@
             <version>1.0-SNAPSHOT</version>
             <scope>compile</scope>
         </dependency>
+        <dependency>
+            <groupId>org.apache.river.container</groupId>
+            <artifactId>browser-module</artifactId>
+            <version>1.0-SNAPSHOT</version>
+            <scope>compile</scope>
+        </dependency>
     </dependencies>
   
     <build>

http://git-wip-us.apache.org/repos/asf/river-container/blob/36463b4a/test-container/src/assemble/test-container.xml
----------------------------------------------------------------------
diff --git a/test-container/src/assemble/test-container.xml b/test-container/src/assemble/test-container.xml
index fcaea6e..98edc8e 100644
--- a/test-container/src/assemble/test-container.xml
+++ b/test-container/src/assemble/test-container.xml
@@ -37,6 +37,17 @@
                 <include>*:reggie-module</include>
             </includes>
         </dependencySet>
+        <dependencySet>
+            <useProjectArtifact>false</useProjectArtifact>
+            <outputDirectory>/profile/client/deploy</outputDirectory>
+            <scope>runtime</scope>
+            <!-- It's a mystery to me how these get into the runtime dependencies in the 
+            first place - Greg Trasuk
+            -->
+            <includes>
+                <include>*:browser-module</include>
+            </includes>
+        </dependencySet>
     </dependencySets>
 
 </assembly>

http://git-wip-us.apache.org/repos/asf/river-container/blob/36463b4a/test-container/src/main/root/bin/logging.properties
----------------------------------------------------------------------
diff --git a/test-container/src/main/root/bin/logging.properties b/test-container/src/main/root/bin/logging.properties
index 73c1b0f..62fab38 100644
--- a/test-container/src/main/root/bin/logging.properties
+++ b/test-container/src/main/root/bin/logging.properties
@@ -38,7 +38,7 @@ java.util.logging.FileHandler.pattern = test.log
 java.util.logging.FileHandler.limit = 50000
 java.util.logging.FileHandler.count = 1
 java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter
-java.util.logging.SimpleFormatter.format=%1$tb %1$td, %1$tY %1$tl:%1$tM:%1$tS %1$Tp %2$s %4$s: %5$s%n
+java.util.logging.SimpleFormatter.format=%1$tb %1$td, %1$tY %1$tl:%1$tM:%1$tS %1$Tp %2$s %4$s: %5$s%6$s%n
 
 # Limit the message that are printed on the console to INFO and above.
 java.util.logging.ConsoleHandler.level = FINER

http://git-wip-us.apache.org/repos/asf/river-container/blob/36463b4a/test-container/src/main/root/profile/client/class-server.properties
----------------------------------------------------------------------
diff --git a/test-container/src/main/root/profile/client/class-server.properties b/test-container/src/main/root/profile/client/class-server.properties
new file mode 100644
index 0000000..6957c40
--- /dev/null
+++ b/test-container/src/main/root/profile/client/class-server.properties
@@ -0,0 +1,17 @@
+# 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.
+ #
+initialPort=8080
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/river-container/blob/36463b4a/test-container/src/main/root/profile/client/config.xml
----------------------------------------------------------------------
diff --git a/test-container/src/main/root/profile/client/config.xml b/test-container/src/main/root/profile/client/config.xml
new file mode 100644
index 0000000..1c108d1
--- /dev/null
+++ b/test-container/src/main/root/profile/client/config.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+    Document   : config.xml
+    Created on : December 10, 2010, 6:39 PM
+    Author     : trasukg
+    Description:
+        Configuration file in the 'profile' directory selected by the 
+        command line.
+-->
+<!--
+    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.
+
+ -->
+
+<cfg:container-config  xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
+   xmlns:cfg='http://river.apache.org/xml/ns/container/config/1.0'
+   xsi:schemaLocation='http://river.apache.org/xml/ns/container/config/1.0 file:/home/trasukg/development/surrogate/src/schemas/config.xsd'>
+    <cfg:property name="deploymentDirectory" value="deploy"/>
+
+    <cfg:property name="defaultDiscoveryGroup" value="RiverContainerDefault"/>
+    <cfg:component class="org.apache.river.container.work.ContextualWorkManager"/>
+    <cfg:component class="org.apache.river.container.work.BasicWorkManager"/>
+    <cfg:component class="org.apache.river.container.codebase.ClassServer"/>
+
+    <!-- Deployer for 'service-starter'-style applications. -->
+    <cfg:component class="org.apache.river.container.deployer.StarterServiceDeployer">
+        <cfg:property name="config" value="service-starter.cfg"/>
+        <cfg:property name="deployDirectory" value="deploy"/>
+    </cfg:component>
+    
+    <!-- Deployer for 'service-starter'-style applications. -->
+    <cfg:component class="org.apache.river.container.deployer.ClientAppDeployer">
+        <cfg:property name="config" value="client-app.cfg"/>
+        <cfg:property name="deployDirectory" value="deploy"/>
+    </cfg:component>
+    
+
+    <!--
+    <cfg:component class="org.apache.river.container.ShowContextToConsole"/>
+    -->
+</cfg:container-config>

http://git-wip-us.apache.org/repos/asf/river-container/blob/36463b4a/test-container/src/main/root/profile/client/deploy-privileged/readme.txt
----------------------------------------------------------------------
diff --git a/test-container/src/main/root/profile/client/deploy-privileged/readme.txt b/test-container/src/main/root/profile/client/deploy-privileged/readme.txt
new file mode 100644
index 0000000..eb900da
--- /dev/null
+++ b/test-container/src/main/root/profile/client/deploy-privileged/readme.txt
@@ -0,0 +1,2 @@
+This file is only here to ensure that the parent directory is 
+preserved in version control.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/river-container/blob/36463b4a/test-container/src/main/root/profile/client/deploy/readme.txt
----------------------------------------------------------------------
diff --git a/test-container/src/main/root/profile/client/deploy/readme.txt b/test-container/src/main/root/profile/client/deploy/readme.txt
new file mode 100644
index 0000000..eb900da
--- /dev/null
+++ b/test-container/src/main/root/profile/client/deploy/readme.txt
@@ -0,0 +1,2 @@
+This file is only here to ensure that the parent directory is 
+preserved in version control.
\ No newline at end of file


Mime
View raw message