summaryrefslogtreecommitdiff
path: root/java/broker
diff options
context:
space:
mode:
Diffstat (limited to 'java/broker')
-rw-r--r--java/broker/bin/qpid-server-bdb.bat19
-rw-r--r--java/broker/etc/access18
-rw-r--r--java/broker/etc/jmxremote.access26
-rw-r--r--java/broker/etc/md5passwd22
-rw-r--r--java/broker/etc/passwd18
-rw-r--r--java/broker/etc/passwdVhost18
-rw-r--r--java/broker/pom.xml8
-rwxr-xr-xjava/broker/python-test.xml18
-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
20 files changed, 320 insertions, 33 deletions
diff --git a/java/broker/bin/qpid-server-bdb.bat b/java/broker/bin/qpid-server-bdb.bat
index 5c8b74e163..8964e577df 100644
--- a/java/broker/bin/qpid-server-bdb.bat
+++ b/java/broker/bin/qpid-server-bdb.bat
@@ -1,3 +1,22 @@
+@REM
+@REM Licensed to the Apache Software Foundation (ASF) under one
+@REM or more contributor license agreements. See the NOTICE file
+@REM distributed with this work for additional information
+@REM regarding copyright ownership. The ASF licenses this file
+@REM to you under the Apache License, Version 2.0 (the
+@REM "License"); you may not use this file except in compliance
+@REM with the License. You may obtain a copy of the License at
+@REM
+@REM http://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing,
+@REM software distributed under the License is distributed on an
+@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+@REM KIND, either express or implied. See the License for the
+@REM specific language governing permissions and limitations
+@REM under the License.
+@REM
+
set BDBSTORE_HOME=c:\qpid\trunk\java\bdbstore
set QPID_MODULE_JARS=%BDBSTORE_HOME%\target\qpid-bdbstore-1.0-incubating-M2-SNAPSHOT.jar;%BDBSTORE_HOME%\lib\bdb\je-3.1.0.jar
.\qpid-server.bat \ No newline at end of file
diff --git a/java/broker/etc/access b/java/broker/etc/access
index a781ed8aa9..58b7443fa9 100644
--- a/java/broker/etc/access
+++ b/java/broker/etc/access
@@ -1 +1,19 @@
+#
+# 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.
+
guest:localhost(rw),test(rw) \ No newline at end of file
diff --git a/java/broker/etc/jmxremote.access b/java/broker/etc/jmxremote.access
index d1172fc197..1a51a6991b 100644
--- a/java/broker/etc/jmxremote.access
+++ b/java/broker/etc/jmxremote.access
@@ -1,3 +1,23 @@
-admin=admin
-guest=readonly
-user=readwrite
+#
+# 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.
+
+#Generated by JMX Console : Last edited by user:admin
+#Tue Jun 12 16:46:39 BST 2007
+admin=admin
+guest=readonly
+user=readwrite
diff --git a/java/broker/etc/md5passwd b/java/broker/etc/md5passwd
index f6839898bf..7984b742e0 100644
--- a/java/broker/etc/md5passwd
+++ b/java/broker/etc/md5passwd
@@ -1 +1,21 @@
-guest:qfgyy4ewnVMBg
+#
+# 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.
+#
+guest:qfgyy4ewnVMBg
+admin:ISMvKXpXpadDiUoOSoAfww==
+user:aBzonUodYLhwSa8s9A10sA==
diff --git a/java/broker/etc/passwd b/java/broker/etc/passwd
index 9e06cab884..966a16153d 100644
--- a/java/broker/etc/passwd
+++ b/java/broker/etc/passwd
@@ -1 +1,19 @@
+#
+# 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.
+#
guest:guest
diff --git a/java/broker/etc/passwdVhost b/java/broker/etc/passwdVhost
index 5db304e12c..48ce8299b6 100644
--- a/java/broker/etc/passwdVhost
+++ b/java/broker/etc/passwdVhost
@@ -1 +1,19 @@
+#
+# 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.
+#
guest:guest:localhost,test
diff --git a/java/broker/pom.xml b/java/broker/pom.xml
index 85ec5da3bf..58200a81b1 100644
--- a/java/broker/pom.xml
+++ b/java/broker/pom.xml
@@ -180,9 +180,9 @@
<tasks>
<condition property="broker.dir"
- value="${user.dir}${file.separator}..${file.separator}broker"
- else="${user.dir}">
- <equals arg1="${topDirectoryLocation}" arg2="." />
+ else="${user.dir}${file.separator}broker"
+ value="${user.dir}">
+ <contains string="${user.dir}" substring="broker" />
</condition>
<condition property="skip-python-tests" value="true">
@@ -191,7 +191,7 @@
<property name="command"
value="python run-tests -v -I java_failing.txt"/>
- <!--value="bash -c 'python run-tests -v -I java_failing.txt'"/>-->
+ <!--value="bash -c 'python run-tests -v -I java_failing.txt'"/>-->
<ant antfile="python-test.xml" inheritRefs="true">
<target name="run-tests" />
diff --git a/java/broker/python-test.xml b/java/broker/python-test.xml
index 8ade392d1c..a31dae0060 100755
--- a/java/broker/python-test.xml
+++ b/java/broker/python-test.xml
@@ -1,4 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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.
+-->
<!-- ====================================================================== -->
<!-- Ant build file (http://ant.apache.org/) for Ant 1.6.2 or above. -->
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)