KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > test > jbossmq > test > SecurityUnitTestCase


1 /*
2   * JBoss, Home of Professional Open Source
3   * Copyright 2005, JBoss Inc., and individual contributors as indicated
4   * by the @authors tag. See the copyright.txt in the distribution for a
5   * full listing of individual contributors.
6   *
7   * This is free software; you can redistribute it and/or modify it
8   * under the terms of the GNU Lesser General Public License as
9   * published by the Free Software Foundation; either version 2.1 of
10   * the License, or (at your option) any later version.
11   *
12   * This software is distributed in the hope that it will be useful,
13   * but WITHOUT ANY WARRANTY; without even the implied warranty of
14   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15   * Lesser General Public License for more details.
16   *
17   * You should have received a copy of the GNU Lesser General Public
18   * License along with this software; if not, write to the Free
19   * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20   * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21   */

22 package org.jboss.test.jbossmq.test;
23
24 import javax.management.ObjectName JavaDoc;
25 import junit.framework.Assert;
26 import junit.framework.Test;
27 import junit.framework.TestSuite;
28 import org.jboss.test.JBossTestSetup;
29 import org.jboss.test.jbossmq.MQBase;
30 /**
31  * Test of security features in JBossMQ
32  *
33  *
34  * @author <a HREF="pra@tim.se">Peter Antman</a>
35  * @version $Revision: 37406 $
36  */

37 public class SecurityUnitTestCase extends MQBase
38 {
39    public SecurityUnitTestCase(String JavaDoc name)
40    {
41       super(name);
42    }
43
44    public void runLoginTest() throws Exception JavaDoc
45    {
46       TopicWorker sub1 = null;
47       TopicWorker pub1 = null;
48       try
49       {
50          drainTopic();
51          int ic = 5;
52          IntRangeMessageFilter f1 = new IntRangeMessageFilter(javax.jms.Message JavaDoc.class, "USER_NR", 0, ic);
53          sub1 = new TopicWorker(SUBSCRIBER, TRANS_NONE, f1);
54          sub1.setUser("john", "needle");
55          Thread JavaDoc t1 = new Thread JavaDoc(sub1);
56          t1.start();
57          // Publish
58
IntRangeMessageCreator c1 = new IntRangeMessageCreator("USER_NR", 0);
59          pub1 = new TopicWorker(PUBLISHER, TRANS_NONE, c1, ic);
60          pub1.connect();
61          pub1.publish();
62          Assert.assertEquals("Publisher did not publish correct number of messages " + pub1.getMessageHandled(), ic,
63                pub1.getMessageHandled());
64          // let sub1 have some time to handle the messages.
65
log.debug("Sleeping for " + ((ic * 10) / 60000) + " minutes");
66          sleep(ic * 100);
67          Assert.assertEquals("Subscriber did not get correct number of messages " + sub1.getMessageHandled(), ic, sub1
68                .getMessageHandled());
69          sub1.close();
70          pub1.close();
71       }
72       catch (Throwable JavaDoc t)
73       {
74          if (t instanceof junit.framework.AssertionFailedError)
75             throw (junit.framework.AssertionFailedError) t;
76          log.error("Error in test: " + t, t);
77          throw new Exception JavaDoc(t.getMessage());
78       }
79       finally
80       {
81          try
82          {
83             if (sub1 != null)
84                sub1.close();
85          }
86          catch (Exception JavaDoc ex)
87          {
88          }
89          try
90          {
91             if (pub1 != null)
92                pub1.close();
93          }
94          catch (Exception JavaDoc ex)
95          {
96          }
97       }
98    }
99
100    /**
101     Tests that check authentication
102     1. Login without cred
103     2. Login with valid usedid,pwd
104     3. Login with valid user, unvalid pwd
105     4. Login with unvalid user.
106     */

107    public void runLoginNoCred() throws Exception JavaDoc
108    {
109       TopicWorker pub1 = null;
110       try
111       {
112          drainTopic();
113          pub1 = new TopicWorker(PUBLISHER, TRANS_NONE, null, 0);
114          pub1.connect();
115       }
116       catch (Exception JavaDoc ex)
117       {
118          Assert.fail("Could lot login without any cred");
119       }
120       finally
121       {
122          try
123          {
124             pub1.close();
125          }
126          catch (Exception JavaDoc ex)
127          {
128          }
129       }
130    }
131
132    public void runLoginValidCred() throws Exception JavaDoc
133    {
134       TopicWorker pub1 = null;
135       try
136       {
137          drainTopic();
138          pub1 = new TopicWorker(PUBLISHER, TRANS_NONE, null, 0);
139          pub1.setUser("john", "needle");
140          pub1.connect();
141       }
142       catch (Exception JavaDoc ex)
143       {
144          Assert.fail("Could lot login with valid cred");
145       }
146       finally
147       {
148          try
149          {
150             pub1.close();
151          }
152          catch (Exception JavaDoc ex)
153          {
154          }
155       }
156    }
157
158    public void runLoginInvalidPwd() throws Exception JavaDoc
159    {
160       TopicWorker pub1 = null;
161       try
162       {
163          drainTopic();
164          pub1 = new TopicWorker(PUBLISHER, TRANS_NONE, null, 0);
165          pub1.setUser("john", "bogus");
166          Exception JavaDoc e = null;
167          try
168          {
169             pub1.connect();
170          }
171          catch (Exception JavaDoc ex)
172          {
173             e = ex;
174          }
175          log.debug(e);
176          Assert.assertTrue("Loggin in with invalid password did not throw correct exception",
177                e instanceof javax.jms.JMSSecurityException JavaDoc);
178       }
179       finally
180       {
181          try
182          {
183             pub1.close();
184          }
185          catch (Exception JavaDoc ex)
186          {
187          }
188       }
189    }
190
191    public void runLoginInvalidCred() throws Exception JavaDoc
192    {
193       TopicWorker pub1 = null;
194       try
195       {
196          drainTopic();
197          pub1 = new TopicWorker(PUBLISHER, TRANS_NONE, null, 0);
198          pub1.setUser("bogus", "bogus");
199          Exception JavaDoc e = null;
200          try
201          {
202             pub1.connect();
203          }
204          catch (Exception JavaDoc ex)
205          {
206             e = ex;
207          }
208          log.debug(e);
209          Assert.assertTrue("Loggin in with invalid user did not throw correct exception",
210                e instanceof javax.jms.JMSSecurityException JavaDoc);
211       }
212       finally
213       {
214          try
215          {
216             pub1.close();
217          }
218          catch (Exception JavaDoc ex)
219          {
220          }
221       }
222    }
223
224    /**
225     An number of tests to verrify that clientID works as expected:
226     
227     1. Nothing. getClientID should return a string starting withID
228     2. user/pwd with preconfigured clientID, should return preconf
229     3. setClientID, should return the set clientID
230     4. setClienID starting with ID, should trow invalid clientID
231     5. setClientID same as a preconf, should trow invalid clientID
232     6. setClientID after any method beeing invoked on con, throw invalid state
233     */

234    public void runClientIDNormalTest() throws Exception JavaDoc
235    {
236       TopicWorker pub1 = null;
237       try
238       {
239          drainTopic();
240          int ic = 5;
241          // Publish
242
IntRangeMessageCreator c1 = new IntRangeMessageCreator("USER_NR", 0);
243          pub1 = new TopicWorker(PUBLISHER, TRANS_NONE, c1, ic);
244          pub1.connect();
245          pub1.publish();
246          Assert.assertTrue("Client did not get a valid clientID", pub1.connection.getClientID().startsWith("ID"));
247          pub1.close();
248       }
249       catch (Throwable JavaDoc t)
250       {
251          if (t instanceof junit.framework.AssertionFailedError)
252             throw (junit.framework.AssertionFailedError) t;
253          log.error("Error in test: " + t, t);
254          throw new Exception JavaDoc(t.getMessage());
255       }
256       finally
257       {
258          try
259          {
260             pub1.close();
261          }
262          catch (Exception JavaDoc ex)
263          {
264          }
265       }
266    }
267
268    public void runClientIDPreconfTest() throws Exception JavaDoc
269    {
270       TopicWorker pub1 = null;
271       try
272       {
273          drainTopic();
274          int ic = 5;
275          // Publish
276
IntRangeMessageCreator c1 = new IntRangeMessageCreator("USER_NR", 0);
277          pub1 = new TopicWorker(PUBLISHER, TRANS_NONE, c1, ic);
278          pub1.setUser("john", "needle");
279          pub1.connect();
280          pub1.publish();
281          Assert.assertEquals("Client did not get a valid clientID", "DurableSubscriberExample", pub1.connection
282                .getClientID());
283          pub1.close();
284       }
285       catch (Throwable JavaDoc t)
286       {
287          if (t instanceof junit.framework.AssertionFailedError)
288             throw (junit.framework.AssertionFailedError) t;
289          log.error("Error in test: " + t, t);
290          throw new Exception JavaDoc(t.getMessage());
291       }
292       finally
293       {
294          try
295          {
296             pub1.close();
297          }
298          catch (Exception JavaDoc ex)
299          {
300          }
301       }
302    }
303
304    public void runClientIDSetTest() throws Exception JavaDoc
305    {
306       TopicWorker pub1 = null;
307       try
308       {
309          drainTopic();
310          int ic = 5;
311          // Publish
312
IntRangeMessageCreator c1 = new IntRangeMessageCreator("USER_NR", 0);
313          pub1 = new TopicWorker(PUBLISHER, TRANS_NONE, c1, ic);
314          pub1.setClientID("myId");
315          pub1.connect();
316          pub1.publish();
317          Assert.assertEquals("Client did not get a valid clientID", "myId", pub1.connection.getClientID());
318          pub1.close();
319       }
320       catch (Throwable JavaDoc t)
321       {
322          if (t instanceof junit.framework.AssertionFailedError)
323             throw (junit.framework.AssertionFailedError) t;
324          log.error("Error in test: " + t, t);
325          throw new Exception JavaDoc(t.getMessage());
326       }
327       finally
328       {
329          try
330          {
331             pub1.close();
332          }
333          catch (Exception JavaDoc ex)
334          {
335          }
336       }
337    }
338
339    public void runClientIDSetSteelPreconf() throws Exception JavaDoc
340    {
341       TopicWorker pub1 = null;
342       try
343       {
344          drainTopic();
345          int ic = 5;
346          // Publish
347
IntRangeMessageCreator c1 = new IntRangeMessageCreator("USER_NR", 0);
348          pub1 = new TopicWorker(PUBLISHER, TRANS_NONE, c1, ic);
349          pub1.setClientID("DurableSubscriberExample");
350          Exception JavaDoc e = null;
351          try
352          {
353             pub1.connect();
354          }
355          catch (Exception JavaDoc ex)
356          {
357             e = ex;
358          }
359          log.debug(e);
360          Assert.assertTrue("Setting a clientID wich is preconfigured did not throw correct exception",
361                e instanceof javax.jms.InvalidClientIDException JavaDoc);
362          pub1.close();
363       }
364       catch (Throwable JavaDoc t)
365       {
366          if (t instanceof junit.framework.AssertionFailedError)
367             throw (junit.framework.AssertionFailedError) t;
368          log.error("Error in test: " + t, t);
369          throw new Exception JavaDoc(t.getMessage());
370       }
371       finally
372       {
373          try
374          {
375             pub1.close();
376          }
377          catch (Exception JavaDoc ex)
378          {
379          }
380       }
381    }
382
383    public void runClientIDSetAfterInvoke() throws Exception JavaDoc
384    {
385       TopicWorker pub1 = null;
386       try
387       {
388          drainTopic();
389          int ic = 5;
390          // Publish
391
IntRangeMessageCreator c1 = new IntRangeMessageCreator("USER_NR", 0);
392          pub1 = new TopicWorker(PUBLISHER, TRANS_NONE, c1, ic);
393          pub1.connect();
394          pub1.publish();
395          Exception JavaDoc e = null;
396          try
397          {
398             pub1.connection.setClientID("myID");
399          }
400          catch (Exception JavaDoc ex)
401          {
402             e = ex;
403          }
404          log.debug(e);
405          Assert.assertTrue("Setting a clientID after connection is used did not throw correct exception: " + e,
406                e instanceof javax.jms.IllegalStateException JavaDoc);
407          pub1.close();
408       }
409       catch (Throwable JavaDoc t)
410       {
411          if (t instanceof junit.framework.AssertionFailedError)
412             throw (junit.framework.AssertionFailedError) t;
413          log.error("Error in test: " + t, t);
414          throw new Exception JavaDoc(t.getMessage());
415       }
416       finally
417       {
418          try
419          {
420             pub1.close();
421          }
422          catch (Exception JavaDoc ex)
423          {
424          }
425       }
426    }
427
428    /**
429     Tests to check autorization.
430     
431     Remember there are actuallt two types of fails:
432     a) You are a user, but do no belong to a group that has acl.
433     b) You belong to a group, but that group does not have acl.
434     we test the first for topics and the second for queues, by
435     configuration in jbossmq-testsuite-service.xml
436     
437     Tests that check autorization.
438     1. test valid topic publisher
439     2. test invalid topic publisher
440     3. test valid topic subscriber
441     4. test invalid topic subscriber
442     5. test valid queue sender
443     6. test invalid queue sender
444     7. test valid queue receiver
445     8. test invalid queue receiver
446     9. test valid queue browser.
447     10. test invalid queue browser
448     11. test preconf dur sub, to valid dest.
449     12. test preconf dur sub, to invalid dest.
450     13. test dyn dur sub, to valid dest.
451     14. test dyn dur sub, to valid dest.
452     */

453    public void runAuzValidTopicPublisher() throws Exception JavaDoc
454    {
455       TopicWorker pub1 = null;
456       try
457       {
458          IntRangeMessageCreator c1 = new IntRangeMessageCreator("USER_NR", 0);
459          pub1 = new TopicWorker(PUBLISHER, TRANS_NONE, c1, 1);
460          pub1.setUser("john", "needle");
461          pub1.connect();
462          pub1.publish();
463       }
464       catch (Exception JavaDoc ex)
465       {
466          Assert.fail("Could not publish to valid destination");
467       }
468       finally
469       {
470          try
471          {
472             pub1.close();
473          }
474          catch (Exception JavaDoc ex)
475          {
476          }
477       }
478    }
479
480    public void runAuzValidTopicPublisherTransaction() throws Exception JavaDoc
481    {
482       TopicWorker pub1 = null;
483       try
484       {
485          IntRangeMessageCreator c1 = new IntRangeMessageCreator("USER_NR", 0);
486          pub1 = new TopicWorker(PUBLISHER, TRANS_INDIVIDUAL, c1, 1);
487          pub1.setUser("john", "needle");
488          pub1.connect();
489          pub1.publish();
490       }
491       catch (Exception JavaDoc ex)
492       {
493          Assert.fail("Could not publish to valid destination");
494       }
495       finally
496       {
497          try
498          {
499             pub1.close();
500          }
501          catch (Exception JavaDoc ex)
502          {
503          }
504       }
505    }
506
507    public void runAuzInvalidTopicPublisher() throws Exception JavaDoc
508    {
509       TopicWorker pub1 = null;
510       try
511       {
512          IntRangeMessageCreator c1 = new IntRangeMessageCreator("USER_NR", 0);
513          pub1 = new TopicWorker(PUBLISHER, TRANS_NONE, c1, 1);
514          pub1.setUser("nobody", "nobody");
515          pub1.connect();
516          Exception JavaDoc e = null;
517          try
518          {
519             pub1.publish();
520          }
521          catch (Exception JavaDoc ex)
522          {
523             e = ex;
524          }
525          log.debug(e);
526          Assert.assertTrue("Unauz topic publishing throw wrong exception: " + e,
527                e instanceof javax.jms.JMSSecurityException JavaDoc);
528       }
529       finally
530       {
531          try
532          {
533             pub1.close();
534          }
535          catch (Exception JavaDoc ex)
536          {
537          }
538       }
539    }
540
541    public void runAuzInvalidTopicPublisherTransaction() throws Exception JavaDoc
542    {
543       TopicWorker pub1 = null;
544       try
545       {
546          IntRangeMessageCreator c1 = new IntRangeMessageCreator("USER_NR", 0);
547          pub1 = new TopicWorker(PUBLISHER, TRANS_INDIVIDUAL, c1, 1);
548          pub1.setUser("nobody", "nobody");
549          pub1.connect();
550          Exception JavaDoc e = null;
551          try
552          {
553             pub1.publish();
554          }
555          catch (Exception JavaDoc ex)
556          {
557             e = ex;
558          }
559          log.debug(e);
560          Assert.assertTrue("Unauz topic publishing throw wrong exception: " + e,
561                e instanceof javax.jms.JMSSecurityException JavaDoc);
562       }
563       finally
564       {
565          try
566          {
567             pub1.close();
568          }
569          catch (Exception JavaDoc ex)
570          {
571          }
572       }
573    }
574
575    public void runAuzValidTopicSubscriber() throws Exception JavaDoc
576    {
577       TopicWorker sub1 = null;
578       try
579       {
580          drainTopic();
581          IntRangeMessageFilter f1 = new IntRangeMessageFilter(javax.jms.Message JavaDoc.class, "USER_NR", 0, 1);
582          sub1 = new TopicWorker(SUBSCRIBER, TRANS_NONE, f1);
583          sub1.setUser("john", "needle");
584          Thread JavaDoc t1 = new Thread JavaDoc(sub1);
585          t1.start();
586          sleep(1000L);
587          Exception JavaDoc ex = sub1.getException();
588          t1.interrupt();
589          Assert.assertTrue("Autz topic subscriber did not work", ex == null);
590       }
591       finally
592       {
593          try
594          {
595             sub1.close();
596          }
597          catch (Exception JavaDoc ex)
598          {
599          }
600       }
601    }
602
603    public void runAuzValidTopicSubscriberTransaction() throws Exception JavaDoc
604    {
605       TopicWorker sub1 = null;
606       try
607       {
608          drainTopic();
609          IntRangeMessageFilter f1 = new IntRangeMessageFilter(javax.jms.Message JavaDoc.class, "USER_NR", 0, 1);
610          sub1 = new TopicWorker(SUBSCRIBER, TRANS_INDIVIDUAL, f1);
611          sub1.setUser("john", "needle");
612          Thread JavaDoc t1 = new Thread JavaDoc(sub1);
613          t1.start();
614          sleep(1000L);
615          Exception JavaDoc ex = sub1.getException();
616          t1.interrupt();
617          Assert.assertTrue("Autz topic subscriber did not work", ex == null);
618       }
619       finally
620       {
621          try
622          {
623             sub1.close();
624          }
625          catch (Exception JavaDoc ex)
626          {
627          }
628       }
629    }
630
631    public void runAuzInvalidTopicSubscriber() throws Exception JavaDoc
632    {
633       TopicWorker sub1 = null;
634       try
635       {
636          drainTopic();
637          IntRangeMessageFilter f1 = new IntRangeMessageFilter(javax.jms.Message JavaDoc.class, "USER_NR", 0, 1);
638          sub1 = new TopicWorker(SUBSCRIBER, TRANS_NONE, f1);
639          sub1.setUser("nobody", "nobody");
640          Thread JavaDoc t1 = new Thread JavaDoc(sub1);
641          t1.start();
642          sleep(1000L);
643          Exception JavaDoc ex = sub1.getException();
644          t1.interrupt();
645          Assert.assertTrue("Unautz topic subscriber throw wrong exception: " + ex,
646                ex instanceof javax.jms.JMSSecurityException JavaDoc);
647       }
648       finally
649       {
650          try
651          {
652             sub1.close();
653          }
654          catch (Exception JavaDoc ex)
655          {
656          }
657       }
658    }
659
660    public void runAuzInvalidTopicSubscriberTransaction() throws Exception JavaDoc
661    {
662       TopicWorker sub1 = null;
663       try
664       {
665          drainTopic();
666          IntRangeMessageFilter f1 = new IntRangeMessageFilter(javax.jms.Message JavaDoc.class, "USER_NR", 0, 1);
667          sub1 = new TopicWorker(SUBSCRIBER, TRANS_INDIVIDUAL, f1);
668          sub1.setUser("nobody", "nobody");
669          Thread JavaDoc t1 = new Thread JavaDoc(sub1);
670          t1.start();
671          sleep(1000L);
672          Exception JavaDoc ex = sub1.getException();
673          t1.interrupt();
674          Assert.assertTrue("Unautz topic subscriber throw wrong exception: " + ex,
675                ex instanceof javax.jms.JMSSecurityException JavaDoc);
676       }
677       finally
678       {
679          try
680          {
681             sub1.close();
682          }
683          catch (Exception JavaDoc ex)
684          {
685          }
686       }
687    }
688
689    public void runAuzValidQueueSender() throws Exception JavaDoc
690    {
691       QueueWorker pub1 = null;
692       try
693       {
694          IntRangeMessageCreator c1 = new IntRangeMessageCreator("USER_NR", 0);
695          pub1 = new QueueWorker(PUBLISHER, TRANS_NONE, c1, 1);
696          pub1.setUser("john", "needle");
697          pub1.connect();
698          pub1.publish();
699       }
700       catch (Exception JavaDoc ex)
701       {
702          Assert.fail("Could not publish to valid destination");
703       }
704       finally
705       {
706          try
707          {
708             pub1.close();
709          }
710          catch (Exception JavaDoc ex)
711          {
712          }
713       }
714    }
715
716    public void runAuzValidQueueSenderTransaction() throws Exception JavaDoc
717    {
718       QueueWorker pub1 = null;
719       try
720       {
721          IntRangeMessageCreator c1 = new IntRangeMessageCreator("USER_NR", 0);
722          pub1 = new QueueWorker(PUBLISHER, TRANS_INDIVIDUAL, c1, 1);
723          pub1.setUser("john", "needle");
724          pub1.connect();
725          pub1.publish();
726       }
727       catch (Exception JavaDoc ex)
728       {
729          Assert.fail("Could not publish to valid destination");
730       }
731       finally
732       {
733          try
734          {
735             pub1.close();
736          }
737          catch (Exception JavaDoc ex)
738          {
739          }
740       }
741    }
742
743    public void runAuzInvalidQueueSender() throws Exception JavaDoc
744    {
745       QueueWorker pub1 = null;
746       try
747       {
748          IntRangeMessageCreator c1 = new IntRangeMessageCreator("USER_NR", 0);
749          pub1 = new QueueWorker(PUBLISHER, TRANS_NONE, c1, 1);
750          pub1.setUser("nobody", "nobody");
751          pub1.connect();
752          Exception JavaDoc e = null;
753          try
754          {
755             pub1.publish();
756          }
757          catch (Exception JavaDoc ex)
758          {
759             e = ex;
760          }
761          log.debug(e);
762          Assert.assertTrue("Unauz queue publishing throw wrong exception: " + e,
763                e instanceof javax.jms.JMSSecurityException JavaDoc);
764       }
765       finally
766       {
767          try
768          {
769             pub1.close();
770          }
771          catch (Exception JavaDoc ex)
772          {
773          }
774       }
775    }
776
777    public void runAuzInvalidQueueSenderTransaction() throws Exception JavaDoc
778    {
779       QueueWorker pub1 = null;
780       try
781       {
782          IntRangeMessageCreator c1 = new IntRangeMessageCreator("USER_NR", 0);
783          pub1 = new QueueWorker(PUBLISHER, TRANS_INDIVIDUAL, c1, 1);
784          pub1.setUser("nobody", "nobody");
785          pub1.connect();
786          Exception JavaDoc e = null;
787          try
788          {
789             pub1.publish();
790          }
791          catch (Exception JavaDoc ex)
792          {
793             e = ex;
794          }
795          log.debug(e);
796          Assert.assertTrue("Unauz queue publishing throw wrong exception: " + e,
797                e instanceof javax.jms.JMSSecurityException JavaDoc);
798       }
799       finally
800       {
801          try
802          {
803             pub1.close();
804          }
805          catch (Exception JavaDoc ex)
806          {
807          }
808       }
809    }
810
811    public void runAuzValidQueueReceiver() throws Exception JavaDoc
812    {
813       QueueWorker sub1 = null;
814       try
815       {
816          IntRangeMessageFilter f1 = new IntRangeMessageFilter(javax.jms.Message JavaDoc.class, "USER_NR", 0, 1);
817          sub1 = new QueueWorker(GETTER, TRANS_NONE, f1);
818          sub1.setUser("john", "needle");
819          sub1.connect();
820          Exception JavaDoc ex = null;
821          try
822          {
823             sub1.get();
824          }
825          catch (Exception JavaDoc e)
826          {
827             ex = e;
828             log.error("ValidQueueReceiver got an exception: " + e, e);
829          }
830          Assert.assertTrue("Autz queue receiver did not work", ex == null);
831       }
832       finally
833       {
834          try
835          {
836             sub1.close();
837          }
838          catch (Exception JavaDoc ex)
839          {
840          }
841       }
842    }
843
844    public void runAuzValidQueueReceiverTransaction() throws Exception JavaDoc
845    {
846       QueueWorker sub1 = null;
847       try
848       {
849          IntRangeMessageFilter f1 = new IntRangeMessageFilter(javax.jms.Message JavaDoc.class, "USER_NR", 0, 1);
850          sub1 = new QueueWorker(GETTER, TRANS_INDIVIDUAL, f1);
851          sub1.setUser("john", "needle");
852          sub1.connect();
853          Exception JavaDoc ex = null;
854          try
855          {
856             sub1.get();
857          }
858          catch (Exception JavaDoc