Author: objectiser
Date: 2011-03-31 10:35:11 -0400 (Thu, 31 Mar 2011)
New Revision: 1345
Modified:
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/EndpointReferenceContextImpl.java
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/ClientEndpointReference.java
Log:
RIFTSAW-325 - update to avoid calling the ODE EndpointFactory unnecessarily.
Modified:
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/EndpointReferenceContextImpl.java
===================================================================
---
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/EndpointReferenceContextImpl.java 2011-03-31
14:23:03 UTC (rev 1344)
+++
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/EndpointReferenceContextImpl.java 2011-03-31
14:35:11 UTC (rev 1345)
@@ -26,6 +26,7 @@
import org.apache.ode.bpel.iapi.EndpointReference;
import org.apache.ode.bpel.iapi.EndpointReferenceContext;
import org.apache.ode.utils.DOMUtils;
+import org.jboss.soa.bpel.runtime.ws.ClientEndpointReference;
import org.w3c.dom.Element;
import java.util.Map;
@@ -41,6 +42,13 @@
public EndpointReference resolveEndpointReference(Element element) {
if (log.isDebugEnabled())
log.debug("Resolving endpoint reference " +
DOMUtils.domToString(element));
+
+ if (element != null &&
element.getNodeName().equals(ClientEndpointReference.CLIENT_EPR_ELEMENT)) {
+ // Returning null as ODE endpoint factory does not have an EndpointReference type
for
+ // this internal riftsaw EPR representation - so null indicates use the default EPR
associated
+ // with the WSDL
+ return(null);
+ }
return EndpointFactory.createEndpoint(element);
}
Modified:
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/ClientEndpointReference.java
===================================================================
---
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/ClientEndpointReference.java 2011-03-31
14:23:03 UTC (rev 1344)
+++
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/ClientEndpointReference.java 2011-03-31
14:35:11 UTC (rev 1345)
@@ -29,6 +29,8 @@
*/
public final class ClientEndpointReference implements EndpointReference
{
+ public static final String CLIENT_EPR_ELEMENT = "attr";
+
private String endpointId;
public ClientEndpointReference(String endpointId)
@@ -42,7 +44,7 @@
try {
ret =
javax.xml.parsers.DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
- org.w3c.dom.Element elem=ret.createElement("attr");
+ org.w3c.dom.Element elem=ret.createElement(CLIENT_EPR_ELEMENT);
elem.setAttribute("endpointId", endpointId);
ret.appendChild(elem);
Show replies by date