diff options
| author | Alex Rudyy <orudyy@apache.org> | 2015-04-15 09:47:28 +0000 |
|---|---|---|
| committer | Alex Rudyy <orudyy@apache.org> | 2015-04-15 09:47:28 +0000 |
| commit | 0a0baee45ebcff44635907d457c4ff6810b09c87 (patch) | |
| tree | 8bfb0f9eddbc23cff88af69be80ab3ce7d47011c /qpid/java/broker | |
| parent | 54aa3d7070da16ce55c28ccad3f7d0871479e461 (diff) | |
| download | qpid-python-0a0baee45ebcff44635907d457c4ff6810b09c87.tar.gz | |
QPID-6481: Move java source tree to top level
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1673693 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/broker')
19 files changed, 0 insertions, 2526 deletions
diff --git a/qpid/java/broker/bin/qpid-server b/qpid/java/broker/bin/qpid-server deleted file mode 100755 index c4709b110d..0000000000 --- a/qpid/java/broker/bin/qpid-server +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/env bash -# -# 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. -# -WHEREAMI=`dirname $0` -if [ -z "$QPID_HOME" ]; then - export QPID_HOME=`cd $WHEREAMI/../ && pwd` -fi - -if [ -z "$QPID_WORK" ]; then - echo "Setting QPID_WORK to $HOME as default" - QPID_WORK=$HOME -fi - -# Set to help us get round the manifold problems of ps/pgrep on various -# platforms which gather up to prevent qpid_stop from working ..... -if [ -z "$QPID_PNAME" ]; then - export QPID_PNAME=" -DPNAME=QPBRKR" -fi - -# Set classpath to include the jars in lib/, lib/plugins, and lib/opt -QPID_LIBS="$QPID_HOME/lib/*:$QPID_HOME/lib/plugins/*:$QPID_HOME/lib/opt/*" - -# Set other variables used by the qpid-run script before calling -export JAVA=java \ - JAVA_VM=-server \ - JAVA_MEM=-Xmx2g \ - JAVA_GC="-XX:+UseConcMarkSweepGC -XX:+HeapDumpOnOutOfMemoryError" \ - QPID_CLASSPATH=$QPID_LIBS \ - QPID_RUN_LOG=2 - -QPID_OPTS="$QPID_OPTS -Damqj.read_write_pool_size=32 -DQPID_LOG_APPEND=$QPID_LOG_APPEND" - -# Echo the PID to file. Since qpid-run is sourced and uses exec to -# launch the broker, this will give the brokers PID. -if [ -z "$QPID_PID_FILENAME" ]; then - export QPID_PID_FILENAME="qpid-server.pid" -fi -echo $$ > "${QPID_WORK}/${QPID_PID_FILENAME}" - -. "${QPID_HOME}/bin/qpid-run" org.apache.qpid.server.Main "$@" diff --git a/qpid/java/broker/bin/qpid-server.bat b/qpid/java/broker/bin/qpid-server.bat deleted file mode 100755 index de10e72483..0000000000 --- a/qpid/java/broker/bin/qpid-server.bat +++ /dev/null @@ -1,204 +0,0 @@ -@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
-
-@echo off
-REM Script to run the Qpid Java Broker
-
-SETLOCAL
-
-rem Guess QPID_HOME if not defined
-set CURRENT_DIR=%cd%
-if not "%QPID_HOME%" == "" goto gotHome
-set QPID_HOME=%CURRENT_DIR%
-echo %QPID_HOME%
-if exist "%QPID_HOME%\bin\qpid-server.bat" goto okHome
-cd ..
-set QPID_HOME=%cd%
-cd %CURRENT_DIR%
-:gotHome
-if exist "%QPID_HOME%\bin\qpid-server.bat" goto okHome
-echo The QPID_HOME environment variable is not defined correctly
-echo This environment variable is needed to run this program
-goto end
-:okHome
-
-REM set QPID_WORK if not set
-if not "%QPID_WORK%" == "" goto okQpidWork
-if "%HOME%" == "" goto noHome
-set QPID_WOKR=%HOME%
-goto okQpidWork
-
-:noHome
-set QPID_WORK=c:\Temp
-if not exist %QPID_WORK% md %QPID_WORK%
-:okQpidWork
-
-if not "%JAVA_HOME%" == "" goto gotJavaHome
-echo The JAVA_HOME environment variable is not defined
-echo This environment variable is needed to run this program
-goto end
-:gotJavaHome
-if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
-goto okJavaHome
-:noJavaHome
-echo The JAVA_HOME environment variable is not defined correctly
-echo This environment variable is needed to run this program.
-goto end
-:okJavaHome
-
-REM set loggin level if not set
-if "%AMQJ_LOGGING_LEVEL%" == "" set AMQJ_LOGGING_LEVEL=info
-
-REM Set the default system properties that we'll use now that they have
-REM all been initialised
-set SYSTEM_PROPS=-Damqj.logging.level=%AMQJ_LOGGING_LEVEL% -DQPID_HOME="%QPID_HOME%" -DQPID_WORK="%QPID_WORK%"
-
-if "%EXTERNAL_CLASSPATH%" == "" set EXTERNAL_CLASSPATH=%CLASSPATH%
-
-REM Use QPID_CLASSPATH if set
-if "%QPID_CLASSPATH%" == "" goto noQpidClasspath
-set CLASSPATH=%QPID_CLASSPATH%
-echo Using CLASSPATH: %CLASSPATH%
-goto afterQpidClasspath
-
-:noQpidClasspath
-echo Warning: Qpid classpath not set. CLASSPATH set to %QPID_HOME%\lib\*;%QPID_HOME%\lib\plugins\*;%QPID_HOME%\lib\opt\*
-set CLASSPATH=%QPID_HOME%\lib\*;%QPID_HOME%\lib\plugins\*;%QPID_HOME%\lib\opt\*
-:afterQpidClasspath
-
-REM start parsing -run arguments
-set QPID_ARGS=
-if "%1" == "" goto endRunArgs
-:runLoop
-set var=%~1
-if "%var:~0,5%" == "-run:" goto runFound
-set QPID_ARGS=%QPID_ARGS% %1
-:beforeRunShift
-shift
-if "%~1" neq "" goto runLoop
-goto endRunArgs
-
-:runFound
-if "%var%" == "-run:debug" goto runDebug
-if "%var%" == "-run:jpda" goto runJdpa
-if "%var:~0,24%" == "-run:external-classpath-" goto runExternalClasspath
-if "%var%" == "-run:print-classpath" goto runPrintCP
-if "%var%" == "-run:help" goto runHelp
-echo "unrecognized -run option '%var%'. For using external classpaths use -run:external-classpath-option"
-goto end
-
-:runDebug
-REM USAGE: print the classpath and command before running it
-set debug=true
-goto beforeRunShift
-
-:runJdpa
-REM USAGE: adds debugging options to the java command, use
-REM USAGE: JPDA_TRANSPORT and JPDA_ADDRESS to customize the debugging
-REM USAGE: behavior and use JPDA_OPTS to override it entirely
-if not "%JPDA_OPTS%" == "" goto beforeRunShift
-if "%JPDA_TRANSPORT%" == "" set JPDA_TRANSPORT=dt_socket
-if "%JPDA_ADDRESS%" == "" set JPDA_ADDRESS=8000
-set JPDA_OPTS=-Xdebug -Xrunjdwp:transport=%JPDA_TRANSPORT%,address=%JPDA_ADDRESS%,server=y,suspend=n
-REM set QPID_OPTS="%QPID_OPTS% %JPDA_OPTS%"
-goto beforeRunShift
-
-:runExternalClasspath
-echo Using external classpath %var%
-REM USAGE: Format is -run:external-classpath-first/last/ignore/only as equals special in DOS
-REM USAGE: controls how the CLASSPATH environment variable is used by
-REM USAGE: this script, value can be one of ignore (the default), first,
-REM USAGE: last, and only
-if "%var%" == "-run:external-classpath-ignore" goto beforeRunShift
-if "%var%" == "-run:external-classpath-first" goto extCPFirst
-if "%var%" == "-run:external-classpath-last" goto extCPLast
-if "%var%" == "-run:external-classpath-only" goto extCPOnly
-echo Invalid value provided for external classpath.
-goto end
-
-:extCPFirst
-set CLASSPATH=%EXTERNAL_CLASSPATH%;%CLASSPATH%
-goto beforeRunShift
-
-:extCPLast
-set CLASSPATH=%CLASSPATH%;%EXTERNAL_CLASSPATH%
-goto beforeRunShift
-
-:extCPonly
-set CLASSPATH=%EXTERNAL_CLASSPATH%
-goto beforeRunShift
-
-:runPrintCP
-REM USAGE: print the classpath
-echo %CLASSPATH%
-goto beforeRunShift
-
-:runHelp
-REM USAGE: print this message
-echo -------------------------------------------------------------------------------------------
-echo -run:option where option can be the following.
-echo debug : Prints classpath and command before running it
-echo jpda : Adds remote debugging info using JPDA_OPTS. Use JPDA_TRANSPORT and JPDA_ADDRESS to
-echo customize, JPDA_OPTS to override
-echo external-classpath : Valid values are: ignore, first, last and only.
-echo print-classpath : Prints classpath before running command
-echo help : Prints this message
-echo --------------------------------------------------------------------------------------------
-goto end
-
-REM end parsing -run arguments
-:endRunArgs
-
-set JAVA_VM=-server
-set JAVA_MEM=-Xmx2g
-set JAVA_GC=-XX:+UseConcMarkSweepGC -XX:+HeapDumpOnOutOfMemoryError
-
-REM Use QPID_JAVA_GC if set
-if "%QPID_JAVA_GC%" == "" goto noQpidJavaGC
-set JAVA_GC=%QPID_JAVA_GC%
-echo Using QPID_JAVA_GC setting: %QPID_JAVA_GC%
-goto afteQpidJavaGC
-
-:noQPidJavaGC
-echo Info: QPID_JAVA_GC not set. Defaulting to JAVA_GC %JAVA_GC%
-:afterQpidJavaGC
-
-REM Use QPID_JAVA_MEM if set
-if "%QPID_JAVA_MEM%" == "" goto noQpidJavaMem
-set JAVA_MEM=%QPID_JAVA_MEM%
-echo Using QPID_JAVA_MEM setting: %QPID_JAVA_MEM%
-goto afterQpidJavaMem
-
-:noQpidJavaMem
-echo Info: QPID_JAVA_MEM not set. Defaulting to JAVA_MEM %JAVA_MEM%
-:afterQpidJavaMem
-
-
-rem QPID_OPTS intended to hold any -D props for use
-rem user must enclose any value for QPID_OPTS in double quotes
-:runCommand
-set MODULE_JARS=%QPID_MODULE_JARS%
-set COMMAND="%JAVA_HOME%\bin\java" %JAVA_VM% %JAVA_MEM% %JAVA_GC% %QPID_OPTS% %JPDA_OPTS% %SYSTEM_PROPS% -cp "%CLASSPATH%;%MODULE_JARS%" org.apache.qpid.server.Main %QPID_ARGS%
-
-if "%debug%" == "true" echo %CLASSPATH%;%LAUNCH_JAR%;%MODULE_JARS%
-if "%debug%" == "true" echo %COMMAND%
-%COMMAND%
-
-:end
-ENDLOCAL
diff --git a/qpid/java/broker/bin/qpid.stop b/qpid/java/broker/bin/qpid.stop deleted file mode 100755 index 867f9788e2..0000000000 --- a/qpid/java/broker/bin/qpid.stop +++ /dev/null @@ -1,178 +0,0 @@ -#!/usr/bin/env bash -# -# 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. -# - -# qpid.stop Script -# -# Script checks for a given pid running DEFAULT_SEARCH and attempts to quit it -# - -MAX_ATTEMPTS=2 -SLEEP_DELAY=1 -DEFAULT_SEARCH="PNAME=QPBRKR" - -if [ -z "$QPID_STOP_SEARCH" ]; then - SEARCH=$DEFAULT_SEARCH; -else - SEARCH=$QPID_STOP_SEARCH; -fi - -# -# Forcably Quit the specified PID($1) -# -forceQuit() -{ -kill -9 $1 -} - -# -# Gracefully ask the PID($1) to quit -# -quit() -{ -kill $1 -} - -# -# grep for the session ID ($1) and return 0 for successful quit and 1 for process alive -# -lookup_pid() -{ -result=`ps -e | grep $1 | wc -l` -} - -# -# grep ps for all instances of $SEARCH for the current user and collect PIDs -# -lookup_all_pids() -{ -pids=`pgrep -f -U $USER $SEARCH` -result_all=`echo -n $pids | wc -w` -} - -# -# check that the PID passed in is for a Qpid broker owned by this user and alive -# -validate_pid() -{ -result=`pgrep -fl $SEARCH | grep $1 | wc -l` -} - -# -# Show the PS output for given set of pids -# -showPids() -{ -ps -o user,pid,args -p $pids -} - -# -# Sleep and then check then lookup the PID($1) to ensure it has quit -# -check() -{ -echo "Waiting $SLEEP_DELAY second for $1 to exit" -sleep $SLEEP_DELAY -lookup_pid $1 -} - -# -# Verify the PID($1) is available -# -verifyPid() -{ -validate_pid $1 -if [[ $[$result] == 1 ]] ; then - brokerspid=$1 -else - echo "Unable to locate Qpid Broker Process with PID $1. Check PID and try again." - exit -1 -fi -} - -# -# Stops all Qpid brokers for current user -# -qpid_stopall_brokers() -{ -for pid in $pids ; do - lookup_pid $pid; - brokerspid=$pid; - stop_broker $pid; -done -} - -# -# Stops Qpid broker with brokerspid id -# -stop_broker() -{ -# Attempt to quit the process MAX_ATTEMPTS Times -attempt=0 -while [[ $[$result] > 0 && $[$attempt] < $[$MAX_ATTEMPTS] ]] ; do - quit $brokerspid - check $brokerspid - attempt=$[$attempt + 1] -done - -# Check that it has quit -if [[ $[$result] == 0 ]] ; then - echo "Process quit" -else - - attempt=0 - # Now attempt to force quit the process - while [[ $[$result] > 0 && $[$attempt] < $[$MAX_ATTEMPTS] ]] ; do - forceQuit $brokerspid - check $brokerspid - attempt=$[$attempt + 1] - done - - # Output final status - if [[ $[$result] > 0 && $[$attempt] == $[$MAX_ATTEMPTS] ]] ; then - echo "Stopped trying to kill process: $brokerspid" - echo "Attempted to stop $attempt times" - else - echo "Done " - fi -fi - -} - -# -# Main Run -# - -# Check if we are killing all qpid pids or just one. -# Now uses local function qpid_stopall_brokers -if [[ $# == 0 ]] ; then - lookup_all_pids - if [[ $[$result_all] > 0 ]] ; then - echo "Killing All Qpid Brokers for user: '$USER'" - qpid_stopall_brokers - else - echo "No Qpid Brokers found running for user: " $USER - fi - exit $result -else - verifyPid $1 - stop_broker - exit $result -fi - diff --git a/qpid/java/broker/bin/qpid.stopall b/qpid/java/broker/bin/qpid.stopall deleted file mode 100755 index 4ab2df3b4b..0000000000 --- a/qpid/java/broker/bin/qpid.stopall +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bash -# -# 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. -# - -# qpid.stopall script -# -# Script attempts to stop all PROGRAMs running under the current user -# Utilises qpid.stop to perform the actual stopping -# - -qpid.stop $* diff --git a/qpid/java/broker/etc/broker_example.acl b/qpid/java/broker/etc/broker_example.acl deleted file mode 100644 index 418e0d4656..0000000000 --- a/qpid/java/broker/etc/broker_example.acl +++ /dev/null @@ -1,132 +0,0 @@ -# -# 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. -# - -### EXAMPLE ACL V2 FILE -### NOTE: Rules are considered from top to bottom, and the first matching rule governs the decision. -### Rules may refer to users or groups. Groups are currently defined in the etc/groups file. - -### JMX MANAGEMENT #### - -# To use JMX management, first give the user/group ACCESS MANAGEMENT permission -ACL ALLOW administrators ACCESS MANAGEMENT -ACL ALLOW guest ACCESS MANAGEMENT - -# Allow guest to perform read operations on the ServerInformation mbean -ACL ALLOW guest ACCESS METHOD component="ServerInformation" - -# Allow 'administrators' all management operations. To reduce log file noise, only non-read-only operations are logged. -ACL ALLOW administrators ACCESS METHOD -ACL ALLOW-LOG administrators ALL METHOD - -# Allow 'guest' to view logger levels, and use getter methods on LoggingManagement -ACL ALLOW guest ACCESS METHOD component="LoggingManagement" name="viewEffectiveRuntimeLoggerLevels" -ACL ALLOW guest ACCESS METHOD component="LoggingManagement" name="get*" - -# Deny access to Shutdown, UserManagement, ConfigurationManagement and LoggingManagement for all other users -# You could grant specific users access to these beans by adding rules above to allow them -ACL DENY-LOG ALL ACCESS METHOD component="Shutdown" -ACL DENY-LOG ALL ACCESS METHOD component="UserManagement" -ACL DENY-LOG ALL ACCESS METHOD component="ConfigurationManagement" -ACL DENY-LOG ALL ACCESS METHOD component="LoggingManagement" - -# Allow everyone to perform all read operations on the mbeans not listed in the DENY rules above -ACL ALLOW ALL ACCESS METHOD - -### WEB MANAGEMENT #### - -# To use web management, first give the user/group ACCESS MANAGEMENT permission -ACL ALLOW webadmins ACCESS MANAGEMENT - -# ACL for web management console admins -# All rules below are required for console admin users -# to perform create/update/delete operations -ACL ALLOW-LOG webadmins CREATE QUEUE -ACL ALLOW-LOG webadmins UPDATE QUEUE -ACL ALLOW-LOG webadmins DELETE QUEUE -ACL ALLOW-LOG webadmins PURGE QUEUE -ACL ALLOW-LOG webadmins CREATE EXCHANGE -ACL ALLOW-LOG webadmins DELETE EXCHANGE -ACL ALLOW-LOG webadmins BIND EXCHANGE -ACL ALLOW-LOG webadmins UNBIND EXCHANGE -ACL ALLOW-LOG webadmins CREATE GROUP -ACL ALLOW-LOG webadmins DELETE GROUP -ACL ALLOW-LOG webadmins UPDATE GROUP -ACL ALLOW-LOG webadmins CREATE USER -ACL ALLOW-LOG webadmins DELETE USER -ACL ALLOW-LOG webadmins UPDATE USER - -ACL ALLOW-LOG webadmins UPDATE METHOD - -# authorise operations changing broker model -ACL ALLOW-LOG webadmins CONFIGURE BROKER - -# authorise operations to view and download broker logs -ACL ALLOW webadmins ACCESS_LOGS BROKER - -# at the moment only the following UPDATE METHOD rules are supported by web management console -#ACL ALLOW-LOG webadmins UPDATE METHOD component="VirtualHost.Queue" name="moveMessages" -#ACL ALLOW-LOG webadmins UPDATE METHOD component="VirtualHost.Queue" name="copyMessages" -#ACL ALLOW-LOG webadmins UPDATE METHOD component="VirtualHost.Queue" name="deleteMessages" -#ACL ALLOW-LOG webadmins UPDATE METHOD component="VirtualHost.Queue" name="clearQueue" - -### MESSAGING ### -# The 'ACCESS VIRTUALHOST' rules below apply to messaging operations (as opposed to management operations) - -# Firewall examples - -# Deny access to all users from *.example.company1.com and *.example.company2.com -ACL DENY-LOG all ACCESS VIRTUALHOST from_hostname=".*\.example\.company1.com,.*\.example\.company2.com" - -# Deny access to all users in the IP ranges 192.168.1.0-192.168.1.255 and 192.168.2.0-192.168.2.255, -# using the notation specified in RFC 4632, "Classless Inter-domain Routing (CIDR)" -ACL DENY-LOG messaging-users ACCESS VIRTUALHOST from_network="192.168.1.0/24,192.168.2.0/24" - -# Deny access to all users in the IP ranges 192.169.1.0-192.169.1.255 and 192.169.2.0-192.169.2.255, -# using wildcard notation. -ACL DENY-LOG messaging-users ACCESS VIRTUALHOST from_network="192.169.1.*,192.169.2.*" - -# Allow 'messaging-users' group to connect to all virtualhosts -ACL ALLOW-LOG messaging-users ACCESS VIRTUALHOST - -# Deny messaging-users management -ACL DENY-LOG messaging-users ACCESS MANAGEMENT - - -# Client side -# Allow the 'client' user to publish requests to the request queue and create, consume from, and delete temporary reply queues. -ACL ALLOW-LOG client CREATE QUEUE temporary="true" -ACL ALLOW-LOG client CONSUME QUEUE temporary="true" -ACL ALLOW-LOG client DELETE QUEUE temporary="true" -ACL ALLOW-LOG client BIND EXCHANGE name="amq.direct" temporary="true" -ACL ALLOW-LOG client UNBIND EXCHANGE name="amq.direct" temporary="true" -ACL ALLOW-LOG client PUBLISH EXCHANGE name="amq.direct" routingKey="example.RequestQueue" - -# Server side -# Allow the 'server' user to create and consume from the request queue and publish a response to the temporary response queue created by -# client. -ACL ALLOW-LOG server CREATE QUEUE name="example.RequestQueue" -ACL ALLOW-LOG server CONSUME QUEUE name="example.RequestQueue" -ACL ALLOW-LOG server BIND EXCHANGE -ACL ALLOW-LOG server PUBLISH EXCHANGE name="amq.direct" routingKey="TempQueue*" - - -### DEFAULT ### - -# Deny all users from performing all operations -ACL DENY-LOG all all diff --git a/qpid/java/broker/etc/groups b/qpid/java/broker/etc/groups deleted file mode 100644 index e3912ece99..0000000000 --- a/qpid/java/broker/etc/groups +++ /dev/null @@ -1,29 +0,0 @@ -# -# 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. -# - -# -# To define a group, use the format: -# -# <groupname>.users=<user1>,<user2>,...,<usern> -# - -messaging-users.users=guest,client,server -administrators.users=admin -webadmins.users=webadmin - diff --git a/qpid/java/broker/etc/log4j.xml b/qpid/java/broker/etc/log4j.xml deleted file mode 100644 index 7229707074..0000000000 --- a/qpid/java/broker/etc/log4j.xml +++ /dev/null @@ -1,123 +0,0 @@ -<?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. - - - --><!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> - -<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="null" threshold="null"> - <appender class="org.apache.log4j.QpidCompositeRollingAppender" name="ArchivingFileAppender"> - <!-- Ensure that logs always have the DatePattern appended to the filename. - DEFAULT IF NOT CONFIGURED: true --> - <param name="StaticLogFileName" value="true"/> - <param name="file" value="${QPID_WORK}/log/${logprefix}qpid${logsuffix}.log"/> - <!-- Style of rolling to use, by: - File Size(1) - Date(2) - Both(3) - - When Date (or Both) is enabled then the value of DatePattern will determine - when the new file is made. e.g. a DatePattern of "'.'yyyy-MM-dd-HH-mm" - which includes minutes will cause a new backup file to be made every minute. - - DEFAULT IF NOT CONFIGURED: 3 --> - <param name="RollingStyle" value="1"/> - <!-- Set the count direction: - Negative numbers mean backups are numbered <latest>, .0, .1, .2,..., .n - 0 means backup is DatePattern stamped and followed with a Positive number - if the DatePattern stamp clashes with other existing backups. - Positive numbers mean backups are numbered 0, 1, 2, ..., n, <latest> - - DEFAULT IF NOT CONFIGURED: -1 --> - <param name="CountDirection" value="0"/> - <!-- Maximum File Size: - DEFAULT IF NOT CONFIGURED: 10MB --> - <param name="MaxFileSize" value="1MB"/> - <!-- Date Pattern: - DEFAULT IF NOT CONFIGURED: "'.'yyyy-MM-dd" --> - <param name="DatePattern" value="'.'yyyy-MM-dd-HH-mm"/> - <!-- Maximum number of backup files: - 0 means no backups - -1 means infinite backups - - DEFAULT IF NOT CONFIGURED: 0 --> - <param name="MaxSizeRollBackups" value="-1"/> - <!-- Compress(gzip) the backup files to the backup location: - DEFAULT IF NOT CONFIGURED: FALSE --> - <param name="CompressBackupFiles" value="true"/> - <!-- Compress the backup files using a second thread: - DEFAULT IF NOT CONFIGURED: FALSE --> - <param name="CompressAsync" value="true"/> - <!-- Backup Location: - DEFAULT IF NOT CONFIGURED: same dir as log file --> - <param name="backupFilesToPath" value="${QPID_WORK}/backup/log"/> - - <layout class="org.apache.log4j.PatternLayout"> - <param name="ConversionPattern" value="%d %-5p [%t] (%c{2}) - %m%n"/> - </layout> - </appender> - - <appender class="org.apache.log4j.FileAppender" name="FileAppender"> - <param name="File" value="${QPID_WORK}/log/${logprefix}qpid${logsuffix}.log"/> - <param name="Append" value="false"/> - - <layout class="org.apache.log4j.PatternLayout"> - <param name="ConversionPattern" value="%d %-5p [%t] (%c{2}) - %m%n"/> - </layout> - </appender> - - <appender class="org.apache.log4j.ConsoleAppender" name="STDOUT"> - <layout class="org.apache.log4j.PatternLayout"> - <param name="ConversionPattern" value="%d %-5p [%t] (%c{2}) - %m%n"/> - </layout> - </appender> - - <!-- General logging hierarchy --> - <logger additivity="true" name="org.apache.qpid"> - <level value="warn"/> - </logger> - - <!-- Operational logging hierarchy --> - <logger additivity="true" name="qpid.message"> - <level value="info"/> - </logger> - - <!-- Subscription state may toggle frequently for clients with low prefetch - so switch off this operational logging by default--> - <logger additivity="true" name="qpid.message.subscription.state"> - <level value="off"/> - </logger> - - <!-- Enable log messages for the queue notifications --> - <logger additivity="true" name="org.apache.qpid.server.queue.NotificationCheck"> - <level value="info"/> - </logger> - - <!-- Set the commons logging that the XML parser uses to WARN, it is very chatty at debug --> - <logger name="org.apache.commons"> - <level value="warn"/> - </logger> - - <!-- Log all info events to file --> - <root> - <level value="info"/> - <appender-ref ref="FileAppender"/> - <!--appender-ref ref="ArchivingFileAppender"/--> - </root> - -</log4j:configuration> diff --git a/qpid/java/broker/etc/md5passwd b/qpid/java/broker/etc/md5passwd deleted file mode 100644 index f7185c0e92..0000000000 --- a/qpid/java/broker/etc/md5passwd +++ /dev/null @@ -1,23 +0,0 @@ -#
-# 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:CE4DQ6BIb/BVMN9scFyLtA==
-client:CE4DQ6BIb/BVMN9scFyLtA==
-server:CE4DQ6BIb/BVMN9scFyLtA==
-admin:ISMvKXpXpadDiUoOSoAfww==
-webadmin:rda7WOE5vhAzJNBNgtj1RQ==
diff --git a/qpid/java/broker/etc/passwd b/qpid/java/broker/etc/passwd deleted file mode 100644 index f0dcb80f25..0000000000 --- a/qpid/java/broker/etc/passwd +++ /dev/null @@ -1,25 +0,0 @@ -# -# 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 -client:guest -server:guest -admin:admin - -webadmin:webadmin - diff --git a/qpid/java/broker/pom.xml b/qpid/java/broker/pom.xml deleted file mode 100644 index d561df2bb1..0000000000 --- a/qpid/java/broker/pom.xml +++ /dev/null @@ -1,208 +0,0 @@ -<?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. ---> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.apache.qpid</groupId> - <artifactId>qpid-java-build</artifactId> - <version>0.32-SNAPSHOT</version> - </parent> - - <artifactId>qpid-broker</artifactId> - <name>Qpid Java Broker</name> - <description>Broker configuration and executable</description> - - <properties> - <dependency-change-verification>true</dependency-change-verification> - </properties> - - <dependencies> - <dependency> - <groupId>org.apache.qpid</groupId> - <artifactId>qpid-broker-core</artifactId> - <version>${project.version}</version> - </dependency> - - <dependency> - <groupId>org.apache.qpid</groupId> - <artifactId>qpid-common</artifactId> - <version>${project.version}</version> - </dependency> - - <dependency> - <groupId>log4j</groupId> - <artifactId>log4j</artifactId> - <version>${log4j-version}</version> - </dependency> - - <dependency> - <groupId>commons-cli</groupId> - <artifactId>commons-cli</artifactId> - <version>${commons-cli-version}</version> - </dependency> - - <dependency> - <groupId>org.apache.qpid</groupId> - <artifactId>qpid-broker-plugins-access-control</artifactId> - <version>${project.version}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.qpid</groupId> - <artifactId>qpid-broker-plugins-amqp-0-8-protocol</artifactId> - <version>${project.version}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.qpid</groupId> - <artifactId>qpid-broker-plugins-amqp-0-10-protocol</artifactId> - <version>${project.version}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.qpid</groupId> - <artifactId>qpid-broker-plugins-amqp-1-0-protocol</artifactId> - <version>${project.version}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.qpid</groupId> - <artifactId>qpid-broker-plugins-amqp-msg-conv-0-8-to-0-10</artifactId> - <version>${project.version}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.qpid</groupId> - <artifactId>qpid-broker-plugins-amqp-msg-conv-0-8-to-1-0</artifactId> - <version>${project.version}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.qpid</groupId> - <artifactId>qpid-broker-plugins-amqp-msg-conv-0-10-to-1-0</artifactId> - <version>${project.version}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.qpid</groupId> - <artifactId>qpid-broker-plugins-derby-store</artifactId> - <version>${project.version}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.qpid</groupId> - <artifactId>qpid-broker-plugins-jdbc-provider-bone</artifactId> - <version>${project.version}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.qpid</groupId> - <artifactId>qpid-broker-plugins-jdbc-store</artifactId> - <version>${project.version}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.qpid</groupId> - <artifactId>qpid-broker-plugins-management-http</artifactId> - <version>${project.version}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.qpid</groupId> - <artifactId>qpid-broker-plugins-management-jmx</artifactId> - <version>${project.version}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.qpid</groupId> - <artifactId>qpid-broker-plugins-memory-store</artifactId> - <version>${project.version}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.qpid</groupId> - <artifactId>qpid-broker-plugins-websocket</artifactId> - <version>${project.version}</version> - <scope>runtime</scope> - </dependency> - - <!-- optional modules --> - <dependency> - <groupId>org.apache.qpid</groupId> - <artifactId>qpid-bdbstore</artifactId> - <version>${project.version}</version> - <scope>runtime</scope> - <optional>true</optional> - </dependency> - - <dependency> - <groupId>org.apache.qpid</groupId> - <artifactId>qpid-bdbstore-jmx</artifactId> - <version>${project.version}</version> - <scope>runtime</scope> - <optional>true</optional> - </dependency> - - <!-- test dependencies --> - <dependency> - <groupId>org.apache.qpid</groupId> - <artifactId>qpid-test-utils</artifactId> - <version>${project.version}</version> - <scope>test</scope> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-assembly-plugin</artifactId> - <!--version specified in parent pluginManagement --> - <configuration> - <descriptors> - <descriptor>src/main/assembly/qpid-broker-bin.xml</descriptor> - </descriptors> - </configuration> - <executions> - <execution> - <id>make-assembly</id> - <phase>package</phase> - <goals> - <goal>single</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - </build> - -</project> diff --git a/qpid/java/broker/python-test.xml b/qpid/java/broker/python-test.xml deleted file mode 100644 index 5c263e3169..0000000000 --- a/qpid/java/broker/python-test.xml +++ /dev/null @@ -1,56 +0,0 @@ -<?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. --> -<!-- ====================================================================== --> - -<project basedir="." default="default"> - - <target name="default" > - <echo message="Used via maven to run python tests."/> - </target> - - <dirname property="broker.dir" file="${ant.file.python-test}"/> - - <property name="pythondir" value="${broker.dir}/../../python"/> - - <target name="run-tests" unless="skip-python-tests"> - - <echo message="Starting Broker with command"/> - - <java classname="org.apache.qpid.server.RunBrokerWithCommand" - fork="true" - dir="${pythondir}" - failonerror="true" - > - <arg value="${command}"/> - <arg value="-p"/> - <arg value="2110"/> - <arg value="-m"/> - <arg value="2111"/> - - <classpath refid="maven.test.classpath"/> - <sysproperty key="QPID_HOME" value="${broker.dir}"/> - <sysproperty key="QPID_WORK" value="${broker.dir}${file.separator}target"/> - </java> - - </target> -</project> diff --git a/qpid/java/broker/scripts/resetAlerting.sh b/qpid/java/broker/scripts/resetAlerting.sh deleted file mode 100644 index ebbdc168d2..0000000000 --- a/qpid/java/broker/scripts/resetAlerting.sh +++ /dev/null @@ -1,116 +0,0 @@ -#!/usr/bin/env bash -# -# -# 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. -# -# - -# -# Alerting Rest Scripts to renabled the alerts on the queue. -# -# Defaults to Localhost broker -# - -if [ -z "$QPID_ALERT_HOME" ]; then - export QPID_ALERT_HOME=$(dirname $(dirname $(readlink -f $0))) - export PATH=${PATH}:${QPID_ALERT_HOME}/bin -fi - -USERNAME=$1 -PASSWORD=$2 -HOSTNAME=$3 -PORT=$4 - -CLI="$QPID_ALERT_HOME/bin/qpid-cli -h ${HOSTNAME:-localhost} -p ${PORT:-8999}" -AUTH= -if [ -n $USERNAME ] ; then - if [ "$USERNAME" == "-h" ] ; then - echo "resetAlerting.sh: [<username> <password> [<hostname> [<port>]]]" - exit 0 - fi - if [ -n $PASSWORD ] ; then - AUTH="-u $USERNAME -w $PASSWORD" - else - echo "Password must be specified with username" - fi -fi - - -OUTPUT=0 - -runCommand() -{ - RET=`$CLI $1 $AUTH` -} - -resetQueue() -{ - vhost=$1 - queue=$2 - runCommand "get -o queue -v $vhost -n $queue -a MaximumQueueDepth" - rawQDepth=$RET - # Note that MaxQueueDepth is returned as Kb but set as b! - queueDepth=$[ $rawQDepth * 1024 ] - runCommand "get -o queue -v $vhost -n $queue -a MaximumMessageAge" - messageAge=$RET - runCommand "get -o queue -v $vhost -n $queue -a MaximumMessageCount" - messageCount=$RET - runCommand "get -o queue -v $vhost -n $queue -a MaximumMessageSize" - messageSize=$RET - - if [ $OUTPUT == 1 ] ; then - echo Current Values: - echo MaximumQueueDepth : $queueDepth - echo MaximumMessageAge : $messageAge - echo MaximumMessageCount : $messageCount - echo MaximumMessageSize : $messageSize - fi - - runCommand "set -o queue -v $vhost -n $queue -a MaximumMessageSize -s $messageSize" - runCommand "set -o queue -v $vhost -n $queue -a MaximumMessageAge -s $messageAge" - runCommand "set -o queue -v $vhost -n $queue -a MaximumMessageCount -s $messageCount" - runCommand "set -o queue -v $vhost -n $queue -a MaximumQueueDepth -s $queueDepth" -} - -resetVirtualHost() -{ - vhost=$1 - ignore=0 - for queue in `$CLI list -o queue -v $vhost $AUTH |grep '|' | cut -d '|' -f 1 ` ; do - - if [ $ignore == 0 ] ; then - ignore=1 - else - resetQueue $vhost $queue - fi - - done -} - -VHOST=`$CLI list -o virtualhost $AUTH` -COUNT=`echo $VHOST | grep -c VirtualHost` -if [ $COUNT -gt 0 ] ; then - for vhost in `echo $VHOST |grep VirtualHost|cut -d '=' -f 3` ; do - - echo "Resetting alert levels for $vhost"; - resetVirtualHost $vhost; - done - echo "Alerting levels reset" -else - echo $VHOST -fi diff --git a/qpid/java/broker/src/main/assembly/LICENSE b/qpid/java/broker/src/main/assembly/LICENSE deleted file mode 100644 index bb9e55be67..0000000000 --- a/qpid/java/broker/src/main/assembly/LICENSE +++ /dev/null @@ -1,300 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed 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. - - - -############################################### -# Third Party Dependency Licensing Information: -############################################### - -This bundles portions of crypto-js which is under the MIT licence: - -Copyright (c) 2009-2013 Jeff Mott - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -############################################### - -This product bundles the slf4j-api and slf4j-log4j jars which are under -the MIT licence: - -Copyright (c) 2004-2013 QOS.ch - All rights reserved. - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -############################################### - -This product bundles the dojo zip which is under the "New" BSD licence: - -Dojo is available under *either* the terms of the modified BSD license *or* the -Academic Free License version 2.1. As a recipient of Dojo, you may choose which -license to receive this code under (except as noted in per-module LICENSE -files). Some modules may not be the copyright of the Dojo Foundation. These -modules contain explicit declarations of copyright in both the LICENSE files in -the directories in which they reside and in the code itself. No external -contributions are allowed under licenses which are fundamentally incompatible -with the AFL or BSD licenses that Dojo is distributed under. - -The "New" BSD License: -********************** - -Copyright (c) 2005-2014, The Dojo Foundation -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of the Dojo Foundation nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/qpid/java/broker/src/main/assembly/NOTICE b/qpid/java/broker/src/main/assembly/NOTICE deleted file mode 100644 index 6950a91fb3..0000000000 --- a/qpid/java/broker/src/main/assembly/NOTICE +++ /dev/null @@ -1,93 +0,0 @@ -Qpid Java Broker -Copyright 2006-2014 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - -############################################### - -Apache Derby -Copyright 2004-2011 The Apache Software Foundation - -Portions of Derby were originally developed by -International Business Machines Corporation and are -licensed to the Apache Software Foundation under the -"Software Grant and Corporate Contribution License Agreement", -informally known as the "Derby CLA". -The following copyright notice(s) were affixed to portions of the code -with which this file is now or was at one time distributed -and are placed here unaltered. - -(C) Copyright 1997,2004 International Business Machines Corporation. All rights reserved. - -(C) Copyright IBM Corp. 2003. - -############################################### - -============================================================== - Jetty Web Container - Copyright 1995-2014 Mort Bay Consulting Pty Ltd. -============================================================== - -The Jetty Web Container is Copyright Mort Bay Consulting Pty Ltd -unless otherwise noted. - -Jetty is dual licensed under both - - * The Apache 2.0 License - http://www.apache.org/licenses/LICENSE-2.0.html - - and - - * The Eclipse Public 1.0 License - http://www.eclipse.org/legal/epl-v10.html - -Jetty may be distributed under either license. - -The javax.servlet package used was sourced from the Apache -Software Foundation and is distributed under the apache 2.0 -license. - -The UnixCrypt.java code implements the one way cryptography used by -Unix systems for simple password protection. Copyright 1996 Aki Yoshida, -modified April 2001 by Iris Van den Broeke, Daniel Deville. -Permission to use, copy, modify and distribute UnixCrypt -for non-commercial or commercial purposes and without fee is -granted provided that the copyright notice appears in all copies. - -############################################### - -Geronimo Servlet Spec 3.0 -Copyright 2003-2010 The Apache Software Foundation - -This product includes software developed by -The W3C Consortium (http://www.w3.org/). - -Copyright © 1994-2002 World Wide Web Consortium, -(Massachusetts Institute of Technology, Institut National -de Recherche en Informatique et en Automatique, Keio -University). All Rights Reserved. -http://www.w3.org/Consortium/Legal/ - -############################################### - -Apache Commons Codec -Copyright 2002-2013 The Apache Software Foundation - -############################################### - -Apache Commons CLI -Copyright 2001-2009 The Apache Software Foundation - -############################################### - -Apache Commons Lang -Copyright 2001-2011 The Apache Software Foundation - -############################################### - -Apache log4j -Copyright 2007 The Apache Software Foundation - -############################################### - diff --git a/qpid/java/broker/src/main/assembly/README.txt b/qpid/java/broker/src/main/assembly/README.txt deleted file mode 100644 index eec46a52f0..0000000000 --- a/qpid/java/broker/src/main/assembly/README.txt +++ /dev/null @@ -1,3 +0,0 @@ -Documentation for the Qpid components can be accessed on our website at: - -http://qpid.apache.org/documentation.html diff --git a/qpid/java/broker/src/main/assembly/dependency-verification/DEPENDENCIES_REFERENCE b/qpid/java/broker/src/main/assembly/dependency-verification/DEPENDENCIES_REFERENCE deleted file mode 100644 index a50f17aea0..0000000000 --- a/qpid/java/broker/src/main/assembly/dependency-verification/DEPENDENCIES_REFERENCE +++ /dev/null @@ -1,132 +0,0 @@ -# -# 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. -# - -#// ------------------------------------------------------------------ -# TRIMMED 3RD PARTY DEPENDENCY INFORMATION FOR MODIFICATION CHECKS -#// ------------------------------------------------------------------ - - - -From: 'an unknown organization' - - Guava: Google Core Libraries for Java (http://code.google.com/p/guava-libraries/guava) com.google.guava:guava:bundle:14.0.1 - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - bcel org.apache.bcel:bcel:jar:5.2 - - -From: 'Apache Software Foundation' (http://db.apache.org/) - - Apache Derby Database Engine and Embedded JDBC Driver (http://db.apache.org/derby/derby/) org.apache.derby:derby:jar:10.8.2.2 - License: Apache 2 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -From: 'Apache Software Foundation' (http://www.apache.org) - - Apache Log4j (http://logging.apache.org/log4j/1.2/) log4j:log4j:bundle:1.2.16 - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -From: 'FasterXML' (http://fasterxml.com) - - Jackson (http://jackson.codehaus.org) org.codehaus.jackson:jackson-core-asl:jar:1.9.1 - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - Data Mapper for Jackson (http://jackson.codehaus.org) org.codehaus.jackson:jackson-mapper-asl:jar:1.9.1 - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -From: 'JolBox' (http://jolbox.com) - - BoneCP :: Core Library (http://jolbox.com/bonecp) com.jolbox:bonecp:bundle:0.7.1.RELEASE - License: Apache v2 (http://www.apache.org/licenses/LICENSE-2.0.html) - -From: 'Mort Bay Consulting' (http://www.mortbay.com) - - Jetty :: Continuation (http://www.eclipse.org/jetty) org.eclipse.jetty:jetty-continuation:jar:8.1.14.v20131031 - License: Apache Software License - Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) License: Eclipse Public License - Version 1.0 (http://www.eclipse.org/org/documents/epl-v10.php) - - Jetty :: Http Utility (http://www.eclipse.org/jetty) org.eclipse.jetty:jetty-http:jar:8.1.14.v20131031 - License: Apache Software License - Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) License: Eclipse Public License - Version 1.0 (http://www.eclipse.org/org/documents/epl-v10.php) - - Jetty :: IO Utility (http://www.eclipse.org/jetty) org.eclipse.jetty:jetty-io:jar:8.1.14.v20131031 - License: Apache Software License - Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) License: Eclipse Public License - Version 1.0 (http://www.eclipse.org/org/documents/epl-v10.php) - - Jetty :: Security (http://www.eclipse.org/jetty) org.eclipse.jetty:jetty-security:jar:8.1.14.v20131031 - License: Apache Software License - Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) License: Eclipse Public License - Version 1.0 (http://www.eclipse.org/org/documents/epl-v10.php) - - Jetty :: Server Core (http://www.eclipse.org/jetty) org.eclipse.jetty:jetty-server:jar:8.1.14.v20131031 - License: Apache Software License - Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) License: Eclipse Public License - Version 1.0 (http://www.eclipse.org/org/documents/epl-v10.php) - - Jetty :: Servlet Handling (http://www.eclipse.org/jetty) org.eclipse.jetty:jetty-servlet:jar:8.1.14.v20131031 - License: Apache Software License - Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) License: Eclipse Public License - Version 1.0 (http://www.eclipse.org/org/documents/epl-v10.php) - - Jetty :: Utilities (http://www.eclipse.org/jetty) org.eclipse.jetty:jetty-util:jar:8.1.14.v20131031 - License: Apache Software License - Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) License: Eclipse Public License - Version 1.0 (http://www.eclipse.org/org/documents/epl-v10.php) - - Jetty :: Websocket (http://www.eclipse.org/jetty) org.eclipse.jetty:jetty-websocket:jar:8.1.14.v20131031 - License: Apache Software License - Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) License: Eclipse Public License - Version 1.0 (http://www.eclipse.org/org/documents/epl-v10.php) - -From: 'QOS.ch' (http://www.qos.ch) - - SLF4J API Module (http://www.slf4j.org) org.slf4j:slf4j-api:jar:1.6.4 - License: MIT License (http://www.opensource.org/licenses/mit-license.php) - - SLF4J LOG4J-12 Binding (http://www.slf4j.org) org.slf4j:slf4j-log4j12:jar:1.6.4 - License: MIT License (http://www.opensource.org/licenses/mit-license.php) - -From: 'The Apache Software Foundation' (http://www.apache.org) - - Servlet 3.0 (http://geronimo.apache.org/maven/specs/geronimo-servlet_3.0_spec/1.0) org.apache.geronimo.specs:geronimo-servlet_3.0_spec:bundle:1.0 - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -From: 'The Apache Software Foundation' (http://www.apache.org/) - - Commons CLI (http://commons.apache.org/cli/) commons-cli:commons-cli:jar:1.2 - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - Apache Commons Codec (http://commons.apache.org/proper/commons-codec/) commons-codec:commons-codec:jar:1.9 - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - Commons Lang (http://commons.apache.org/lang/) commons-lang:commons-lang:jar:2.6 - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - Qpid AMQP 1.0 Common (http://qpid.apache.org/qpid-java-build/qpid-amqp-1-0-common) org.apache.qpid:qpid-amqp-1-0-common:jar - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - Qpid BDB Message Store (http://qpid.apache.org/qpid-java-build/qpid-bdbstore) org.apache.qpid:qpid-bdbstore:jar - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - Qpid BDB Message Store JMX (http://qpid.apache.org/qpid-java-build/bdbstore/qpid-bdbstore-jmx) org.apache.qpid:qpid-bdbstore-jmx:jar - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - Qpid Java Broker Core (http://qpid.apache.org/qpid-java-build/qpid-broker-core) org.apache.qpid:qpid-broker-core:jar - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - Qpid Access Control Broker Plug-in (http://qpid.apache.org/qpid-java-build/broker-plugins/qpid-broker-plugins-access-control) org.apache.qpid:qpid-broker-plugins-access-control:jar - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - Qpid AMQP 0-10 Protocol Plug-in (http://qpid.apache.org/qpid-java-build/broker-plugins/qpid-broker-plugins-amqp-0-10-protocol) org.apache.qpid:qpid-broker-plugins-amqp-0-10-protocol:jar - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - Qpid AMQP 0-8 Protocol Broker Plug-in (http://qpid.apache.org/qpid-java-build/broker-plugins/qpid-broker-plugins-amqp-0-8-protocol) org.apache.qpid:qpid-broker-plugins-amqp-0-8-protocol:jar - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - Qpid AMQP 1-0 Protocol Broker Plug-in (http://qpid.apache.org/qpid-java-build/broker-plugins/qpid-broker-plugins-amqp-1-0-protocol) org.apache.qpid:qpid-broker-plugins-amqp-1-0-protocol:jar - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - Qpid AMQP 0-10 to 1-0 Message Conversion Broker Plug-in (http://qpid.apache.org/qpid-java-build/broker-plugins/qpid-broker-plugins-amqp-msg-conv-0-10-to-1-0) org.apache.qpid:qpid-broker-plugins-amqp-msg-conv-0-10-to-1-0:jar - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - Qpid AMQP 0-8 to 0-10 Message Conversion Broker Plug-in (http://qpid.apache.org/qpid-java-build/broker-plugins/qpid-broker-plugins-amqp-msg-conv-0-8-to-0-10) org.apache.qpid:qpid-broker-plugins-amqp-msg-conv-0-8-to-0-10:jar - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - Qpid AMQP 0-8 to 1-0 Message Conversion Broker Plug-in (http://qpid.apache.org/qpid-java-build/broker-plugins/qpid-broker-plugins-amqp-msg-conv-0-8-to-1-0) org.apache.qpid:qpid-broker-plugins-amqp-msg-conv-0-8-to-1-0:jar - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - Qpid Derby Message Store (http://qpid.apache.org/qpid-java-build/broker-plugins/qpid-broker-plugins-derby-store) org.apache.qpid:qpid-broker-plugins-derby-store:jar - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - Qpid JDBC Message Store Connection Pooling Plug-in (http://qpid.apache.org/qpid-java-build/broker-plugins/qpid-broker-plugins-jdbc-provider-bone) org.apache.qpid:qpid-broker-plugins-jdbc-provider-bone:jar - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - Qpid JDBC Message Store Broker Plug-in (http://qpid.apache.org/qpid-java-build/broker-plugins/qpid-broker-plugins-jdbc-store) org.apache.qpid:qpid-broker-plugins-jdbc-store:jar - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - Qpid HTTP Management Broker Plug-in (http://qpid.apache.org/qpid-java-build/broker-plugins/qpid-broker-plugins-management-http) org.apache.qpid:qpid-broker-plugins-management-http:jar - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - Qpid JMX Management Broker Plug-in (http://qpid.apache.org/qpid-java-build/broker-plugins/qpid-broker-plugins-management-jmx) org.apache.qpid:qpid-broker-plugins-management-jmx:jar - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - Qpid Memory Message Store Broker Plug-in (http://qpid.apache.org/qpid-java-build/broker-plugins/qpid-broker-plugins-memory-store) org.apache.qpid:qpid-broker-plugins-memory-store:jar - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - Qpid WebSocket Broker Plug-in (http://qpid.apache.org/qpid-java-build/broker-plugins/qpid-broker-plugins-websocket) org.apache.qpid:qpid-broker-plugins-websocket:jar - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - Qpid Common (http://qpid.apache.org/qpid-java-build/management/qpid-common) org.apache.qpid:qpid-common:jar - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - Qpid Management Common (http://qpid.apache.org/qpid-java-build/management/qpid-management-common) org.apache.qpid:qpid-management-common:jar - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -From: 'The Dojo Foundation' (http://dojotoolkit.org/foundation) - - Dojo Toolkit :: Bundles (http://dojotoolkit.org) org.dojotoolkit:dojo:pom:1.9.1 - License: Academic Free License v2.1 (http://trac.dojotoolkit.org/browser/dojo/trunk/LICENSE) License: BSD License (http://trac.dojotoolkit.org/browser/dojo/trunk/LICENSE) - - - - diff --git a/qpid/java/broker/src/main/assembly/qpid-broker-bin.xml b/qpid/java/broker/src/main/assembly/qpid-broker-bin.xml deleted file mode 100644 index 4ec674c803..0000000000 --- a/qpid/java/broker/src/main/assembly/qpid-broker-bin.xml +++ /dev/null @@ -1,77 +0,0 @@ -<?xml version='1.0'?> -<!-- - - 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. - ---> -<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd"> - <id>bin</id> - <formats> - <format>tar.gz</format> - </formats> - <baseDirectory>qpid-broker/${project.version}</baseDirectory> - <fileSets> - <fileSet> - <directory>${project.basedir}</directory> - <outputDirectory>/</outputDirectory> - <includes> - <include>etc/</include> - </includes> - <fileMode>0644</fileMode> - <directoryMode>0755</directoryMode> - </fileSet> - <fileSet> - <directory>${basedir}/src/main/assembly/</directory> - <outputDirectory>/</outputDirectory> - <includes> - <include>LICENSE</include> - <include>NOTICE</include> - <include>README.txt</include> - </includes> - <fileMode>0644</fileMode> - <directoryMode>0755</directoryMode> - </fileSet> - <fileSet> - <directory>${project.basedir}</directory> - <outputDirectory>/</outputDirectory> - <includes> - <include>bin/</include> - </includes> - <fileMode>0755</fileMode> - <directoryMode>0755</directoryMode> - </fileSet> - <fileSet> - <directory>${project.basedir}/../common</directory> - <outputDirectory>/</outputDirectory> - <includes> - <include>bin/qpid-run</include> - </includes> - <fileMode>0755</fileMode> - <directoryMode>0755</directoryMode> - </fileSet> - </fileSets> - <dependencySets> - <dependencySet> - <outputDirectory>/lib</outputDirectory> - <useProjectArtifact>true</useProjectArtifact> - </dependencySet> - </dependencySets> -</assembly> - diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/Main.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/Main.java deleted file mode 100644 index 8e08492d68..0000000000 --- a/qpid/java/broker/src/main/java/org/apache/qpid/server/Main.java +++ /dev/null @@ -1,460 +0,0 @@ -/* - * - * 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; - -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.net.MalformedURLException; -import java.net.URL; - -import org.apache.commons.cli.CommandLine; -import org.apache.commons.cli.HelpFormatter; -import org.apache.commons.cli.Option; -import org.apache.commons.cli.OptionBuilder; -import org.apache.commons.cli.Options; -import org.apache.commons.cli.ParseException; -import org.apache.commons.cli.PosixParser; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.apache.qpid.common.QpidProperties; -import org.apache.qpid.framing.ProtocolVersion; -import org.apache.qpid.server.configuration.IllegalConfigurationException; -import org.apache.qpid.server.util.Action; -import org.apache.qpid.server.util.StringUtil; -import org.apache.qpid.util.FileUtils; - -/** - * Main entry point for AMQPD. - * - */ -public class Main -{ - private static final int MANAGEMENT_MODE_PASSWORD_LENGTH = 10; - - private static final Option OPTION_HELP = new Option("h", "help", false, "print this message"); - - private static final Option OPTION_VERSION = new Option("v", "version", false, "print the version information and exit"); - - private static final Option OPTION_CONFIGURATION_STORE_PATH = OptionBuilder.withArgName("path").hasArg() - .withDescription("use given configuration store location").withLongOpt("store-path").create("sp"); - - private static final Option OPTION_CONFIGURATION_STORE_TYPE = OptionBuilder.withArgName("type").hasArg() - .withDescription("use given broker configuration store type").withLongOpt("store-type").create("st"); - - private static final Option OPTION_INITIAL_CONFIGURATION_PATH = OptionBuilder.withArgName("path").hasArg() - .withDescription("set the location of initial JSON config to use when creating/overwriting a broker configuration store").withLongOpt("initial-config-path").create("icp"); - - private static final Option OPTION_OVERWRITE_CONFIGURATION_STORE = OptionBuilder.withDescription("overwrite the broker configuration store with the current initial configuration") - .withLongOpt("overwrite-store").create("os"); - - private static final Option OPTION_CREATE_INITIAL_CONFIG = OptionBuilder.withArgName("path").hasOptionalArg().withDescription("create a copy of the initial config file, either to an" + - " optionally specified file path, or as " + BrokerOptions.DEFAULT_INITIAL_CONFIG_NAME + " in the current directory") - .withLongOpt("create-initial-config").create("cic"); - - private static final Option OPTION_CONFIGURATION_PROPERTY = OptionBuilder.withArgName("name=value").hasArg() - .withDescription("set a configuration property to use when resolving variables in the broker configuration store, with format \"name=value\"") - .withLongOpt("config-property").create("prop"); - - private static final Option OPTION_LOG_CONFIG_FILE = - OptionBuilder.withArgName("file").hasArg() - .withDescription("use the specified log4j xml configuration file. By " - + "default looks for a file named " + BrokerOptions.DEFAULT_LOG_CONFIG_FILE - + " in the same directory as the configuration file").withLongOpt("logconfig").create("l"); - - private static final Option OPTION_LOG_WATCH = - OptionBuilder.withArgName("period").hasArg() - .withDescription("monitor the log file configuration file for changes. Units are seconds. " - + "Zero means do not check for changes.").withLongOpt("logwatch").create("w"); - - private static final Option OPTION_MANAGEMENT_MODE = OptionBuilder.withDescription("start broker in management mode, disabling the AMQP ports") - .withLongOpt("management-mode").create("mm"); - private static final Option OPTION_MM_QUIESCE_VHOST = OptionBuilder.withDescription("make virtualhosts stay in the quiesced state during management mode.") - .withLongOpt("management-mode-quiesce-virtualhosts").create("mmqv"); - private static final Option OPTION_MM_RMI_PORT = OptionBuilder.withArgName("port").hasArg() - .withDescription("override jmx rmi registry port in management mode").withLongOpt("management-mode-rmi-registry-port").create("mmrmi"); - private static final Option OPTION_MM_CONNECTOR_PORT = OptionBuilder.withArgName("port").hasArg() - .withDescription("override jmx connector port in management mode").withLongOpt("management-mode-jmx-connector-port").create("mmjmx"); - private static final Option OPTION_MM_HTTP_PORT = OptionBuilder.withArgName("port").hasArg() - .withDescription("override http management port in management mode").withLongOpt("management-mode-http-port").create("mmhttp"); - private static final Option OPTION_MM_PASSWORD = OptionBuilder.withArgName("password").hasArg() - .withDescription("Set the password for the management mode user " + BrokerOptions.MANAGEMENT_MODE_USER_NAME).withLongOpt("management-mode-password").create("mmpass"); - - private static final Option OPTION_INITIAL_SYSTEM_PROPERTIES = OptionBuilder.withArgName("path").hasArg() - .withDescription("set the location of initial properties file to set otherwise unset system properties").withLongOpt("system-properties-file").create("props"); - - private static final Options OPTIONS = new Options(); - - static - { - OPTIONS.addOption(OPTION_HELP); - OPTIONS.addOption(OPTION_VERSION); - OPTIONS.addOption(OPTION_CONFIGURATION_STORE_PATH); - OPTIONS.addOption(OPTION_CONFIGURATION_STORE_TYPE); - OPTIONS.addOption(OPTION_OVERWRITE_CONFIGURATION_STORE); - OPTIONS.addOption(OPTION_CREATE_INITIAL_CONFIG); - OPTIONS.addOption(OPTION_LOG_CONFIG_FILE); - OPTIONS.addOption(OPTION_LOG_WATCH); - OPTIONS.addOption(OPTION_INITIAL_CONFIGURATION_PATH); - OPTIONS.addOption(OPTION_MANAGEMENT_MODE); - OPTIONS.addOption(OPTION_MM_QUIESCE_VHOST); - OPTIONS.addOption(OPTION_MM_RMI_PORT); - OPTIONS.addOption(OPTION_MM_CONNECTOR_PORT); - OPTIONS.addOption(OPTION_MM_HTTP_PORT); - OPTIONS.addOption(OPTION_MM_PASSWORD); - OPTIONS.addOption(OPTION_CONFIGURATION_PROPERTY); - OPTIONS.addOption(OPTION_INITIAL_SYSTEM_PROPERTIES); - } - - protected CommandLine _commandLine; - - public static void main(String[] args) - { - //if the -Dlog4j.configuration property has not been set, enable the init override - //to stop Log4J wondering off and picking up the first log4j.xml/properties file it - //finds from the classpath when we get the first Loggers - if(System.getProperty("log4j.configuration") == null) - { - System.setProperty("log4j.defaultInitOverride", "true"); - } - - new Main(args); - } - - public Main(final String[] args) - { - if (parseCommandline(args)) - { - try - { - execute(); - } - catch(Exception e) - { - System.err.println("Exception during startup: " + e); - e.printStackTrace(); - shutdown(1); - } - } - } - - protected boolean parseCommandline(final String[] args) - { - try - { - _commandLine = new PosixParser().parse(OPTIONS, args); - - return true; - } - catch (ParseException e) - { - System.err.println("Error: " + e.getMessage()); - HelpFormatter formatter = new HelpFormatter(); - formatter.printHelp("Qpid", OPTIONS, true); - - return false; - } - } - - protected void execute() throws Exception - { - BrokerOptions options = new BrokerOptions(); - - String initialProperties = _commandLine.getOptionValue(OPTION_INITIAL_SYSTEM_PROPERTIES.getOpt()); - if (initialProperties != null) - { - options.setInitialSystemProperties(initialProperties); - } - - String initialConfigLocation = _commandLine.getOptionValue(OPTION_INITIAL_CONFIGURATION_PATH.getOpt()); - if (initialConfigLocation != null) - { - options.setInitialConfigurationLocation(initialConfigLocation); - } - - //process the remaining options - if (_commandLine.hasOption(OPTION_HELP.getOpt())) - { - final HelpFormatter formatter = new HelpFormatter(); - formatter.printHelp("Qpid", OPTIONS, true); - } - else if (_commandLine.hasOption(OPTION_CREATE_INITIAL_CONFIG.getOpt())) - { - File destinationFile = null; - - String destinationOption = _commandLine.getOptionValue(OPTION_CREATE_INITIAL_CONFIG.getOpt()); - if (destinationOption != null) - { - destinationFile = new File(destinationOption); - } - else - { - destinationFile = new File(System.getProperty("user.dir"), BrokerOptions.DEFAULT_INITIAL_CONFIG_NAME); - } - - copyInitialConfigFile(options, destinationFile); - - System.out.println("Initial config written to: " + destinationFile.getAbsolutePath()); - } - else if (_commandLine.hasOption(OPTION_VERSION.getOpt())) - { - final StringBuilder protocol = new StringBuilder("AMQP version(s) [major.minor]: "); - boolean first = true; - for (final ProtocolVersion pv : ProtocolVersion.getSupportedProtocolVersions()) - { - if (first) - { - first = false; - } - else - { - protocol.append(", "); - } - - protocol.append(pv.getMajorVersion()).append('-').append(pv.getMinorVersion()); - } - System.out.println(QpidProperties.getVersionString() + " (" + protocol + ")"); - } - else - { - String[] configPropPairs = _commandLine.getOptionValues(OPTION_CONFIGURATION_PROPERTY.getOpt()); - if(configPropPairs != null && configPropPairs.length > 0) - { - for(String s : configPropPairs) - { - int firstEquals = s.indexOf("="); - if(firstEquals == -1) - { - throw new IllegalArgumentException("Configuration property argument is not of the format name=value: " + s); - } - String name = s.substring(0, firstEquals); - String value = s.substring(firstEquals + 1); - - if(name.equals("")) - { - throw new IllegalArgumentException("Configuration property argument is not of the format name=value: " + s); - } - - options.setConfigProperty(name, value); - } - } - - String configurationStore = _commandLine.getOptionValue(OPTION_CONFIGURATION_STORE_PATH.getOpt()); - if (configurationStore != null) - { - options.setConfigurationStoreLocation(configurationStore); - } - - String configurationStoreType = _commandLine.getOptionValue(OPTION_CONFIGURATION_STORE_TYPE.getOpt()); - if (configurationStoreType != null) - { - options.setConfigurationStoreType(configurationStoreType); - } - - String logWatchConfig = _commandLine.getOptionValue(OPTION_LOG_WATCH.getOpt()); - if(logWatchConfig != null) - { - options.setLogWatchFrequency(Integer.parseInt(logWatchConfig)); - } - - String logConfig = _commandLine.getOptionValue(OPTION_LOG_CONFIG_FILE.getOpt()); - if(logConfig != null) - { - options.setLogConfigFileLocation(logConfig); - } - - boolean overwriteConfigurationStore = _commandLine.hasOption(OPTION_OVERWRITE_CONFIGURATION_STORE.getOpt()); - options.setOverwriteConfigurationStore(overwriteConfigurationStore); - - boolean managementMode = _commandLine.hasOption(OPTION_MANAGEMENT_MODE.getOpt()); - if (managementMode) - { - options.setManagementMode(true); - String rmiPort = _commandLine.getOptionValue(OPTION_MM_RMI_PORT.getOpt()); - if (rmiPort != null) - { - options.setManagementModeRmiPortOverride(Integer.parseInt(rmiPort)); - } - String connectorPort = _commandLine.getOptionValue(OPTION_MM_CONNECTOR_PORT.getOpt()); - if (connectorPort != null) - { - options.setManagementModeJmxPortOverride(Integer.parseInt(connectorPort)); - } - String httpPort = _commandLine.getOptionValue(OPTION_MM_HTTP_PORT.getOpt()); - if (httpPort != null) - { - options.setManagementModeHttpPortOverride(Integer.parseInt(httpPort)); - } - - boolean quiesceVhosts = _commandLine.hasOption(OPTION_MM_QUIESCE_VHOST.getOpt()); - options.setManagementModeQuiesceVirtualHosts(quiesceVhosts); - - String password = _commandLine.getOptionValue(OPTION_MM_PASSWORD.getOpt()); - if (password == null) - { - password = new StringUtil().randomAlphaNumericString(MANAGEMENT_MODE_PASSWORD_LENGTH); - } - options.setManagementModePassword(password); - } - setExceptionHandler(); - - startBroker(options); - } - } - - private void copyInitialConfigFile(final BrokerOptions options, final File destinationFile) - { - String initialConfigLocation = options.getInitialConfigurationLocation(); - URL url = null; - try - { - url = new URL(initialConfigLocation); - } - catch (MalformedURLException e) - { - File locationFile = new File(initialConfigLocation); - try - { - url = locationFile.toURI().toURL(); - } - catch (MalformedURLException e1) - { - throw new IllegalConfigurationException("Cannot create URL for file " + locationFile, e1); - } - } - InputStream in = null; - try - { - in = url.openStream(); - FileUtils.copy(in, destinationFile); - } - catch (IOException e) - { - throw new IllegalConfigurationException("Cannot create file " + destinationFile - + " by copying initial config from " + initialConfigLocation, e); - } - finally - { - if (in != null) - { - try - { - in.close(); - } - catch (IOException e) - { - throw new IllegalConfigurationException("Cannot close initial config input stream: " + initialConfigLocation, e); - } - } - } - } - - protected void setExceptionHandler() - { - Thread.UncaughtExceptionHandler handler = null; - String handlerClass = System.getProperty("qpid.broker.exceptionHandler"); - if(handlerClass != null) - { - try - { - handler = (Thread.UncaughtExceptionHandler) Class.forName(handlerClass).newInstance(); - } - catch (ClassNotFoundException e) - { - - } - catch (InstantiationException e) - { - - } - catch (IllegalAccessException e) - { - - } - catch (ClassCastException e) - { - - } - } - - if(handler == null) - { - handler = - new Thread.UncaughtExceptionHandler() - { - public void uncaughtException(final Thread t, final Throwable e) - { - boolean continueOnError = Boolean.getBoolean("qpid.broker.exceptionHandler.continue"); - try - { - System.err.println("########################################################################"); - System.err.println("#"); - System.err.print("# Unhandled Exception "); - System.err.print(e.toString()); - System.err.print(" in Thread "); - System.err.println(t.getName()); - System.err.println("#"); - System.err.println(continueOnError ? "# Forced to continue by JVM setting 'qpid.broker.exceptionHandler.continue'" : "# Exiting"); - System.err.println("#"); - System.err.println("########################################################################"); - e.printStackTrace(System.err); - - Logger logger = LoggerFactory.getLogger("org.apache.qpid.server.Main"); - logger.error("Uncaught exception, " + (continueOnError ? "continuing." : "shutting down."), e); - } - finally - { - if (!continueOnError) - { - Runtime.getRuntime().halt(1); - } - } - - } - }; - - Thread.setDefaultUncaughtExceptionHandler(handler); - } - } - - protected void startBroker(final BrokerOptions options) throws Exception - { - Broker broker = new Broker(new Action<Integer>() - { - @Override - public void performAction(final Integer exitStatusCode) - { - if (exitStatusCode != 0) - { - shutdown(exitStatusCode); - } - } - }); - broker.startup(options); - } - - protected void shutdown(final int status) - { - System.exit(status); - } - -} diff --git a/qpid/java/broker/src/test/java/org/apache/qpid/server/MainTest.java b/qpid/java/broker/src/test/java/org/apache/qpid/server/MainTest.java deleted file mode 100644 index 636048cac2..0000000000 --- a/qpid/java/broker/src/test/java/org/apache/qpid/server/MainTest.java +++ /dev/null @@ -1,284 +0,0 @@ -/* - * - * 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; - -import java.io.File; -import java.util.Map; - -import org.apache.commons.cli.CommandLine; -import org.apache.qpid.server.configuration.BrokerProperties; -import org.apache.qpid.test.utils.QpidTestCase; - -/** - * Test to verify the command line parsing within the Main class, by - * providing it a series of command line arguments and verifying the - * BrokerOptions emerging for use in starting the Broker instance. - */ -public class MainTest extends QpidTestCase -{ - private Exception _startupException; - - public void testNoOptionsSpecified() - { - String qpidWork = "/qpid/work"; - setTestSystemProperty(BrokerProperties.PROPERTY_QPID_WORK, qpidWork); - String qpidHome = "/qpid/home"; - setTestSystemProperty(BrokerProperties.PROPERTY_QPID_HOME, qpidHome); - - String expectedStorePath = new File(qpidWork, BrokerOptions.DEFAULT_CONFIG_NAME_PREFIX + ".json").getAbsolutePath(); - String expectedLogConfigPath = new File(qpidHome, BrokerOptions.DEFAULT_LOG_CONFIG_FILE).getAbsolutePath(); - - BrokerOptions options = startDummyMain(""); - - assertEquals("JSON", options.getConfigurationStoreType()); - assertEquals(expectedStorePath, options.getConfigurationStoreLocation()); - assertEquals(expectedLogConfigPath, options.getLogConfigFileLocation()); - assertEquals(0, options.getLogWatchFrequency()); - assertEquals(BrokerOptions.DEFAULT_INITIAL_CONFIG_LOCATION, options.getInitialConfigurationLocation()); - assertFalse(options.isOverwriteConfigurationStore()); - assertFalse(options.isManagementMode()); - assertEquals(0, options.getManagementModeJmxPortOverride()); - assertEquals(0, options.getManagementModeRmiPortOverride()); - assertEquals(0, options.getManagementModeHttpPortOverride()); - } - - public void testConfigurationStoreLocation() - { - BrokerOptions options = startDummyMain("-sp abcd/config.xml"); - assertEquals("abcd/config.xml", options.getConfigurationStoreLocation()); - - options = startDummyMain("-store-path abcd/config2.xml"); - assertEquals("abcd/config2.xml", options.getConfigurationStoreLocation()); - } - - public void testConfigurationStoreType() - { - BrokerOptions options = startDummyMain("-st dby"); - assertEquals("dby", options.getConfigurationStoreType()); - - options = startDummyMain("-store-type bdb"); - assertEquals("bdb", options.getConfigurationStoreType()); - } - - public void testOverwriteConfigurationStore() - { - BrokerOptions options = startDummyMain("-os"); - assertTrue(options.isOverwriteConfigurationStore()); - - options = startDummyMain("-overwrite-store"); - assertTrue(options.isOverwriteConfigurationStore()); - } - - public void testLogConfig() - { - BrokerOptions options = startDummyMain("-l wxyz/log4j.xml"); - - assertEquals("wxyz/log4j.xml", options.getLogConfigFileLocation()); - } - - public void testLogWatch() - { - BrokerOptions options = startDummyMain("-w 9"); - - assertEquals(9, options.getLogWatchFrequency()); - } - - public void testVersion() - { - final TestMain main = new TestMain("-v".split("\\s")); - - assertNotNull("Command line not parsed correctly", main.getCommandLine()); - assertTrue("Parsed command line didnt pick up version option", main.getCommandLine().hasOption("v")); - } - - public void testHelp() - { - final TestMain main = new TestMain("-h".split("\\s")); - - assertNotNull("Command line not parsed correctly", main.getCommandLine()); - assertTrue("Parsed command line didnt pick up help option", main.getCommandLine().hasOption("h")); - } - - public void testInitailConfigurationLocation() - { - BrokerOptions options = startDummyMain("-icp abcd/initial-config.json"); - assertEquals("abcd/initial-config.json", options.getInitialConfigurationLocation()); - - options = startDummyMain("-initial-config-path abcd/initial-config.json"); - assertEquals("abcd/initial-config.json", options.getInitialConfigurationLocation()); - } - - public void testManagementMode() - { - BrokerOptions options = startDummyMain("-mm"); - assertTrue(options.isManagementMode()); - - options = startDummyMain("--management-mode"); - assertTrue(options.isManagementMode()); - } - - public void testManagementModeRmiPortOverride() - { - BrokerOptions options = startDummyMain("-mm -mmrmi 7777"); - assertTrue(options.isManagementMode()); - assertEquals(7777, options.getManagementModeRmiPortOverride()); - - options = startDummyMain("-mm --management-mode-rmi-registry-port 7777"); - assertTrue(options.isManagementMode()); - assertEquals(7777, options.getManagementModeRmiPortOverride()); - - options = startDummyMain("-mmrmi 7777"); - assertEquals(0, options.getManagementModeRmiPortOverride()); - } - - public void testManagementModeJmxPortOverride() - { - BrokerOptions options = startDummyMain("-mm -mmjmx 8888"); - assertTrue(options.isManagementMode()); - assertEquals(8888, options.getManagementModeJmxPortOverride()); - - options = startDummyMain("-mm --management-mode-jmx-connector-port 8888"); - assertTrue(options.isManagementMode()); - assertEquals(8888, options.getManagementModeJmxPortOverride()); - - options = startDummyMain("-mmjmx 8888"); - assertEquals(0, options.getManagementModeJmxPortOverride()); - } - - public void testManagementModeHttpPortOverride() - { - BrokerOptions options = startDummyMain("-mm -mmhttp 9999"); - assertTrue(options.isManagementMode()); - assertEquals(9999, options.getManagementModeHttpPortOverride()); - - options = startDummyMain("-mm --management-mode-http-port 9999"); - assertTrue(options.isManagementMode()); - assertEquals(9999, options.getManagementModeHttpPortOverride()); - - options = startDummyMain("-mmhttp 9999"); - assertEquals(0, options.getManagementModeHttpPortOverride()); - } - - public void testManagementModePassword() - { - String password = getTestName(); - BrokerOptions options = startDummyMain("-mm -mmpass " + password); - assertTrue(options.isManagementMode()); - assertEquals(password, options.getManagementModePassword()); - - options = startDummyMain("-mm --management-mode-password " + password); - assertTrue(options.isManagementMode()); - assertEquals(password, options.getManagementModePassword()); - - options = startDummyMain("-mm -mmpass " + password); - assertNotNull(options.getManagementModePassword()); - } - - public void testDefaultManagementModePassword() - { - BrokerOptions options = startDummyMain("-mm"); - assertTrue(options.isManagementMode()); - assertNotNull(options.getManagementModePassword()); - } - - public void testSetConfigProperties() - { - //short name - String newPort = "12345"; - BrokerOptions options = startDummyMain("-prop name=value -prop " + org.apache.qpid.server.model.Broker.QPID_AMQP_PORT + "=" + newPort); - - Map<String, String> props = options.getConfigProperties(); - - assertEquals(newPort, props.get(org.apache.qpid.server.model.Broker.QPID_AMQP_PORT)); - assertEquals("value", props.get("name")); - - //long name - newPort = "678910"; - options = startDummyMain("--config-property name2=value2 --config-property " + org.apache.qpid.server.model.Broker.QPID_AMQP_PORT + "=" + newPort); - - props = options.getConfigProperties(); - - assertEquals(newPort, props.get(org.apache.qpid.server.model.Broker.QPID_AMQP_PORT)); - assertEquals("value2", props.get("name2")); - } - - public void testSetConfigPropertiesInvalidFormat() - { - //missing equals - startDummyMain("-prop namevalue"); - assertTrue("expected exception did not occur", - _startupException instanceof IllegalArgumentException); - - //no name specified - startDummyMain("-prop =value"); - assertTrue("expected exception did not occur", - _startupException instanceof IllegalArgumentException); - } - - private BrokerOptions startDummyMain(String commandLine) - { - return (new TestMain(commandLine.split("\\s"))).getOptions(); - } - - private class TestMain extends Main - { - private BrokerOptions _options; - - public TestMain(String[] args) - { - super(args); - } - - @Override - protected void execute() - { - try - { - super.execute(); - } - catch(Exception re) - { - MainTest.this._startupException = re; - } - } - - @Override - protected void startBroker(BrokerOptions options) - { - _options = options; - } - - @Override - protected void setExceptionHandler() - { - } - - public BrokerOptions getOptions() - { - return _options; - } - - public CommandLine getCommandLine() - { - return _commandLine; - } - } -} |
