public CoreDurableSubscription getDurableSubscription(String clientID,
public DurableSubscription getDurableSubscription(String clientID,
   public CoreDurableSubscription getDurableSubscription(String clientID,                                                         String subscriptionName,                                                                                                                  MessageStore ms,                                                         PersistenceManager pm)      throws JMSException   {      // Look in memory first      CoreDurableSubscription sub = getDurableSubscription(clientID, subscriptionName);            if (sub != null)      {         return sub;      }            //Now look in the db      try      {                  Connection conn = null;         PreparedStatement ps  = null;         ResultSet rs = null;         TransactionWrapper wrap = new TransactionWrapper();                  try         {            conn = ds.getConnection();                        ps = conn.prepareStatement(selectDurableSub);                        ps.setString(1, clientID);            ps.setString(2, subscriptionName);                        boolean exists = false;                        try            {               rs = ps.executeQuery();               exists = rs.next();            }            finally            {               if (log.isTraceEnabled())               {                  String s = JDBCUtil.statementToString(selectDurableSub, clientID, subscriptionName);                  log.trace(s + (rs == null ? " failed!" : (exists ? " returned rows" : " did NOT return rows")));               }            }                        if (exists)            {               String topicName = rs.getString(1);               long id = rs.getLong(2);               String selector = rs.getString(3);               boolean noLocal = rs.getString(4).equals("Y");                              Map subs = (Map)subscriptions.get(clientID);               if (subs == null)               {                  subs = new ConcurrentReaderHashMap();                  subscriptions.put(clientID, subs);               }                              // create in memory               sub = createDurableSubscriptionInternal(id, topicName, clientID, subscriptionName, selector,                                                       noLocal, ms, pm);                              // load its state               sub.load();            }                        return sub;         }         finally         {            if (rs != null)            {               rs.close();            }            if (ps != null)            {               ps.close();            }            if (conn != null)            {               conn.close();            }            wrap.end();         }      }      catch (Exception e)      {         final String msg = "Failed to get subscription";         log.error(msg, e);         JMSException e2 = new JMSException(msg);         e2.setLinkedException(e);         throw e2;      }         }