User: hiram
Date: 01/01/04 15:24:51
Modified: src/java/org/spydermq/distributed/server
ConnectionReceiverOIL.java
ConnectionReceiverOILClient.java
ConnectionReceiverUIL.java
ConnectionReceiverUILClient.java
DistributedJMSServerOIL.java
Log:
Bug Fix: message consumers would hang if it was delivered a message after it was
closed.
Revision Changes Path
1.15 +5 -8
spyderMQ/src/java/org/spydermq/distributed/server/ConnectionReceiverOIL.java
Index: ConnectionReceiverOIL.java
===================================================================
RCS file:
/products/cvs/ejboss/spyderMQ/src/java/org/spydermq/distributed/server/ConnectionReceiverOIL.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- ConnectionReceiverOIL.java 2000/12/29 21:17:10 1.14
+++ ConnectionReceiverOIL.java 2001/01/04 23:24:50 1.15
@@ -16,7 +16,7 @@
import org.spydermq.SpyTopicConnection;
import org.spydermq.SpyQueueSession;
import org.spydermq.Log;
-import org.spydermq.NoReceiverException;
+
import org.spydermq.distributed.interfaces.ConnectionReceiver;
import org.spydermq.distributed.interfaces.ConnectionReceiverSetup;
import org.spydermq.SpyConsumer;
@@ -42,7 +42,7 @@
* @author Norbert Lataille ([EMAIL PROTECTED])
* @author Hiram Chirino ([EMAIL PROTECTED])
*
- * @version $Revision: 1.14 $
+ * @version $Revision: 1.15 $
*/
public class ConnectionReceiverOIL implements Runnable, ConnectionReceiverSetup {
// Attributes ----------------------------------------------------
@@ -137,12 +137,9 @@
break;
try {
- if (e instanceof NoReceiverException) {
- out.writeByte(2);
- } else {
- out.writeByte(1);
- }
- out.writeObject(e.getMessage());
+ Log.error(e);
+ out.writeByte(1);
+ out.writeObject(e);
out.reset();
out.flush();
} catch (IOException e2) {
1.15 +1 -4
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.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- ConnectionReceiverOILClient.java 2000/12/26 04:15:56 1.14
+++ ConnectionReceiverOILClient.java 2001/01/04 23:24:50 1.15
@@ -32,7 +32,7 @@
* @author Norbert Lataille ([EMAIL PROTECTED])
* @author Hiram Chirino ([EMAIL PROTECTED])
*
- * @version $Revision: 1.14 $
+ * @version $Revision: 1.15 $
*/
public class ConnectionReceiverOILClient
implements ConnectionReceiver, Serializable
@@ -80,9 +80,6 @@
Exception e=(Exception)in.readObject();
throwException = new RemoteException("", e);
break;
- case 2:
- String st=(String)in.readObject();
- throwException = new
org.spydermq.NoReceiverException(st);
}
} catch (IOException e) {
Log.notice("IOException while reading the answer");
1.7 +5 -10
spyderMQ/src/java/org/spydermq/distributed/server/ConnectionReceiverUIL.java
Index: ConnectionReceiverUIL.java
===================================================================
RCS file:
/products/cvs/ejboss/spyderMQ/src/java/org/spydermq/distributed/server/ConnectionReceiverUIL.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- ConnectionReceiverUIL.java 2000/12/23 15:48:21 1.6
+++ ConnectionReceiverUIL.java 2001/01/04 23:24:50 1.7
@@ -15,7 +15,7 @@
import org.spydermq.SpyTopicConnection;
import org.spydermq.SpyQueueSession;
import org.spydermq.Log;
-import org.spydermq.NoReceiverException;
+
import org.spydermq.distributed.interfaces.ConnectionReceiver;
import org.spydermq.distributed.interfaces.ConnectionReceiverSetup;
import org.spydermq.SpyConsumer;
@@ -42,7 +42,7 @@
* @author Norbert Lataille ([EMAIL PROTECTED])
* @author Hiram Chirino ([EMAIL PROTECTED])
*
- * @version $Revision: 1.6 $
+ * @version $Revision: 1.7 $
*/
public class ConnectionReceiverUIL implements Runnable, ConnectionReceiverSetup {
// Attributes ----------------------------------------------------
@@ -123,7 +123,6 @@
} catch (IOException e) {
if (closed)
break;
- ;
failure("Result write", e);
break;
@@ -135,13 +134,9 @@
break;
try {
- if (e instanceof NoReceiverException) {
- out.writeByte(2);
- out.writeObject(e.getMessage());
- } else {
- out.writeByte(1);
- out.writeObject(e);
- }
+ Log.error( e );
+ out.writeByte(1);
+ out.writeObject(e);
out.reset();
out.flush();
} catch (IOException e2) {
1.7 +1 -4
spyderMQ/src/java/org/spydermq/distributed/server/ConnectionReceiverUILClient.java
Index: ConnectionReceiverUILClient.java
===================================================================
RCS file:
/products/cvs/ejboss/spyderMQ/src/java/org/spydermq/distributed/server/ConnectionReceiverUILClient.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- ConnectionReceiverUILClient.java 2000/12/26 04:15:56 1.6
+++ ConnectionReceiverUILClient.java 2001/01/04 23:24:50 1.7
@@ -31,7 +31,7 @@
* @author Norbert Lataille ([EMAIL PROTECTED])
* @author Hiram Chirino ([EMAIL PROTECTED])
*
- * @version $Revision: 1.6 $
+ * @version $Revision: 1.7 $
*/
import org.spydermq.multiplexor.SocketMultiplexor;
import org.spydermq.ReceiveRequest;
@@ -70,9 +70,6 @@
Exception e=(Exception)in.readObject();
throwException = new RemoteException("", e);
break;
- case 2:
- String st=(String)in.readObject();
- throwException = new
org.spydermq.NoReceiverException(st);
}
} catch (IOException e) {
Log.notice("IOException while reading the answer");
1.11 +5 -1
spyderMQ/src/java/org/spydermq/distributed/server/DistributedJMSServerOIL.java
Index: DistributedJMSServerOIL.java
===================================================================
RCS file:
/products/cvs/ejboss/spyderMQ/src/java/org/spydermq/distributed/server/DistributedJMSServerOIL.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- DistributedJMSServerOIL.java 2000/12/26 04:15:58 1.10
+++ DistributedJMSServerOIL.java 2001/01/04 23:24:50 1.11
@@ -39,7 +39,7 @@
* @author Norbert Lataille ([EMAIL PROTECTED])
* @author Hiram Chirino ([EMAIL PROTECTED])
*
- * @version $Revision: 1.10 $
+ * @version $Revision: 1.11 $
*/
public class DistributedJMSServerOIL extends DistributedJMSServerUIL
implements DistributedJMSServerOILMBean
@@ -173,11 +173,15 @@
break;
try {
+ Log.log("Client request caused an exception:
");
+ Log.log(e);
out.writeByte(2);
out.writeObject(e);
out.reset();
out.flush();
} catch (IOException e2) {
+ if( closed )
+ break;
failure("Result write",e2);
break;
}