river-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtra...@apache.org
Subject [29/40] git commit: Added transient-outrigger module to river-container project. Added outrigger profile to the 'product' container.
Date Mon, 13 Jan 2014 03:35:36 GMT
Added transient-outrigger module to river-container project.
Added outrigger profile to the 'product' container.

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

Branch: refs/heads/master
Commit: b63e6d47b2f072ffb6b4cf88beba338a47de0b97
Parents: 8d8d2c4
Author: Greg Trasuk <trasukg@trasuk.com>
Authored: Sat Nov 30 01:00:27 2013 -0500
Committer: Greg Trasuk <trasukg@trasuk.com>
Committed: Sat Nov 30 01:00:27 2013 -0500

----------------------------------------------------------------------
 pom.xml                                         |  3 +-
 product/pom.xml                                 |  6 ++
 product/src/assemble/product-container.xml      |  8 ++
 .../profile/outrigger/class-server.properties   | 17 ++++
 .../src/main/root/profile/outrigger/config.xml  | 60 +++++++++++++
 .../outrigger/deploy-privileged/readme.txt      |  2 +
 .../root/profile/outrigger/deploy/readme.txt    |  2 +
 .../root/profile/outrigger/service-starter.cfg  | 95 ++++++++++++++++++++
 transient-outrigger-module/pom.xml              | 55 ++++++++++++
 .../src/assemble/module.xml                     | 66 ++++++++++++++
 .../src/main/root/start.properties              | 20 +++++
 .../src/main/root/transient-outrigger.config    | 45 ++++++++++
 12 files changed, 378 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/river-container/blob/b63e6d47/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 131ab5b..7ce20e8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -15,7 +15,8 @@
         <module>browser</module>
         <module>user-docs</module>
         <module>product</module>
-    </modules>
+    <module>transient-outrigger-module</module>
+  </modules>
     <properties>
         <jsk-version>2.2.2</jsk-version>
     </properties>

http://git-wip-us.apache.org/repos/asf/river-container/blob/b63e6d47/product/pom.xml
----------------------------------------------------------------------
diff --git a/product/pom.xml b/product/pom.xml
index dc1a87d..c3307b0 100644
--- a/product/pom.xml
+++ b/product/pom.xml
@@ -36,6 +36,12 @@
             <version>1.0-SNAPSHOT</version>
             <scope>compile</scope>
         </dependency>
+        <dependency>
+            <groupId>org.apache.river.container</groupId>
+            <artifactId>transient-outrigger-module</artifactId>
+            <version>1.0-SNAPSHOT</version>
+            <scope>compile</scope>
+        </dependency>
     </dependencies>
   
     <build>

http://git-wip-us.apache.org/repos/asf/river-container/blob/b63e6d47/product/src/assemble/product-container.xml
----------------------------------------------------------------------
diff --git a/product/src/assemble/product-container.xml b/product/src/assemble/product-container.xml
index 67f0db3..b032332 100644
--- a/product/src/assemble/product-container.xml
+++ b/product/src/assemble/product-container.xml
@@ -44,6 +44,14 @@
                 <include>*:browser-module</include>
             </includes>
         </dependencySet>
+        <dependencySet>
+            <useProjectArtifact>false</useProjectArtifact>
+            <outputDirectory>/profile/outrigger/deploy</outputDirectory>
+            <scope>runtime</scope>
+            <includes>
+                <include>*:transient-outrigger-module</include>
+            </includes>
+        </dependencySet>
     </dependencySets>
 
 </assembly>

http://git-wip-us.apache.org/repos/asf/river-container/blob/b63e6d47/product/src/main/root/profile/outrigger/class-server.properties
----------------------------------------------------------------------
diff --git a/product/src/main/root/profile/outrigger/class-server.properties b/product/src/main/root/profile/outrigger/class-server.properties
new file mode 100644
index 0000000..6957c40
--- /dev/null
+++ b/product/src/main/root/profile/outrigger/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/b63e6d47/product/src/main/root/profile/outrigger/config.xml
----------------------------------------------------------------------
diff --git a/product/src/main/root/profile/outrigger/config.xml b/product/src/main/root/profile/outrigger/config.xml
new file mode 100644
index 0000000..7d81f52
--- /dev/null
+++ b/product/src/main/root/profile/outrigger/config.xml
@@ -0,0 +1,60 @@
+<?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:component>
+    
+    <!-- Deployer for applications that are in the 'deploy' directory
+    at startup. -->
+    <cfg:component class="org.apache.river.container.deployer.StartupDeployer">
+        <cfg:property name="deployDirectory" value="deploy"/>
+        <cfg:property name="autoDeploy" value="true"/>
+    </cfg:component>
+    
+    <!-- Deployer for 'system apps' like the remote deployment service 
+    <cfg:component class="org.apache.river.container.deployer.StarterServiceDeployer">
+        <cfg:property name="config" value="privileged-services.cfg"/>
+        <cfg:property name="deployDirectory" value="deploy-privileged"/>
+    </cfg:component>
+    -->
+    
+    <cfg:component class="org.apache.river.container.ShowContextToConsole"/>
+</cfg:container-config>

http://git-wip-us.apache.org/repos/asf/river-container/blob/b63e6d47/product/src/main/root/profile/outrigger/deploy-privileged/readme.txt
----------------------------------------------------------------------
diff --git a/product/src/main/root/profile/outrigger/deploy-privileged/readme.txt b/product/src/main/root/profile/outrigger/deploy-privileged/readme.txt
new file mode 100644
index 0000000..eb900da
--- /dev/null
+++ b/product/src/main/root/profile/outrigger/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/b63e6d47/product/src/main/root/profile/outrigger/deploy/readme.txt
----------------------------------------------------------------------
diff --git a/product/src/main/root/profile/outrigger/deploy/readme.txt b/product/src/main/root/profile/outrigger/deploy/readme.txt
new file mode 100644
index 0000000..eb900da
--- /dev/null
+++ b/product/src/main/root/profile/outrigger/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

http://git-wip-us.apache.org/repos/asf/river-container/blob/b63e6d47/product/src/main/root/profile/outrigger/service-starter.cfg
----------------------------------------------------------------------
diff --git a/product/src/main/root/profile/outrigger/service-starter.cfg b/product/src/main/root/profile/outrigger/service-starter.cfg
new file mode 100644
index 0000000..4b2a5a0
--- /dev/null
+++ b/product/src/main/root/profile/outrigger/service-starter.cfg
@@ -0,0 +1,95 @@
+/*
+ * 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.
+ */
+
+// Sample file that our policy file parser should be able to process.
+
+// Grants given to all applications.
+grant {
+    //java.security.AllPermission;
+    //java.io.FilePermission "${serviceArchive}" "read";
+    java.io.FilePermission "-" "read";
+    java.net.SocketPermission "*" "connect,listen,accept,resolve";
+
+    // Required for VFSFileManager
+    java.util.PropertyPermission "java.io.tmpdir" "read";
+    java.util.PropertyPermission "os.*" "read";
+    java.util.PropertyPermission "path.*" "read";
+    java.lang.RuntimePermission "getClassLoader";
+    java.lang.RuntimePermission "setContextClassLoader";
+    /* net.jini.security.Security requires createSecurityManager, but we
+    don't grant 'setSecurityManager'. */
+    java.lang.RuntimePermission "createSecurityManager";
+    java.lang.RuntimePermission "getProtectionDomain";
+    java.lang.RuntimePermission "setFactory";
+    java.lang.RuntimePermission "modifyThread";
+    java.lang.RuntimePermission "modifyThreadGroup";
+    java.security.SecurityPermission "getDomainCombiner";
+    java.security.SecurityPermission "createAccessControlContext";
+    java.security.SecurityPermission "getPolicy";
+
+    // BasicProxyPreparer requirements:
+    javax.security.auth.AuthPermission "getSubject";
+    // Should not be required once UmbrellaGrantPolicy is implemented.
+    // TODO: Config file parser doesn't recognize \"
+    // net.jini.security.GrantPermission "delim=| java.lang.RuntimePermission |accessClassInPackage.com.sun.proxy|";
+
+    net.jini.security.policy.UmbrellaGrantPermission;
+    com.sun.jini.thread.ThreadPoolPermission "getSystemThreadPool";
+    com.sun.jini.thread.ThreadPoolPermission "getUserThreadPool";
+    com.sun.jini.discovery.internal.EndpointInternalsPermission "set";
+    com.sun.jini.discovery.internal.EndpointInternalsPermission "get";
+    java.lang.reflect.ReflectPermission "suppressAccessChecks";
+    net.jini.export.ExportPermission "exportRemoteInterface.*";
+    net.jini.discovery.DiscoveryPermission "*";
+    java.lang.RuntimePermission "shutdownHooks";
+    java.util.PropertyPermission "*" "read";
+
+    java.lang.RuntimePermission "accessClassInPackage.com.sun.proxy";
+
+    // Only in client configuration - apps can call System.exit()
+    java.lang.RuntimePermission "exitVM.*";
+}
+
+classloader {
+    // Variables required to set up the application classloader.
+    //For a privileged application deployer, parent=containerClassLoader;
+    parent systemClassLoader;
+
+    jars {
+        commons-vfs2-2.0.jar,
+        commons-logging-1.1.1.jar,
+        jsk-platform-${jsk-version}.jar,
+        jsk-lib-${jsk-version}.jar,
+        jsk-resources-${jsk-version}.jar,
+        river-container-core-1.0-SNAPSHOT.jar(org.apache.river.container.liaison.Strings,
+            org.apache.river.container.liaison.VirtualFileSystemConfiguration, 
+            org.apache.river.container.liaison.VirtualFileSystemConfiguration$MyConfigurationFile,

+            "META-INF/services/*")
+    }
+
+    codebase {jsk-dl-${jsk-version}.jar}
+}
+
+configuration {
+    // Anything on the left-hand side of '=' is set into the application config
+    // as a "special variable, accessible through '$name'.
+    discoveryGroup=defaultDiscoveryGroup;
+    
+    // For privileged deployer, include 
+    // context=context;
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/river-container/blob/b63e6d47/transient-outrigger-module/pom.xml
----------------------------------------------------------------------
diff --git a/transient-outrigger-module/pom.xml b/transient-outrigger-module/pom.xml
new file mode 100644
index 0000000..7bdcb4f
--- /dev/null
+++ b/transient-outrigger-module/pom.xml
@@ -0,0 +1,55 @@
+<?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>
+    <parent>
+        <artifactId>river-container</artifactId>
+        <groupId>org.apache.river.container</groupId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+    <groupId>org.apache.river.container</groupId>
+    <artifactId>transient-outrigger-module</artifactId>
+    <version>1.0-SNAPSHOT</version>
+    <packaging>pom</packaging>
+    <name>transient-outrigger-module</name>
+  
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.river</groupId>
+            <artifactId>outrigger</artifactId>
+            <version>${jsk-version}</version>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.river</groupId>
+            <artifactId>outrigger-dl</artifactId>
+            <version>${jsk-version}</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/b63e6d47/transient-outrigger-module/src/assemble/module.xml
----------------------------------------------------------------------
diff --git a/transient-outrigger-module/src/assemble/module.xml b/transient-outrigger-module/src/assemble/module.xml
new file mode 100644
index 0000000..0965573
--- /dev/null
+++ b/transient-outrigger-module/src/assemble/module.xml
@@ -0,0 +1,66 @@
+<!--
+ 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>
+            <!-- jsk jars are already provided by the container. -->
+            <excludes>
+                <exclude>*:jsk-*</exclude>
+            </excludes>
+        </dependencySet>
+        
+        <dependencySet>
+            <useProjectArtifact>false</useProjectArtifact>
+            <outputDirectory>/lib-dl</outputDirectory>
+            <includes>
+                <include>*:*-dl</include>
+            </includes>
+            <!-- jsk jars are already provided by the container. -->
+            <excludes>
+                <exclude>*:jsk-*</exclude>
+            </excludes>
+        </dependencySet>
+    </dependencySets>
+
+</assembly>

http://git-wip-us.apache.org/repos/asf/river-container/blob/b63e6d47/transient-outrigger-module/src/main/root/start.properties
----------------------------------------------------------------------
diff --git a/transient-outrigger-module/src/main/root/start.properties b/transient-outrigger-module/src/main/root/start.properties
new file mode 100644
index 0000000..98b3840
--- /dev/null
+++ b/transient-outrigger-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.outrigger.TransientOutriggerImpl
+startParameters=transient-outrigger.config

http://git-wip-us.apache.org/repos/asf/river-container/blob/b63e6d47/transient-outrigger-module/src/main/root/transient-outrigger.config
----------------------------------------------------------------------
diff --git a/transient-outrigger-module/src/main/root/transient-outrigger.config b/transient-outrigger-module/src/main/root/transient-outrigger.config
new file mode 100644
index 0000000..2f54ffa
--- /dev/null
+++ b/transient-outrigger-module/src/main/root/transient-outrigger.config
@@ -0,0 +1,45 @@
+import net.jini.core.entry.Entry;
+import net.jini.jeri.BasicILFactory;
+import net.jini.jeri.BasicJeriExporter;
+import net.jini.jeri.tcp.TcpServerEndpoint;
+import net.jini.lookup.entry.Name;
+import java.security.Permission;
+import net.jini.constraint.BasicMethodConstraints;
+import net.jini.core.constraint.InvocationConstraints;
+import net.jini.security.BasicProxyPreparer;
+
+
+com.sun.jini.outrigger{
+
+    serviceInvocationConstraints=InvocationConstraints.EMPTY;
+
+    name = "Java Space (Outrigger)";
+
+    initialLookupAttributes=new Entry[]{	new Name(name)};
+
+    initialLookupGroups=new String[] {$discoveryGroup};
+
+    serverExporter= new BasicJeriExporter(TcpServerEndpoint.getInstance(0),
+                                 new BasicILFactory());
+    basicProxyPreparer =
+        new BasicProxyPreparer(false, new BasicMethodConstraints(serviceInvocationConstraints),
+        new Permission[] { new RuntimePermission("accessClassInPackage.com.sun.proxy") }
);
+
+    transactionManagerPreparer=basicProxyPreparer;
+    listenerPreparer=basicProxyPreparer;
+
+}
+
+
+net.jini.lookup.JoinManager {
+    serviceInvocationConstraints=InvocationConstraints.EMPTY;
+        
+    basicProxyPreparer =
+        new BasicProxyPreparer(false, new BasicMethodConstraints(serviceInvocationConstraints),
+            new Permission[] { new RuntimePermission("accessClassInPackage.com.sun.proxy")
} );
+
+    registrarPreparer = basicProxyPreparer;
+    registrationPreparer = basicProxyPreparer;
+    serviceLeasePreparer = basicProxyPreparer;
+    
+}
\ No newline at end of file


Mime
View raw message