summaryrefslogtreecommitdiff
path: root/qpid/java/broker-plugins
diff options
context:
space:
mode:
Diffstat (limited to 'qpid/java/broker-plugins')
-rw-r--r--qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/DefaultAccessControl.java3
-rw-r--r--qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/config/PlainConfigurationTest.java6
-rw-r--r--qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/DefaultAccessControlTest.java27
-rw-r--r--qpid/java/broker-plugins/derby-store/src/main/java/org/apache/qpid/server/store/derby/DerbyMessageStoreFactory.java9
-rw-r--r--qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/org/apache/qpid/server/store/jdbc/bonecp/BoneCPConnectionProvider.java1
-rw-r--r--qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/org/apache/qpid/server/store/jdbc/bonecp/BoneCPConnectionProviderFactory.java1
-rw-r--r--qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/store/jdbc/JDBCMessageStoreFactory.java24
-rw-r--r--qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/ManagedObjectRegistry.java4
-rw-r--r--qpid/java/broker-plugins/memory-store/src/main/java/org/apache/qpid/server/store/MemoryMessageStoreFactory.java8
9 files changed, 16 insertions, 67 deletions
diff --git a/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/DefaultAccessControl.java b/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/DefaultAccessControl.java
index f6d8b04880..5f5e12d435 100644
--- a/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/DefaultAccessControl.java
+++ b/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/DefaultAccessControl.java
@@ -29,7 +29,6 @@ import java.util.Set;
import javax.security.auth.Subject;
-import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.lang.ObjectUtils;
import org.apache.log4j.Logger;
import org.apache.qpid.server.configuration.IllegalConfigurationException;
@@ -64,7 +63,7 @@ public class DefaultAccessControl implements AccessControl
_aclFile = new File(fileName);
}
- DefaultAccessControl(RuleSet rs) throws ConfigurationException
+ DefaultAccessControl(RuleSet rs)
{
_ruleSet = rs;
_eventLogger = rs;
diff --git a/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/config/PlainConfigurationTest.java b/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/config/PlainConfigurationTest.java
index 1440904c74..6ac21f856a 100644
--- a/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/config/PlainConfigurationTest.java
+++ b/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/config/PlainConfigurationTest.java
@@ -36,12 +36,6 @@ import org.apache.qpid.server.security.access.Operation;
import static org.mockito.Mockito.mock;
-/**
- * These tests check that the ACL file parsing works correctly.
- *
- * For each message that can be returned in a {@link ConfigurationException}, an ACL file is created that should trigger this
- * particular message.
- */
public class PlainConfigurationTest extends TestCase
{
private PlainConfiguration writeACLConfig(String...aclData) throws Exception
diff --git a/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/DefaultAccessControlTest.java b/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/DefaultAccessControlTest.java
index 74ea7639ff..3a36ddef2c 100644
--- a/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/DefaultAccessControlTest.java
+++ b/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/DefaultAccessControlTest.java
@@ -31,7 +31,6 @@ import javax.security.auth.Subject;
import junit.framework.TestCase;
-import org.apache.commons.configuration.ConfigurationException;
import org.apache.qpid.server.connection.ConnectionPrincipal;
import org.apache.qpid.server.logging.EventLogger;
import org.apache.qpid.server.logging.EventLoggerProvider;
@@ -68,12 +67,12 @@ public class DefaultAccessControlTest extends TestCase
_plugin = null;
}
- private void setUpGroupAccessControl() throws ConfigurationException
+ private void setUpGroupAccessControl()
{
configureAccessControl(createGroupRuleSet());
}
- private void configureAccessControl(final RuleSet rs) throws ConfigurationException
+ private void configureAccessControl(final RuleSet rs)
{
_plugin = new DefaultAccessControl(rs);
}
@@ -98,7 +97,7 @@ public class DefaultAccessControlTest extends TestCase
/**
* ACL plugin must always abstain if there is no subject attached to the thread.
*/
- public void testNoSubjectAlwaysAbstains() throws ConfigurationException
+ public void testNoSubjectAlwaysAbstains()
{
setUpGroupAccessControl();
final Result result = _plugin.authorise(Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);
@@ -109,7 +108,7 @@ public class DefaultAccessControlTest extends TestCase
* Tests that an allow rule expressed with a username allows an operation performed by a thread running
* with the same username.
*/
- public void testUsernameAllowsOperation() throws ConfigurationException
+ public void testUsernameAllowsOperation()
{
setUpGroupAccessControl();
Subject.doAs(TestPrincipalUtils.createTestSubject("user1"), new PrivilegedAction<Object>()
@@ -128,7 +127,7 @@ public class DefaultAccessControlTest extends TestCase
* Tests that an allow rule expressed with an <b>ACL groupname</b> allows an operation performed by a thread running
* by a user who belongs to the same group..
*/
- public void testGroupMembershipAllowsOperation() throws ConfigurationException
+ public void testGroupMembershipAllowsOperation()
{
setUpGroupAccessControl();
@@ -141,7 +140,7 @@ public class DefaultAccessControlTest extends TestCase
* Tests that a deny rule expressed with a <b>groupname</b> denies an operation performed by a thread running
* by a user who belongs to the same group.
*/
- public void testGroupMembershipDeniesOperation() throws ConfigurationException
+ public void testGroupMembershipDeniesOperation()
{
setUpGroupAccessControl();
authoriseAndAssertResult(Result.DENIED, "user3", DENIED_GROUP);
@@ -150,7 +149,7 @@ public class DefaultAccessControlTest extends TestCase
/**
* Tests that the catch all deny denies the operation and logs with the logging actor.
*/
- public void testCatchAllRuleDeniesUnrecognisedUsername() throws ConfigurationException
+ public void testCatchAllRuleDeniesUnrecognisedUsername()
{
setUpGroupAccessControl();
Subject.doAs(TestPrincipalUtils.createTestSubject("unknown", "unkgroup1", "unkgroup2"),
@@ -177,7 +176,7 @@ public class DefaultAccessControlTest extends TestCase
/**
* Tests that a grant access method rule allows any access operation to be performed on any component
*/
- public void testAuthoriseAccessMethodWhenAllAccessOperationsAllowedOnAllComponents() throws ConfigurationException
+ public void testAuthoriseAccessMethodWhenAllAccessOperationsAllowedOnAllComponents()
{
final RuleSet rs = new RuleSet(mock(EventLoggerProvider.class));
@@ -203,7 +202,7 @@ public class DefaultAccessControlTest extends TestCase
/**
* Tests that a grant access method rule allows any access operation to be performed on a specified component
*/
- public void testAuthoriseAccessMethodWhenAllAccessOperationsAllowedOnSpecifiedComponent() throws ConfigurationException
+ public void testAuthoriseAccessMethodWhenAllAccessOperationsAllowedOnSpecifiedComponent()
{
final RuleSet rs = new RuleSet(mock(EventLoggerProvider.class));
@@ -303,7 +302,7 @@ public class DefaultAccessControlTest extends TestCase
/**
* Tests that a grant access method rule allows any access operation to be performed on a specified component
*/
- public void testAuthoriseAccessMethodWhenSpecifiedAccessOperationsAllowedOnSpecifiedComponent() throws ConfigurationException
+ public void testAuthoriseAccessMethodWhenSpecifiedAccessOperationsAllowedOnSpecifiedComponent()
{
final RuleSet rs = new RuleSet(mock(EventLoggerProvider.class));
@@ -340,7 +339,7 @@ public class DefaultAccessControlTest extends TestCase
/**
* Tests that granting of all method rights on a method allows a specified operation to be performed on any component
*/
- public void testAuthoriseAccessUpdateMethodWhenAllRightsGrantedOnSpecifiedMethodForAllComponents() throws ConfigurationException
+ public void testAuthoriseAccessUpdateMethodWhenAllRightsGrantedOnSpecifiedMethodForAllComponents()
{
final RuleSet rs = new RuleSet(mock(EventLoggerProvider.class));
@@ -379,7 +378,7 @@ public class DefaultAccessControlTest extends TestCase
/**
* Tests that granting of all method rights allows any operation to be performed on any component
*/
- public void testAuthoriseAccessUpdateMethodWhenAllRightsGrantedOnAllMethodsInAllComponents() throws ConfigurationException
+ public void testAuthoriseAccessUpdateMethodWhenAllRightsGrantedOnAllMethodsInAllComponents()
{
final RuleSet rs = new RuleSet(mock(EventLoggerProvider.class));
@@ -417,7 +416,7 @@ public class DefaultAccessControlTest extends TestCase
/**
* Tests that granting of access method rights with mask allows matching operations to be performed on the specified component
*/
- public void testAuthoriseAccessMethodWhenMatchingAccessOperationsAllowedOnSpecifiedComponent() throws ConfigurationException
+ public void testAuthoriseAccessMethodWhenMatchingAccessOperationsAllowedOnSpecifiedComponent()
{
final RuleSet rs = new RuleSet(mock(EventLoggerProvider.class));
diff --git a/qpid/java/broker-plugins/derby-store/src/main/java/org/apache/qpid/server/store/derby/DerbyMessageStoreFactory.java b/qpid/java/broker-plugins/derby-store/src/main/java/org/apache/qpid/server/store/derby/DerbyMessageStoreFactory.java
index 47a451ccf6..8a3c5683ac 100644
--- a/qpid/java/broker-plugins/derby-store/src/main/java/org/apache/qpid/server/store/derby/DerbyMessageStoreFactory.java
+++ b/qpid/java/broker-plugins/derby-store/src/main/java/org/apache/qpid/server/store/derby/DerbyMessageStoreFactory.java
@@ -20,9 +20,7 @@
*/
package org.apache.qpid.server.store.derby;
-import java.util.Collections;
import java.util.Map;
-import org.apache.commons.configuration.Configuration;
import org.apache.qpid.server.model.VirtualHost;
import org.apache.qpid.server.plugin.DurableConfigurationStoreFactory;
import org.apache.qpid.server.plugin.MessageStoreFactory;
@@ -51,13 +49,6 @@ public class DerbyMessageStoreFactory implements MessageStoreFactory, DurableCon
}
@Override
- public Map<String, Object> convertStoreConfiguration(Configuration configuration)
- {
- return Collections.emptyMap();
- }
-
-
- @Override
public void validateAttributes(Map<String, Object> attributes)
{
if(getType().equals(attributes.get(VirtualHost.STORE_TYPE)))
diff --git a/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/org/apache/qpid/server/store/jdbc/bonecp/BoneCPConnectionProvider.java b/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/org/apache/qpid/server/store/jdbc/bonecp/BoneCPConnectionProvider.java
index 1cde6f130d..1d9ff9a8e1 100644
--- a/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/org/apache/qpid/server/store/jdbc/bonecp/BoneCPConnectionProvider.java
+++ b/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/org/apache/qpid/server/store/jdbc/bonecp/BoneCPConnectionProvider.java
@@ -24,7 +24,6 @@ import com.jolbox.bonecp.BoneCP;
import com.jolbox.bonecp.BoneCPConfig;
import java.sql.Connection;
import java.sql.SQLException;
-import org.apache.commons.configuration.Configuration;
import org.apache.qpid.server.model.VirtualHost;
import org.apache.qpid.server.store.jdbc.ConnectionProvider;
diff --git a/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/org/apache/qpid/server/store/jdbc/bonecp/BoneCPConnectionProviderFactory.java b/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/org/apache/qpid/server/store/jdbc/bonecp/BoneCPConnectionProviderFactory.java
index 73876eceb4..b95ad1166c 100644
--- a/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/org/apache/qpid/server/store/jdbc/bonecp/BoneCPConnectionProviderFactory.java
+++ b/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/org/apache/qpid/server/store/jdbc/bonecp/BoneCPConnectionProviderFactory.java
@@ -21,7 +21,6 @@
package org.apache.qpid.server.store.jdbc.bonecp;
import java.sql.SQLException;
-import org.apache.commons.configuration.Configuration;
import org.apache.qpid.server.model.VirtualHost;
import org.apache.qpid.server.plugin.JDBCConnectionProviderFactory;
import org.apache.qpid.server.store.jdbc.ConnectionProvider;
diff --git a/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/store/jdbc/JDBCMessageStoreFactory.java b/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/store/jdbc/JDBCMessageStoreFactory.java
index 1144eaaf18..c0ece88692 100644
--- a/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/store/jdbc/JDBCMessageStoreFactory.java
+++ b/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/store/jdbc/JDBCMessageStoreFactory.java
@@ -20,9 +20,7 @@
*/
package org.apache.qpid.server.store.jdbc;
-import java.util.HashMap;
import java.util.Map;
-import org.apache.commons.configuration.Configuration;
import org.apache.qpid.server.model.VirtualHost;
import org.apache.qpid.server.plugin.DurableConfigurationStoreFactory;
import org.apache.qpid.server.plugin.MessageStoreFactory;
@@ -51,28 +49,6 @@ public class JDBCMessageStoreFactory implements MessageStoreFactory, DurableConf
}
@Override
- public Map<String, Object> convertStoreConfiguration(Configuration storeConfiguration)
- {
- Map<String,Object> convertedMap = new HashMap<String,Object>();
- convertedMap.put("jdbcBlobType", storeConfiguration.getString("sqlBlobType"));
- convertedMap.put("jdbcVarbinaryType", storeConfiguration.getString("sqlVarbinaryType"));
- if(storeConfiguration.containsKey("useBytesForBlob"))
- {
- convertedMap.put("jdbcUseBytesForBlob", storeConfiguration.getBoolean("useBytesForBlob"));
- }
- convertedMap.put("jdbcBigIntType", storeConfiguration.getString("sqlBigIntType"));
- convertedMap.put("connectionPool", storeConfiguration.getString("pool.type"));
- convertedMap.put("minConnectionsPerPartition", storeConfiguration.getInteger("pool.minConnectionsPerPartition",
- null));
- convertedMap.put("maxConnectionsPerPartition", storeConfiguration.getInteger("pool.maxConnectionsPerPartition",
- null));
- convertedMap.put("partitionCount", storeConfiguration.getInteger("pool.partitionCount", null));
-
- return convertedMap;
- }
-
-
- @Override
public void validateAttributes(Map<String, Object> attributes)
{
if(getType().equals(attributes.get(VirtualHost.STORE_TYPE)))
diff --git a/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/ManagedObjectRegistry.java b/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/ManagedObjectRegistry.java
index d8aea03b36..26608d4309 100644
--- a/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/ManagedObjectRegistry.java
+++ b/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/ManagedObjectRegistry.java
@@ -20,10 +20,10 @@
*/
package org.apache.qpid.server.jmx;
-import org.apache.commons.configuration.ConfigurationException;
import org.apache.qpid.common.Closeable;
import javax.management.JMException;
+
import java.io.IOException;
/**
@@ -40,7 +40,7 @@ import java.io.IOException;
*/
public interface ManagedObjectRegistry extends Closeable
{
- void start() throws IOException, ConfigurationException;
+ void start() throws IOException;
void registerObject(ManagedObject managedObject) throws JMException;
diff --git a/qpid/java/broker-plugins/memory-store/src/main/java/org/apache/qpid/server/store/MemoryMessageStoreFactory.java b/qpid/java/broker-plugins/memory-store/src/main/java/org/apache/qpid/server/store/MemoryMessageStoreFactory.java
index 49f823e7ee..a715073b7e 100644
--- a/qpid/java/broker-plugins/memory-store/src/main/java/org/apache/qpid/server/store/MemoryMessageStoreFactory.java
+++ b/qpid/java/broker-plugins/memory-store/src/main/java/org/apache/qpid/server/store/MemoryMessageStoreFactory.java
@@ -20,9 +20,7 @@
*/
package org.apache.qpid.server.store;
-import java.util.Collections;
import java.util.Map;
-import org.apache.commons.configuration.Configuration;
import org.apache.qpid.server.plugin.MessageStoreFactory;
public class MemoryMessageStoreFactory implements MessageStoreFactory
@@ -41,12 +39,6 @@ public class MemoryMessageStoreFactory implements MessageStoreFactory
}
@Override
- public Map<String, Object> convertStoreConfiguration(Configuration configuration)
- {
- return Collections.emptyMap();
- }
-
- @Override
public void validateAttributes(Map<String, Object> attributes)
{
}