1 22 package org.jboss.mq; 23 24 import javax.jms.JMSException ; 25 import javax.jms.TemporaryQueue ; 26 27 35 public class SpyTemporaryQueue extends SpyQueue implements TemporaryQueue 36 { 37 39 40 static final long serialVersionUID = 1216493383395688001L; 41 42 44 45 ConnectionToken dc; 46 47 48 private transient Connection con = null; 49 50 52 54 60 public SpyTemporaryQueue(String queueName, ConnectionToken dc_) 61 { 62 super(queueName); 63 dc = dc_; 64 } 65 66 68 74 public void setConnection(Connection con) 75 { 76 this.con = con; 77 } 78 79 81 public void delete() throws JMSException 82 { 83 try 84 { 85 con.deleteTemporaryDestination(this); 86 } 87 catch (Exception e) 88 { 89 throw new SpyJMSException("Cannot delete the TemporaryQueue", e); 90 } 91 } 92 93 95 97 99 } | Popular Tags |