3 Replies Latest reply on Oct 30, 2006 5:53 AM by timfox

    ClassCastException String to ManagedDestination

    xiangya

      in code :/trunk/src/main/org/jboss/jms/server/DestinationJNDIMapper.java
      there are two type errors.
      maybe it should be:

      263 Set queues=new HashSet(queueMap.values());
      265 Set topics = new HashSet(topicMap.values());
      

      source code as follows:
       67 // Map <name , destination holder>
       68 private Map queueMap;
       69 private Map topicMap;
      
       261 public void stop() throws Exception
       262 {
       263 Set queues = new HashSet(queueMap.keySet());
       264
       265 Set topics = new HashSet(topicMap.keySet());
       266
       267 // remove all destinations from JNDI
       268 for(Iterator i = queues.iterator(); i.hasNext(); )
       269 {
       270 unregisterDestination((ManagedDestination)i.next());
       271 }
       272
       273 for(Iterator i = topics.iterator(); i.hasNext(); )
       274 {
       275 unregisterDestination((ManagedDestination)i.next());
       276 }
       277
       278 initialContext.unbind(serverPeer.getDefaultQueueJNDIContext());
       279 initialContext.unbind(serverPeer.getDefaultTopicJNDIContext());
       280
       281 initialContext.close();
       282 }