Author: kurt.stam(a)jboss.com
Date: 2010-10-05 11:44:31 -0400 (Tue, 05 Oct 2010)
New Revision: 1018
Modified:
trunk/distribution/pom.xml
trunk/distribution/src/main/assembly/bin.xml
trunk/distribution/src/main/release/install/build.xml
trunk/runtime/uddi/pom.xml
trunk/runtime/uddi/src/main/java/org/jboss/soa/bpel/uddi/UDDIRegistrationImpl.java
Log:
RIFTSAW-280, now removing the service if the last bindingtemplate is removed.
Modified: trunk/distribution/pom.xml
===================================================================
--- trunk/distribution/pom.xml 2010-10-05 14:56:46 UTC (rev 1017)
+++ trunk/distribution/pom.xml 2010-10-05 15:44:31 UTC (rev 1018)
@@ -222,6 +222,12 @@
<version>1.0</version>
</dependency>
+ <!-- juddi-client, should be removed once esb catches up to 3.0.4-->
+ <dependency>
+ <groupId>org.apache.juddi</groupId>
+ <artifactId>juddi-client</artifactId>
+ <version>3.0.4-SNAPSHOT</version>
+ </dependency>
</dependencies>
Modified: trunk/distribution/src/main/assembly/bin.xml
===================================================================
--- trunk/distribution/src/main/assembly/bin.xml 2010-10-05 14:56:46 UTC (rev 1017)
+++ trunk/distribution/src/main/assembly/bin.xml 2010-10-05 15:44:31 UTC (rev 1018)
@@ -202,6 +202,13 @@
</includes>
</dependencySet>
+ <!-- juddi-client, should be removed once esb catches up to 3.0.4-->
+ <dependencySet>
+ <outputDirectory>/db/juddi</outputDirectory>
+ <includes>
+ <include>org.apache.juddi:juddi-client</include>
+ </includes>
+ </dependencySet>
</dependencySets>
</assembly>
Modified: trunk/distribution/src/main/release/install/build.xml
===================================================================
--- trunk/distribution/src/main/release/install/build.xml 2010-10-05 14:56:46 UTC (rev
1017)
+++ trunk/distribution/src/main/release/install/build.xml 2010-10-05 15:44:31 UTC (rev
1018)
@@ -296,6 +296,14 @@
<replace file="${deploy.dir}/riftsaw.sar/bpel.properties"
token="bpel.uddi.client.impl=org.jboss.soa.bpel.uddi.UDDIRegistration"
value="bpel.uddi.client.impl=org.jboss.soa.bpel.uddi.UDDIRegistration"/>
+
+ <!-- juddi-client, should be removed once esb catches up to 3.0.4-->
+ <copy todir="${deployers.dir}/esb.deployer/lib"
overwrite="true">
+ <fileset dir="../db/juddi">
+ <include name="juddi-client-*.jar"/>
+ </fileset>
+ </copy>
+
</target>
<target name="renameEsbJUDDIClientXML" if="isNot.renamedToOld"
depends="check.esb.juddi.client.xml.old">
Modified: trunk/runtime/uddi/pom.xml
===================================================================
--- trunk/runtime/uddi/pom.xml 2010-10-05 14:56:46 UTC (rev 1017)
+++ trunk/runtime/uddi/pom.xml 2010-10-05 15:44:31 UTC (rev 1018)
@@ -26,7 +26,7 @@
<dependency>
<artifactId>juddi-client</artifactId>
<groupId>org.apache.juddi</groupId>
- <version>3.0.3</version>
+ <version>3.0.4-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
Modified:
trunk/runtime/uddi/src/main/java/org/jboss/soa/bpel/uddi/UDDIRegistrationImpl.java
===================================================================
---
trunk/runtime/uddi/src/main/java/org/jboss/soa/bpel/uddi/UDDIRegistrationImpl.java 2010-10-05
14:56:46 UTC (rev 1017)
+++
trunk/runtime/uddi/src/main/java/org/jboss/soa/bpel/uddi/UDDIRegistrationImpl.java 2010-10-05
15:44:31 UTC (rev 1018)
@@ -207,15 +207,25 @@
bindingKey =
TokenResolver.replaceTokens((String)properties.get(BINDING_KEY_FORMAT) + bindingName,
properties);
}
bindingKey = bindingKey.toLowerCase();
- //Lookup the binding
- BindingTemplate binding = null;
- try {
- binding = bpelClerk.findServiceBinding(bindingKey,
bpelClerk.getUDDINode().getApiNode());
- //TODO Kurt: Just delete this binding -not all bindings- upgrade the jUDDI client
to support this.
- BusinessService businessService = bpelClerk.findService(binding.getServiceKey(),
bpelClerk.getUDDINode().getApiNode());
- bpelClerk.unRegister(businessService, bpelClerk.getUDDINode().getApiNode());
+ try {
+ boolean isRemoveServiceIfNoTemplates = true; //we can make this configurable if
needed.
+ if (isRemoveServiceIfNoTemplates) {
+ BindingTemplate bindingTemplate = bpelClerk.findServiceBinding(bindingKey,
bpelClerk.getUDDINode().getApiNode());
+ BusinessService businessService =
bpelClerk.findService(bindingTemplate.getServiceKey(),
bpelClerk.getUDDINode().getApiNode());
+ if (businessService.getBindingTemplates().getBindingTemplate().size()==1
&&
+ businessService.getBindingTemplates().getBindingTemplate().get(0).getBindingKey().equals(bindingKey))
{
+ log.info("info removing service " + businessService.getServiceKey() +
"from UDDI.");
+ bpelClerk.unRegisterService(businessService.getServiceKey(),bpelClerk.getUDDINode().getApiNode());
+ } else {
+ log.info("info removing binding " + bindingKey + "from
UDDI.");
+ bpelClerk.unRegisterBinding(bindingKey, bpelClerk.getUDDINode().getApiNode());
+ }
+ } else {
+ log.info("info removing binding " + bindingKey + "from
UDDI.");
+ bpelClerk.unRegisterBinding(bindingKey, bpelClerk.getUDDINode().getApiNode());
+ }
} catch (Exception e) {
- log.warn("Could not find BindingTemplate with key " + bindingKey +
" for unRegistration.");
+ log.warn("Could not unRegister BindingTemplate with key " +
bindingKey);
}
} catch (Exception e) {
log.error("Unable to unRegister EPR " + bindingName
Show replies by date