[Ubermq-commits] jms/src/com/ubermq/jms/client/impl LocalTopicSubscriber.java,1.6,1.7
Brought to you by:
jimmyp
From: <ji...@us...> - 2002-08-30 15:32:53
|
Update of /cvsroot/ubermq/jms/src/com/ubermq/jms/client/impl In directory usw-pr-cvs1:/tmp/cvs-serv14058/src/com/ubermq/jms/client/impl Modified Files: LocalTopicSubscriber.java Log Message: bug fixes Index: LocalTopicSubscriber.java =================================================================== RCS file: /cvsroot/ubermq/jms/src/com/ubermq/jms/client/impl/LocalTopicSubscriber.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** LocalTopicSubscriber.java 23 Aug 2002 14:06:53 -0000 1.6 --- LocalTopicSubscriber.java 30 Aug 2002 15:32:50 -0000 1.7 *************** *** 128,147 **** // setup receive q with priority ordering. ! receiveQueue = new BoundedPriorityQueue(BOUNDED_BUFFER_SIZE, ! new Comparator() { ! ! public int compare(Object o1, Object o2) ! { ! try ! { ! int pri1 = ((Message)o1).getJMSPriority(), ! pri2 = ((Message)o2).getJMSPriority(); ! return pri1 - pri2; ! } ! catch (JMSException e) { ! return 0; ! } ! } ! }); // register myself with the subscription router. --- 128,132 ---- // setup receive q with priority ordering. ! init(); // register myself with the subscription router. *************** *** 172,175 **** --- 157,163 ---- this.name = name; this.durable = true; + + // common setup + init(); // register myself with the subscription router. *************** *** 180,183 **** --- 168,191 ---- } + private void init() { + + receiveQueue = new BoundedPriorityQueue(BOUNDED_BUFFER_SIZE, + new Comparator() { + + public int compare(Object o1, Object o2) + { + try + { + int pri1 = ((Message)o1).getJMSPriority(), + pri2 = ((Message)o2).getJMSPriority(); + return pri1 - pri2; + } + catch (JMSException e) { + return 0; + } + } + }); + } + // // Implementation of TopicSubscriber Interface. |