Author: objectiser
Date: 2010-07-01 06:34:54 -0400 (Thu, 01 Jul 2010)
New Revision: 826
Modified:
workspace/gbrown/RiftSaw-2.1.x-VersionedInterfaces/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/JAXWSBindingContext.java
workspace/gbrown/RiftSaw-2.1.x-VersionedInterfaces/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/EndpointManager.java
Log:
Removes endpoint when activating another, so the interface now can change with the BPEL
process.
Modified:
workspace/gbrown/RiftSaw-2.1.x-VersionedInterfaces/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/JAXWSBindingContext.java
===================================================================
---
workspace/gbrown/RiftSaw-2.1.x-VersionedInterfaces/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/JAXWSBindingContext.java 2010-07-01
09:54:10 UTC (rev 825)
+++
workspace/gbrown/RiftSaw-2.1.x-VersionedInterfaces/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/JAXWSBindingContext.java 2010-07-01
10:34:54 UTC (rev 826)
@@ -67,6 +67,7 @@
org.apache.ode.bpel.iapi.EndpointReference ref =
endpointManager.maintains(myRoleEndpoint.serviceName, myRoleEndpoint.portName);
+ /*
if(ref!=null)
{
// might happen when processes are retired.
@@ -76,6 +77,7 @@
}
else
{
+ */
WSDLReference wsdlReference = new WSDLHelper().createWSDLReference(engine,
processId,
myRoleEndpoint.serviceName, myRoleEndpoint.portName);
@@ -96,7 +98,7 @@
{
throw new ContextException("Failed to activate endpoint", e);
}
- }
+ //}
return(ref);
}
Modified:
workspace/gbrown/RiftSaw-2.1.x-VersionedInterfaces/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/EndpointManager.java
===================================================================
---
workspace/gbrown/RiftSaw-2.1.x-VersionedInterfaces/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/EndpointManager.java 2010-07-01
09:54:10 UTC (rev 825)
+++
workspace/gbrown/RiftSaw-2.1.x-VersionedInterfaces/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/EndpointManager.java 2010-07-01
10:34:54 UTC (rev 826)
@@ -105,6 +105,10 @@
handlerFile = null;
}
+ // WebMetaData
+ URL serviceUrl = new
WSDLParser(wsdlRef.getDefinition()).getServiceLocationURL(metaData.getServiceName(),
metaData.getPortName());
+ String[] webContext = deriveWebContextFromServiceUrl(serviceUrl);
+
// generate provider impl
WebServiceProviderFactory providerFactory = new WebServiceProviderFactory();
@@ -133,10 +137,6 @@
// Classloading
ClassLoaderFactory clf = new DelegatingClassLoaderFactory(classLoader);
- // WebMetaData
- URL serviceUrl = new
WSDLParser(wsdlRef.getDefinition()).getServiceLocationURL(metaData.getServiceName(),
metaData.getPortName());
- String[] webContext = deriveWebContextFromServiceUrl(serviceUrl);
-
WebMetaDataFactory wmdFactory = new WebMetaDataFactory(
metaData.getEndpointId(), webContext[0], webContext[1],
providerImpl.getClass().getName()
);
@@ -150,6 +150,15 @@
mutableAttachments.addAttachment(JBossWebMetaData.class,
wmdFactory.createWebMetaData(classLoader));
mutableAttachments.addAttachment(DeploymentUnitFilter.class, new
RiftsawWSDeploymentUnitFilter());
+
+ // Undeploy
+ try {
+ log.debug("Check if can remove existing service:
"+metaData.getServiceName()+":"+metaData.getPortName());
+ removeEndpoint(metaData.getServiceName(), metaData.getPortName());
+ } catch(IllegalStateException ise) {
+ // Ignore for now - endpoint may not exist if first version
+ }
+
getMainDeployer().deploy(deployment);
ServiceEndpointReference ref = new ServiceEndpointReference(
@@ -233,6 +242,10 @@
// unregister
endpointMapping.remove(key);
+
+ if (log.isDebugEnabled()) {
+ log.debug("Undeployed web service with deploymentId="+deploymentId);
+ }
// remove physical artifacts
File warArchive = new File(ref.getArchiveLocation());
Show replies by date