Package org.apache.qpid.server.security.auth.management

Examples of org.apache.qpid.server.security.auth.management.AMQUserManagementMBean


    public void initialiseManagement(ServerConfiguration config) throws ConfigurationException
    {
        try
        {
            AMQUserManagementMBean _mbean = new AMQUserManagementMBean();


            final Collection<PrincipalDatabase> dbs = getDatabases().values();
            if (dbs.size() == 0)
            {
                throw new ConfigurationException("Principal-database not found");
            }
            final PrincipalDatabase database = dbs.iterator().next();

            _mbean.setPrincipalDatabase(database);
            _mbean.register();
        }
        catch (JMException e)
        {
            _logger.warn("User management disabled as unable to create MBean:" + e);
        }
View Full Code Here


    public void setUp() throws Exception
    {
        super.setUp();

        _database = new PlainPasswordFilePrincipalDatabase();
        _amqumMBean = new AMQUserManagementMBean();
        loadFreshTestPasswordFile();
    }
View Full Code Here

    {
        try
        {
            _logger.info("Registering UserManagementMBean");

            _mbean = new AMQUserManagementMBean();
            _mbean.setPrincipalDatabase(_principalDatabase);
            _mbean.register();
        }
        catch (Exception e)
        {
View Full Code Here

    public void initialiseManagement(ServerConfiguration config) throws ConfigurationException
    {
        try
        {
            AMQUserManagementMBean _mbean = new AMQUserManagementMBean();

            List<String> principalDBs = config.getManagementPrincipalDBs();
            if (principalDBs.isEmpty())
            {
                throw new ConfigurationException("No principal-database specified for jmx security");
            }

            String databaseName = principalDBs.get(0);
            PrincipalDatabase database = getDatabases().get(databaseName);
            if (database == null)
            {
                throw new ConfigurationException("Principal-database '" + databaseName + "' not found");
            }

            _mbean.setPrincipalDatabase(database);

            List<String> jmxaccesslist = config.getManagementAccessList();
            if (jmxaccesslist.isEmpty())
            {
                throw new ConfigurationException("No access control files specified for jmx security");
            }

            String jmxaccesssFile = null;
           
            try
            {
                jmxaccesssFile = PropertyUtils.replaceProperties(jmxaccesslist.get(0));
            }
            catch (PropertyException e)
            {
                throw new ConfigurationException("Unable to parse access control filename '" + jmxaccesssFile + "'");
            }
           
            try
            {
                _mbean.setAccessFile(jmxaccesssFile);
            }
            catch (IOException e)
            {
                _logger.warn("Unable to load access file:" + jmxaccesssFile);
            }

            _mbean.register();
        }
        catch (JMException e)
        {
            _logger.warn("User management disabled as unable to create MBean:" + e);
        }
View Full Code Here

    public void setUp() throws Exception
    {
        super.setUp();

        _database = new PlainPasswordFilePrincipalDatabase();
        _amqumMBean = new AMQUserManagementMBean();
        loadFreshTestPasswordFile();
        loadFreshTestAccessFile();
    }
View Full Code Here

    public void setUp() throws Exception
    {
        super.setUp();

        _database = new PlainPasswordFilePrincipalDatabase();
        _amqumMBean = new AMQUserManagementMBean();
        loadFreshTestPasswordFile();
    }
View Full Code Here

    {
        try
        {
            _logger.info("Registering UserManagementMBean");

            _mbean = new AMQUserManagementMBean();
            _mbean.setPrincipalDatabase(_principalDatabase);
            _mbean.register();
        }
        catch (Exception e)
        {
View Full Code Here

    public void setUp() throws Exception
    {
        super.setUp();

        _database = new PlainPasswordFilePrincipalDatabase();
        _amqumMBean = new AMQUserManagementMBean();
        loadFreshTestPasswordFile();
    }
View Full Code Here

TOP

Related Classes of org.apache.qpid.server.security.auth.management.AMQUserManagementMBean

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.