Index: core/kernel/src/main/java/com/sun/enterprise/v3/server/SnifferManagerImpl.java =================================================================== --- core/kernel/src/main/java/com/sun/enterprise/v3/server/SnifferManagerImpl.java (revision 29673) +++ core/kernel/src/main/java/com/sun/enterprise/v3/server/SnifferManagerImpl.java (working copy) @@ -76,22 +76,13 @@ * @return Collection (possibly empty but never null) of Sniffer */ public Collection getSniffers() { - if (sniffers==null) { - // this is a little bit of a hack, sniffers are now ordered by their names - // which is useful since connector is before ejb which is before web so if - // a standalone module happens to implement the three types of components, - // they will be naturally ordered correctly. We might want to revisit this - // later and formalize the ordering of sniffers. The hard thing as usual - // is that sniffers are highly pluggable so you never know which sniffers - // set you are working with depending on the distribution - sniffers = new ArrayList(); - sniffers.addAll(habitat.getAllByContract(Sniffer.class)); - Collections.sort(sniffers, new Comparator() { - public int compare(Sniffer o1, Sniffer o2) { - return o1.getModuleType().compareTo(o2.getModuleType()); - } - }); - } + List sniffers = new ArrayList(); + sniffers.addAll(habitat.getAllByContract(Sniffer.class)); + Collections.sort(sniffers, new Comparator() { + public int compare(Sniffer o1, Sniffer o2) { + return o1.getModuleType().compareTo(o2.getModuleType()); + } + }); return sniffers; } @@ -101,11 +92,7 @@ * @return Collection (possibly empty but never null) of Sniffer */ public Collection getCompositeSniffers() { - if (compositeSniffers==null) { - compositeSniffers = new ArrayList(); - compositeSniffers.addAll(habitat.getAllByContract(CompositeSniffer.class)); - } - return compositeSniffers; + return habitat.getAllByContract(CompositeSniffer.class); } /**