dblevins 2005/06/21 17:16:59
Modified: modules/core/src/java/org/openejb/server/ejbd
EJBInvocationStream.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.6 +12 -1
openejb/modules/core/src/java/org/openejb/server/ejbd/EJBInvocationStream.java
Index: EJBInvocationStream.java
===================================================================
RCS file:
/scm/openejb/openejb/modules/core/src/java/org/openejb/server/ejbd/EJBInvocationStream.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- EJBInvocationStream.java 23 Mar 2005 08:23:23 -0000 1.5
+++ EJBInvocationStream.java 21 Jun 2005 21:16:59 -0000 1.6
@@ -49,6 +49,8 @@
import java.lang.reflect.Method;
import org.apache.geronimo.core.service.InvocationKey;
+import org.apache.geronimo.core.service.InvocationResult;
+import org.apache.geronimo.core.service.SimpleInvocationResult;
import org.apache.geronimo.transaction.context.TransactionContext;
import org.openejb.EJBInstanceContext;
import org.openejb.EJBInterfaceType;
@@ -207,4 +209,13 @@
public void setMethodIndex(int methodIndex) {
this.methodIndex = methodIndex;
}
+
+ public InvocationResult createResult(Object object) {
+ return new SimpleInvocationResult(true, object);
+ }
+
+ public InvocationResult createExceptionResult(Exception exception) {
+ return new SimpleInvocationResult(false, exception);
+ }
+
}