Пример #1
0
 public void tearDown() throws Exception {
   try {
     if (_jmxUtils != null) {
       _jmxUtils.close();
     }
   } finally {
     super.tearDown();
   }
 }
Пример #2
0
  public void setUp() throws Exception {
    _passwordFile = createTemporaryPasswordFileWithJmxAdminUser();

    Map<String, Object> newAttributes = new HashMap<String, Object>();
    newAttributes.put(AuthenticationProvider.TYPE, getAuthenticationManagerType());
    newAttributes.put("path", _passwordFile.getAbsolutePath());
    getBrokerConfiguration()
        .setObjectAttributes(
            AuthenticationProvider.class,
            TestBrokerConfiguration.ENTRY_NAME_AUTHENTICATION_PROVIDER,
            newAttributes);
    getBrokerConfiguration().addJmxManagementConfiguration();

    _jmxUtils = new JMXTestUtils(this);

    super.setUp();
    _jmxUtils.open();

    _testUserName = getTestName() + System.currentTimeMillis();

    _userManagement =
        _jmxUtils.getUserManagement(TestBrokerConfiguration.ENTRY_NAME_AUTHENTICATION_PROVIDER);
  }