dblevins 2005/06/21 17:16:59
Modified: modules/core/src/java/org/openejb/mejb MEJB.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 +4 -4 openejb/modules/core/src/java/org/openejb/mejb/MEJB.java
Index: MEJB.java
===================================================================
RCS file:
/scm/openejb/openejb/modules/core/src/java/org/openejb/mejb/MEJB.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- MEJB.java 8 May 2005 19:37:06 -0000 1.4
+++ MEJB.java 21 Jun 2005 21:16:58 -0000 1.5
@@ -222,15 +222,15 @@
EJBInvocation ejbInvocation = (EJBInvocation) invocation;
int methodIndex = methodMap[ejbInvocation.getMethodIndex()];
if (methodIndex == CREATE_INDEX) {
- return new SimpleInvocationResult(true, getEjbObject(null));
+ return ejbInvocation.createResult(getEjbObject(null));
}
try {
- return new SimpleInvocationResult(true,
fastClass.invoke(methodIndex, this, ejbInvocation.getArguments()));
+ return ejbInvocation.createResult(fastClass.invoke(methodIndex,
this, ejbInvocation.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 ejbInvocation.createExceptionResult((Exception)t);
} else {
// unchecked Exception - just throw it to indicate an
abnormal completion
throw t;