Author: objectiser
Date: 2009-11-23 12:38:28 -0500 (Mon, 23 Nov 2009)
New Revision: 303
Removed:
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/BPELFault.java
Modified:
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/BPELEngine.java
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/PartnerChannel.java
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/BPELEngineImpl.java
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/WebServiceClient.java
trunk/runtime/jbossesb-bpel/src/test/java/org/jboss/soa/esb/actions/bpel/BPELInvokeTest.java
trunk/runtime/jbossesb-bpel/src/test/java/org/jboss/soa/esb/actions/bpel/TestBPELEngine.java
Log:
Remove BPELFault as no longer required to pass a fault across the BPELEngine interface.
Now it is up to the InvocationAdapter implementation to record the fault details from the
ODE Message Exchange.
Modified:
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/BPELEngine.java
===================================================================
---
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/BPELEngine.java 2009-11-23
16:52:29 UTC (rev 302)
+++
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/BPELEngine.java 2009-11-23
17:38:28 UTC (rev 303)
@@ -39,10 +39,9 @@
/**
*
* @param invocationAdapter
- * @throws BPELFault
* @throws Exception
*/
- public void invoke(InvocationAdapter invocationAdapter) throws BPELFault, Exception;
+ public void invoke(InvocationAdapter invocationAdapter) throws Exception;
/**
* This method closes the BPEL engine.
Deleted:
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/BPELFault.java
===================================================================
---
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/BPELFault.java 2009-11-23
16:52:29 UTC (rev 302)
+++
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/BPELFault.java 2009-11-23
17:38:28 UTC (rev 303)
@@ -1,70 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.jboss.soa.bpel.runtime.engine;
-
-import javax.xml.namespace.QName;
-
-import org.w3c.dom.Element;
-
-/**
- * This exception represents a BPEL fault returns as the result of
- * an invocation on a service.
- *
- * @author gbrown
- *
- */
-public class BPELFault extends Exception {
-
- private static final long serialVersionUID = 5232665438135478453L;
-
- /**
- * This constructor initialises the BPEL fault with a qualified
- * name and the fault message content.
- *
- * @param faultName The fault name
- * @param faultMesg The fault message
- */
- public BPELFault(QName faultName, Element faultMesg) {
- super("BPEL Fault '"+faultName+"'");
-
- m_faultName = faultName;
- m_faultMesg = faultMesg;
- }
-
- /**
- * This method returns the full qualified name of the
- * fault.
- *
- * @return The fault name
- */
- public QName getFaultName() {
- return(m_faultName);
- }
-
- /**
- * This method returns the fault message content.
- *
- * @return The fault message
- */
- public Element getFaultMessage() {
- return(m_faultMesg);
- }
-
- private QName m_faultName=null;
- private Element m_faultMesg=null;
-}
Modified:
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/PartnerChannel.java
===================================================================
---
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/PartnerChannel.java 2009-11-23
16:52:29 UTC (rev 302)
+++
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/PartnerChannel.java 2009-11-23
17:38:28 UTC (rev 303)
@@ -45,11 +45,11 @@
* @param operation The operation name
* @param mesg The message
* @return The optional response
- * @throws BPELFault The optional fault
+ * @throws Exception The optional fault
* @deprecated use {@link #invoke(org.apache.ode.bpel.iapi.PartnerRoleMessageExchange)}
instead
*/
public org.w3c.dom.Element invoke(String operation, org.w3c.dom.Element mesg)
- throws BPELFault;
+ throws Exception;
void invoke(PartnerRoleMessageExchange mex);
Modified:
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/BPELEngineImpl.java
===================================================================
---
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/BPELEngineImpl.java 2009-11-23
16:52:29 UTC (rev 302)
+++
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/engine/ode/BPELEngineImpl.java 2009-11-23
17:38:28 UTC (rev 303)
@@ -39,7 +39,6 @@
import org.apache.ode.utils.GUID;
import org.apache.ode.utils.Properties;
import org.jboss.soa.bpel.runtime.engine.BPELEngine;
-import org.jboss.soa.bpel.runtime.engine.BPELFault;
import org.jboss.soa.bpel.runtime.engine.IntegrationLayer;
import org.jboss.soa.bpel.runtime.engine.InvocationAdapter;
import org.w3c.dom.Element;
@@ -92,7 +91,7 @@
* @throws Exception Failed to invoke the operation
*/
public void invoke(InvocationAdapter invocationAdapter)
- throws BPELFault, Exception
+ throws Exception
{
boolean success = true;
MyRoleMessageExchange odeMex = null;
@@ -185,10 +184,6 @@
commit = true;
- } catch (BPELFault af) {
- __log.warn("MEX produced a fault " + odeMex, af);
- commit = true;
- throw af;
} catch (Exception e) {
__log.error("Error processing response for MEX " + odeMex, e);
throw new Exception("An exception occured when invoking ODE.", e);
@@ -230,7 +225,7 @@
return odeMex;
}
- private void onResponse(MyRoleMessageExchange mex, InvocationAdapter invocationAdapter)
throws BPELFault, Exception {
+ private void onResponse(MyRoleMessageExchange mex, InvocationAdapter invocationAdapter)
throws Exception {
Element ret=null;
switch (mex.getStatus()) {
@@ -239,7 +234,6 @@
__log.debug("Fault response message: " + mex.getFault());
invocationAdapter.createFault(mex);
- // throw new BPELFault(mex.getFault(), mex.getFaultResponse().getMessage());
break;
case ASYNC:
case RESPONSE:
Modified:
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/WebServiceClient.java
===================================================================
---
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/WebServiceClient.java 2009-11-23
16:52:29 UTC (rev 302)
+++
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/WebServiceClient.java 2009-11-23
17:38:28 UTC (rev 303)
@@ -28,7 +28,6 @@
import org.apache.ode.bpel.iapi.PartnerRoleMessageExchange;
import org.apache.ode.bpel.iapi.Scheduler;
import org.apache.ode.utils.DOMUtils;
-import org.jboss.soa.bpel.runtime.engine.BPELFault;
import org.jboss.soa.bpel.runtime.engine.EndpointReference;
import org.jboss.soa.bpel.runtime.engine.PartnerChannel;
import org.jboss.soa.bpel.runtime.engine.ode.ExecutionEnvironment;
@@ -252,7 +251,7 @@
return tx;
}
- public Element invoke(String operation, Element mesg) throws BPELFault
+ public Element invoke(String operation, Element mesg) throws Exception
{
throw new RuntimeException("Not implemented. Should be removed form
interface");
}
Modified:
trunk/runtime/jbossesb-bpel/src/test/java/org/jboss/soa/esb/actions/bpel/BPELInvokeTest.java
===================================================================
---
trunk/runtime/jbossesb-bpel/src/test/java/org/jboss/soa/esb/actions/bpel/BPELInvokeTest.java 2009-11-23
16:52:29 UTC (rev 302)
+++
trunk/runtime/jbossesb-bpel/src/test/java/org/jboss/soa/esb/actions/bpel/BPELInvokeTest.java 2009-11-23
17:38:28 UTC (rev 303)
@@ -17,7 +17,6 @@
*/
package org.jboss.soa.esb.actions.bpel;
-import org.jboss.soa.bpel.runtime.engine.BPELFault;
import org.jboss.soa.esb.helpers.ConfigTree;
import org.jboss.soa.esb.message.Message;
import org.jboss.soa.esb.message.format.MessageFactory;
Modified:
trunk/runtime/jbossesb-bpel/src/test/java/org/jboss/soa/esb/actions/bpel/TestBPELEngine.java
===================================================================
---
trunk/runtime/jbossesb-bpel/src/test/java/org/jboss/soa/esb/actions/bpel/TestBPELEngine.java 2009-11-23
16:52:29 UTC (rev 302)
+++
trunk/runtime/jbossesb-bpel/src/test/java/org/jboss/soa/esb/actions/bpel/TestBPELEngine.java 2009-11-23
17:38:28 UTC (rev 303)
@@ -19,7 +19,6 @@
import org.jboss.soa.bpel.runtime.engine.BPELEngine;
-import org.jboss.soa.bpel.runtime.engine.BPELFault;
import org.jboss.soa.bpel.runtime.engine.IntegrationLayer;
import org.jboss.soa.bpel.runtime.engine.InvocationAdapter;
import org.w3c.dom.Document;
@@ -71,7 +70,7 @@
}
public void invoke(InvocationAdapter invocationAdapter)
- throws BPELFault, Exception {
+ throws Exception {
ESBInvocationAdapter esbCtx = (ESBInvocationAdapter) invocationAdapter;
m_request = esbCtx.getRequestXML();