owenb 2003/06/06 06:58:54
Modified: java/src/org/apache/wsif/providers/ejb WSIFPort_EJB.java
Log:
Performance improvement - do not narrow the EJBHome returned by the jndi lookup if
it is loaded by the same classloader as the local copy
(i.e. the local copy is assignable from the one returned by the jndi lookup)
Revision Changes Path
1.13 +6 -1
xml-axis-wsif/java/src/org/apache/wsif/providers/ejb/WSIFPort_EJB.java
Index: WSIFPort_EJB.java
===================================================================
RCS file:
/home/cvs/xml-axis-wsif/java/src/org/apache/wsif/providers/ejb/WSIFPort_EJB.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- WSIFPort_EJB.java 6 Apr 2003 13:36:00 -0000 1.12
+++ WSIFPort_EJB.java 6 Jun 2003 13:58:54 -0000 1.13
@@ -213,7 +213,12 @@
}
if (homeClass != null) {
- fieldEjbHome = (EJBHome)
PortableRemoteObject.narrow(initContext.lookup(address.getJndiName()),homeClass);
+ Object tempHome = initContext.lookup(address.getJndiName());
+ if (homeClass.isAssignableFrom(tempHome.getClass())) {
+ fieldEjbHome = (EJBHome) tempHome;
+ } else {
+ fieldEjbHome = (EJBHome)
PortableRemoteObject.narrow(tempHome, homeClass);
+ }
} else {
fieldEjbHome = (EJBHome)
initContext.lookup(address.getJndiName());
}