

If = echo Queue Manager Profile was not specified & goto Usage
DELETE .MQ FILE SECURE WINDOWS
Here is the entire sample Windows batch file called ClearQ.bat: off The QList function of MQBT is for generating a list of queues of the queue manager.Īlso, you appear to be posting only part of the script. Note You could have sent a message to Capitalware Support for help.
DELETE .MQ FILE SECURE HOW TO
That's all there is to it, you now know how to configure the ActiveMQ Web Console to use Tomcat's UserDatabaseRealm and JDBCRealm.Your question is about scripting MQ Batch Toolkit (MQBT) for deleting messages from a queue.
DELETE .MQ FILE SECURE PASSWORD
This time when you login to the ActiveMQ Web Console use the username and password specified when loading the database tables. Now the Tomcat server can be started again. Looking at the JDBCRealm, you can see we are using the mysql JDBC driver, the connection URL is configured to connect to the tomcat_users database using the specified credentials, and the table and column names used in our database have been specified. In the server.xml file, located in /conf, we need to comment out the existing UserDataBaseRealm and add the JDBCRealm: If you left the Tomcat server running from the first part of this demonstration shut it down at this time so we can change the configuration to use the JDBCRealm. Now we can verify the information in our database: Mysql> INSERT INTO tomcat_users_roles (user_name, role_name) VALUES ('admin', 'activemq') Mysql> INSERT INTO tomcat_roles (role_name) VALUES ('activemq') Mysql> INSERT INTO tomcat_users (user_name, password) VALUES ('admin', 'dbpass') Next seed the tables with the user and role information: > CONSTRAINT tomcat_users_roles_foreign_key_2 FOREIGN KEY (role_name) REFERENCES tomcat_roles (role_name) > CONSTRAINT tomcat_users_roles_foreign_key_1 FOREIGN KEY (user_name) REFERENCES tomcat_users (user_name), > role_name varchar(20) NOT NULL PRIMARY KEY > user_name varchar(20) NOT NULL PRIMARY KEY, Then you can login to the database and create the following tables:

Mysql> GRANT ALL ON tomcat_users.* TO OK, 0 rows affected (0.02 sec) Provide the appropriate permissions for this database to a database user: Lets first create a new database as follows using a MySQL database: Next we will look at configuring the ActiveMQ Web Console to use a JDBCRealm which will authenticate against users stored in a database. What you have seen so far is a simple authentication using the UserDataBaseRealm which contains a list of users in a text file. The browser will retain your username and password in memory so you will need to exit the browser to end the session. As I mentioned before the user name and password are base64 encoded and each request is authenticated against the UserDataBaseRealm. Once you enter the user name and password you should get logged into the ActiveMQ Web Console. Once started, you should be able to access the ActiveMQ Web Console at the following URL: You should be prompted with something similar to this dialog: Now we are ready to start the Tomcat server. Next, open the catalina.sh/catalina.bat startup script and add the following configuration to initialize the JAVA_OPTS variable: First, copy the activemq-all jar into the Tomcat lib directory. The last thing we need to do before starting our Tomcat server is add the required configuration to communicate with the broker. This defines our activemq role and configures a user with that role. Open the tomcat-users.xml file and add the following: This instructs the web server to validate against the tomcat-users.xml file which can be found in /conf as well. Out-of-the-box Tomcat is configured to use the UserDataBaseRealm. Now lets configure the Tomcat server to validate our activemq role we just specified in the web app. To improve the security further you could enable a secure transport such as SSL. This means the username password are base64 encoded but not truly encrypted. And lastly, note that this is configured for basic authentication. Another point to notice is the auth-constraint which has been set to the activemq role, we will define this shortly. This configuration enables the security constraint on the entire application as noted with /* url-pattern.
