[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jboss-cvs-commits
Subject:    [jboss-cvs] jboss-jms/src/main/org/jboss/messaging/core/local       ...
From:       Ovidiu Feodorov <ovidiu.feodorov () jboss ! com>
Date:       2006-01-31 23:37:16
Message-ID: E1F453k-00021y-L8 () committer01 ! frg ! pub ! inap ! atl ! jboss ! com
[Download RAW message or body]

  User: ovidiu  
  Date: 06/01/31 18:37:16

  Modified:    src/main/org/jboss/messaging/core/local       Pipe.java
                        Queue.java
  Added:       src/main/org/jboss/messaging/core/local      
                        CoreDurableSubscription.java CoreSubscription.java
  Removed:     src/main/org/jboss/messaging/core/local      
                        DurableSubscription.java Subscription.java
  Log:
  - Clarified the distinction between destination undeployment/re-deployment and \
destination drop.  Added a test case that checks whether the current convention is \
enforced.  Currently, is not possible to drop destinations, they will be always \
"re-deployed" or "activated".  See http://jira.jboss.org/jira/browse/JBMESSAGING-220
  - Move various tests under the correct packages.
  
  Revision  Changes    Path
  1.10      +2 -3      jboss-jms/src/main/org/jboss/messaging/core/local/Pipe.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Pipe.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-jms/src/main/org/jboss/messaging/core/local/Pipe.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -b -r1.9 -r1.10
  --- Pipe.java	30 Jan 2006 18:36:28 -0000	1.9
  +++ Pipe.java	31 Jan 2006 23:37:16 -0000	1.10
  @@ -24,14 +24,13 @@
   import org.jboss.messaging.core.plugin.contract.TransactionLog;
   import org.jboss.messaging.core.plugin.contract.MessageStore;
   import org.jboss.messaging.core.ChannelSupport;
  -import org.jboss.messaging.core.plugin.contract.MessageStore;
   
   
   
   /**
    * @author <a href="mailto:ovidiu@jboss.org">Ovidiu Feodorov</a>
  - * @version <tt>$Revision: 1.9 $</tt>
  - * $Id: Pipe.java,v 1.9 2006/01/30 18:36:28 ovidiu Exp $
  + * @version <tt>$Revision: 1.10 $</tt>
  + * $Id: Pipe.java,v 1.10 2006/01/31 23:37:16 ovidiu Exp $
    */
   public class Pipe extends ChannelSupport
   {
  
  
  
  1.17      +2 -3      jboss-jms/src/main/org/jboss/messaging/core/local/Queue.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Queue.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-jms/src/main/org/jboss/messaging/core/local/Queue.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -b -r1.16 -r1.17
  --- Queue.java	31 Jan 2006 19:19:40 -0000	1.16
  +++ Queue.java	31 Jan 2006 23:37:16 -0000	1.17
  @@ -25,13 +25,12 @@
   import org.jboss.messaging.core.plugin.contract.MessageStore;
   import org.jboss.messaging.core.ChannelSupport;
   import org.jboss.messaging.core.CoreDestination;
  -import org.jboss.messaging.core.plugin.contract.MessageStore;
   
   /**
    * @author <a href="mailto:ovidiu@jboss.org">Ovidiu Feodorov</a>
  - * @version <tt>$Revision: 1.16 $</tt>
  + * @version <tt>$Revision: 1.17 $</tt>
    *
  - * $Id: Queue.java,v 1.16 2006/01/31 19:19:40 afu Exp $
  + * $Id: Queue.java,v 1.17 2006/01/31 23:37:16 ovidiu Exp $
    */
   public class Queue extends ChannelSupport implements CoreDestination, \
ManageableQueue  {
  
  
  
  1.1      date: 2006/01/31 23:37:16;  author: ovidiu;  state: \
Exp;jboss-jms/src/main/org/jboss/messaging/core/local/CoreDurableSubscription.java  
  Index: CoreDurableSubscription.java
  ===================================================================
  /*
    * JBoss, Home of Professional Open Source
    * Copyright 2005, JBoss Inc., and individual contributors as indicated
    * by the @authors tag. See the copyright.txt in the distribution for a
    * full listing of individual contributors.
    *
    * This is free software; you can redistribute it and/or modify it
    * under the terms of the GNU Lesser General Public License as
    * published by the Free Software Foundation; either version 2.1 of
    * the License, or (at your option) any later version.
    *
    * This software is distributed in the hope that it will be useful,
    * but WITHOUT ANY WARRANTY; without even the implied warranty of
    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    * Lesser General Public License for more details.
    *
    * You should have received a copy of the GNU Lesser General Public
    * License along with this software; if not, write to the Free
    * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
    * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
    */
  package org.jboss.messaging.core.local;
  
  import javax.jms.JMSException;
  
  import org.jboss.messaging.core.plugin.contract.TransactionLog;
  import org.jboss.messaging.util.Util;
  import org.jboss.messaging.core.plugin.contract.MessageStore;
  
  /**
   * 
   * Represents a durable topic subscription
   * 
   * @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
   * @author <a href="mailto:ovidiu@jboss.org">Ovidiu Feodorov</a>
   *
   * $Id: CoreDurableSubscription.java,v 1.1 2006/01/31 23:37:16 ovidiu Exp $
   */
  public class CoreDurableSubscription extends CoreSubscription
  {
     // Constants -----------------------------------------------------
  
     // Static --------------------------------------------------------
     
     // Attributes ----------------------------------------------------
     
     protected String name;
     protected String clientID;
  
  
     // Constructors --------------------------------------------------
  
     public CoreDurableSubscription(String clientID, String name, Topic topic, String \
                selector,
                                boolean noLocal, MessageStore ms, TransactionLog tl)
     {
        super(clientID + "." + name, topic, selector, noLocal, ms, tl);
        this.name = name;
        this.clientID = clientID;
     }
     
  
     // Channel implementation ----------------------------------------
  
     // Public --------------------------------------------------------
     
     public void closeConsumer() throws JMSException
     {
        // do nothing - this is durable
     }
     
     public String getName()
     {
        return name;
     }
  
     public String getClientID()
     {
        return clientID;
     }
  
     public void load() throws Exception
     {
        this.state.load();
     }
  
     public String toString()
     {
        return "CoreDurableSubscription[" + Util.guidToString(getChannelID()) + ", " \
+ topic + "]";  }
  
     // Package protected ---------------------------------------------
     
     // Protected -----------------------------------------------------
     
     // Private -------------------------------------------------------
     
     // Inner classes -------------------------------------------------   
  }
  
  
  
  
  1.1      date: 2006/01/31 23:37:16;  author: ovidiu;  state: \
Exp;jboss-jms/src/main/org/jboss/messaging/core/local/CoreSubscription.java  
  Index: CoreSubscription.java
  ===================================================================
  /*
    * JBoss, Home of Professional Open Source
    * Copyright 2005, JBoss Inc., and individual contributors as indicated
    * by the @authors tag. See the copyright.txt in the distribution for a
    * full listing of individual contributors.
    *
    * This is free software; you can redistribute it and/or modify it
    * under the terms of the GNU Lesser General Public License as
    * published by the Free Software Foundation; either version 2.1 of
    * the License, or (at your option) any later version.
    *
    * This software is distributed in the hope that it will be useful,
    * but WITHOUT ANY WARRANTY; without even the implied warranty of
    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    * Lesser General Public License for more details.
    *
    * You should have received a copy of the GNU Lesser General Public
    * License along with this software; if not, write to the Free
    * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
    * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
    */
  package org.jboss.messaging.core.local;
  
  
  import javax.jms.JMSException;
  
  import org.jboss.logging.Logger;
  import org.jboss.messaging.core.plugin.contract.TransactionLog;
  import org.jboss.messaging.core.plugin.contract.MessageStore;
  import org.jboss.messaging.util.Util;
  import org.jboss.util.id.GUID;
  
  /**
   * Represents a subscription to a destination (topic or queue). It  job is to \
                recoverably hold
   * messages in transit to consumers.
   * 
   * @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
   *
   * $Id: CoreSubscription.java,v 1.1 2006/01/31 23:37:16 ovidiu Exp $
   */
  public class CoreSubscription extends Pipe
  {
     // Constants -----------------------------------------------------
     
     private static final Logger log = Logger.getLogger(CoreSubscription.class);
  
     // Static --------------------------------------------------------
     
     // Attributes ----------------------------------------------------
     
     protected Topic topic;
     protected String selector;
     protected boolean noLocal;
     
     // Constructors --------------------------------------------------
  
     public CoreSubscription(Topic topic, String selector, boolean noLocal, \
MessageStore ms)  {
        this("sub" + new GUID().toString(), topic, selector, noLocal, ms, null);
     }
     
     protected CoreSubscription(String name, Topic topic, String selector, boolean \
noLocal,  MessageStore ms, TransactionLog tl)
     {
        // A CoreSubscription must accept reliable messages, even if itself is \
non-recoverable  super(name, ms, tl, true);
        this.topic = topic;
        this.selector = selector;
        this.noLocal = noLocal;
     }
     
     // Channel implementation ----------------------------------------
  
     // Public --------------------------------------------------------
     
     public void subscribe()
     {
        topic.add(this);
     }
     
     public void unsubscribe() throws JMSException
     {
        topic.remove(this);
     }
     
     public void closeConsumer() throws JMSException
     {
        unsubscribe();
        try
        {
           if (tl != null)
           {
              tl.removeAllMessageData(this.channelID);
           }
        }
        catch (Exception e)
        {
           final String msg = "Failed to remove message data for subscription";
           log.error(msg, e);
           throw new IllegalStateException(msg);
        }
     }
     
     public Topic getTopic()
     {
        return topic;
     }
     
     public String getSelector()
     {
        return selector;
     }
     
     public boolean isNoLocal()
     {
        return noLocal;
     }
  
     public String toString()
     {
        return "CoreSubscription[" + Util.guidToString(getChannelID()) + ", " + topic \
+ "]";  }
  
     // Package protected ---------------------------------------------
     
     // Protected -----------------------------------------------------
     
     // Private -------------------------------------------------------
     
     // Inner classes -------------------------------------------------   
  }
  
  
  


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
jboss-cvs-commits mailing list
jboss-cvs-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-cvs-commits


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic