User: hiram   
  Date: 00/12/12 13:04:22

  Modified:    src/java/org/spydermq SpyQueueSender.java
                        SpyTopicPublisher.java
  Log:
  Bug Fix: After a send() or publish() the sent message would be left in a read only 
mode.
  This should not happen since it is ok to reuse the message object to send other 
messages.
  The clone of the message is now what gets put into read only mode.
  
  Revision  Changes    Path
  1.4       +6 -10     spyderMQ/src/java/org/spydermq/SpyQueueSender.java
  
  Index: SpyQueueSender.java
  ===================================================================
  RCS file: /products/cvs/ejboss/spyderMQ/src/java/org/spydermq/SpyQueueSender.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SpyQueueSender.java       2000/12/12 05:58:57     1.3
  +++ SpyQueueSender.java       2000/12/12 21:04:22     1.4
  @@ -17,7 +17,7 @@
    *      
    *   @author Norbert Lataille ([EMAIL PROTECTED])
    * 
  - *   @version $Revision: 1.3 $
  + *   @version $Revision: 1.4 $
    */
   public class SpyQueueSender 
        extends SpyMessageProducer 
  @@ -83,14 +83,10 @@
                message.setJMSPriority(priority);
                message.setJMSMessageID(session.getNewMessageID());
                
  -             //Set the properties and the message body in ReadOnly mode
  -             //the client has to call clearProperties() and clearBody() if he wants 
to modify those values
  -             message.setReadOnlyMode();
  -             
  -             //This message is not redelivered
  -             message.setJMSRedelivered(false);
  -             
  -             //We must put a 'new message' in the Session's outgoing queue [3.9]    
                         
  -             session.sendMessage(message.myClone());
  +             //Clone the message so we can make the outbound message read only
  +             SpyMessage clone = message.myClone();
  +             clone.setReadOnlyMode();
  +             //Send the message.
  +             session.sendMessage(clone);
        }
   }
  
  
  
  1.4       +6 -13     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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SpyTopicPublisher.java    2000/07/07 21:37:31     1.3
  +++ SpyTopicPublisher.java    2000/12/12 21:04:22     1.4
  @@ -18,7 +18,7 @@
    *      
    *   @author Norbert Lataille ([EMAIL PROTECTED])
    * 
  - *   @version $Revision: 1.3 $
  + *   @version $Revision: 1.4 $
    */
   public class SpyTopicPublisher 
        extends SpyMessageProducer 
  @@ -84,18 +84,11 @@
                message.setJMSPriority(priority);
                message.setJMSMessageID(mySession.getNewMessageID());
                
  -             //Set the properties and the message body in ReadOnly mode
  -             //the client has to call clearProperties() and clearBody() if he wants 
to modify those values
  -             message.setReadOnlyMode();
  -             
  -             //This message is not redelivered
  -             message.setJMSRedelivered(false);
  -             
  -             //Handle the persistence
  -             message.persistent=(deliveryMode==DeliveryMode.PERSISTENT);
  -
  -             //We must put a 'new message' in the Session's outgoing queue [3.9]    
                         
  -             mySession.sendMessage(message.myClone());
  +             //Clone the message so we can make the outbound message read only      
 
  +             SpyMessage clone = message.myClone();
  +             clone.setReadOnlyMode();
  +             //Send the message
  +             mySession.sendMessage(clone);
        }
                
   }
  
  
  

Reply via email to