User: norbert 
  Date: 00/05/30 20:52:42

  Modified:    src/java/org/spyderMQ JMSServer.java JMSServerQueue.java
                        SessionQueue.java SpyConnection.java
                        SpyTopicPublisher.java
  Log:
  Fixes for P2P system
  
  Revision  Changes    Path
  1.36      +2 -2      spyderMQ/src/java/org/spyderMQ/JMSServer.java
  
  Index: JMSServer.java
  ===================================================================
  RCS file: /products/cvs/ejboss/spyderMQ/src/java/org/spyderMQ/JMSServer.java,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- JMSServer.java    2000/05/31 02:54:29     1.35
  +++ JMSServer.java    2000/05/31 03:52:41     1.36
  @@ -22,7 +22,7 @@
    *      
    *   @author Norbert Lataille ([EMAIL PROTECTED])
    * 
  - *   @version $Revision: 1.35 $
  + *   @version $Revision: 1.36 $
    */
   public class JMSServer 
                implements Runnable 
  @@ -270,7 +270,7 @@
   
                        HashMap newMap=null;
                        Iterator i=messageQueue.values().iterator();
  -                     boolean modified=false; //we don't want to waste our memory :)
  +                     boolean modified=false; //don't waste memory
        
                        while (i.hasNext()) {
                                
  
  
  
  1.31      +5 -3      spyderMQ/src/java/org/spyderMQ/JMSServerQueue.java
  
  Index: JMSServerQueue.java
  ===================================================================
  RCS file: /products/cvs/ejboss/spyderMQ/src/java/org/spyderMQ/JMSServerQueue.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- JMSServerQueue.java       2000/05/31 02:54:29     1.30
  +++ JMSServerQueue.java       2000/05/31 03:52:41     1.31
  @@ -18,7 +18,7 @@
    *      
    *   @author Norbert Lataille ([EMAIL PROTECTED])
    * 
  - *   @version $Revision: 1.30 $
  + *   @version $Revision: 1.31 $
    */
   public class JMSServerQueue
   {
  @@ -225,7 +225,7 @@
        
        private void handleConnectionFailure(SpyDistributedConnection dc,Iterator i)
        {
  -             //We should try again :) Such behavior should under control of a 
Failure-Plugin         
  +             //We should try again :) This behavior should under control of a 
Failure-Plugin         
                Log.error("I remove this Connection from the subscribers list");
                
                //Call JMSServer.ConnectionClosing(), but ask him not to check my list.
  @@ -264,7 +264,9 @@
                        
                        while (true) {
                                
  -                             //Get a receiver - NL We could find a better receiver 
(load balancing ?)                                
  +                             //Get a receiver
  +                             //NL: We could find a better receiver (load balancing 
?)
  +                             
                                if (listeners==0) break;                               
 
                                Iterator i=subscribers.values().iterator();
                                SpyDistributedConnection dc=null;
  
  
  
  1.20      +6 -8      spyderMQ/src/java/org/spyderMQ/SessionQueue.java
  
  Index: SessionQueue.java
  ===================================================================
  RCS file: /products/cvs/ejboss/spyderMQ/src/java/org/spyderMQ/SessionQueue.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- SessionQueue.java 2000/05/31 02:54:30     1.19
  +++ SessionQueue.java 2000/05/31 03:52:41     1.20
  @@ -21,7 +21,7 @@
    *      
    *   @author Norbert Lataille ([EMAIL PROTECTED])
    * 
  - *   @version $Revision: 1.19 $
  + *   @version $Revision: 1.20 $
    */
   public class SessionQueue
   {
  @@ -175,14 +175,13 @@
                }
        
        }
  -     
  -     
  +             
        public void dispatchMessage(Destination dest, SpyMessage mes) throws 
JMSException
        {       
                Log.log("SessionQueue: 
dispatchMessage(Destination="+dest.toString()+",Mes="+mes.toString()+")");
                
  -             if (session.closed) throw new IllegalStateException("The session is 
closed");           
  -             if (NumListeningSubscribers==0) throw new JMSException("There is no 
receiver for this queue !"); //We should catch this error in the JMSServerQueue object
  +             if (session.closed) throw new IllegalStateException("The session is 
closed");
  +             if (NumListeningSubscribers==0) throw new NoReceiverException("There 
are no receivers for this destination !");
                if (mes.isOutdated()) return;
                
                Iterator i=subscribers.iterator();              
  @@ -194,14 +193,13 @@
                if (receiver==null||!receiver.listening) {
                        NumListeningSubscribers=0;
                        Log.error("WARNING: The listeners count was invalid !");
  -                     throw new JMSException("There is no receiver for this queue 
!"); //We should catch this error in the JMSServerQueue object
  +                     throw new NoReceiverException("There are no receivers for this 
destination !");
                }
   
  -             
                synchronized (receiver.messages) {
                                
                        if (receiver.messageListener==null) {
  -                             if (!receiver.waitInReceive) throw new 
JMSException("There is no receiver for this queue !"); //We should catch this error in 
the JMSServerQueue object
  +                             if (!receiver.waitInReceive) throw new 
NoReceiverException("The receiver is not waiting for a message !"); //Try someone else 
in the same session
                                receiver.addMessage(mes);
                                receiver.messages.notify();
                        } else {
  
  
  
  1.35      +2 -2      spyderMQ/src/java/org/spyderMQ/SpyConnection.java
  
  Index: SpyConnection.java
  ===================================================================
  RCS file: /products/cvs/ejboss/spyderMQ/src/java/org/spyderMQ/SpyConnection.java,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- SpyConnection.java        2000/05/31 00:02:01     1.34
  +++ SpyConnection.java        2000/05/31 03:52:41     1.35
  @@ -29,7 +29,7 @@
    *      
    *   @author Norbert Lataille ([EMAIL PROTECTED])
    * 
  - *   @version $Revision: 1.34 $
  + *   @version $Revision: 1.35 $
    */
   public class SpyConnection 
                implements Connection, Serializable
  @@ -50,7 +50,7 @@
        //Last message ID returned
        private int lastMessageID;
        //Is the connection stopped ?
  -     protected boolean modeStop;
  +     public boolean modeStop;
        //Is the connection closed ?
        boolean closed;
        //Name of the connectionReceiver class
  
  
  
  1.11      +1 -3      spyderMQ/src/java/org/spyderMQ/SpyTopicPublisher.java
  
  Index: SpyTopicPublisher.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/spyderMQ/src/java/org/spyderMQ/SpyTopicPublisher.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- SpyTopicPublisher.java    2000/05/26 22:37:49     1.10
  +++ SpyTopicPublisher.java    2000/05/31 03:52:41     1.11
  @@ -18,7 +18,7 @@
    *      
    *   @author Norbert Lataille ([EMAIL PROTECTED])
    * 
  - *   @version $Revision: 1.10 $
  + *   @version $Revision: 1.11 $
    */
   public class SpyTopicPublisher 
        extends SpyMessageProducer 
  @@ -90,8 +90,6 @@
                
                //This message is not redelivered
                message.setJMSRedelivered(false);               
  -
  -             Log.log("publish");
   
                //We must put a 'new message' in the Session's outgoing queue [3.9]    
                         
                mySession.sendMessage(message.myClone());
  
  
  

Reply via email to