qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhupend...@apache.org
Subject svn commit: r526692 - in /incubator/qpid/branches/M2/java: broker/etc/ broker/src/main/java/org/apache/qpid/server/ broker/src/main/java/org/apache/qpid/server/management/ management/eclipse-plugin/bin/ management/eclipse-plugin/src/main/java/org/apach...
Date Mon, 09 Apr 2007 09:45:09 GMT
Author: bhupendrab
Date: Mon Apr  9 02:45:06 2007
New Revision: 526692

URL: http://svn.apache.org/viewvc?view=rev&rev=526692
Log:
QPID-444   : added log statements and some config parameters.
Removed the autoDelete parameter from createNewQueue method used from Management Console.


Modified:
    incubator/qpid/branches/M2/java/broker/etc/persistent_config.xml
    incubator/qpid/branches/M2/java/broker/etc/transient_config.xml
    incubator/qpid/branches/M2/java/broker/src/main/java/org/apache/qpid/server/AMQBrokerManagerMBean.java
    incubator/qpid/branches/M2/java/broker/src/main/java/org/apache/qpid/server/management/JMXManagedObjectRegistry.java
    incubator/qpid/branches/M2/java/broker/src/main/java/org/apache/qpid/server/management/ManagedBroker.java
    incubator/qpid/branches/M2/java/management/eclipse-plugin/bin/qpidmc.sh
    incubator/qpid/branches/M2/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/JMXServerRegistry.java

Modified: incubator/qpid/branches/M2/java/broker/etc/persistent_config.xml
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/M2/java/broker/etc/persistent_config.xml?view=diff&rev=526692&r1=526691&r2=526692
==============================================================================
--- incubator/qpid/branches/M2/java/broker/etc/persistent_config.xml (original)
+++ incubator/qpid/branches/M2/java/broker/etc/persistent_config.xml Mon Apr  9 02:45:06 2007
@@ -37,6 +37,7 @@
     </connector>
     <management>
         <enabled>true</enabled>
+        <jmxport>8999</jmxport>
     </management>
     <advanced>
         <filterchain enableExecutorPool="true"/>

Modified: incubator/qpid/branches/M2/java/broker/etc/transient_config.xml
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/M2/java/broker/etc/transient_config.xml?view=diff&rev=526692&r1=526691&r2=526692
==============================================================================
--- incubator/qpid/branches/M2/java/broker/etc/transient_config.xml (original)
+++ incubator/qpid/branches/M2/java/broker/etc/transient_config.xml Mon Apr  9 02:45:06 2007
@@ -37,6 +37,7 @@
     </connector>
     <management>
         <enabled>true</enabled>
+        <jmxport>8999</jmxport>
     </management>
     <advanced>
         <filterchain enableExecutorPool="true"/>

Modified: incubator/qpid/branches/M2/java/broker/src/main/java/org/apache/qpid/server/AMQBrokerManagerMBean.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/M2/java/broker/src/main/java/org/apache/qpid/server/AMQBrokerManagerMBean.java?view=diff&rev=526692&r1=526691&r2=526692
==============================================================================
--- incubator/qpid/branches/M2/java/broker/src/main/java/org/apache/qpid/server/AMQBrokerManagerMBean.java
(original)
+++ incubator/qpid/branches/M2/java/broker/src/main/java/org/apache/qpid/server/AMQBrokerManagerMBean.java
Mon Apr  9 02:45:06 2007
@@ -140,8 +140,7 @@
      * @param autoDelete
      * @throws JMException
      */
-    public void createNewQueue(String queueName, String owner, boolean durable,boolean autoDelete)
-            throws JMException
+    public void createNewQueue(String queueName, String owner, boolean durable) throws JMException
     {
         AMQQueue queue = _queueRegistry.getQueue(new AMQShortString(queueName));
         if (queue != null)
@@ -156,7 +155,7 @@
             {
                 ownerShortString = new AMQShortString(owner);
             }
-            queue = new AMQQueue(new AMQShortString(queueName), durable, ownerShortString,
autoDelete, getVirtualHost());
+            queue = new AMQQueue(new AMQShortString(queueName), durable, ownerShortString,
false, getVirtualHost());
             if (queue.isDurable() && !queue.isAutoDelete())
             {
                 _messageStore.createQueue(queue);

Modified: incubator/qpid/branches/M2/java/broker/src/main/java/org/apache/qpid/server/management/JMXManagedObjectRegistry.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/M2/java/broker/src/main/java/org/apache/qpid/server/management/JMXManagedObjectRegistry.java?view=diff&rev=526692&r1=526691&r2=526692
==============================================================================
--- incubator/qpid/branches/M2/java/broker/src/main/java/org/apache/qpid/server/management/JMXManagedObjectRegistry.java
(original)
+++ incubator/qpid/branches/M2/java/broker/src/main/java/org/apache/qpid/server/management/JMXManagedObjectRegistry.java
Mon Apr  9 02:45:06 2007
@@ -124,11 +124,13 @@
                     MBeanServerForwarder mbsf = MBeanInvocationHandlerImpl.newProxyInstance();
                     cs.setMBeanServerForwarder(mbsf);
                     cs.start();
+                    _log.info("JMX: Starting JMXConnector server with SASL");
                 }
                 catch (java.net.MalformedURLException urlException)
                 {
                     // When JMXMPConnector is not available
                     // java.net.MalformedURLException: Unsupported protocol: jmxmp
+                    _log.info("JMX: Starting JMXConnector server");
                     startJMXConnectorServer(port);
                 }
             }

Modified: incubator/qpid/branches/M2/java/broker/src/main/java/org/apache/qpid/server/management/ManagedBroker.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/M2/java/broker/src/main/java/org/apache/qpid/server/management/ManagedBroker.java?view=diff&rev=526692&r1=526691&r2=526692
==============================================================================
--- incubator/qpid/branches/M2/java/broker/src/main/java/org/apache/qpid/server/management/ManagedBroker.java
(original)
+++ incubator/qpid/branches/M2/java/broker/src/main/java/org/apache/qpid/server/management/ManagedBroker.java
Mon Apr  9 02:45:06 2007
@@ -81,8 +81,7 @@
     @MBeanOperation(name="createNewQueue", description="Create a new Queue on the Broker
server", impact= MBeanOperationInfo.ACTION)
     void createNewQueue(@MBeanOperationParameter(name="queue name", description="Name of
the new queue")String queueName,
                         @MBeanOperationParameter(name="owner", description="Owner name")String
owner,
-                        @MBeanOperationParameter(name="durable", description="true if the
queue should be durable")boolean durable,
-                        @MBeanOperationParameter(name="autoDelete", description="true if
the queue should be auto delete") boolean autoDelete)
+                        @MBeanOperationParameter(name="durable", description="true if the
queue should be durable")boolean durable)
         throws IOException, JMException;
 
     /**

Modified: incubator/qpid/branches/M2/java/management/eclipse-plugin/bin/qpidmc.sh
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/M2/java/management/eclipse-plugin/bin/qpidmc.sh?view=diff&rev=526692&r1=526691&r2=526692
==============================================================================
--- incubator/qpid/branches/M2/java/management/eclipse-plugin/bin/qpidmc.sh (original)
+++ incubator/qpid/branches/M2/java/management/eclipse-plugin/bin/qpidmc.sh Mon Apr  9 02:45:06
2007
@@ -61,4 +61,4 @@
     os="linux"
 fi
 
-"$JAVA_HOME/bin/java" -Xms40m -Xmx256m -Declipse.consoleLog=false -jar $QPIDMC_HOME/eclipse/startup.jar
org.eclipse.core.launcher.Main -launcher $QPIDMC_HOME/eclipse/eclipse -name "Qpid Management
Console" -showsplash 600 -configuration "file:$QPIDMC_HOME/configuration" -os $os -ws $ws
-arch $arch
+"$JAVA_HOME/bin/java" -Xms40m -Xmx256m -Declipse.consoleLog=false -Dsecurity=true -jar $QPIDMC_HOME/eclipse/startup.jar
org.eclipse.core.launcher.Main -launcher $QPIDMC_HOME/eclipse/eclipse -name "Qpid Management
Console" -showsplash 600 -configuration "file:$QPIDMC_HOME/configuration" -os $os -ws $ws
-arch $arch

Modified: incubator/qpid/branches/M2/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/JMXServerRegistry.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/M2/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/JMXServerRegistry.java?view=diff&rev=526692&r1=526691&r2=526692
==============================================================================
--- incubator/qpid/branches/M2/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/JMXServerRegistry.java
(original)
+++ incubator/qpid/branches/M2/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/JMXServerRegistry.java
Mon Apr  9 02:45:06 2007
@@ -53,7 +53,6 @@
 
 public class JMXServerRegistry extends ServerRegistry
 {
-    private boolean _securityEnabled = false;
     private ObjectName _serverObjectName = null;
     private JMXConnector _jmxc = null;
     private MBeanServerConnection _mbsc = null;
@@ -90,36 +89,37 @@
         super(server);
         JMXServiceURL jmxUrl = new JMXServiceURL(server.getUrl());
         Map<String, Object> env = null;
-        
-        //String[] creds = {server.getUser(), server.getPassword()};
-        //env.put(JMXConnector.CREDENTIALS, creds);
        
         if (ApplicationRegistry.enableSecurity)
-        {
-            Security.addProvider(new SaslProvider());
-            jmxUrl = new JMXServiceURL("jmxmp", null, server.getPort());
-            //jmxUrl = new JMXServiceURL("service:jmx:jmxmp://localhost:8999");
-            
-            env = new HashMap<String, Object>();
-            env.put("jmx.remote.profiles", "SASL/PLAIN");
-            //env.put("jmx.remote.profiles", "SASL/CRAM-MD5"); 
-            env.put("jmx.remote.sasl.callback.handler",
-                    new UserPasswordCallbackHandler(server.getUser(), server.getPassword()));
                     
+        {                                
             try
             {
+                // Check if the JMXMP connector is available
                 Class klass = Class.forName("javax.management.remote.jmxmp.JMXMPConnector");
+                
+                // Now create the instance of JMXMPConnector
+                Security.addProvider(new SaslProvider());
+                jmxUrl = new JMXServiceURL("jmxmp", null, server.getPort());
+                
+                env = new HashMap<String, Object>();
+                env.put("jmx.remote.profiles", "SASL/PLAIN");
+                //env.put("jmx.remote.profiles", "SASL/CRAM-MD5"); 
+                env.put("jmx.remote.sasl.callback.handler",
+                        new UserPasswordCallbackHandler(server.getUser(), server.getPassword()));

+                
                 Class[] paramTypes = {JMXServiceURL.class, Map.class};                  
        
                 Constructor cons = klass.getConstructor(paramTypes);
                 
                 Object[] args = {jmxUrl, env};           
                 Object theObject = cons.newInstance(args);
                 _jmxc = (JMXConnector)theObject;
-                //_jmxc = new JMXMPConnector(jmxUrl, env);
                 _jmxc.connect();
+                System.out.println("Starting JMXConnector with SASL");
             }
             catch (Exception ex)
             {
                 // When JMXMPConnector is not available
+                System.out.println("Starting JMXConnector");                
                 jmxUrl = new JMXServiceURL(server.getUrl());
                 _jmxc = JMXConnectorFactory.connect(jmxUrl, null);
             }



Mime
View raw message