summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/binding-corba
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2008-07-09 22:19:54 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2008-07-09 22:19:54 +0000
commite7bad91576a64b9116cd04504df80639333b5be5 (patch)
treeac1e1cffda85281f44c85dd597450db1d219dcb1 /java/sca/modules/binding-corba
parentf6512d3190de77f1f14e74efc16ad61f96fd61ff (diff)
Apply the patch from Wojtek for TUSCANY-2397. Thanks. (corbaname-improvement-jira-2357-09-july.patch)
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@675361 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/binding-corba')
-rw-r--r--java/sca/modules/binding-corba/pom.xml6
-rw-r--r--java/sca/modules/binding-corba/src/main/java/org/apache/tuscany/sca/binding/corba/CorbaBinding.java2
-rw-r--r--java/sca/modules/binding-corba/src/main/java/org/apache/tuscany/sca/binding/corba/impl/CorbaBindingImpl.java5
3 files changed, 13 insertions, 0 deletions
diff --git a/java/sca/modules/binding-corba/pom.xml b/java/sca/modules/binding-corba/pom.xml
index 3f4d2127c2..2eda625e4a 100644
--- a/java/sca/modules/binding-corba/pom.xml
+++ b/java/sca/modules/binding-corba/pom.xml
@@ -42,6 +42,12 @@
<version>1.4-SNAPSHOT</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-host-corba</artifactId>
+ <version>1.4-SNAPSHOT</version>
+ </dependency>
+
</dependencies>
<build>
diff --git a/java/sca/modules/binding-corba/src/main/java/org/apache/tuscany/sca/binding/corba/CorbaBinding.java b/java/sca/modules/binding-corba/src/main/java/org/apache/tuscany/sca/binding/corba/CorbaBinding.java
index 667bfa361b..0b79065cc3 100644
--- a/java/sca/modules/binding-corba/src/main/java/org/apache/tuscany/sca/binding/corba/CorbaBinding.java
+++ b/java/sca/modules/binding-corba/src/main/java/org/apache/tuscany/sca/binding/corba/CorbaBinding.java
@@ -41,4 +41,6 @@ public interface CorbaBinding extends Binding {
String getId();
void setId(String id);
+
+ String getCorbaname();
}
diff --git a/java/sca/modules/binding-corba/src/main/java/org/apache/tuscany/sca/binding/corba/impl/CorbaBindingImpl.java b/java/sca/modules/binding-corba/src/main/java/org/apache/tuscany/sca/binding/corba/impl/CorbaBindingImpl.java
index c98b41549b..6afe49717f 100644
--- a/java/sca/modules/binding-corba/src/main/java/org/apache/tuscany/sca/binding/corba/impl/CorbaBindingImpl.java
+++ b/java/sca/modules/binding-corba/src/main/java/org/apache/tuscany/sca/binding/corba/impl/CorbaBindingImpl.java
@@ -23,6 +23,7 @@ import java.util.ArrayList;
import java.util.List;
import org.apache.tuscany.sca.binding.corba.CorbaBinding;
+import org.apache.tuscany.sca.host.corba.CorbaHostUtils;
import org.apache.tuscany.sca.policy.Intent;
import org.apache.tuscany.sca.policy.IntentAttachPointType;
import org.apache.tuscany.sca.policy.PolicySet;
@@ -124,4 +125,8 @@ public class CorbaBindingImpl implements CorbaBinding, PolicySetAttachPoint {
this.id = id;
}
+ public String getCorbaname() {
+ return CorbaHostUtils.isValidCorbanameURI(getURI()) ? getURI(): CorbaHostUtils.createCorbanameURI(getHost(), getPort(), getName());
+ }
+
}