}
public SecurityMetadataStore startSecurityStore() throws Exception
{
ObjectName securityObject = new ObjectName("jboss.messaging:service=SecurityStore");
SecurityMetadataStore securityMetadataStore = new SecurityMetadataStore();
securityMetadataStore.setSecurityDomain(MockJBossSecurityManager.TEST_SECURITY_DOMAIN);
securityMetadataStore.setSuckerPassword(SecurityMetadataStore.DEFAULT_SUCKER_USER_PASSWORD);
securityMetadataStore.setDefaultSecurityConfig(XMLUtil.stringToElement("<security>\n" +
" <role name=\"guest\" read=\"true\" write=\"true\" create=\"true\"/>\n" +
" </security>"));
mbeanServer.registerMBean(securityMetadataStore, securityObject);
mbeanServer.invoke(securityObject, "start", new Object[0], new String[0]);
return securityMetadataStore;