dblevins 2005/06/21 17:16:59
Modified: modules/core/src/java/org/openejb/sfsb AfterBegin.java
AfterCompletion.java BeforeCompletion.java
CreateMethod.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.3 +2 -2
openejb/modules/core/src/java/org/openejb/sfsb/AfterBegin.java
Index: AfterBegin.java
===================================================================
RCS file:
/scm/openejb/openejb/modules/core/src/java/org/openejb/sfsb/AfterBegin.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- AfterBegin.java 27 Feb 2005 02:53:58 -0000 1.2
+++ AfterBegin.java 21 Jun 2005 21:16:59 -0000 1.3
@@ -76,6 +76,6 @@
ctx.setOperation(oldOperation);
TimerState.setTimerState(oldTimerMethodAvailable);
}
- return new SimpleInvocationResult(true, null);
+ return invocation.createResult(null);
}
}
1.3 +2 -2
openejb/modules/core/src/java/org/openejb/sfsb/AfterCompletion.java
Index: AfterCompletion.java
===================================================================
RCS file:
/scm/openejb/openejb/modules/core/src/java/org/openejb/sfsb/AfterCompletion.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- AfterCompletion.java 27 Feb 2005 02:53:58 -0000 1.2
+++ AfterCompletion.java 21 Jun 2005 21:16:59 -0000 1.3
@@ -77,6 +77,6 @@
ctx.setOperation(oldOperation);
TimerState.setTimerState(oldTimerMethodAvailable);
}
- return new SimpleInvocationResult(true, null);
+ return invocation.createResult(null);
}
}
1.3 +2 -2
openejb/modules/core/src/java/org/openejb/sfsb/BeforeCompletion.java
Index: BeforeCompletion.java
===================================================================
RCS file:
/scm/openejb/openejb/modules/core/src/java/org/openejb/sfsb/BeforeCompletion.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- BeforeCompletion.java 27 Feb 2005 02:54:02 -0000 1.2
+++ BeforeCompletion.java 21 Jun 2005 21:16:59 -0000 1.3
@@ -76,6 +76,6 @@
ctx.setOperation(oldOperation);
TimerState.setTimerState(oldTimerMethodAvailable);
}
- return new SimpleInvocationResult(true, null);
+ return invocation.createResult(null);
}
}
1.6 +3 -3
openejb/modules/core/src/java/org/openejb/sfsb/CreateMethod.java
Index: CreateMethod.java
===================================================================
RCS file:
/scm/openejb/openejb/modules/core/src/java/org/openejb/sfsb/CreateMethod.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- CreateMethod.java 1 Mar 2005 23:34:30 -0000 1.5
+++ CreateMethod.java 21 Jun 2005 21:16:59 -0000 1.6
@@ -99,7 +99,7 @@
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;
@@ -110,7 +110,7 @@
// return a ref
EJBInterfaceType type = invocation.getType();
- return new SimpleInvocationResult(true, getReference(type.isLocal(),
ctx, ctx.getId()));
+ return invocation.createResult(getReference(type.isLocal(), ctx,
ctx.getId()));
}
private Object getReference(boolean local, EJBInstanceContext ctx,
Object id) {