dblevins 2005/06/21 17:16:57
Modified: modules/core/src/java/org/openejb/dispatch
AbstractMethodOperation.java
AbstractSpecificMethodOperation.java
Log:
Removing 47 references to the SimpleInvocationResult constructor and
replacing with a factory method on EJBInvocatin interface. The
implementor of EJBInvocation should be able to decide the
implementation of InvocationResult.
Revision Changes Path
1.5 +3 -3
openejb/modules/core/src/java/org/openejb/dispatch/AbstractMethodOperation.java
Index: AbstractMethodOperation.java
===================================================================
RCS file:
/scm/openejb/openejb/modules/core/src/java/org/openejb/dispatch/AbstractMethodOperation.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- AbstractMethodOperation.java 14 Feb 2005 18:32:25 -0000 1.4
+++ AbstractMethodOperation.java 21 Jun 2005 21:16:57 -0000 1.5
@@ -87,12 +87,12 @@
try {
ctx.setOperation(operation);
try {
- return new SimpleInvocationResult(true,
fastClass.invoke(methodIndex, ctx.getInstance(), invocation.getArguments()));
+ return invocation.createResult(fastClass.invoke(methodIndex,
ctx.getInstance(), invocation.getArguments()));
} catch (InvocationTargetException ite) {
Throwable t = ite.getTargetException();
if (t instanceof Exception && t instanceof RuntimeException
== false) {
// checked exception - which we simply include in the
result
- return new SimpleInvocationResult(false, t);
+ return invocation.createExceptionResult((Exception)t);
} else {
// unchecked Exception - just throw it to indicate an
abnormal completion
throw t;
1.3 +3 -3
openejb/modules/core/src/java/org/openejb/dispatch/AbstractSpecificMethodOperation.java
Index: AbstractSpecificMethodOperation.java
===================================================================
RCS file:
/scm/openejb/openejb/modules/core/src/java/org/openejb/dispatch/AbstractSpecificMethodOperation.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- AbstractSpecificMethodOperation.java 14 Feb 2005 18:32:25 -0000
1.2
+++ AbstractSpecificMethodOperation.java 21 Jun 2005 21:16:57 -0000
1.3
@@ -78,11 +78,11 @@
try {
ctx.setOperation(operation);
try {
- return new SimpleInvocationResult(true,
doOperation(ctx.getInstance(), invocation.getArguments()));
+ return
invocation.createResult(doOperation(ctx.getInstance(),
invocation.getArguments()));
} catch (Throwable t) {
if (t instanceof Exception && t instanceof RuntimeException
== false) {
// checked exception - which we simply include in the
result
- return new SimpleInvocationResult(false, t);
+ return invocation.createExceptionResult((Exception)t);
} else {
// unchecked Exception - just throw it to indicate an
abnormal completion
throw t;