activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r453171 - /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTopicMessageStore.java
Date Thu, 05 Oct 2006 10:11:20 GMT
Author: rajdavies
Date: Thu Oct  5 03:11:17 2006
New Revision: 453171

URL: http://svn.apache.org/viewvc?view=rev&rev=453171
Log:
fixed some class cast exceptions

Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTopicMessageStore.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTopicMessageStore.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTopicMessageStore.java?view=diff&rev=453171&r1=453170&r2=453171
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTopicMessageStore.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTopicMessageStore.java
Thu Oct  5 03:11:17 2006
@@ -146,8 +146,8 @@
         ListContainer list=(ListContainer) subscriberAcks.get(key);
         if(list!=null){
             for(Iterator i=list.iterator();i.hasNext();){
-                TopicSubAck tsa = (TopicSubAck)i.next();
-                Object msg=messageContainer.get(tsa.getStoreEntry());
+                StoreEntry entry = (StoreEntry)i.next();
+                Object msg=messageContainer.get(entry);
                 if(msg!=null){
                     if(msg.getClass()==String.class){
                         listener.recoverMessageReference((String) msg);
@@ -170,8 +170,8 @@
             boolean startFound=false;
             int count = 0;
             for(Iterator i=list.iterator();i.hasNext() && count < maxReturned;){
-                TopicSubAck tsa = (TopicSubAck)i.next();
-                Object msg=messageContainer.get(tsa.getStoreEntry());
+                StoreEntry entry = (StoreEntry)i.next();
+                Object msg=messageContainer.get(entry);
                 if(msg!=null){
                     if(msg.getClass()==String.class){
                         String ref=msg.toString();
@@ -226,9 +226,8 @@
     public Message getNextMessageToDeliver(String clientId,String subscriptionName) throws
IOException{
         String key=getSubscriptionKey(clientId,subscriptionName);
         ListContainer list=(ListContainer) subscriberAcks.get(key);
-        Iterator iter = list.iterator();
-        TopicSubAck tsa = (TopicSubAck)list.get(0);
-        Message msg=(Message)messageContainer.get(tsa.getStoreEntry());
+        StoreEntry entry = (StoreEntry)list.get(0);
+        Message msg=(Message)messageContainer.get(entry);
         return msg;
     }
 



Mime
View raw message