예제 #1
0
  @Override
  @After
  public void tearDown() throws Exception {
    try {
      for (JMSContext jmsContext : contextSet) {
        jmsContext.close();
      }
    } catch (RuntimeException ignored) {
      // no-op
    } finally {
      contextSet.clear();
    }
    try {
      if (conn != null) conn.close();
    } catch (Exception e) {
      // no-op
    }

    namingContext.close();
    jmsServer.stop();
    server = null;
    cf = null;
    jmsServer = null;

    namingContext = null;

    MBeanServerFactory.releaseMBeanServer(mbeanServer);

    mbeanServer = null;

    ServiceUtils.setTransactionManager(null);

    super.tearDown();
  }
예제 #2
0
 protected void useDummyTransactionManager() {
   ServiceUtils.setTransactionManager(new DummyTransactionManager());
 }