dblevins 2005/02/11 19:48:19
Modified: modules/core/src/java/org/openejb EJBInvocationImpl.java
GenericEJBContainer.java
Log:
Fixed indexing of ServiceEndpoint interface
Added legacy support for ServiceEndpoint interface
Fixed issue with StAX provider not being loaded due to the way it incorrectly
"detects" which classloader to use.
Revision Changes Path
1.6 +6 -6
openejb/modules/core/src/java/org/openejb/EJBInvocationImpl.java
Index: EJBInvocationImpl.java
===================================================================
RCS file:
/home/projects/openejb/scm/openejb/modules/core/src/java/org/openejb/EJBInvocationImpl.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- EJBInvocationImpl.java 10 Feb 2005 06:38:32 -0000 1.5
+++ EJBInvocationImpl.java 12 Feb 2005 00:48:19 -0000 1.6
@@ -80,8 +80,8 @@
}
public EJBInvocationImpl(EJBInterfaceType type, int index, Object[]
arguments) {
- assert type != null;
- assert index >= 0;
+ assert type != null : "Interface type may not be null";
+ assert index >= 0 : "Invalid method index: "+index;
this.type = type;
this.index = index;
this.arguments = arguments;
@@ -89,8 +89,8 @@
}
public EJBInvocationImpl(EJBInterfaceType type, Object id, int index,
Object[] arguments) {
- assert type != null;
- assert index >= 0;
+ assert type != null : "Interface type may not be null";
+ assert index >= 0 : "Invalid method index: "+index;
this.type = type;
this.index = index;
this.arguments = arguments;
@@ -98,7 +98,7 @@
}
public EJBInvocationImpl(int index, Object[] arguments,
EJBInstanceContext instanceContext) {
- assert index >= 0;
+ assert index >= 0 : "Invalid method index: "+index;
assert instanceContext != null;
this.type = EJBInterfaceType.LIFECYCLE;
this.index = index;
1.36 +6 -2
openejb/modules/core/src/java/org/openejb/GenericEJBContainer.java
Index: GenericEJBContainer.java
===================================================================
RCS file:
/home/projects/openejb/scm/openejb/modules/core/src/java/org/openejb/GenericEJBContainer.java,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- GenericEJBContainer.java 3 Feb 2005 03:09:52 -0000 1.35
+++ GenericEJBContainer.java 12 Feb 2005 00:48:19 -0000 1.36
@@ -225,13 +225,17 @@
EJBInterfaceType invocationType = null;
int index = proxyFactory.getMethodIndex(method);
+ Class serviceEndpointInterface =
this.getProxyInfo().getServiceEndpointInterface();
+
Class clazz = method.getDeclaringClass();
if (EJBHome.class.isAssignableFrom(clazz)) {
invocationType = EJBInterfaceType.HOME;
} else if (EJBObject.class.isAssignableFrom(clazz)) {
invocationType = EJBInterfaceType.REMOTE;
+ } else if (serviceEndpointInterface != null &&
serviceEndpointInterface.isAssignableFrom(clazz)) {
+ invocationType = EJBInterfaceType.WEB_SERVICE;
} else {
- throw new IllegalArgumentException("Legacy invoke interface only
supports remote interfaces: " + clazz);
+ throw new IllegalArgumentException("Legacy invoke interface only
supports remote and service-endpoint interfaces: " + clazz);
}
// extract the primary key from home ejb remove invocations