- Fix NPE due to JMX problem

- Made the maven setting a little more eclipse freindly.



git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@384438 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Hiram R. Chirino 2006-03-09 05:41:08 +00:00
parent d34b2fe072
commit c4e99fe48b
8 changed files with 56 additions and 34 deletions

View File

@ -2,7 +2,13 @@
# Build Properties
# -------------------------------------------------------------------
maven.multiproject.type=jar
maven.eclipse.classpath.include=src/main/resources,src/test/resources,src/gram/java,target/generated
maven.eclipse.classpath.include=\
${basedir}/src/main/resources,\
${basedir}/src/test/eclipse-resources,\
${basedir}/src/test/resources,\
${basedir}/src/gram/java,\
${basedir}/target/generated
openwire.version=1

View File

@ -13,8 +13,27 @@
*/
package org.apache.activemq.broker.jmx;
import edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap;
import edu.emory.mathcs.backport.java.util.concurrent.CopyOnWriteArraySet;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.Map.Entry;
import javax.management.InstanceNotFoundException;
import javax.management.MBeanServer;
import javax.management.MalformedObjectNameException;
import javax.management.ObjectName;
import javax.management.openmbean.CompositeData;
import javax.management.openmbean.CompositeDataSupport;
import javax.management.openmbean.CompositeType;
import javax.management.openmbean.OpenDataException;
import javax.management.openmbean.TabularData;
import javax.management.openmbean.TabularDataSupport;
import javax.management.openmbean.TabularType;
import org.apache.activemq.broker.Broker;
import org.apache.activemq.broker.BrokerService;
@ -44,28 +63,8 @@ import org.apache.activemq.util.SubscriptionKey;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import javax.management.InstanceNotFoundException;
import javax.management.MBeanRegistrationException;
import javax.management.MBeanServer;
import javax.management.MalformedObjectNameException;
import javax.management.ObjectName;
import javax.management.openmbean.CompositeData;
import javax.management.openmbean.CompositeDataSupport;
import javax.management.openmbean.CompositeType;
import javax.management.openmbean.OpenDataException;
import javax.management.openmbean.TabularData;
import javax.management.openmbean.TabularDataSupport;
import javax.management.openmbean.TabularType;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.Map.Entry;
import edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap;
import edu.emory.mathcs.backport.java.util.concurrent.CopyOnWriteArraySet;
public class ManagedRegionBroker extends RegionBroker{
private static final Log log=LogFactory.getLog(ManagedRegionBroker.class);
@ -167,7 +166,7 @@ public class ManagedRegionBroker extends RegionBroker{
public void registerSubscription(ConnectionContext context,Subscription sub){
SubscriptionKey key = new SubscriptionKey(context.getClientId(),sub.getConsumerInfo().getSubcriptionName());
Hashtable map=brokerObjectName.getKeyPropertyList();
String name = key.toString() + ":" + sub.getConsumerInfo().getConsumerId().toString();
String name = key.toString();
try{
ObjectName objectName = new ObjectName(

View File

@ -0,0 +1,12 @@
#
# The logging properties used for eclipse testing, We want to see debug output on the console.
#
log4j.rootLogger=DEBUG, out
log4j.logger.org.apache.activemq.spring=WARN
# CONSOLE appender not used by default
log4j.appender.out=org.apache.log4j.ConsoleAppender
log4j.appender.out.layout=org.apache.log4j.PatternLayout
log4j.appender.out.layout.ConversionPattern=[%30.30t] %-30.30c{1} %-5p %m%n
#log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n

View File

@ -7,6 +7,6 @@ http://cvs.apache.org/repository
# Build Properties
# -------------------------------------------------------------------
maven.multiproject.type=jar
maven.eclipse.classpath.include=src/test/resources
maven.eclipse.classpath.include=${basedir}/src/test/resources
maven.junit.jvmargs=-Djava.security.auth.login.config=src/test/resources/login.config

View File

@ -7,7 +7,7 @@ http://cvs.apache.org/repository
# Build Properties
# -------------------------------------------------------------------
maven.multiproject.type=jar
maven.eclipse.classpath.include=src/test/resources
maven.eclipse.classpath.include=${basedir}/src/test/resources
maven.changelog.range=730

View File

@ -20,4 +20,4 @@ http://www.openejb.org/maven
maven.jar.mainclass = org.apache.activemq.console.Main
maven.eclipse.classpath.include=src/test/resources
maven.eclipse.classpath.include=${basedir}/src/test/resources

View File

@ -29,16 +29,15 @@
</persistenceAdapter>
<transportConnectors>
<transportConnector uri="tcp://localhost:61616" discoveryUri="multicast://default"/>
<transportConnector uri="stomp://localhost:61617"/>
<transportConnector name="default" uri="tcp://localhost:61616" discoveryUri="multicast://default"/>
<transportConnector name="stomp" uri="stomp://localhost:61617"/>
</transportConnectors>
<networkConnectors>
<!-- by default just auto discover the other brokers -->
<networkConnector uri="multicast://default"/>
<networkConnector name="default" uri="multicast://default"/>
<!--
<networkConnector uri="static://(tcp://host1:61616,tcp://host2:61616)"/>
<networkConnector name="host1 and host2" uri="static://(tcp://host1:61616,tcp://host2:61616)"/>
-->
</networkConnectors>

View File

@ -42,6 +42,12 @@ http://jakarta.apache.org/commons/logging/apidocs
maven.javadoc.additionalparam = -linksource
# -------------------------------------------------------------------
# Eclipse IDE Properties
# -------------------------------------------------------------------
maven.eclipse.output.dir=${basedir}/target/eclipse
maven.eclipse.test.output.dir=${basedir}target/eclipse
# -------------------------------------------------------------------
# Checkstyle Properties
# -------------------------------------------------------------------