tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wjaniszew...@apache.org
Subject svn commit: r685909 - in /tuscany/java/sca/modules: host-corba-jee/src/main/java/org/apache/tuscany/sca/host/corba/jee/ host-corba-jse-tns/src/main/java/org/apache/tuscany/sca/host/corba/jse/tns/ host-corba-jse-tns/src/test/java/org/apache/tuscany/sca/...
Date Thu, 14 Aug 2008 14:17:16 GMT
Author: wjaniszewski
Date: Thu Aug 14 07:17:15 2008
New Revision: 685909

URL: http://svn.apache.org/viewvc?rev=685909&view=rev
Log:
host-corba* modules code cleanup, added comments, svn headers

Modified:
    tuscany/java/sca/modules/host-corba-jee/src/main/java/org/apache/tuscany/sca/host/corba/jee/JEECorbaHost.java
    tuscany/java/sca/modules/host-corba-jse-tns/src/main/java/org/apache/tuscany/sca/host/corba/jse/tns/TnsDefaultCorbaHost.java
    tuscany/java/sca/modules/host-corba-jse-tns/src/test/java/org/apache/tuscany/sca/host/corba/testing/TnsDefaultCorbaHostTestCase.java
    tuscany/java/sca/modules/host-corba-jse/src/main/java/org/apache/tuscany/sca/host/corba/jse/DefaultCorbaHost.java
    tuscany/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/CorbaHost.java
    tuscany/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/CorbaHostException.java
    tuscany/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/CorbaHostExtensionPoint.java
    tuscany/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/CorbaHostUtils.java
    tuscany/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/CorbanameURL.java
    tuscany/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/DefaultCorbaHostExtensionPoint.java
    tuscany/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/ExtensibleCorbaHost.java
    tuscany/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/SocketUtil.java
    tuscany/java/sca/modules/host-corba/src/test/java/org/apache/tuscany/sca/host/corba/UtilsTestCase.java

Modified: tuscany/java/sca/modules/host-corba-jee/src/main/java/org/apache/tuscany/sca/host/corba/jee/JEECorbaHost.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/host-corba-jee/src/main/java/org/apache/tuscany/sca/host/corba/jee/JEECorbaHost.java?rev=685909&r1=685908&r2=685909&view=diff
==============================================================================
--- tuscany/java/sca/modules/host-corba-jee/src/main/java/org/apache/tuscany/sca/host/corba/jee/JEECorbaHost.java
(original)
+++ tuscany/java/sca/modules/host-corba-jee/src/main/java/org/apache/tuscany/sca/host/corba/jee/JEECorbaHost.java
Thu Aug 14 07:17:15 2008
@@ -42,7 +42,8 @@
 import org.omg.CosNaming.NamingContextPackage.NotFound;
 
 /**
- * Default implementation of CORBA host
+ * @version $Rev$ $Date$
+ * Implementation of JEE CORBA host
  */
 public class JEECorbaHost implements CorbaHost {
 

Modified: tuscany/java/sca/modules/host-corba-jse-tns/src/main/java/org/apache/tuscany/sca/host/corba/jse/tns/TnsDefaultCorbaHost.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/host-corba-jse-tns/src/main/java/org/apache/tuscany/sca/host/corba/jse/tns/TnsDefaultCorbaHost.java?rev=685909&r1=685908&r2=685909&view=diff
==============================================================================
--- tuscany/java/sca/modules/host-corba-jse-tns/src/main/java/org/apache/tuscany/sca/host/corba/jse/tns/TnsDefaultCorbaHost.java
(original)
+++ tuscany/java/sca/modules/host-corba-jse-tns/src/main/java/org/apache/tuscany/sca/host/corba/jse/tns/TnsDefaultCorbaHost.java
Thu Aug 14 07:17:15 2008
@@ -21,6 +21,7 @@
 
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
+import java.util.logging.Logger;
 
 import org.apache.tuscany.sca.host.corba.CorbaHost;
 import org.apache.tuscany.sca.host.corba.CorbaHostException;
@@ -32,11 +33,12 @@
 import org.omg.CORBA.Object;
 
 /**
+ * @version $Rev$ $Date$
  * Default implementation of CORBA host
  */
 public class TnsDefaultCorbaHost implements CorbaHost {
-    //private static final Logger logger = Logger.getLogger(TnsDefaultCorbaHost.class.getName());
-
+    
+    private static final Logger logger = Logger.getLogger(TnsDefaultCorbaHost.class.getName());
     private Map<Integer, TransientNameServer> localServers = new ConcurrentHashMap<Integer,
TransientNameServer>();
     private Map<Integer, Integer> clientsCount = new ConcurrentHashMap<Integer,
Integer>();
     private CorbaHost targetHost = new DefaultCorbaHost();
@@ -95,13 +97,12 @@
                 clientsCount.remove(port);
                 localServers.remove(port);
             } else {
-                // FIXME: should we throw exception when expecting not null
-                // server object?
+                logger.warning("Local name server on port " + port + " was null!");
             }
         } else if (useCount > 1) {
             clientsCount.put(port, --useCount);
         } else {
-            // ignoring request to stop non existing name server
+            logger.warning("Tried to release non existing local name server on port " + port);
         }
 
     }

Modified: tuscany/java/sca/modules/host-corba-jse-tns/src/test/java/org/apache/tuscany/sca/host/corba/testing/TnsDefaultCorbaHostTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/host-corba-jse-tns/src/test/java/org/apache/tuscany/sca/host/corba/testing/TnsDefaultCorbaHostTestCase.java?rev=685909&r1=685908&r2=685909&view=diff
==============================================================================
--- tuscany/java/sca/modules/host-corba-jse-tns/src/test/java/org/apache/tuscany/sca/host/corba/testing/TnsDefaultCorbaHostTestCase.java
(original)
+++ tuscany/java/sca/modules/host-corba-jse-tns/src/test/java/org/apache/tuscany/sca/host/corba/testing/TnsDefaultCorbaHostTestCase.java
Thu Aug 14 07:17:15 2008
@@ -32,6 +32,7 @@
 import org.junit.Test;
 
 /**
+ * @version $Rev$ $Date$
  * General tests
  */
 public class TnsDefaultCorbaHostTestCase {

Modified: tuscany/java/sca/modules/host-corba-jse/src/main/java/org/apache/tuscany/sca/host/corba/jse/DefaultCorbaHost.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/host-corba-jse/src/main/java/org/apache/tuscany/sca/host/corba/jse/DefaultCorbaHost.java?rev=685909&r1=685908&r2=685909&view=diff
==============================================================================
--- tuscany/java/sca/modules/host-corba-jse/src/main/java/org/apache/tuscany/sca/host/corba/jse/DefaultCorbaHost.java
(original)
+++ tuscany/java/sca/modules/host-corba-jse/src/main/java/org/apache/tuscany/sca/host/corba/jse/DefaultCorbaHost.java
Thu Aug 14 07:17:15 2008
@@ -40,7 +40,8 @@
 import org.omg.CosNaming.NamingContextPackage.NotFound;
 
 /**
- * Default implementation of CORBA host
+ * @version $Rev$ $Date$
+ * Default implementation of JSE CORBA host
  */
 public class DefaultCorbaHost implements CorbaHost {
     private static final Logger logger = Logger.getLogger(DefaultCorbaHost.class.getName());

Modified: tuscany/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/CorbaHost.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/CorbaHost.java?rev=685909&r1=685908&r2=685909&view=diff
==============================================================================
--- tuscany/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/CorbaHost.java
(original)
+++ tuscany/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/CorbaHost.java
Thu Aug 14 07:17:15 2008
@@ -22,6 +22,7 @@
 import org.omg.CORBA.Object;
 
 /**
+ * @version $Rev$ $Date$
  * CORBA Service hosting interface
  */
 public interface CorbaHost {

Modified: tuscany/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/CorbaHostException.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/CorbaHostException.java?rev=685909&r1=685908&r2=685909&view=diff
==============================================================================
--- tuscany/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/CorbaHostException.java
(original)
+++ tuscany/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/CorbaHostException.java
Thu Aug 14 07:17:15 2008
@@ -20,6 +20,7 @@
 package org.apache.tuscany.sca.host.corba;
 
 /**
+ * @version $Rev$ $Date$
  * General exception for corba hosts operations
  */
 public class CorbaHostException extends Exception {

Modified: tuscany/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/CorbaHostExtensionPoint.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/CorbaHostExtensionPoint.java?rev=685909&r1=685908&r2=685909&view=diff
==============================================================================
--- tuscany/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/CorbaHostExtensionPoint.java
(original)
+++ tuscany/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/CorbaHostExtensionPoint.java
Thu Aug 14 07:17:15 2008
@@ -22,6 +22,7 @@
 import java.util.List;
 
 /**
+ * @version $Rev$ $Date$
  * An extension point for CORBA hostst
  */
 public interface CorbaHostExtensionPoint {

Modified: tuscany/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/CorbaHostUtils.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/CorbaHostUtils.java?rev=685909&r1=685908&r2=685909&view=diff
==============================================================================
--- tuscany/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/CorbaHostUtils.java
(original)
+++ tuscany/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/CorbaHostUtils.java
Thu Aug 14 07:17:15 2008
@@ -21,6 +21,7 @@
 
 
 /**
+ * @version $Rev$ $Date$
  * Various utilities for host-corba
  */
 public class CorbaHostUtils {

Modified: tuscany/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/CorbanameURL.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/CorbanameURL.java?rev=685909&r1=685908&r2=685909&view=diff
==============================================================================
--- tuscany/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/CorbanameURL.java
(original)
+++ tuscany/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/CorbanameURL.java
Thu Aug 14 07:17:15 2008
@@ -25,6 +25,7 @@
 import java.util.List;
 
 /**
+ * @version $Rev$ $Date$
  * Holds corbaname URI details
  */
 public class CorbanameURL {

Modified: tuscany/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/DefaultCorbaHostExtensionPoint.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/DefaultCorbaHostExtensionPoint.java?rev=685909&r1=685908&r2=685909&view=diff
==============================================================================
--- tuscany/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/DefaultCorbaHostExtensionPoint.java
(original)
+++ tuscany/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/DefaultCorbaHostExtensionPoint.java
Thu Aug 14 07:17:15 2008
@@ -23,6 +23,7 @@
 import java.util.List;
 
 /**
+ * @version $Rev$ $Date$
  * Default implementation of CorbaHostExtensionPoint
  */
 public class DefaultCorbaHostExtensionPoint implements CorbaHostExtensionPoint {

Modified: tuscany/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/ExtensibleCorbaHost.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/ExtensibleCorbaHost.java?rev=685909&r1=685908&r2=685909&view=diff
==============================================================================
--- tuscany/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/ExtensibleCorbaHost.java
(original)
+++ tuscany/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/ExtensibleCorbaHost.java
Thu Aug 14 07:17:15 2008
@@ -22,6 +22,7 @@
 import org.omg.CORBA.Object;
 
 /**
+ * @version $Rev$ $Date$
  * Default implementation of extensible CORBA host
  */
 public class ExtensibleCorbaHost implements CorbaHost {

Modified: tuscany/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/SocketUtil.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/SocketUtil.java?rev=685909&r1=685908&r2=685909&view=diff
==============================================================================
--- tuscany/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/SocketUtil.java
(original)
+++ tuscany/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/SocketUtil.java
Thu Aug 14 07:17:15 2008
@@ -30,6 +30,7 @@
 import java.util.Set;
 
 /**
+ * @version $Rev$ $Date$
  * Class partially copied from eclipse wst project
  * (http://repo1.maven.org/maven2/org/eclipse/wst/server/core/1.0.205-v20070829b/).
  * Finally we should use jar from maven dependency. Problem described in

Modified: tuscany/java/sca/modules/host-corba/src/test/java/org/apache/tuscany/sca/host/corba/UtilsTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/host-corba/src/test/java/org/apache/tuscany/sca/host/corba/UtilsTestCase.java?rev=685909&r1=685908&r2=685909&view=diff
==============================================================================
--- tuscany/java/sca/modules/host-corba/src/test/java/org/apache/tuscany/sca/host/corba/UtilsTestCase.java
(original)
+++ tuscany/java/sca/modules/host-corba/src/test/java/org/apache/tuscany/sca/host/corba/UtilsTestCase.java
Thu Aug 14 07:17:15 2008
@@ -28,6 +28,10 @@
 
 import org.junit.Test;
 
+/**
+ * @version $Rev$ $Date$
+ * Tests for host utils
+ */
 public class UtilsTestCase {
 
     private void assertDetailsAreOk(CorbanameURL details, String host, int port, String nameService,
List<String> namePath) {
@@ -40,6 +44,9 @@
         }
     }
 
+    /**
+     * Tests if corbaname url is beeing processes properly
+     */
     @Test
     public void test_validCorbaname() {
         String testUri = null;
@@ -103,6 +110,9 @@
         assertDetailsAreOk(details, CorbanameURL.DEFAULT_HOST, CorbanameURL.DEFAULT_PORT,
CorbanameURL.DEFAULT_NAME_SERVICE, namePath);
     }
     
+    /**
+     * Test for invalid corbaname url 
+     */
     @Test
     public void test_invalidCorbaname() {
         String testUri = null;
@@ -124,6 +134,9 @@
         }
     }
     
+    /**
+     * Test for creating corbaname url from host, port, name parameters
+     */
     @Test
     public void test_creatingCorbanameURI() {
         String uri = CorbaHostUtils.createCorbanameURI("SomeHost", 1000, "SomeName");



Mime
View raw message