You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@river.apache.org by gt...@apache.org on 2012/05/09 04:38:07 UTC

svn commit: r1335902 - in /river/jtsk/skunk/surrogate: src/org/apache/river/container/codebase/ClassServerCodebaseContext.java test/org/apache/river/container/codebase/SocketAddressTest.java testfiles/logging.properties

Author: gtrasuk
Date: Wed May  9 02:38:06 2012
New Revision: 1335902

URL: http://svn.apache.org/viewvc?rev=1335902&view=rev
Log:
Container now hosts Reggie, complete with codebase server and security implementation.
Still need to complete StarterServiceDeployer configuration to copy values to hosted configuration.

Added:
    river/jtsk/skunk/surrogate/test/org/apache/river/container/codebase/SocketAddressTest.java
Modified:
    river/jtsk/skunk/surrogate/src/org/apache/river/container/codebase/ClassServerCodebaseContext.java
    river/jtsk/skunk/surrogate/testfiles/logging.properties

Modified: river/jtsk/skunk/surrogate/src/org/apache/river/container/codebase/ClassServerCodebaseContext.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/surrogate/src/org/apache/river/container/codebase/ClassServerCodebaseContext.java?rev=1335902&r1=1335901&r2=1335902&view=diff
==============================================================================
--- river/jtsk/skunk/surrogate/src/org/apache/river/container/codebase/ClassServerCodebaseContext.java (original)
+++ river/jtsk/skunk/surrogate/src/org/apache/river/container/codebase/ClassServerCodebaseContext.java Wed May  9 02:38:06 2012
@@ -76,7 +76,7 @@ public class ClassServerCodebaseContext 
                 }
             }
             return codebaseAnnotation.toArray(new URL[0]);
-        } catch (MalformedURLException ex) {
+        } catch (Exception ex) {
             throw new RuntimeException(ex);
         }
     }

Added: river/jtsk/skunk/surrogate/test/org/apache/river/container/codebase/SocketAddressTest.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/surrogate/test/org/apache/river/container/codebase/SocketAddressTest.java?rev=1335902&view=auto
==============================================================================
--- river/jtsk/skunk/surrogate/test/org/apache/river/container/codebase/SocketAddressTest.java (added)
+++ river/jtsk/skunk/surrogate/test/org/apache/river/container/codebase/SocketAddressTest.java Wed May  9 02:38:06 2012
@@ -0,0 +1,74 @@
+/*
+ * 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.codebase;
+
+import java.net.InetAddress;
+import java.net.InetSocketAddress;
+import java.net.ServerSocket;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+/**
+ *
+ * @author trasukg
+ */
+public class SocketAddressTest {
+
+    public SocketAddressTest() {
+    }
+
+    @BeforeClass
+    public static void setUpClass() throws Exception {
+    }
+
+    @AfterClass
+    public static void tearDownClass() throws Exception {
+    }
+
+    @Before
+    public void setUp() {
+    }
+
+    @After
+    public void tearDown() {
+    }
+
+    /**
+    Exploratory test to find out how we can get a usable ip address for
+    use in the codebase annotation.
+    @throws Exception 
+    */
+    @Test
+    public void testSocketBind() throws Exception {
+
+        ServerSocket socket = new ServerSocket();
+        socket.bind(new InetSocketAddress(8080));
+        String socketName = InetAddress.getLocalHost().getCanonicalHostName();
+        assertEquals("socket name", "localhost:8080", socketName);
+    }
+
+    @Test
+    public void testInterfaces() throws Exception {
+        
+    }
+}

Modified: river/jtsk/skunk/surrogate/testfiles/logging.properties
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/surrogate/testfiles/logging.properties?rev=1335902&r1=1335901&r2=1335902&view=diff
==============================================================================
--- river/jtsk/skunk/surrogate/testfiles/logging.properties (original)
+++ river/jtsk/skunk/surrogate/testfiles/logging.properties Wed May  9 02:38:06 2012
@@ -50,8 +50,11 @@ java.util.logging.ConsoleHandler.formatt
 ############################################################
 
 org.apache.river.container.level = FINER
-org.apache.river.container.AnnotatedClassDeployer.level=FINE
+
 org.apache.river.container.ShowContextToConsole.level=INFO
+
+net.jini.config.level=INFO
+org.apache.river.container.security.ContainerCodePolicy.level=INFO
+org.apache.river.container.deployer.ClasspathFilterBuilder.level=INFO
 org.apache.river.container.deployer.DeployerConfigParser=INFO
 net.jini.config.level=INFO
-org.apache.river.container.security.ContainerCodePolicy.level=INFO
\ No newline at end of file