summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--java/sca/modules/host-corba-jee/src/main/java/org/apache/tuscany/sca/host/corba/jee/JEECorbaHost.java3
-rw-r--r--java/sca/modules/host-corba-jse-tns/src/main/java/org/apache/tuscany/sca/host/corba/jse/tns/TnsDefaultCorbaHost.java11
-rw-r--r--java/sca/modules/host-corba-jse-tns/src/test/java/org/apache/tuscany/sca/host/corba/testing/TnsDefaultCorbaHostTestCase.java1
-rw-r--r--java/sca/modules/host-corba-jse/src/main/java/org/apache/tuscany/sca/host/corba/jse/DefaultCorbaHost.java3
-rw-r--r--java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/CorbaHost.java1
-rw-r--r--java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/CorbaHostException.java1
-rw-r--r--java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/CorbaHostExtensionPoint.java1
-rw-r--r--java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/CorbaHostUtils.java1
-rw-r--r--java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/CorbanameURL.java1
-rw-r--r--java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/DefaultCorbaHostExtensionPoint.java1
-rw-r--r--java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/ExtensibleCorbaHost.java1
-rwxr-xr-xjava/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/SocketUtil.java1
-rw-r--r--java/sca/modules/host-corba/src/test/java/org/apache/tuscany/sca/host/corba/UtilsTestCase.java13
13 files changed, 32 insertions, 7 deletions
diff --git a/java/sca/modules/host-corba-jee/src/main/java/org/apache/tuscany/sca/host/corba/jee/JEECorbaHost.java b/java/sca/modules/host-corba-jee/src/main/java/org/apache/tuscany/sca/host/corba/jee/JEECorbaHost.java
index c2f903961b..7e714c1ca5 100644
--- a/java/sca/modules/host-corba-jee/src/main/java/org/apache/tuscany/sca/host/corba/jee/JEECorbaHost.java
+++ b/java/sca/modules/host-corba-jee/src/main/java/org/apache/tuscany/sca/host/corba/jee/JEECorbaHost.java
@@ -42,7 +42,8 @@ import org.omg.CosNaming.NamingContextPackage.InvalidName;
import org.omg.CosNaming.NamingContextPackage.NotFound;
/**
- * Default implementation of CORBA host
+ * @version $Rev$ $Date$
+ * Implementation of JEE CORBA host
*/
public class JEECorbaHost implements CorbaHost {
diff --git a/java/sca/modules/host-corba-jse-tns/src/main/java/org/apache/tuscany/sca/host/corba/jse/tns/TnsDefaultCorbaHost.java b/java/sca/modules/host-corba-jse-tns/src/main/java/org/apache/tuscany/sca/host/corba/jse/tns/TnsDefaultCorbaHost.java
index c322b5cfee..2dc2c7ddd4 100644
--- a/java/sca/modules/host-corba-jse-tns/src/main/java/org/apache/tuscany/sca/host/corba/jse/tns/TnsDefaultCorbaHost.java
+++ b/java/sca/modules/host-corba-jse-tns/src/main/java/org/apache/tuscany/sca/host/corba/jse/tns/TnsDefaultCorbaHost.java
@@ -21,6 +21,7 @@ package org.apache.tuscany.sca.host.corba.jse.tns;
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.apache.tuscany.sca.host.corba.naming.TransientNameService;
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 @@ public class TnsDefaultCorbaHost implements CorbaHost {
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);
}
}
diff --git a/java/sca/modules/host-corba-jse-tns/src/test/java/org/apache/tuscany/sca/host/corba/testing/TnsDefaultCorbaHostTestCase.java b/java/sca/modules/host-corba-jse-tns/src/test/java/org/apache/tuscany/sca/host/corba/testing/TnsDefaultCorbaHostTestCase.java
index 06bc14f4e3..9f6be0f27d 100644
--- a/java/sca/modules/host-corba-jse-tns/src/test/java/org/apache/tuscany/sca/host/corba/testing/TnsDefaultCorbaHostTestCase.java
+++ b/java/sca/modules/host-corba-jse-tns/src/test/java/org/apache/tuscany/sca/host/corba/testing/TnsDefaultCorbaHostTestCase.java
@@ -32,6 +32,7 @@ import org.junit.BeforeClass;
import org.junit.Test;
/**
+ * @version $Rev$ $Date$
* General tests
*/
public class TnsDefaultCorbaHostTestCase {
diff --git a/java/sca/modules/host-corba-jse/src/main/java/org/apache/tuscany/sca/host/corba/jse/DefaultCorbaHost.java b/java/sca/modules/host-corba-jse/src/main/java/org/apache/tuscany/sca/host/corba/jse/DefaultCorbaHost.java
index e0cee52c3d..015644e19d 100644
--- a/java/sca/modules/host-corba-jse/src/main/java/org/apache/tuscany/sca/host/corba/jse/DefaultCorbaHost.java
+++ b/java/sca/modules/host-corba-jse/src/main/java/org/apache/tuscany/sca/host/corba/jse/DefaultCorbaHost.java
@@ -40,7 +40,8 @@ import org.omg.CosNaming.NamingContextPackage.InvalidName;
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());
diff --git a/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/CorbaHost.java b/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/CorbaHost.java
index 01a27ba371..eb49f3f841 100644
--- a/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/CorbaHost.java
+++ b/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/CorbaHost.java
@@ -22,6 +22,7 @@ package org.apache.tuscany.sca.host.corba;
import org.omg.CORBA.Object;
/**
+ * @version $Rev$ $Date$
* CORBA Service hosting interface
*/
public interface CorbaHost {
diff --git a/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/CorbaHostException.java b/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/CorbaHostException.java
index 78e888c8d1..049bfdb6cd 100644
--- a/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/CorbaHostException.java
+++ b/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/CorbaHostException.java
@@ -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 {
diff --git a/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/CorbaHostExtensionPoint.java b/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/CorbaHostExtensionPoint.java
index 1488e4f80b..067b9193c5 100644
--- a/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/CorbaHostExtensionPoint.java
+++ b/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/CorbaHostExtensionPoint.java
@@ -22,6 +22,7 @@ package org.apache.tuscany.sca.host.corba;
import java.util.List;
/**
+ * @version $Rev$ $Date$
* An extension point for CORBA hostst
*/
public interface CorbaHostExtensionPoint {
diff --git a/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/CorbaHostUtils.java b/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/CorbaHostUtils.java
index c12980523b..b90fe9c78b 100644
--- a/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/CorbaHostUtils.java
+++ b/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/CorbaHostUtils.java
@@ -21,6 +21,7 @@ package org.apache.tuscany.sca.host.corba;
/**
+ * @version $Rev$ $Date$
* Various utilities for host-corba
*/
public class CorbaHostUtils {
diff --git a/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/CorbanameURL.java b/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/CorbanameURL.java
index a6b778c375..a380fd6d79 100644
--- a/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/CorbanameURL.java
+++ b/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/CorbanameURL.java
@@ -25,6 +25,7 @@ import java.util.Arrays;
import java.util.List;
/**
+ * @version $Rev$ $Date$
* Holds corbaname URI details
*/
public class CorbanameURL {
diff --git a/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/DefaultCorbaHostExtensionPoint.java b/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/DefaultCorbaHostExtensionPoint.java
index c7a6eb6ba4..438734086d 100644
--- a/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/DefaultCorbaHostExtensionPoint.java
+++ b/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/DefaultCorbaHostExtensionPoint.java
@@ -23,6 +23,7 @@ import java.util.ArrayList;
import java.util.List;
/**
+ * @version $Rev$ $Date$
* Default implementation of CorbaHostExtensionPoint
*/
public class DefaultCorbaHostExtensionPoint implements CorbaHostExtensionPoint {
diff --git a/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/ExtensibleCorbaHost.java b/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/ExtensibleCorbaHost.java
index 12112fea04..7e043667a9 100644
--- a/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/ExtensibleCorbaHost.java
+++ b/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/ExtensibleCorbaHost.java
@@ -22,6 +22,7 @@ package org.apache.tuscany.sca.host.corba;
import org.omg.CORBA.Object;
/**
+ * @version $Rev$ $Date$
* Default implementation of extensible CORBA host
*/
public class ExtensibleCorbaHost implements CorbaHost {
diff --git a/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/SocketUtil.java b/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/SocketUtil.java
index b076e023da..42f45b7a5e 100755
--- a/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/SocketUtil.java
+++ b/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/SocketUtil.java
@@ -30,6 +30,7 @@ import java.util.Map;
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
diff --git a/java/sca/modules/host-corba/src/test/java/org/apache/tuscany/sca/host/corba/UtilsTestCase.java b/java/sca/modules/host-corba/src/test/java/org/apache/tuscany/sca/host/corba/UtilsTestCase.java
index f57b0869a7..4e076f9342 100644
--- a/java/sca/modules/host-corba/src/test/java/org/apache/tuscany/sca/host/corba/UtilsTestCase.java
+++ b/java/sca/modules/host-corba/src/test/java/org/apache/tuscany/sca/host/corba/UtilsTestCase.java
@@ -28,6 +28,10 @@ import java.util.List;
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 @@ public class UtilsTestCase {
}
}
+ /**
+ * Tests if corbaname url is beeing processes properly
+ */
@Test
public void test_validCorbaname() {
String testUri = null;
@@ -103,6 +110,9 @@ public class UtilsTestCase {
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 @@ public class UtilsTestCase {
}
}
+ /**
+ * Test for creating corbaname url from host, port, name parameters
+ */
@Test
public void test_creatingCorbanameURI() {
String uri = CorbaHostUtils.createCorbanameURI("SomeHost", 1000, "SomeName");