river-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtra...@apache.org
Subject [23/40] git commit: Add transient-mahalo module. Continue work on switching to jsk 2.2.2.
Date Mon, 13 Jan 2014 03:35:30 GMT
Add transient-mahalo module.  Continue work on switching to jsk 2.2.2.


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

Branch: refs/heads/master
Commit: e8ab8bc4ff185a723bc6727d44ce2f15bcec2829
Parents: 6311235
Author: Greg Trasuk <gtrasuk@apache.org>
Authored: Mon Nov 25 03:05:54 2013 -0500
Committer: Greg Trasuk <gtrasuk@apache.org>
Committed: Mon Nov 25 03:05:54 2013 -0500

----------------------------------------------------------------------
 pom.xml                                         | 13 ++--
 product/src/assemble/product-container.xml      |  1 +
 .../root/profile/default/service-starter.cfg    | 18 +++--
 reggie-module/src/assemble/module.xml           | 13 ++--
 test-container/pom.xml                          |  6 ++
 test-container/src/assemble/test-container.xml  |  2 +
 .../root/profile/client/service-starter.cfg     |  8 +--
 .../root/profile/default/service-starter.cfg    |  8 +--
 transient-mahalo-module/pom.xml                 | 73 ++++++++++++++++++++
 transient-mahalo-module/src/assemble/module.xml | 59 ++++++++++++++++
 .../src/main/root/mahalo.config                 | 26 +++++++
 .../src/main/root/start.properties              | 20 ++++++
 12 files changed, 225 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/river-container/blob/e8ab8bc4/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 2560cad..131ab5b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -10,14 +10,15 @@
         <module>river-container-core</module>
         <module>test-container</module>
         <module>reggie-module</module>
+        <module>transient-mahalo-module</module>
         <module>browser-module</module>
-    <module>browser</module>
+        <module>browser</module>
         <module>user-docs</module>
-    <module>product</module>
-  </modules>
-  <properties>
-      <jsk-version>2.2.2</jsk-version>
-  </properties>
+        <module>product</module>
+    </modules>
+    <properties>
+        <jsk-version>2.2.2</jsk-version>
+    </properties>
     <build>
         <pluginManagement>
             <plugins>             

http://git-wip-us.apache.org/repos/asf/river-container/blob/e8ab8bc4/product/src/assemble/product-container.xml
----------------------------------------------------------------------
diff --git a/product/src/assemble/product-container.xml b/product/src/assemble/product-container.xml
index 203a622..67f0db3 100644
--- a/product/src/assemble/product-container.xml
+++ b/product/src/assemble/product-container.xml
@@ -33,6 +33,7 @@
             <scope>runtime</scope>
             <includes>
                 <include>*:reggie-module</include>
+                <include>*:mahalo-module</include>            
             </includes>
         </dependencySet>
         <dependencySet>

http://git-wip-us.apache.org/repos/asf/river-container/blob/e8ab8bc4/product/src/main/root/profile/default/service-starter.cfg
----------------------------------------------------------------------
diff --git a/product/src/main/root/profile/default/service-starter.cfg b/product/src/main/root/profile/default/service-starter.cfg
index 4df90b2..d62e2cc 100644
--- a/product/src/main/root/profile/default/service-starter.cfg
+++ b/product/src/main/root/profile/default/service-starter.cfg
@@ -41,6 +41,13 @@ grant {
     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";
@@ -53,6 +60,9 @@ grant {
     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 {
@@ -63,16 +73,16 @@ classloader {
     jars {
         commons-vfs2-2.0.jar,
         commons-logging-1.1.1.jar,
-        jsk-platform-2.2.1.jar,
-        jsk-lib-2.2.1.jar,
-        jsk-resources-2.2.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-2.2.1.jar}
+    codebase {jsk-dl-${jsk-version}.jar}
 }
 
 configuration {

http://git-wip-us.apache.org/repos/asf/river-container/blob/e8ab8bc4/reggie-module/src/assemble/module.xml
----------------------------------------------------------------------
diff --git a/reggie-module/src/assemble/module.xml b/reggie-module/src/assemble/module.xml
index e1110a4..0965573 100644
--- a/reggie-module/src/assemble/module.xml
+++ b/reggie-module/src/assemble/module.xml
@@ -44,17 +44,22 @@
         <dependencySet>
             <useProjectArtifact>false</useProjectArtifact>
             <outputDirectory>/lib</outputDirectory>
-            <includes>
-                <include>org.apache.river:reggie</include>
-            </includes>
+            <!-- jsk jars are already provided by the container. -->
+            <excludes>
+                <exclude>*:jsk-*</exclude>
+            </excludes>
         </dependencySet>
         
         <dependencySet>
             <useProjectArtifact>false</useProjectArtifact>
             <outputDirectory>/lib-dl</outputDirectory>
             <includes>
-                <include>org.apache.river:reggie-dl</include>
+                <include>*:*-dl</include>
             </includes>
+            <!-- jsk jars are already provided by the container. -->
+            <excludes>
+                <exclude>*:jsk-*</exclude>
+            </excludes>
         </dependencySet>
     </dependencySets>
 

http://git-wip-us.apache.org/repos/asf/river-container/blob/e8ab8bc4/test-container/pom.xml
----------------------------------------------------------------------
diff --git a/test-container/pom.xml b/test-container/pom.xml
index cb99d23..c69d324 100644
--- a/test-container/pom.xml
+++ b/test-container/pom.xml
@@ -37,6 +37,12 @@
         </dependency>
         <dependency>
             <groupId>org.apache.river.container</groupId>
+            <artifactId>transient-mahalo-module</artifactId>
+            <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>

http://git-wip-us.apache.org/repos/asf/river-container/blob/e8ab8bc4/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 98edc8e..8f3b5a6 100644
--- a/test-container/src/assemble/test-container.xml
+++ b/test-container/src/assemble/test-container.xml
@@ -11,6 +11,7 @@
         <fileSet>
             <outputDirectory>/</outputDirectory>
             <directory>src/main/root</directory> 
+            <filtered>true</filtered>
         </fileSet>
     </fileSets>
     <dependencySets>
@@ -35,6 +36,7 @@
             -->
             <includes>
                 <include>*:reggie-module</include>
+                <include>*:transient-mahalo-module</include>            
             </includes>
         </dependencySet>
         <dependencySet>

http://git-wip-us.apache.org/repos/asf/river-container/blob/e8ab8bc4/test-container/src/main/root/profile/client/service-starter.cfg
----------------------------------------------------------------------
diff --git a/test-container/src/main/root/profile/client/service-starter.cfg b/test-container/src/main/root/profile/client/service-starter.cfg
index b53cc07..d62e2cc 100644
--- a/test-container/src/main/root/profile/client/service-starter.cfg
+++ b/test-container/src/main/root/profile/client/service-starter.cfg
@@ -73,16 +73,16 @@ classloader {
     jars {
         commons-vfs2-2.0.jar,
         commons-logging-1.1.1.jar,
-        jsk-platform-2.2.1.jar,
-        jsk-lib-2.2.1.jar,
-        jsk-resources-2.2.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-2.2.1.jar}
+    codebase {jsk-dl-${jsk-version}.jar}
 }
 
 configuration {

http://git-wip-us.apache.org/repos/asf/river-container/blob/e8ab8bc4/test-container/src/main/root/profile/default/service-starter.cfg
----------------------------------------------------------------------
diff --git a/test-container/src/main/root/profile/default/service-starter.cfg b/test-container/src/main/root/profile/default/service-starter.cfg
index 4df90b2..dff12ce 100644
--- a/test-container/src/main/root/profile/default/service-starter.cfg
+++ b/test-container/src/main/root/profile/default/service-starter.cfg
@@ -63,16 +63,16 @@ classloader {
     jars {
         commons-vfs2-2.0.jar,
         commons-logging-1.1.1.jar,
-        jsk-platform-2.2.1.jar,
-        jsk-lib-2.2.1.jar,
-        jsk-resources-2.2.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-2.2.1.jar}
+    codebase {jsk-dl-${jsk-version}.jar}
 }
 
 configuration {

http://git-wip-us.apache.org/repos/asf/river-container/blob/e8ab8bc4/transient-mahalo-module/pom.xml
----------------------------------------------------------------------
diff --git a/transient-mahalo-module/pom.xml b/transient-mahalo-module/pom.xml
new file mode 100644
index 0000000..06a0af5
--- /dev/null
+++ b/transient-mahalo-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>transient-mahalo-module</artifactId>
+    <version>1.0-SNAPSHOT</version>
+    <packaging>pom</packaging>
+    <name>transient-mahalo-module</name>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.river</groupId>
+            <artifactId>reggie</artifactId>
+            <version>${jsk-version}</version>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.river</groupId>
+            <artifactId>reggie-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/e8ab8bc4/transient-mahalo-module/src/assemble/module.xml
----------------------------------------------------------------------
diff --git a/transient-mahalo-module/src/assemble/module.xml b/transient-mahalo-module/src/assemble/module.xml
new file mode 100644
index 0000000..3776c7e
--- /dev/null
+++ b/transient-mahalo-module/src/assemble/module.xml
@@ -0,0 +1,59 @@
+<!--
+ 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>
+            
+        </dependencySet>
+        
+        <dependencySet>
+            <useProjectArtifact>false</useProjectArtifact>
+            <outputDirectory>/lib-dl</outputDirectory>
+            <includes>
+                <include>*:*-dl</include>
+            </includes>
+        </dependencySet>
+    </dependencySets>
+
+</assembly>

http://git-wip-us.apache.org/repos/asf/river-container/blob/e8ab8bc4/transient-mahalo-module/src/main/root/mahalo.config
----------------------------------------------------------------------
diff --git a/transient-mahalo-module/src/main/root/mahalo.config b/transient-mahalo-module/src/main/root/mahalo.config
new file mode 100644
index 0000000..8db990e
--- /dev/null
+++ b/transient-mahalo-module/src/main/root/mahalo.config
@@ -0,0 +1,26 @@
+import net.jini.jeri.BasicILFactory;
+import net.jini.jeri.BasicJeriExporter;
+import net.jini.jeri.tcp.TcpServerEndpoint;
+import java.security.Permission;
+import net.jini.constraint.BasicMethodConstraints;
+import net.jini.core.constraint.InvocationConstraints;
+import net.jini.security.BasicProxyPreparer;
+
+com.sun.jini.mahalo {
+	
+    initialLookupGroups = new String[] {$discoveryGroup};
+    initialMemberGroups = 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")
} );
+
+    recoveredParticipantPreparer = basicProxyPreparer;
+    participantPreparer = basicProxyPreparer;
+    lookupLocatorPreparer = basicProxyPreparer;
+    recoveredLookupLocatorPreparer = basicProxyPreparer;
+
+}

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


Mime
View raw message