You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsif-dev@ws.apache.org by ow...@apache.org on 2003/04/06 15:36:01 UTC
cvs commit: xml-axis-wsif/java/src/org/apache/wsif/providers/ejb WSIFPort_EJB.java
owenb 2003/04/06 06:36:01
Modified: java/src/org/apache/wsif/providers/ejb WSIFPort_EJB.java
Log:
Improvements to getEjbObjectClass method and related methods
Revision Changes Path
1.12 +14 -6 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.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- WSIFPort_EJB.java 4 Feb 2003 13:54:13 -0000 1.11
+++ WSIFPort_EJB.java 6 Apr 2003 13:36:00 -0000 1.12
@@ -249,7 +249,10 @@
}
/**
- * Gets the Java class of the EJB remote interface without having to create the object
+ * Gets the Java class of the EJB remote interface. The method attempts to get the class
+ * information from the EJBMetaData for the EJBHome but if this fails, it will create
+ * the EJBObject and get the class from the instamce.
+ *
* @return Class the class of the service object
*/
Class getEjbObjectClass() throws WSIFException {
@@ -272,10 +275,12 @@
ejbObjectClass =
fieldEjbHome.getEJBMetaData().getRemoteInterfaceClass();
} catch (RemoteException re) {
- Trc.exception(re);
- throw new WSIFException(
- "Unable to get EJBObject class",
- re);
+ Trc.ignoredException(re);
+ }
+ // As a last resort, attempt to create the EJBObject and get its class
+ if (ejbObjectClass == null) {
+ getEjbObject();
+ ejbObjectClass = fieldEjbObject.getClass();
}
}
}
@@ -289,7 +294,7 @@
* @return Method[] the methods of the EJB's remote interface
*/
Method[] getEjbObjectMethods() throws WSIFException {
- // no method access modifier as it used by WSIFOperation_Java
+ // no method access modifier as it used by WSIFOperation_EJB
Trc.entry(this);
if (ejbObjectMethods == null) {
Class c = getEjbObjectClass();
@@ -332,6 +337,9 @@
public void setEjbObject(EJBObject newEjbObject) {
Trc.entry(this, newEjbObject);
fieldEjbObject = newEjbObject;
+ if (fieldEjbObject != null) {
+ ejbObjectClass = fieldEjbObject.getClass();
+ }
Trc.exit();
}