@Override protected void tearDown() throws NamingException, JMSException {
  NamingEnumeration<Binding> iter=context.listBindings("");
  while (iter.hasMore()) {
    Binding binding=iter.next();
    Object connFactory=binding.getObject();
    if (connFactory instanceof ActiveMQConnectionFactory) {
    }
  }
}

@ Override protected void tearDown ( ) throws NamingException , JMSException { NamingEnumeration < Binding > iter = context . listBindings ( "" ) ; while ( iter . hasMore ( ) ) { Binding binding = iter . next ( ) ; Object connFactory = binding . getObject ( ) ; if ( connFactory instanceof ActiveMQConnectionFactory ) { } } }
stops all existing activemqconnectionfactory in context .
