dblevins 2004/04/12 04:31:41
Modified: modules/core/src/java/org/openejb/client EJBRequest.java
Log:
Still quite a few failures, but minimal remote server functionality is working.
Test results are:
Tests run: 112, Failures: 27, Errors: 6
Couple things causing problems:
- DatabaseBean can't get a datasource, so no BMP tests run.
- BeanPolicy$2.invoke throwing "Not yet implemented" is preventing
nearly all the SFSB tests from running.
- Still having classloader issues on outbound proxy replacements,
so many RMI-IIOP tests are failing.
All in all the test suite is doing it's job.
Revision Changes Path
1.3 +45 -33 openejb/modules/core/src/java/org/openejb/client/EJBRequest.java
Index: EJBRequest.java
===================================================================
RCS file:
/home/projects/openejb/scm/openejb/modules/core/src/java/org/openejb/client/EJBRequest.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- EJBRequest.java 9 Apr 2004 19:04:01 -0000 1.2
+++ EJBRequest.java 12 Apr 2004 08:31:41 -0000 1.3
@@ -233,8 +233,41 @@
* restored cannot be found.
*/
public void readExternal(ObjectInput in) throws IOException,
ClassNotFoundException {
- ClassNotFoundException result = null;
+ clearState();
+ readRequestMethod(in);
+
+ readContainerId(in);
+
+ readClientIdentity(in);
+
+ readPrimaryKey(in);
+
+ readMethod(in);
+
+ readMethodParameters(in);
+
+ loadMethodInstance();
+ }
+
+ protected void loadMethodInstance() throws IOException {
+ try {
+ methodInstance = methodClass.getDeclaredMethod(methodName,
methodParamTypes);
+ } catch (NoSuchMethodException nsme) {
+ throw (IOException)new IOException("Invalid EJB request
data.").initCause(nsme);
+ }
+ }
+
+ protected void readMethod(ObjectInput in) throws ClassNotFoundException,
IOException {
+ methodClass = (Class) in.readObject();
+ methodName = in.readUTF();
+ }
+
+ protected void readPrimaryKey(ObjectInput in) throws ClassNotFoundException,
IOException {
+ primaryKey = in.readObject();
+ }
+
+ protected void clearState() {
requestMethod = -1;
deploymentId = null;
deploymentCode = -1;
@@ -243,40 +276,19 @@
methodClass = null;
methodName = null;
methodInstance = null;
+ }
- requestMethod = in.readByte();
- try {
- deploymentId = (String) in.readObject();
- } catch (ClassNotFoundException cnfe) {
- result = cnfe;
- }
- deploymentCode = in.readShort();
- try {
- clientIdentity = in.readObject();
- primaryKey = in.readObject();
- methodClass = (Class) in.readObject();
- } catch (ClassNotFoundException cnfe) {
- if (result == null) result = cnfe;
- }
- methodName = in.readUTF();
-
- try {
- readMethodParameters(in);
- } catch (ClassNotFoundException cnfe) {
- if (result == null) result = cnfe;
- }
+ protected void readClientIdentity(ObjectInput in) throws
ClassNotFoundException, IOException {
+ clientIdentity = in.readObject();
+ }
- if (methodClass != null) {
- try {
- methodInstance = methodClass
- .getDeclaredMethod(methodName, methodParamTypes);
- } catch (NoSuchMethodException nsme) {
- //if (result == null) result = nsme;
- }
- }
+ protected void readContainerId(ObjectInput in) throws ClassNotFoundException,
IOException {
+ deploymentId = (String) in.readObject();
+ deploymentCode = in.readShort();
+ }
- if (result != null)
- throw result;
+ protected void readRequestMethod(ObjectInput in) throws IOException {
+ requestMethod = in.readByte();
}
/**