summaryrefslogtreecommitdiff
path: root/java/broker/src
diff options
context:
space:
mode:
authorMartin Ritchie <ritchiem@apache.org>2007-06-18 16:29:49 +0000
committerMartin Ritchie <ritchiem@apache.org>2007-06-18 16:29:49 +0000
commitd43e1a5351598e558d01de9493c21870b3b0bcbb (patch)
tree4450cc8c14572b1f06a975970a052bffbc2acf74 /java/broker/src
parent45b526ce09daee869ec1313808583f7e05bff7bb (diff)
downloadqpid-python-d43e1a5351598e558d01de9493c21870b3b0bcbb.tar.gz
Merged revisions 539476-539480,539482-539483,539485-539500,539502-539593,539595-539782,539784-539787,539789-540106,540108-540168,540170-540510,540512-541246,541248-541919,541921-542483,542485-542788,542790-543495,543497-544108,544110-544421,544423-544507,544509-546095,546097-546189,546191-546440,546442-546457,546459-547177,547179-547626,547628-548381 via svnmerge from
https://svn.apache.org/repos/asf/incubator/qpid/branches/M2 ........ r539476 | ritchiem | 2007-05-18 15:12:28 +0100 (Fri, 18 May 2007) | 1 line QPID-401 Update to pom to correctly set the broker.dir ........ r544866 | rupertlssmith | 2007-06-06 16:25:02 +0100 (Wed, 06 Jun 2007) | 1 line Updated examples to build source jar. Also put the java14 retrotranslated module back in now that the strange repeating build problem is solved. ........ r545146 | ritchiem | 2007-06-07 12:30:01 +0100 (Thu, 07 Jun 2007) | 1 line POM update renumbering tests now we have trimmed down the tests being run. ........ r548276 | ritchiem | 2007-06-18 10:59:32 +0100 (Mon, 18 Jun 2007) | 1 line Various License header updates. ........ r548279 | ritchiem | 2007-06-18 11:17:20 +0100 (Mon, 18 Jun 2007) | 1 line Various License header updates. ........ r548302 | ritchiem | 2007-06-18 11:49:50 +0100 (Mon, 18 Jun 2007) | 2 lines Various License header updates. Update to PrincipalDatabase's to ensure they work correctly with # comments. ........ r548308 | ritchiem | 2007-06-18 11:58:38 +0100 (Mon, 18 Jun 2007) | 1 line Various License header updates, missed this file. Though the first update of it via the JMX console will remove the license. ........ r548312 | rupertlssmith | 2007-06-18 12:03:09 +0100 (Mon, 18 Jun 2007) | 1 line Added SLF4J to Log4J binding. ........ r548315 | ritchiem | 2007-06-18 12:07:45 +0100 (Mon, 18 Jun 2007) | 1 line Old lib dir from M1 ........ r548317 | ritchiem | 2007-06-18 12:13:57 +0100 (Mon, 18 Jun 2007) | 1 line Old lib dirs from M1 ........ r548319 | ritchiem | 2007-06-18 12:16:25 +0100 (Mon, 18 Jun 2007) | 1 line Mistakenly checked in Intelij file ........ r548381 | ritchiem | 2007-06-18 16:37:41 +0100 (Mon, 18 Jun 2007) | 1 line QPID-525 Memory leak in DestWildExchange. Used routing key in remove rather than empty queue ........ git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@548400 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/broker/src')
-rw-r--r--java/broker/src/main/java/org/apache/qpid/server/exchange/DestWildExchange.java3
-rw-r--r--java/broker/src/main/java/org/apache/qpid/server/exchange/FanoutExchange.java21
-rw-r--r--java/broker/src/main/java/org/apache/qpid/server/handler/BasicGetMethodHandler.java21
-rw-r--r--java/broker/src/main/java/org/apache/qpid/server/handler/QueuePurgeHandler.java21
-rw-r--r--java/broker/src/main/java/org/apache/qpid/server/management/MBeanAttribute.java23
-rw-r--r--java/broker/src/main/java/org/apache/qpid/server/management/MBeanConstructor.java23
-rw-r--r--java/broker/src/main/java/org/apache/qpid/server/management/MBeanDescription.java23
-rw-r--r--java/broker/src/main/java/org/apache/qpid/server/management/MBeanOperation.java23
-rw-r--r--java/broker/src/main/java/org/apache/qpid/server/management/MBeanOperationParameter.java23
-rw-r--r--java/broker/src/main/java/org/apache/qpid/server/security/access/AMQUserManagementMBean.java2
-rw-r--r--java/broker/src/main/java/org/apache/qpid/server/security/auth/database/PlainPasswordFilePrincipalDatabase.java15
-rw-r--r--java/broker/src/main/java/org/apache/qpid/server/security/auth/database/PlainPasswordVhostFilePrincipalDatabase.java8
12 files changed, 181 insertions, 25 deletions
diff --git a/java/broker/src/main/java/org/apache/qpid/server/exchange/DestWildExchange.java b/java/broker/src/main/java/org/apache/qpid/server/exchange/DestWildExchange.java
index 25ec0c3a2d..222e341b1a 100644
--- a/java/broker/src/main/java/org/apache/qpid/server/exchange/DestWildExchange.java
+++ b/java/broker/src/main/java/org/apache/qpid/server/exchange/DestWildExchange.java
@@ -222,7 +222,6 @@ public class DestWildExchange extends AbstractExchange
{
_logger.warn("No queues found for routing key " + routingKey);
_logger.warn("Routing map contains: " + _routingKey2queues);
- //todo Check for valid topic - mritchie
return;
}
}
@@ -288,7 +287,7 @@ public class DestWildExchange extends AbstractExchange
}
if (queues.isEmpty())
{
- _routingKey2queues.remove(queues);
+ _routingKey2queues.remove(routingKey);
}
}
diff --git a/java/broker/src/main/java/org/apache/qpid/server/exchange/FanoutExchange.java b/java/broker/src/main/java/org/apache/qpid/server/exchange/FanoutExchange.java
index 28d4b19f2e..6148fd4e1c 100644
--- a/java/broker/src/main/java/org/apache/qpid/server/exchange/FanoutExchange.java
+++ b/java/broker/src/main/java/org/apache/qpid/server/exchange/FanoutExchange.java
@@ -1,3 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *
+ */
+
package org.apache.qpid.server.exchange;
import java.util.concurrent.CopyOnWriteArraySet;
diff --git a/java/broker/src/main/java/org/apache/qpid/server/handler/BasicGetMethodHandler.java b/java/broker/src/main/java/org/apache/qpid/server/handler/BasicGetMethodHandler.java
index b88c2ebf3a..782a89c704 100644
--- a/java/broker/src/main/java/org/apache/qpid/server/handler/BasicGetMethodHandler.java
+++ b/java/broker/src/main/java/org/apache/qpid/server/handler/BasicGetMethodHandler.java
@@ -1,3 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *
+ */
+
package org.apache.qpid.server.handler;
import org.apache.log4j.Logger;
diff --git a/java/broker/src/main/java/org/apache/qpid/server/handler/QueuePurgeHandler.java b/java/broker/src/main/java/org/apache/qpid/server/handler/QueuePurgeHandler.java
index 0c00436470..3e1937bb43 100644
--- a/java/broker/src/main/java/org/apache/qpid/server/handler/QueuePurgeHandler.java
+++ b/java/broker/src/main/java/org/apache/qpid/server/handler/QueuePurgeHandler.java
@@ -1,3 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *
+ */
+
package org.apache.qpid.server.handler;
import org.apache.qpid.AMQException;
diff --git a/java/broker/src/main/java/org/apache/qpid/server/management/MBeanAttribute.java b/java/broker/src/main/java/org/apache/qpid/server/management/MBeanAttribute.java
index 3b5db7d6c7..7d42297699 100644
--- a/java/broker/src/main/java/org/apache/qpid/server/management/MBeanAttribute.java
+++ b/java/broker/src/main/java/org/apache/qpid/server/management/MBeanAttribute.java
@@ -1,3 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *
+ */
+
package org.apache.qpid.server.management;
import java.lang.annotation.ElementType;
@@ -9,8 +30,6 @@ import java.lang.annotation.Target;
/**
* Annotation for MBean attributes. This should be used with getter or setter
* methods of attributes.
- * @author Bhupendra Bhardwaj
- * @version 0.1
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
diff --git a/java/broker/src/main/java/org/apache/qpid/server/management/MBeanConstructor.java b/java/broker/src/main/java/org/apache/qpid/server/management/MBeanConstructor.java
index 7a600005e2..9138e03085 100644
--- a/java/broker/src/main/java/org/apache/qpid/server/management/MBeanConstructor.java
+++ b/java/broker/src/main/java/org/apache/qpid/server/management/MBeanConstructor.java
@@ -1,3 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *
+ */
+
package org.apache.qpid.server.management;
import java.lang.annotation.ElementType;
@@ -8,8 +29,6 @@ import java.lang.annotation.Target;
/**
* Annotation for MBean constructors.
- * @author Bhupendra Bhardwaj
- * @version 0.1
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.CONSTRUCTOR)
diff --git a/java/broker/src/main/java/org/apache/qpid/server/management/MBeanDescription.java b/java/broker/src/main/java/org/apache/qpid/server/management/MBeanDescription.java
index 97717662dd..448fed3280 100644
--- a/java/broker/src/main/java/org/apache/qpid/server/management/MBeanDescription.java
+++ b/java/broker/src/main/java/org/apache/qpid/server/management/MBeanDescription.java
@@ -1,3 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *
+ */
+
package org.apache.qpid.server.management;
import java.lang.annotation.ElementType;
@@ -8,8 +29,6 @@ import java.lang.annotation.Target;
/**
* Annotation for MBean class.
- * @author Bhupendra Bhardwaj
- * @version 0.1
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
diff --git a/java/broker/src/main/java/org/apache/qpid/server/management/MBeanOperation.java b/java/broker/src/main/java/org/apache/qpid/server/management/MBeanOperation.java
index f94be2f42f..a2dca3e51d 100644
--- a/java/broker/src/main/java/org/apache/qpid/server/management/MBeanOperation.java
+++ b/java/broker/src/main/java/org/apache/qpid/server/management/MBeanOperation.java
@@ -1,3 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *
+ */
+
package org.apache.qpid.server.management;
import java.lang.annotation.ElementType;
@@ -10,8 +31,6 @@ import javax.management.MBeanOperationInfo;
/**
* Annotation for MBean operations.
- * @author Bhupendra Bhardwaj
- * @version 0.1
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
diff --git a/java/broker/src/main/java/org/apache/qpid/server/management/MBeanOperationParameter.java b/java/broker/src/main/java/org/apache/qpid/server/management/MBeanOperationParameter.java
index ad03b740ab..aba5ec70d8 100644
--- a/java/broker/src/main/java/org/apache/qpid/server/management/MBeanOperationParameter.java
+++ b/java/broker/src/main/java/org/apache/qpid/server/management/MBeanOperationParameter.java
@@ -1,3 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *
+ */
+
package org.apache.qpid.server.management;
import java.lang.annotation.ElementType;
@@ -7,8 +28,6 @@ import java.lang.annotation.Target;
/**
* Annotation for MBean operation parameters.
- * @author Bhupendra Bhardwaj
- * @version 0.1
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.PARAMETER)
diff --git a/java/broker/src/main/java/org/apache/qpid/server/security/access/AMQUserManagementMBean.java b/java/broker/src/main/java/org/apache/qpid/server/security/access/AMQUserManagementMBean.java
index 155afa961e..2dc7fcbc1e 100644
--- a/java/broker/src/main/java/org/apache/qpid/server/security/access/AMQUserManagementMBean.java
+++ b/java/broker/src/main/java/org/apache/qpid/server/security/access/AMQUserManagementMBean.java
@@ -414,7 +414,7 @@ public class AMQUserManagementMBean extends AMQManagedObject implements UserMana
rights.renameTo(old);
FileOutputStream output = new FileOutputStream(tmp);
- _accessRights.store(output, "Last edited by user:" + getCurrentJMXUser());
+ _accessRights.store(output, "Generated by AMQUserManagementMBean Console : Last edited by user:" + getCurrentJMXUser());
output.close();
// Rename new file to main file
diff --git a/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/PlainPasswordFilePrincipalDatabase.java b/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/PlainPasswordFilePrincipalDatabase.java
index c49f4e2a33..b29ea66bfc 100644
--- a/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/PlainPasswordFilePrincipalDatabase.java
+++ b/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/PlainPasswordFilePrincipalDatabase.java
@@ -29,18 +29,17 @@ import org.apache.qpid.server.security.auth.sasl.plain.PlainInitialiser;
import javax.security.auth.callback.PasswordCallback;
import javax.security.auth.login.AccountNotFoundException;
+import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.BufferedReader;
import java.io.FileReader;
-import java.io.UnsupportedEncodingException;
-import java.util.regex.Pattern;
-import java.util.Map;
+import java.io.IOException;
+import java.security.Principal;
import java.util.HashMap;
-import java.util.List;
import java.util.LinkedList;
-import java.security.Principal;
+import java.util.List;
+import java.util.Map;
+import java.util.regex.Pattern;
/**
* Represents a user database where the account information is stored in a simple flat file.
@@ -212,7 +211,7 @@ public class PlainPasswordFilePrincipalDatabase implements PrincipalDatabase
reader = new BufferedReader(new FileReader(_passwordFile));
String line;
- while ((line = reader.readLine()) != null)
+ while ((line = reader.readLine()) != null && !line.startsWith("#"))
{
String[] result = _regexp.split(line);
if (result == null || result.length < 2)
diff --git a/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/PlainPasswordVhostFilePrincipalDatabase.java b/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/PlainPasswordVhostFilePrincipalDatabase.java
index 598f8f8b4c..f4f3385c75 100644
--- a/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/PlainPasswordVhostFilePrincipalDatabase.java
+++ b/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/PlainPasswordVhostFilePrincipalDatabase.java
@@ -20,17 +20,17 @@
*/
package org.apache.qpid.server.security.auth.database;
+import org.apache.log4j.Logger;
import org.apache.qpid.server.security.access.AccessManager;
import org.apache.qpid.server.security.access.AccessResult;
-import org.apache.qpid.server.security.access.Accessable;
import org.apache.qpid.server.security.access.AccessRights;
+import org.apache.qpid.server.security.access.Accessable;
import org.apache.qpid.server.security.auth.sasl.UsernamePrincipal;
import org.apache.qpid.server.virtualhost.VirtualHost;
-import org.apache.log4j.Logger;
-import java.io.IOException;
import java.io.BufferedReader;
import java.io.FileReader;
+import java.io.IOException;
import java.security.Principal;
/**
@@ -61,7 +61,7 @@ public class PlainPasswordVhostFilePrincipalDatabase extends PlainPasswordFilePr
reader = new BufferedReader(new FileReader(_passwordFile));
String line;
- while ((line = reader.readLine()) != null)
+ while ((line = reader.readLine()) != null && !line.startsWith("#"))
{
String[] result = _regexp.split(line);
if (result == null || result.length < 3)