[jboss-user] [Installation, Configuration & DEPLOYMENT] - how to prevent others to deploy queue using MBeanServerConne

subrata_jboss do-not-reply at jboss.com
Thu Apr 3 01:47:14 EDT 2008

my problem is i have following program which others can write and deploy a queue in my machine ...

public static void deployQueue(String queueName,InitialContext ic) throws Exception {
		MBeanServerConnection mBeanServer = lookupMBeanServerProxy();

		ObjectName serverObjectName = new ObjectName(

		mBeanServer.invoke(serverObjectName, "deployQueue", new Object[] {
				queueName, queueName, 2000, 2, 2 }, new String[] {
				"java.lang.String", "java.lang.String", "int", "int", "int" });

		System.out.println("Queue " + queueName + " deployed");

public static MBeanServerConnection lookupMBeanServerProxy()
			throws Exception {
		Properties p = new Properties();
		p.put(Context.PROVIDER_URL, "jnp://");
		InitialContext ctx = new InitialContext(p);
		return (MBeanServerConnection) ctx.lookup("jmx/invoker/RMIAdaptor");

How can i configure it so that others can not deploy the queue ??

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4141156#4141156

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4141156

More information about the jboss-user mailing list