User: hiram
Date: 00/11/13 22:05:05
Modified: src/java/org/spydermq/distributed/server
ConnectionReceiverOILClient.java
Log:
Fixed the p2p deadlock
Revision Changes Path
1.9 +13 -6
spyderMQ/src/java/org/spydermq/distributed/server/ConnectionReceiverOILClient.java
Index: ConnectionReceiverOILClient.java
===================================================================
RCS file:
/products/cvs/ejboss/spyderMQ/src/java/org/spydermq/distributed/server/ConnectionReceiverOILClient.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- ConnectionReceiverOILClient.java 2000/11/04 19:24:47 1.8
+++ ConnectionReceiverOILClient.java 2000/11/14 06:05:05 1.9
@@ -59,22 +59,29 @@
public void waitAnswer() throws Exception
{
+ Exception throwException=null;
try {
os.flush();
int val=is.read();
- if (val==1) {
+ switch(val) {
+ case 1:
String st=(String)in.readObject();
- throw new RemoteException(st);
+ throwException = new RemoteException(st);
+ break;
+ case 2:
+ st=(String)in.readObject();
+ throwException = new
org.spydermq.NoReceiverException(st);
}
} catch (IOException e) {
Log.notice("IOException while reading the answer");
Log.notice(e);
throw new RemoteException("Cannot contact the remote object");
- } /*catch (ClassNotFoundException e) {
- throw new RemoteException("ClassNotFoundException");
- }*/
+ }
+
+ if( throwException != null )
+ throw throwException;
}
-
+
public void receive(SpyDestination dest,SpyMessage mes) throws Exception
{
if (socket==null) createConnection();