git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@550449 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Davies 2007-06-25 10:45:55 +00:00
parent db51eba74f
commit d36c0d4de7
71 changed files with 877 additions and 856 deletions

View File

@ -76,6 +76,7 @@ public class PropertiesBrokerFactory implements BrokerFactoryHandler {
} }
} }
properties.load(inputStream); properties.load(inputStream);
inputStream.close();
// should we append any system properties? // should we append any system properties?
try { try {

View File

@ -387,7 +387,7 @@ public class ManagementContext implements Service{
mbeanServer.registerMBean(cl.newInstance(),namingServiceObjectName); mbeanServer.registerMBean(cl.newInstance(),namingServiceObjectName);
// mbeanServer.createMBean("mx4j.tools.naming.NamingService", namingServiceObjectName, null); // mbeanServer.createMBean("mx4j.tools.naming.NamingService", namingServiceObjectName, null);
// set the naming port // set the naming port
Attribute attr=new Attribute("Port",new Integer(connectorPort)); Attribute attr=new Attribute("Port",Integer.valueOf(connectorPort));
mbeanServer.setAttribute(namingServiceObjectName,attr); mbeanServer.setAttribute(namingServiceObjectName,attr);
}catch(Throwable e){ }catch(Throwable e){
log.debug("Failed to create local registry",e); log.debug("Failed to create local registry",e);

View File

@ -124,9 +124,9 @@ public class OpenTypeSupport {
rc.put("JMSReplyTo", ""+m.getJMSReplyTo()); rc.put("JMSReplyTo", ""+m.getJMSReplyTo());
rc.put("JMSType", m.getJMSType()); rc.put("JMSType", m.getJMSType());
rc.put("JMSDeliveryMode", m.getJMSDeliveryMode()==DeliveryMode.PERSISTENT ? "PERSISTENT" : "NON-PERSISTENT"); rc.put("JMSDeliveryMode", m.getJMSDeliveryMode()==DeliveryMode.PERSISTENT ? "PERSISTENT" : "NON-PERSISTENT");
rc.put("JMSExpiration", new Long(m.getJMSExpiration())); rc.put("JMSExpiration", Long.valueOf(m.getJMSExpiration()));
rc.put("JMSPriority", new Integer(m.getJMSPriority())); rc.put("JMSPriority", Integer.valueOf(m.getJMSPriority()));
rc.put("JMSRedelivered", new Boolean(m.getJMSRedelivered())); rc.put("JMSRedelivered", Boolean.valueOf(m.getJMSRedelivered()));
rc.put("JMSTimestamp", new Date(m.getJMSTimestamp())); rc.put("JMSTimestamp", new Date(m.getJMSTimestamp()));
try { try {
rc.put("Properties", ""+m.getProperties()); rc.put("Properties", ""+m.getProperties());
@ -155,9 +155,9 @@ public class OpenTypeSupport {
long length=0; long length=0;
try { try {
length = m.getBodyLength(); length = m.getBodyLength();
rc.put("BodyLength", new Long(length)); rc.put("BodyLength", Long.valueOf(length));
} catch (JMSException e) { } catch (JMSException e) {
rc.put("BodyLength", new Long(0)); rc.put("BodyLength", Long.valueOf(0));
} }
try { try {
byte preview[] = new byte[ (int)Math.min(length, 255) ]; byte preview[] = new byte[ (int)Math.min(length, 255) ];

View File

@ -119,9 +119,9 @@ public class DurableTopicSubscription extends PrefetchSubscription implements Us
MessageReference node=(MessageReference)iter.next(); MessageReference node=(MessageReference)iter.next();
Integer count=(Integer)redeliveredMessages.get(node.getMessageId()); Integer count=(Integer)redeliveredMessages.get(node.getMessageId());
if(count!=null){ if(count!=null){
redeliveredMessages.put(node.getMessageId(),new Integer(count.intValue()+1)); redeliveredMessages.put(node.getMessageId(),Integer.valueOf(count.intValue()+1));
}else{ }else{
redeliveredMessages.put(node.getMessageId(),new Integer(1)); redeliveredMessages.put(node.getMessageId(),Integer.valueOf(1));
} }
if(keepDurableSubsActive){ if(keepDurableSubsActive){
synchronized(pending){ synchronized(pending){

View File

@ -477,7 +477,7 @@ public class ActiveMQMapMessage extends ActiveMQMessage implements MapMessage {
*/ */
public void setByte(String name, byte value) throws JMSException { public void setByte(String name, byte value) throws JMSException {
initializeWriting(); initializeWriting();
put(name, new Byte(value)); put(name, Byte.valueOf(value));
} }
/** /**
@ -491,7 +491,7 @@ public class ActiveMQMapMessage extends ActiveMQMessage implements MapMessage {
*/ */
public void setShort(String name, short value) throws JMSException { public void setShort(String name, short value) throws JMSException {
initializeWriting(); initializeWriting();
put(name, new Short(value)); put(name, Short.valueOf(value));
} }
/** /**
@ -505,7 +505,7 @@ public class ActiveMQMapMessage extends ActiveMQMessage implements MapMessage {
*/ */
public void setChar(String name, char value) throws JMSException { public void setChar(String name, char value) throws JMSException {
initializeWriting(); initializeWriting();
put(name, new Character(value)); put(name, Character.valueOf(value));
} }
/** /**
@ -519,7 +519,7 @@ public class ActiveMQMapMessage extends ActiveMQMessage implements MapMessage {
*/ */
public void setInt(String name, int value) throws JMSException { public void setInt(String name, int value) throws JMSException {
initializeWriting(); initializeWriting();
put(name, new Integer(value)); put(name, Integer.valueOf(value));
} }
/** /**
@ -533,7 +533,7 @@ public class ActiveMQMapMessage extends ActiveMQMessage implements MapMessage {
*/ */
public void setLong(String name, long value) throws JMSException { public void setLong(String name, long value) throws JMSException {
initializeWriting(); initializeWriting();
put(name, new Long(value)); put(name, Long.valueOf(value));
} }
/** /**

View File

@ -53,7 +53,6 @@ public class ActiveMQMessage extends Message implements org.apache.activemq.Mess
} }
transient protected Callback acknowledgeCallback; transient protected Callback acknowledgeCallback;
transient int hashCode;
public Message copy() { public Message copy() {
ActiveMQMessage copy = new ActiveMQMessage(); ActiveMQMessage copy = new ActiveMQMessage();
@ -545,23 +544,23 @@ public class ActiveMQMessage extends Message implements org.apache.activemq.Mess
setBooleanProperty(name,value,true); setBooleanProperty(name,value,true);
} }
public void setBooleanProperty(String name, boolean value,boolean checkReadOnly) throws JMSException { public void setBooleanProperty(String name, boolean value,boolean checkReadOnly) throws JMSException {
setObjectProperty(name, value ? Boolean.TRUE : Boolean.FALSE,checkReadOnly); setObjectProperty(name, Boolean.valueOf(value), checkReadOnly);
} }
public void setByteProperty(String name, byte value) throws JMSException { public void setByteProperty(String name, byte value) throws JMSException {
setObjectProperty(name, new Byte(value)); setObjectProperty(name, Byte.valueOf(value));
} }
public void setShortProperty(String name, short value) throws JMSException { public void setShortProperty(String name, short value) throws JMSException {
setObjectProperty(name, new Short(value)); setObjectProperty(name, Short.valueOf(value));
} }
public void setIntProperty(String name, int value) throws JMSException { public void setIntProperty(String name, int value) throws JMSException {
setObjectProperty(name, new Integer(value)); setObjectProperty(name, Integer.valueOf(value));
} }
public void setLongProperty(String name, long value) throws JMSException { public void setLongProperty(String name, long value) throws JMSException {
setObjectProperty(name, new Long(value)); setObjectProperty(name, Long.valueOf(value));
} }
public void setFloatProperty(String name, float value) throws JMSException { public void setFloatProperty(String name, float value) throws JMSException {

View File

@ -819,16 +819,16 @@ public class ActiveMQStreamMessage extends ActiveMQMessage implements StreamMess
return this.dataIn.readUTF(); return this.dataIn.readUTF();
} }
if (type == MarshallingSupport.LONG_TYPE) { if (type == MarshallingSupport.LONG_TYPE) {
return new Long(this.dataIn.readLong()); return Long.valueOf(this.dataIn.readLong());
} }
if (type == MarshallingSupport.INTEGER_TYPE) { if (type == MarshallingSupport.INTEGER_TYPE) {
return new Integer(this.dataIn.readInt()); return Integer.valueOf(this.dataIn.readInt());
} }
if (type == MarshallingSupport.SHORT_TYPE) { if (type == MarshallingSupport.SHORT_TYPE) {
return new Short(this.dataIn.readShort()); return Short.valueOf(this.dataIn.readShort());
} }
if (type == MarshallingSupport.BYTE_TYPE) { if (type == MarshallingSupport.BYTE_TYPE) {
return new Byte(this.dataIn.readByte()); return Byte.valueOf(this.dataIn.readByte());
} }
if (type == MarshallingSupport.FLOAT_TYPE) { if (type == MarshallingSupport.FLOAT_TYPE) {
return new Float(this.dataIn.readFloat()); return new Float(this.dataIn.readFloat());
@ -840,7 +840,7 @@ public class ActiveMQStreamMessage extends ActiveMQMessage implements StreamMess
return this.dataIn.readBoolean() ? Boolean.TRUE : Boolean.FALSE; return this.dataIn.readBoolean() ? Boolean.TRUE : Boolean.FALSE;
} }
if (type == MarshallingSupport.CHAR_TYPE) { if (type == MarshallingSupport.CHAR_TYPE) {
return new Character(this.dataIn.readChar()); return Character.valueOf(this.dataIn.readChar());
} }
if (type == MarshallingSupport.BYTE_ARRAY_TYPE) { if (type == MarshallingSupport.BYTE_ARRAY_TYPE) {
int len = this.dataIn.readInt(); int len = this.dataIn.readInt();

View File

@ -41,26 +41,26 @@ public abstract class ComparisonExpression extends BinaryExpression implements B
static final private HashSet REGEXP_CONTROL_CHARS = new HashSet(); static final private HashSet REGEXP_CONTROL_CHARS = new HashSet();
static { static {
REGEXP_CONTROL_CHARS.add(new Character('.')); REGEXP_CONTROL_CHARS.add(Character.valueOf('.'));
REGEXP_CONTROL_CHARS.add(new Character('\\')); REGEXP_CONTROL_CHARS.add(Character.valueOf('\\'));
REGEXP_CONTROL_CHARS.add(new Character('[')); REGEXP_CONTROL_CHARS.add(Character.valueOf('['));
REGEXP_CONTROL_CHARS.add(new Character(']')); REGEXP_CONTROL_CHARS.add(Character.valueOf(']'));
REGEXP_CONTROL_CHARS.add(new Character('^')); REGEXP_CONTROL_CHARS.add(Character.valueOf('^'));
REGEXP_CONTROL_CHARS.add(new Character('$')); REGEXP_CONTROL_CHARS.add(Character.valueOf('$'));
REGEXP_CONTROL_CHARS.add(new Character('?')); REGEXP_CONTROL_CHARS.add(Character.valueOf('?'));
REGEXP_CONTROL_CHARS.add(new Character('*')); REGEXP_CONTROL_CHARS.add(Character.valueOf('*'));
REGEXP_CONTROL_CHARS.add(new Character('+')); REGEXP_CONTROL_CHARS.add(Character.valueOf('+'));
REGEXP_CONTROL_CHARS.add(new Character('{')); REGEXP_CONTROL_CHARS.add(Character.valueOf('{'));
REGEXP_CONTROL_CHARS.add(new Character('}')); REGEXP_CONTROL_CHARS.add(Character.valueOf('}'));
REGEXP_CONTROL_CHARS.add(new Character('|')); REGEXP_CONTROL_CHARS.add(Character.valueOf('|'));
REGEXP_CONTROL_CHARS.add(new Character('(')); REGEXP_CONTROL_CHARS.add(Character.valueOf('('));
REGEXP_CONTROL_CHARS.add(new Character(')')); REGEXP_CONTROL_CHARS.add(Character.valueOf(')'));
REGEXP_CONTROL_CHARS.add(new Character(':')); REGEXP_CONTROL_CHARS.add(Character.valueOf(':'));
REGEXP_CONTROL_CHARS.add(new Character('&')); REGEXP_CONTROL_CHARS.add(Character.valueOf('&'));
REGEXP_CONTROL_CHARS.add(new Character('<')); REGEXP_CONTROL_CHARS.add(Character.valueOf('<'));
REGEXP_CONTROL_CHARS.add(new Character('>')); REGEXP_CONTROL_CHARS.add(Character.valueOf('>'));
REGEXP_CONTROL_CHARS.add(new Character('=')); REGEXP_CONTROL_CHARS.add(Character.valueOf('='));
REGEXP_CONTROL_CHARS.add(new Character('!')); REGEXP_CONTROL_CHARS.add(Character.valueOf('!'));
} }
static class LikeExpression extends UnaryExpression implements BooleanExpression { static class LikeExpression extends UnaryExpression implements BooleanExpression {
@ -354,13 +354,13 @@ public abstract class ComparisonExpression extends BinaryExpression implements B
if (lc != rc) { if (lc != rc) {
if (lc == Byte.class) { if (lc == Byte.class) {
if (rc == Short.class) { if (rc == Short.class) {
lv = new Short(((Number) lv).shortValue()); lv = Short.valueOf(((Number) lv).shortValue());
} }
else if (rc == Integer.class) { else if (rc == Integer.class) {
lv = new Integer(((Number) lv).intValue()); lv = Integer.valueOf(((Number) lv).intValue());
} }
else if (rc == Long.class) { else if (rc == Long.class) {
lv = new Long(((Number) lv).longValue()); lv = Long.valueOf(((Number) lv).longValue());
} }
else if (rc == Float.class) { else if (rc == Float.class) {
lv = new Float(((Number) lv).floatValue()); lv = new Float(((Number) lv).floatValue());
@ -373,10 +373,10 @@ public abstract class ComparisonExpression extends BinaryExpression implements B
} }
} else if (lc == Short.class) { } else if (lc == Short.class) {
if (rc == Integer.class) { if (rc == Integer.class) {
lv = new Integer(((Number) lv).intValue()); lv = Integer.valueOf(((Number) lv).intValue());
} }
else if (rc == Long.class) { else if (rc == Long.class) {
lv = new Long(((Number) lv).longValue()); lv = Long.valueOf(((Number) lv).longValue());
} }
else if (rc == Float.class) { else if (rc == Float.class) {
lv = new Float(((Number) lv).floatValue()); lv = new Float(((Number) lv).floatValue());
@ -389,7 +389,7 @@ public abstract class ComparisonExpression extends BinaryExpression implements B
} }
} else if (lc == Integer.class) { } else if (lc == Integer.class) {
if (rc == Long.class) { if (rc == Long.class) {
lv = new Long(((Number) lv).longValue()); lv = Long.valueOf(((Number) lv).longValue());
} }
else if (rc == Float.class) { else if (rc == Float.class) {
lv = new Float(((Number) lv).floatValue()); lv = new Float(((Number) lv).floatValue());
@ -403,7 +403,7 @@ public abstract class ComparisonExpression extends BinaryExpression implements B
} }
else if (lc == Long.class) { else if (lc == Long.class) {
if (rc == Integer.class) { if (rc == Integer.class) {
rv = new Long(((Number) rv).longValue()); rv = Long.valueOf(((Number) rv).longValue());
} }
else if (rc == Float.class) { else if (rc == Float.class) {
lv = new Float(((Number) lv).floatValue()); lv = new Float(((Number) lv).floatValue());

View File

@ -60,25 +60,25 @@ public class ConstantExpression implements Expression {
long l = value.longValue(); long l = value.longValue();
if (Integer.MIN_VALUE <= l && l <= Integer.MAX_VALUE) { if (Integer.MIN_VALUE <= l && l <= Integer.MAX_VALUE) {
value = new Integer(value.intValue()); value = Integer.valueOf(value.intValue());
} }
return new ConstantExpression(value); return new ConstantExpression(value);
} }
public static ConstantExpression createFromHex(String text) { public static ConstantExpression createFromHex(String text) {
Number value = new Long(Long.parseLong(text.substring(2), 16)); Number value = Long.valueOf(Long.parseLong(text.substring(2), 16));
long l = value.longValue(); long l = value.longValue();
if (Integer.MIN_VALUE <= l && l <= Integer.MAX_VALUE) { if (Integer.MIN_VALUE <= l && l <= Integer.MAX_VALUE) {
value = new Integer(value.intValue()); value = Integer.valueOf(value.intValue());
} }
return new ConstantExpression(value); return new ConstantExpression(value);
} }
public static ConstantExpression createFromOctal(String text) { public static ConstantExpression createFromOctal(String text) {
Number value = new Long(Long.parseLong(text, 8)); Number value = Long.valueOf(Long.parseLong(text, 8));
long l = value.longValue(); long l = value.longValue();
if (Integer.MIN_VALUE <= l && l <= Integer.MAX_VALUE) { if (Integer.MIN_VALUE <= l && l <= Integer.MAX_VALUE) {
value = new Integer(value.intValue()); value = Integer.valueOf(value.intValue());
} }
return new ConstantExpression(value); return new ConstantExpression(value);
} }

View File

@ -66,12 +66,12 @@ public class PropertyExpression implements Expression {
}); });
JMS_PROPERTY_EXPRESSIONS.put("JMSDeliveryMode", new SubExpression() { JMS_PROPERTY_EXPRESSIONS.put("JMSDeliveryMode", new SubExpression() {
public Object evaluate(Message message) { public Object evaluate(Message message) {
return new Integer(message.isPersistent() ? DeliveryMode.PERSISTENT : DeliveryMode.NON_PERSISTENT ); return Integer.valueOf(message.isPersistent() ? DeliveryMode.PERSISTENT : DeliveryMode.NON_PERSISTENT );
} }
}); });
JMS_PROPERTY_EXPRESSIONS.put("JMSPriority", new SubExpression() { JMS_PROPERTY_EXPRESSIONS.put("JMSPriority", new SubExpression() {
public Object evaluate(Message message) { public Object evaluate(Message message) {
return new Integer(message.getPriority()); return Integer.valueOf(message.getPriority());
} }
}); });
JMS_PROPERTY_EXPRESSIONS.put("JMSMessageID", new SubExpression() { JMS_PROPERTY_EXPRESSIONS.put("JMSMessageID", new SubExpression() {
@ -83,7 +83,7 @@ public class PropertyExpression implements Expression {
}); });
JMS_PROPERTY_EXPRESSIONS.put("JMSTimestamp", new SubExpression() { JMS_PROPERTY_EXPRESSIONS.put("JMSTimestamp", new SubExpression() {
public Object evaluate(Message message) { public Object evaluate(Message message) {
return new Long(message.getTimestamp()); return Long.valueOf(message.getTimestamp());
} }
}); });
JMS_PROPERTY_EXPRESSIONS.put("JMSCorrelationID", new SubExpression() { JMS_PROPERTY_EXPRESSIONS.put("JMSCorrelationID", new SubExpression() {
@ -93,28 +93,28 @@ public class PropertyExpression implements Expression {
}); });
JMS_PROPERTY_EXPRESSIONS.put("JMSExpiration", new SubExpression() { JMS_PROPERTY_EXPRESSIONS.put("JMSExpiration", new SubExpression() {
public Object evaluate(Message message) { public Object evaluate(Message message) {
return new Long(message.getExpiration()); return Long.valueOf(message.getExpiration());
} }
}); });
JMS_PROPERTY_EXPRESSIONS.put("JMSPriority", new SubExpression() { JMS_PROPERTY_EXPRESSIONS.put("JMSPriority", new SubExpression() {
public Object evaluate(Message message) { public Object evaluate(Message message) {
return new Integer(message.getPriority()); return Integer.valueOf(message.getPriority());
} }
}); });
JMS_PROPERTY_EXPRESSIONS.put("JMSTimestamp", new SubExpression() { JMS_PROPERTY_EXPRESSIONS.put("JMSTimestamp", new SubExpression() {
public Object evaluate(Message message) { public Object evaluate(Message message) {
return new Long(message.getTimestamp()); return Long.valueOf(message.getTimestamp());
} }
}); });
JMS_PROPERTY_EXPRESSIONS.put("JMSRedelivered", new SubExpression() { JMS_PROPERTY_EXPRESSIONS.put("JMSRedelivered", new SubExpression() {
public Object evaluate(Message message) { public Object evaluate(Message message) {
return new Boolean(message.isRedelivered()); return Boolean.valueOf(message.isRedelivered());
} }
}); });
JMS_PROPERTY_EXPRESSIONS.put("JMSXDeliveryCount", new SubExpression() { JMS_PROPERTY_EXPRESSIONS.put("JMSXDeliveryCount", new SubExpression() {
public Object evaluate(Message message) { public Object evaluate(Message message) {
return new Integer(message.getRedeliveryCounter()+1); return Integer.valueOf(message.getRedeliveryCounter()+1);
} }
}); });
JMS_PROPERTY_EXPRESSIONS.put("JMSXGroupID", new SubExpression() { JMS_PROPERTY_EXPRESSIONS.put("JMSXGroupID", new SubExpression() {

View File

@ -195,7 +195,7 @@ public abstract class UnaryExpression implements Expression {
bd = bd.negate(); bd = bd.negate();
if( BD_LONG_MIN_VALUE.compareTo(bd)==0 ) { if( BD_LONG_MIN_VALUE.compareTo(bd)==0 ) {
return new Long(Long.MIN_VALUE); return Long.valueOf(Long.MIN_VALUE);
} }
return bd; return bd;
} }

View File

@ -51,7 +51,7 @@ public final class AsyncDataManager {
private static final Log log=LogFactory.getLog(AsyncDataManager.class); private static final Log log=LogFactory.getLog(AsyncDataManager.class);
public static int CONTROL_RECORD_MAX_LENGTH=1024; public static final int CONTROL_RECORD_MAX_LENGTH=1024;
public static final int ITEM_HEAD_RESERVED_SPACE=21; public static final int ITEM_HEAD_RESERVED_SPACE=21;
// ITEM_HEAD_SPACE = length + type+ reserved space + SOR // ITEM_HEAD_SPACE = length + type+ reserved space + SOR
@ -67,9 +67,9 @@ public final class AsyncDataManager {
public static final byte DATA_ITEM_TYPE=1; public static final byte DATA_ITEM_TYPE=1;
public static final byte REDO_ITEM_TYPE=2; public static final byte REDO_ITEM_TYPE=2;
public static String DEFAULT_DIRECTORY="data"; public static final String DEFAULT_DIRECTORY="data";
public static String DEFAULT_FILE_PREFIX="data-"; public static final String DEFAULT_FILE_PREFIX="data-";
public static int DEFAULT_MAX_FILE_LENGTH=1024*1024*32; public static final int DEFAULT_MAX_FILE_LENGTH=1024*1024*32;
private File directory = new File(DEFAULT_DIRECTORY); private File directory = new File(DEFAULT_DIRECTORY);
private String filePrefix=DEFAULT_FILE_PREFIX; private String filePrefix=DEFAULT_FILE_PREFIX;
@ -314,7 +314,7 @@ public final class AsyncDataManager {
public synchronized void addInterestInFile(int file) throws IOException{ public synchronized void addInterestInFile(int file) throws IOException{
if(file>=0){ if(file>=0){
Integer key=new Integer(file); Integer key=Integer.valueOf(file);
DataFile dataFile=(DataFile) fileMap.get(key); DataFile dataFile=(DataFile) fileMap.get(key);
if(dataFile==null){ if(dataFile==null){
throw new IOException("That data file does not exist"); throw new IOException("That data file does not exist");
@ -331,7 +331,7 @@ public final class AsyncDataManager {
public synchronized void removeInterestInFile(int file) throws IOException{ public synchronized void removeInterestInFile(int file) throws IOException{
if(file>=0){ if(file>=0){
Integer key=new Integer(file); Integer key=Integer.valueOf(file);
DataFile dataFile=(DataFile) fileMap.get(key); DataFile dataFile=(DataFile) fileMap.get(key);
removeInterestInFile(dataFile); removeInterestInFile(dataFile);
} }

View File

@ -352,7 +352,7 @@ class DataFileAppender {
write = (WriteCommand) write.getNext(); write = (WriteCommand) write.getNext();
} }
} }
buff.close();
} catch (IOException e) { } catch (IOException e) {
synchronized( enqueueMutex ) { synchronized( enqueueMutex ) {
firstAsyncException = e; firstAsyncException = e;

View File

@ -41,7 +41,7 @@ import org.apache.commons.logging.LogFactory;
public final class DataManagerImpl implements DataManager { public final class DataManagerImpl implements DataManager {
private static final Log log=LogFactory.getLog(DataManagerImpl.class); private static final Log log=LogFactory.getLog(DataManagerImpl.class);
public static long MAX_FILE_LENGTH=1024*1024*32; public static final long MAX_FILE_LENGTH=1024*1024*32;
private static final String NAME_PREFIX="data-"; private static final String NAME_PREFIX="data-";
private final File dir; private final File dir;
private final String name; private final String name;
@ -239,7 +239,7 @@ public final class DataManagerImpl implements DataManager {
*/ */
public synchronized void addInterestInFile(int file) throws IOException{ public synchronized void addInterestInFile(int file) throws IOException{
if(file>=0){ if(file>=0){
Integer key=new Integer(file); Integer key=Integer.valueOf(file);
DataFile dataFile=(DataFile) fileMap.get(key); DataFile dataFile=(DataFile) fileMap.get(key);
if(dataFile==null){ if(dataFile==null){
dataFile=createAndAddDataFile(file); dataFile=createAndAddDataFile(file);
@ -259,7 +259,7 @@ public final class DataManagerImpl implements DataManager {
*/ */
public synchronized void removeInterestInFile(int file) throws IOException{ public synchronized void removeInterestInFile(int file) throws IOException{
if(file>=0){ if(file>=0){
Integer key=new Integer(file); Integer key=Integer.valueOf(file);
DataFile dataFile=(DataFile) fileMap.get(key); DataFile dataFile=(DataFile) fileMap.get(key);
removeInterestInFile(dataFile); removeInterestInFile(dataFile);
} }

View File

@ -151,7 +151,7 @@ public final class IndexManager{
return result; return result;
} }
long getLength(){ synchronized long getLength(){
return length; return length;
} }

View File

@ -72,9 +72,6 @@ public class ForwardingBridge implements Service{
private boolean dispatchAsync; private boolean dispatchAsync;
private String destinationFilter = ">"; private String destinationFilter = ">";
private int queueDispatched;
private int topicDispatched;
BrokerId localBrokerId; BrokerId localBrokerId;
BrokerId remoteBrokerId; BrokerId remoteBrokerId;
private NetworkBridgeFailedListener bridgeFailedListener; private NetworkBridgeFailedListener bridgeFailedListener;

View File

@ -183,7 +183,7 @@ abstract public class BaseDataStreamMarshaller implements DataStreamMarshaller {
tightUnmarshalString(dataIn, bs), tightUnmarshalString(dataIn, bs),
tightUnmarshalString(dataIn, bs), tightUnmarshalString(dataIn, bs),
tightUnmarshalString(dataIn, bs), tightUnmarshalString(dataIn, bs),
new Integer(dataIn.readInt()) Integer.valueOf(dataIn.readInt())
}); });
} catch (IOException e) { } catch (IOException e) {
throw e; throw e;
@ -484,7 +484,7 @@ abstract public class BaseDataStreamMarshaller implements DataStreamMarshaller {
looseUnmarshalString(dataIn), looseUnmarshalString(dataIn),
looseUnmarshalString(dataIn), looseUnmarshalString(dataIn),
looseUnmarshalString(dataIn), looseUnmarshalString(dataIn),
new Integer(dataIn.readInt()) Integer.valueOf(dataIn.readInt())
}); });
} catch (IOException e) { } catch (IOException e) {
throw e; throw e;

View File

@ -182,7 +182,7 @@ abstract public class BaseDataStreamMarshaller implements DataStreamMarshaller {
tightUnmarshalString(dataIn, bs), tightUnmarshalString(dataIn, bs),
tightUnmarshalString(dataIn, bs), tightUnmarshalString(dataIn, bs),
tightUnmarshalString(dataIn, bs), tightUnmarshalString(dataIn, bs),
new Integer(dataIn.readInt()) Integer.valueOf(dataIn.readInt())
}); });
} catch (IOException e) { } catch (IOException e) {
throw e; throw e;
@ -483,7 +483,7 @@ abstract public class BaseDataStreamMarshaller implements DataStreamMarshaller {
looseUnmarshalString(dataIn), looseUnmarshalString(dataIn),
looseUnmarshalString(dataIn), looseUnmarshalString(dataIn),
looseUnmarshalString(dataIn), looseUnmarshalString(dataIn),
new Integer(dataIn.readInt()) Integer.valueOf(dataIn.readInt())
}); });
} catch (IOException e) { } catch (IOException e) {
throw e; throw e;

View File

@ -108,7 +108,7 @@ public class AuthorizationEntry extends DestinationMapEntry {
paramClass[0] = String.class; paramClass[0] = String.class;
Object[] param = new Object[1]; Object[] param = new Object[1];
param[0] = new String(name); param[0] = name;
try { try {
Class cls = Class.forName(groupClass); Class cls = Class.forName(groupClass);

View File

@ -133,8 +133,8 @@ public class LDAPAuthorizationMap implements AuthorizationMap {
String queueSearchSubtree = (String) options.get(QUEUE_SEARCH_SUBTREE); String queueSearchSubtree = (String) options.get(QUEUE_SEARCH_SUBTREE);
topicSearchMatchingFormat = new MessageFormat(topicSearchMatching); topicSearchMatchingFormat = new MessageFormat(topicSearchMatching);
queueSearchMatchingFormat = new MessageFormat(queueSearchMatching); queueSearchMatchingFormat = new MessageFormat(queueSearchMatching);
topicSearchSubtreeBool = new Boolean(topicSearchSubtree).booleanValue(); topicSearchSubtreeBool = Boolean.valueOf(topicSearchSubtree).booleanValue();
queueSearchSubtreeBool = new Boolean(queueSearchSubtree).booleanValue(); queueSearchSubtreeBool = Boolean.valueOf(queueSearchSubtree).booleanValue();
} }
public Set getTempDestinationAdminACLs() { public Set getTempDestinationAdminACLs() {

View File

@ -162,7 +162,7 @@ public class KahaReferenceStoreAdapter extends KahaPersistenceAdapter implements
} }
synchronized void addInterestInRecordFile(int recordNumber) { synchronized void addInterestInRecordFile(int recordNumber) {
Integer key = new Integer(recordNumber); Integer key = Integer.valueOf(recordNumber);
AtomicInteger rr = recordReferences.get(key); AtomicInteger rr = recordReferences.get(key);
if (rr == null) { if (rr == null) {
rr = new AtomicInteger(); rr = new AtomicInteger();
@ -172,7 +172,7 @@ public class KahaReferenceStoreAdapter extends KahaPersistenceAdapter implements
} }
synchronized void removeInterestInRecordFile(int recordNumber) { synchronized void removeInterestInRecordFile(int recordNumber) {
Integer key = new Integer(recordNumber); Integer key = Integer.valueOf(recordNumber);
AtomicInteger rr = recordReferences.get(key); AtomicInteger rr = recordReferences.get(key);
if (rr != null && rr.decrementAndGet() <= 0) { if (rr != null && rr.decrementAndGet() <= 0) {
recordReferences.remove(key); recordReferences.remove(key);

View File

@ -217,7 +217,7 @@ public class KahaTopicReferenceStore extends KahaReferenceStore implements Topic
if(msg!=null){ if(msg!=null){
recoverReference(listener,msg); recoverReference(listener,msg);
count++; count++;
container.setBatchEntry(msg.getMessageId().toString(),entry); container.setBatchEntry(msg.getMessageId(),entry);
}else { }else {
container.reset(); container.reset();
} }

View File

@ -41,6 +41,7 @@ public class TopicSubContainer {
} }
/** /**
* @param id
* @param batchEntry the batchEntry to set * @param batchEntry the batchEntry to set
*/ */
public void setBatchEntry(String id,StoreEntry batchEntry) { public void setBatchEntry(String id,StoreEntry batchEntry) {

View File

@ -30,7 +30,7 @@ import java.util.concurrent.TimeUnit;
public class Scheduler { public class Scheduler {
static public ScheduledThreadPoolExecutor clockDaemon = new ScheduledThreadPoolExecutor(5, new ThreadFactory(){ public static final ScheduledThreadPoolExecutor clockDaemon = new ScheduledThreadPoolExecutor(5, new ThreadFactory(){
public Thread newThread(Runnable runnable) { public Thread newThread(Runnable runnable) {
Thread thread = new Thread(runnable,"ActiveMQ Scheduler"); Thread thread = new Thread(runnable,"ActiveMQ Scheduler");
thread.setDaemon(true); thread.setDaemon(true);

View File

@ -84,7 +84,7 @@ public class ResponseCorrelator extends TransportFilter{
Response response=(Response)command; Response response=(Response)command;
FutureResponse future=null; FutureResponse future=null;
synchronized(requestMap){ synchronized(requestMap){
future=(FutureResponse)requestMap.remove(new Integer(response.getCorrelationId())); future=(FutureResponse)requestMap.remove(Integer.valueOf(response.getCorrelationId()));
} }
if(future!=null){ if(future!=null){
future.set(response); future.set(response);

View File

@ -51,10 +51,10 @@ public class DefaultReplayBuffer implements ReplayBuffer {
int max = size - 1; int max = size - 1;
while (map.size() >= max) { while (map.size() >= max) {
// lets find things to evict // lets find things to evict
Object evictedBuffer = map.remove(new Integer(++lowestCommandId)); Object evictedBuffer = map.remove(Integer.valueOf(++lowestCommandId));
onEvictedBuffer(lowestCommandId, evictedBuffer); onEvictedBuffer(lowestCommandId, evictedBuffer);
} }
map.put(new Integer(commandId), buffer); map.put(Integer.valueOf(commandId), buffer);
} }
} }
@ -72,7 +72,7 @@ public class DefaultReplayBuffer implements ReplayBuffer {
for (int i = fromCommandId; i <= toCommandId; i++) { for (int i = fromCommandId; i <= toCommandId; i++) {
Object buffer = null; Object buffer = null;
synchronized (lock) { synchronized (lock) {
buffer = map.get(new Integer(i)); buffer = map.get(Integer.valueOf(i));
} }
replayer.sendBuffer(i, buffer); replayer.sendBuffer(i, buffer);
} }

View File

@ -114,7 +114,7 @@ public class ProtocolConverter {
command.setCommandId(generateCommandId()); command.setCommandId(generateCommandId());
if(handler!=null) { if(handler!=null) {
command.setResponseRequired(true); command.setResponseRequired(true);
resposeHandlers.put(new Integer(command.getCommandId()), handler); resposeHandlers.put(Integer.valueOf(command.getCommandId()), handler);
} }
transportFilter.sendToActiveMQ(command); transportFilter.sendToActiveMQ(command);
} }
@ -472,7 +472,7 @@ public class ProtocolConverter {
if ( command.isResponse() ) { if ( command.isResponse() ) {
Response response = (Response) command; Response response = (Response) command;
ResponseHandler rh = (ResponseHandler) resposeHandlers.remove(new Integer(response.getCorrelationId())); ResponseHandler rh = (ResponseHandler) resposeHandlers.remove(Integer.valueOf(response.getCorrelationId()));
if( rh !=null ) { if( rh !=null ) {
rh.onResponse(this, response); rh.onResponse(this, response);
} }

View File

@ -189,6 +189,7 @@ public class StompWireFormat implements WireFormat {
throw new ProtocolException(errorMessage, true); throw new ProtocolException(errorMessage, true);
baos.write(b); baos.write(b);
} }
baos.close();
ByteSequence sequence = baos.toByteSequence(); ByteSequence sequence = baos.toByteSequence();
return new String(sequence.getData(),sequence.getOffset(),sequence.getLength(),"UTF-8"); return new String(sequence.getData(),sequence.getOffset(),sequence.getLength(),"UTF-8");
} }

View File

@ -165,9 +165,9 @@ public class TcpTransportServer extends TransportServerThreadSupport {
} }
else { else {
HashMap options = new HashMap(); HashMap options = new HashMap();
options.put("maxInactivityDuration", new Long(maxInactivityDuration)); options.put("maxInactivityDuration", Long.valueOf(maxInactivityDuration));
options.put("minmumWireFormatVersion", new Integer(minmumWireFormatVersion)); options.put("minmumWireFormatVersion", Integer.valueOf(minmumWireFormatVersion));
options.put("trace", new Boolean(trace)); options.put("trace", Boolean.valueOf(trace));
options.putAll(transportOptions); options.putAll(transportOptions);
WireFormat format = wireFormatFactory.createWireFormat(); WireFormat format = wireFormatFactory.createWireFormat();
Transport transport = createTransport(socket, format); Transport transport = createTransport(socket, format);

View File

@ -155,22 +155,22 @@ public class MarshallingSupport {
Object value=null; Object value=null;
switch( in.readByte() ) { switch( in.readByte() ) {
case BYTE_TYPE: case BYTE_TYPE:
value = new Byte(in.readByte()); value = Byte.valueOf(in.readByte());
break; break;
case BOOLEAN_TYPE: case BOOLEAN_TYPE:
value = in.readBoolean() ? Boolean.TRUE : Boolean.FALSE; value = in.readBoolean() ? Boolean.TRUE : Boolean.FALSE;
break; break;
case CHAR_TYPE: case CHAR_TYPE:
value = new Character(in.readChar()); value = Character.valueOf(in.readChar());
break; break;
case SHORT_TYPE: case SHORT_TYPE:
value = new Short(in.readShort()); value = Short.valueOf(in.readShort());
break; break;
case INTEGER_TYPE: case INTEGER_TYPE:
value = new Integer(in.readInt()); value = Integer.valueOf(in.readInt());
break; break;
case LONG_TYPE: case LONG_TYPE:
value = new Long(in.readLong()); value = Long.valueOf(in.readLong());
break; break;
case FLOAT_TYPE: case FLOAT_TYPE:
value = new Float(in.readFloat()); value = new Float(in.readFloat());
@ -378,6 +378,7 @@ public class MarshallingSupport {
DataByteArrayOutputStream dataOut=new DataByteArrayOutputStream(); DataByteArrayOutputStream dataOut=new DataByteArrayOutputStream();
props.store(dataOut,""); props.store(dataOut,"");
result=new String(dataOut.getData(),0,dataOut.size()); result=new String(dataOut.getData(),0,dataOut.size());
dataOut.close();
} }
return result; return result;
} }
@ -387,6 +388,7 @@ public class MarshallingSupport {
if (str != null && str.length() > 0 ) { if (str != null && str.length() > 0 ) {
DataByteArrayInputStream dataIn = new DataByteArrayInputStream(str.getBytes()); DataByteArrayInputStream dataIn = new DataByteArrayInputStream(str.getBytes());
result.load(dataIn); result.load(dataIn);
dataIn.close();
} }
return result; return result;
} }

View File

@ -32,28 +32,28 @@ public class MemoryIntPropertyEditor extends PropertyEditorSupport {
Pattern p = Pattern.compile("^\\s*(\\d+)\\s*(b)?\\s*$",Pattern.CASE_INSENSITIVE); Pattern p = Pattern.compile("^\\s*(\\d+)\\s*(b)?\\s*$",Pattern.CASE_INSENSITIVE);
Matcher m = p.matcher(text); Matcher m = p.matcher(text);
if (m.matches()) { if (m.matches()) {
setValue(new Integer(Integer.parseInt(m.group(1)))); setValue(Integer.valueOf(Integer.parseInt(m.group(1))));
return; return;
} }
p = Pattern.compile("^\\s*(\\d+)\\s*k(b)?\\s*$",Pattern.CASE_INSENSITIVE); p = Pattern.compile("^\\s*(\\d+)\\s*k(b)?\\s*$",Pattern.CASE_INSENSITIVE);
m = p.matcher(text); m = p.matcher(text);
if (m.matches()) { if (m.matches()) {
setValue(new Integer(Integer.parseInt(m.group(1)) * 1024)); setValue(Integer.valueOf(Integer.parseInt(m.group(1)) * 1024));
return; return;
} }
p = Pattern.compile("^\\s*(\\d+)\\s*m(b)?\\s*$", Pattern.CASE_INSENSITIVE); p = Pattern.compile("^\\s*(\\d+)\\s*m(b)?\\s*$", Pattern.CASE_INSENSITIVE);
m = p.matcher(text); m = p.matcher(text);
if (m.matches()) { if (m.matches()) {
setValue(new Integer(Integer.parseInt(m.group(1)) * 1024 * 1024 )); setValue(Integer.valueOf(Integer.parseInt(m.group(1)) * 1024 * 1024 ));
return; return;
} }
p = Pattern.compile("^\\s*(\\d+)\\s*g(b)?\\s*$", Pattern.CASE_INSENSITIVE); p = Pattern.compile("^\\s*(\\d+)\\s*g(b)?\\s*$", Pattern.CASE_INSENSITIVE);
m = p.matcher(text); m = p.matcher(text);
if (m.matches()) { if (m.matches()) {
setValue(new Integer(Integer.parseInt(m.group(1)) * 1024 * 1024 * 1024 )); setValue(Integer.valueOf(Integer.parseInt(m.group(1)) * 1024 * 1024 * 1024 ));
return; return;
} }

View File

@ -32,28 +32,28 @@ public class MemoryPropertyEditor extends PropertyEditorSupport {
Pattern p = Pattern.compile("^\\s*(\\d+)\\s*(b)?\\s*$",Pattern.CASE_INSENSITIVE); Pattern p = Pattern.compile("^\\s*(\\d+)\\s*(b)?\\s*$",Pattern.CASE_INSENSITIVE);
Matcher m = p.matcher(text); Matcher m = p.matcher(text);
if (m.matches()) { if (m.matches()) {
setValue(new Long(Long.parseLong(m.group(1)))); setValue(Long.valueOf(Long.parseLong(m.group(1))));
return; return;
} }
p = Pattern.compile("^\\s*(\\d+)\\s*k(b)?\\s*$",Pattern.CASE_INSENSITIVE); p = Pattern.compile("^\\s*(\\d+)\\s*k(b)?\\s*$",Pattern.CASE_INSENSITIVE);
m = p.matcher(text); m = p.matcher(text);
if (m.matches()) { if (m.matches()) {
setValue(new Long(Long.parseLong(m.group(1)) * 1024)); setValue(Long.valueOf(Long.parseLong(m.group(1)) * 1024));
return; return;
} }
p = Pattern.compile("^\\s*(\\d+)\\s*m(b)?\\s*$", Pattern.CASE_INSENSITIVE); p = Pattern.compile("^\\s*(\\d+)\\s*m(b)?\\s*$", Pattern.CASE_INSENSITIVE);
m = p.matcher(text); m = p.matcher(text);
if (m.matches()) { if (m.matches()) {
setValue(new Long(Long.parseLong(m.group(1)) * 1024 * 1024 )); setValue(Long.valueOf(Long.parseLong(m.group(1)) * 1024 * 1024 ));
return; return;
} }
p = Pattern.compile("^\\s*(\\d+)\\s*g(b)?\\s*$", Pattern.CASE_INSENSITIVE); p = Pattern.compile("^\\s*(\\d+)\\s*g(b)?\\s*$", Pattern.CASE_INSENSITIVE);
m = p.matcher(text); m = p.matcher(text);
if (m.matches()) { if (m.matches()) {
setValue(new Long(Long.parseLong(m.group(1)) * 1024 * 1024 * 1024 )); setValue(Long.valueOf(Long.parseLong(m.group(1)) * 1024 * 1024 * 1024 ));
return; return;
} }

View File

@ -102,7 +102,7 @@ public class TypeConversionSupport {
Converter longConverter = new Converter() { Converter longConverter = new Converter() {
public Object convert(Object value) { public Object convert(Object value) {
return new Long(((Number) value).longValue()); return Long.valueOf(((Number) value).longValue());
} }
}; };
CONVERSION_MAP.put(new ConversionKey(Byte.class, Long.class), longConverter); CONVERSION_MAP.put(new ConversionKey(Byte.class, Long.class), longConverter);
@ -110,13 +110,13 @@ public class TypeConversionSupport {
CONVERSION_MAP.put(new ConversionKey(Integer.class, Long.class), longConverter); CONVERSION_MAP.put(new ConversionKey(Integer.class, Long.class), longConverter);
CONVERSION_MAP.put(new ConversionKey(Date.class, Long.class), new Converter() { CONVERSION_MAP.put(new ConversionKey(Date.class, Long.class), new Converter() {
public Object convert(Object value) { public Object convert(Object value) {
return new Long(((Date) value).getTime()); return Long.valueOf(((Date) value).getTime());
} }
}); });
Converter intConverter = new Converter() { Converter intConverter = new Converter() {
public Object convert(Object value) { public Object convert(Object value) {
return new Integer(((Number) value).intValue()); return Integer.valueOf(((Number) value).intValue());
} }
}; };
CONVERSION_MAP.put(new ConversionKey(Byte.class, Integer.class), intConverter); CONVERSION_MAP.put(new ConversionKey(Byte.class, Integer.class), intConverter);
@ -124,7 +124,7 @@ public class TypeConversionSupport {
CONVERSION_MAP.put(new ConversionKey(Byte.class, Short.class), new Converter() { CONVERSION_MAP.put(new ConversionKey(Byte.class, Short.class), new Converter() {
public Object convert(Object value) { public Object convert(Object value) {
return new Short(((Number) value).shortValue()); return Short.valueOf(((Number) value).shortValue());
} }
}); });

View File

@ -18,12 +18,20 @@
# #
# The logging properties used for eclipse testing, We want to see debug output on the console. # The logging properties used for eclipse testing, We want to see debug output on the console.
# #
log4j.rootLogger=WARN, out log4j.rootLogger=INFO, out
log4j.logger.org.apache.activemq=DEBUG
# CONSOLE appender not used by default # CONSOLE appender not used by default
log4j.appender.out=org.apache.log4j.ConsoleAppender log4j.appender.out=org.apache.log4j.ConsoleAppender
log4j.appender.out.layout=org.apache.log4j.PatternLayout 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=[%30.30t] %-30.30c{1} %-5p %m%n
#log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n #log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
# File appender
log4j.appender.fout=org.apache.log4j.FileAppender
log4j.appender.fout.layout=org.apache.log4j.PatternLayout
log4j.appender.fout.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
log4j.appender.fout.file=target/amq-testlog.log
log4j.appender.fout.append=true

View File

@ -321,7 +321,7 @@ public class AMQDeadlockTest3 extends TestCase {
} }
private class PooledProducerTask implements Runnable { private static class PooledProducerTask implements Runnable {
private final String queueName; private final String queueName;
@ -377,7 +377,7 @@ public class AMQDeadlockTest3 extends TestCase {
} }
private class NonPooledProducerTask implements Runnable { private static class NonPooledProducerTask implements Runnable {
private final String queueName; private final String queueName;

View File

@ -65,13 +65,13 @@ public class JMSConsumerTest extends JmsTestSupport {
public void initCombosForTestMessageListenerWithConsumerCanBeStopped() { public void initCombosForTestMessageListenerWithConsumerCanBeStopped() {
addCombinationValues("deliveryMode", new Object[] { addCombinationValues("deliveryMode", new Object[] {
new Integer(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.NON_PERSISTENT),
new Integer(DeliveryMode.PERSISTENT) }); Integer.valueOf(DeliveryMode.PERSISTENT) });
addCombinationValues("destinationType", new Object[] { addCombinationValues("destinationType", new Object[] {
new Byte(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.QUEUE_TYPE),
new Byte(ActiveMQDestination.TOPIC_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE),
new Byte(ActiveMQDestination.TEMP_QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE),
new Byte(ActiveMQDestination.TEMP_TOPIC_TYPE) }); Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE) });
} }
public void testMessageListenerWithConsumerCanBeStopped() throws Exception { public void testMessageListenerWithConsumerCanBeStopped() throws Exception {
@ -115,17 +115,17 @@ public class JMSConsumerTest extends JmsTestSupport {
public void initCombosForTestMutiReceiveWithPrefetch1() { public void initCombosForTestMutiReceiveWithPrefetch1() {
addCombinationValues("deliveryMode", new Object[] { addCombinationValues("deliveryMode", new Object[] {
new Integer(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.NON_PERSISTENT),
new Integer(DeliveryMode.PERSISTENT) }); Integer.valueOf(DeliveryMode.PERSISTENT) });
addCombinationValues("ackMode", new Object[] { addCombinationValues("ackMode", new Object[] {
new Integer(Session.AUTO_ACKNOWLEDGE), Integer.valueOf(Session.AUTO_ACKNOWLEDGE),
new Integer(Session.DUPS_OK_ACKNOWLEDGE), Integer.valueOf(Session.DUPS_OK_ACKNOWLEDGE),
new Integer(Session.CLIENT_ACKNOWLEDGE) }); Integer.valueOf(Session.CLIENT_ACKNOWLEDGE) });
addCombinationValues("destinationType", new Object[] { addCombinationValues("destinationType", new Object[] {
new Byte(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.QUEUE_TYPE),
new Byte(ActiveMQDestination.TOPIC_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE),
new Byte(ActiveMQDestination.TEMP_QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE),
new Byte(ActiveMQDestination.TEMP_TOPIC_TYPE) Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)
}); });
} }
@ -155,10 +155,10 @@ public class JMSConsumerTest extends JmsTestSupport {
public void initCombosForTestDurableConsumerSelectorChange() { public void initCombosForTestDurableConsumerSelectorChange() {
addCombinationValues("deliveryMode", new Object[] { addCombinationValues("deliveryMode", new Object[] {
new Integer(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.NON_PERSISTENT),
new Integer(DeliveryMode.PERSISTENT) }); Integer.valueOf(DeliveryMode.PERSISTENT) });
addCombinationValues("destinationType", new Object[] { addCombinationValues("destinationType", new Object[] {
new Byte(ActiveMQDestination.TOPIC_TYPE)}); Byte.valueOf(ActiveMQDestination.TOPIC_TYPE)});
} }
public void testDurableConsumerSelectorChange() throws Exception { public void testDurableConsumerSelectorChange() throws Exception {
@ -200,11 +200,11 @@ public class JMSConsumerTest extends JmsTestSupport {
} }
public void initCombosForTestSendReceiveBytesMessage() { public void initCombosForTestSendReceiveBytesMessage() {
addCombinationValues("deliveryMode", new Object[] { new Integer(DeliveryMode.NON_PERSISTENT), addCombinationValues("deliveryMode", new Object[] { Integer.valueOf(DeliveryMode.NON_PERSISTENT),
new Integer(DeliveryMode.PERSISTENT) }); Integer.valueOf(DeliveryMode.PERSISTENT) });
addCombinationValues("destinationType", new Object[] { new Byte(ActiveMQDestination.QUEUE_TYPE), addCombinationValues("destinationType", new Object[] { Byte.valueOf(ActiveMQDestination.QUEUE_TYPE),
new Byte(ActiveMQDestination.TOPIC_TYPE), new Byte(ActiveMQDestination.TEMP_QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE), Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE),
new Byte(ActiveMQDestination.TEMP_TOPIC_TYPE) }); Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE) });
} }
public void testSendReceiveBytesMessage() throws Exception { public void testSendReceiveBytesMessage() throws Exception {
@ -233,13 +233,13 @@ public class JMSConsumerTest extends JmsTestSupport {
public void initCombosForTestSetMessageListenerAfterStart() { public void initCombosForTestSetMessageListenerAfterStart() {
addCombinationValues("deliveryMode", new Object[] { addCombinationValues("deliveryMode", new Object[] {
new Integer(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.NON_PERSISTENT),
new Integer(DeliveryMode.PERSISTENT) }); Integer.valueOf(DeliveryMode.PERSISTENT) });
addCombinationValues("destinationType", new Object[] { addCombinationValues("destinationType", new Object[] {
new Byte(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.QUEUE_TYPE),
new Byte(ActiveMQDestination.TOPIC_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE),
new Byte(ActiveMQDestination.TEMP_QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE),
new Byte(ActiveMQDestination.TEMP_TOPIC_TYPE) }); Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE) });
} }
public void testSetMessageListenerAfterStart() throws Exception { public void testSetMessageListenerAfterStart() throws Exception {
@ -273,15 +273,15 @@ public class JMSConsumerTest extends JmsTestSupport {
public void initCombosForTestMessageListenerUnackedWithPrefetch1StayInQueue() { public void initCombosForTestMessageListenerUnackedWithPrefetch1StayInQueue() {
addCombinationValues("deliveryMode", new Object[] { addCombinationValues("deliveryMode", new Object[] {
new Integer(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.NON_PERSISTENT),
new Integer(DeliveryMode.PERSISTENT) Integer.valueOf(DeliveryMode.PERSISTENT)
}); });
addCombinationValues("ackMode", new Object[] { addCombinationValues("ackMode", new Object[] {
new Integer(Session.AUTO_ACKNOWLEDGE), Integer.valueOf(Session.AUTO_ACKNOWLEDGE),
new Integer(Session.DUPS_OK_ACKNOWLEDGE), Integer.valueOf(Session.DUPS_OK_ACKNOWLEDGE),
new Integer(Session.CLIENT_ACKNOWLEDGE) Integer.valueOf(Session.CLIENT_ACKNOWLEDGE)
}); });
addCombinationValues("destinationType", new Object[] { new Byte(ActiveMQDestination.QUEUE_TYPE), }); addCombinationValues("destinationType", new Object[] { Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), });
} }
public void testMessageListenerUnackedWithPrefetch1StayInQueue() throws Exception { public void testMessageListenerUnackedWithPrefetch1StayInQueue() throws Exception {
@ -364,13 +364,13 @@ public class JMSConsumerTest extends JmsTestSupport {
public void initCombosForTestMessageListenerWithConsumerWithPrefetch1() { public void initCombosForTestMessageListenerWithConsumerWithPrefetch1() {
addCombinationValues("deliveryMode", new Object[] { addCombinationValues("deliveryMode", new Object[] {
new Integer(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.NON_PERSISTENT),
new Integer(DeliveryMode.PERSISTENT) }); Integer.valueOf(DeliveryMode.PERSISTENT) });
addCombinationValues("destinationType", new Object[] { addCombinationValues("destinationType", new Object[] {
new Byte(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.QUEUE_TYPE),
new Byte(ActiveMQDestination.TOPIC_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE),
new Byte(ActiveMQDestination.TEMP_QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE),
new Byte(ActiveMQDestination.TEMP_TOPIC_TYPE) }); Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE) });
} }
public void testMessageListenerWithConsumerWithPrefetch1() throws Exception { public void testMessageListenerWithConsumerWithPrefetch1() throws Exception {
@ -404,13 +404,13 @@ public class JMSConsumerTest extends JmsTestSupport {
public void initCombosForTestMessageListenerWithConsumer() { public void initCombosForTestMessageListenerWithConsumer() {
addCombinationValues("deliveryMode", new Object[] { addCombinationValues("deliveryMode", new Object[] {
new Integer(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.NON_PERSISTENT),
new Integer(DeliveryMode.PERSISTENT) }); Integer.valueOf(DeliveryMode.PERSISTENT) });
addCombinationValues("destinationType", new Object[] { addCombinationValues("destinationType", new Object[] {
new Byte(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.QUEUE_TYPE),
new Byte(ActiveMQDestination.TOPIC_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE),
new Byte(ActiveMQDestination.TEMP_QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE),
new Byte(ActiveMQDestination.TEMP_TOPIC_TYPE) }); Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE) });
} }
public void testMessageListenerWithConsumer() throws Exception { public void testMessageListenerWithConsumer() throws Exception {
@ -441,11 +441,11 @@ public class JMSConsumerTest extends JmsTestSupport {
} }
public void initCombosForTestUnackedWithPrefetch1StayInQueue() { public void initCombosForTestUnackedWithPrefetch1StayInQueue() {
addCombinationValues("deliveryMode", new Object[] { new Integer(DeliveryMode.NON_PERSISTENT), addCombinationValues("deliveryMode", new Object[] { Integer.valueOf(DeliveryMode.NON_PERSISTENT),
new Integer(DeliveryMode.PERSISTENT) }); Integer.valueOf(DeliveryMode.PERSISTENT) });
addCombinationValues("ackMode", new Object[] { new Integer(Session.AUTO_ACKNOWLEDGE), addCombinationValues("ackMode", new Object[] { Integer.valueOf(Session.AUTO_ACKNOWLEDGE),
new Integer(Session.DUPS_OK_ACKNOWLEDGE), new Integer(Session.CLIENT_ACKNOWLEDGE) }); Integer.valueOf(Session.DUPS_OK_ACKNOWLEDGE), Integer.valueOf(Session.CLIENT_ACKNOWLEDGE) });
addCombinationValues("destinationType", new Object[] { new Byte(ActiveMQDestination.QUEUE_TYPE), }); addCombinationValues("destinationType", new Object[] { Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), });
} }
public void testUnackedWithPrefetch1StayInQueue() throws Exception { public void testUnackedWithPrefetch1StayInQueue() throws Exception {
@ -490,8 +490,8 @@ public class JMSConsumerTest extends JmsTestSupport {
} }
public void initCombosForTestPrefetch1MessageNotDispatched() { public void initCombosForTestPrefetch1MessageNotDispatched() {
addCombinationValues("deliveryMode", new Object[] { new Integer(DeliveryMode.NON_PERSISTENT), addCombinationValues("deliveryMode", new Object[] { Integer.valueOf(DeliveryMode.NON_PERSISTENT),
new Integer(DeliveryMode.PERSISTENT) }); Integer.valueOf(DeliveryMode.PERSISTENT) });
} }
public void testPrefetch1MessageNotDispatched() throws Exception { public void testPrefetch1MessageNotDispatched() throws Exception {
@ -532,9 +532,9 @@ public class JMSConsumerTest extends JmsTestSupport {
} }
public void initCombosForTestDontStart() { public void initCombosForTestDontStart() {
addCombinationValues("deliveryMode", new Object[] { new Integer(DeliveryMode.NON_PERSISTENT), }); addCombinationValues("deliveryMode", new Object[] { Integer.valueOf(DeliveryMode.NON_PERSISTENT), });
addCombinationValues("destinationType", new Object[] { new Byte(ActiveMQDestination.QUEUE_TYPE), addCombinationValues("destinationType", new Object[] { Byte.valueOf(ActiveMQDestination.QUEUE_TYPE),
new Byte(ActiveMQDestination.TOPIC_TYPE), }); Byte.valueOf(ActiveMQDestination.TOPIC_TYPE), });
} }
public void testDontStart() throws Exception { public void testDontStart() throws Exception {
@ -551,9 +551,9 @@ public class JMSConsumerTest extends JmsTestSupport {
} }
public void initCombosForTestStartAfterSend() { public void initCombosForTestStartAfterSend() {
addCombinationValues("deliveryMode", new Object[] { new Integer(DeliveryMode.NON_PERSISTENT), }); addCombinationValues("deliveryMode", new Object[] { Integer.valueOf(DeliveryMode.NON_PERSISTENT), });
addCombinationValues("destinationType", new Object[] { new Byte(ActiveMQDestination.QUEUE_TYPE), addCombinationValues("destinationType", new Object[] { Byte.valueOf(ActiveMQDestination.QUEUE_TYPE),
new Byte(ActiveMQDestination.TOPIC_TYPE), }); Byte.valueOf(ActiveMQDestination.TOPIC_TYPE), });
} }
public void testStartAfterSend() throws Exception { public void testStartAfterSend() throws Exception {
@ -574,11 +574,11 @@ public class JMSConsumerTest extends JmsTestSupport {
} }
public void initCombosForTestReceiveMessageWithConsumer() { public void initCombosForTestReceiveMessageWithConsumer() {
addCombinationValues("deliveryMode", new Object[] { new Integer(DeliveryMode.NON_PERSISTENT), addCombinationValues("deliveryMode", new Object[] { Integer.valueOf(DeliveryMode.NON_PERSISTENT),
new Integer(DeliveryMode.PERSISTENT) }); Integer.valueOf(DeliveryMode.PERSISTENT) });
addCombinationValues("destinationType", new Object[] { new Byte(ActiveMQDestination.QUEUE_TYPE), addCombinationValues("destinationType", new Object[] { Byte.valueOf(ActiveMQDestination.QUEUE_TYPE),
new Byte(ActiveMQDestination.TOPIC_TYPE), new Byte(ActiveMQDestination.TEMP_QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE), Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE),
new Byte(ActiveMQDestination.TEMP_TOPIC_TYPE) }); Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE) });
} }
public void testReceiveMessageWithConsumer() throws Exception { public void testReceiveMessageWithConsumer() throws Exception {

View File

@ -45,8 +45,8 @@ public class JMSExclusiveConsumerTest extends JmsTestSupport {
public int deliveryMode; public int deliveryMode;
public void initCombosForTestRoundRobinDispatchOnNonExclusive() { public void initCombosForTestRoundRobinDispatchOnNonExclusive() {
addCombinationValues("deliveryMode", new Object[] { new Integer(DeliveryMode.NON_PERSISTENT), addCombinationValues("deliveryMode", new Object[] { Integer.valueOf(DeliveryMode.NON_PERSISTENT),
new Integer(DeliveryMode.PERSISTENT) }); Integer.valueOf(DeliveryMode.PERSISTENT) });
} }
/** /**
@ -82,8 +82,8 @@ public class JMSExclusiveConsumerTest extends JmsTestSupport {
} }
public void initCombosForTestDispatchExclusive() { public void initCombosForTestDispatchExclusive() {
addCombinationValues("deliveryMode", new Object[] { new Integer(DeliveryMode.NON_PERSISTENT), addCombinationValues("deliveryMode", new Object[] { Integer.valueOf(DeliveryMode.NON_PERSISTENT),
new Integer(DeliveryMode.PERSISTENT) }); Integer.valueOf(DeliveryMode.PERSISTENT) });
} }
/** /**

View File

@ -65,10 +65,10 @@ public class JMSMessageTest extends JmsTestSupport {
"vm://localhost?marshal=true" "vm://localhost?marshal=true"
}); });
addCombinationValues("deliveryMode", new Object[] { addCombinationValues("deliveryMode", new Object[] {
new Integer(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.NON_PERSISTENT),
new Integer(DeliveryMode.PERSISTENT) }); Integer.valueOf(DeliveryMode.PERSISTENT) });
addCombinationValues("destinationType", new Object[] { addCombinationValues("destinationType", new Object[] {
new Byte(ActiveMQDestination.QUEUE_TYPE)}); Byte.valueOf(ActiveMQDestination.QUEUE_TYPE)});
} }
public void testTextMessage() throws Exception { public void testTextMessage() throws Exception {

View File

@ -50,11 +50,11 @@ public class JMSUsecaseTest extends JmsTestSupport {
public void initCombosForTestQueueBrowser() { public void initCombosForTestQueueBrowser() {
addCombinationValues( "deliveryMode", new Object[]{ addCombinationValues( "deliveryMode", new Object[]{
new Integer(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.NON_PERSISTENT),
new Integer(DeliveryMode.PERSISTENT)} ); Integer.valueOf(DeliveryMode.PERSISTENT)} );
addCombinationValues( "destinationType", new Object[]{ addCombinationValues( "destinationType", new Object[]{
new Byte(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.QUEUE_TYPE),
new Byte(ActiveMQDestination.TEMP_QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE),
} ); } );
} }
public void testQueueBrowser() throws Exception { public void testQueueBrowser() throws Exception {
@ -80,13 +80,13 @@ public class JMSUsecaseTest extends JmsTestSupport {
public void initCombosForTestSendReceive() { public void initCombosForTestSendReceive() {
addCombinationValues( "deliveryMode", new Object[]{ addCombinationValues( "deliveryMode", new Object[]{
new Integer(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.NON_PERSISTENT),
new Integer(DeliveryMode.PERSISTENT)} ); Integer.valueOf(DeliveryMode.PERSISTENT)} );
addCombinationValues( "destinationType", new Object[]{ addCombinationValues( "destinationType", new Object[]{
new Byte(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.QUEUE_TYPE),
new Byte(ActiveMQDestination.TOPIC_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE),
new Byte(ActiveMQDestination.TEMP_QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE),
new Byte(ActiveMQDestination.TEMP_TOPIC_TYPE)} ); Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)} );
} }
public void testSendReceive() throws Exception { public void testSendReceive() throws Exception {
// Send a message to the broker. // Send a message to the broker.
@ -105,13 +105,13 @@ public class JMSUsecaseTest extends JmsTestSupport {
public void initCombosForTestSendReceiveTransacted() { public void initCombosForTestSendReceiveTransacted() {
addCombinationValues( "deliveryMode", new Object[]{ addCombinationValues( "deliveryMode", new Object[]{
new Integer(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.NON_PERSISTENT),
new Integer(DeliveryMode.PERSISTENT)} ); Integer.valueOf(DeliveryMode.PERSISTENT)} );
addCombinationValues( "destinationType", new Object[]{ addCombinationValues( "destinationType", new Object[]{
new Byte(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.QUEUE_TYPE),
new Byte(ActiveMQDestination.TOPIC_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE),
new Byte(ActiveMQDestination.TEMP_QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE),
new Byte(ActiveMQDestination.TEMP_TOPIC_TYPE)} ); Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)} );
} }
public void testSendReceiveTransacted() throws Exception { public void testSendReceiveTransacted() throws Exception {
// Send a message to the broker. // Send a message to the broker.

View File

@ -54,8 +54,8 @@ abstract public class JmsTransactionTestSupport extends TestSupport implements M
protected Destination destination; protected Destination destination;
// for message listener test // for message listener test
private final int messageCount = 5; private static final int messageCount = 5;
private final String messageText = "message"; private static final String messageText = "message";
private List unackMessages = new ArrayList(messageCount); private List unackMessages = new ArrayList(messageCount);
private List ackMessages = new ArrayList(messageCount); private List ackMessages = new ArrayList(messageCount);
private boolean resendPhase = false; private boolean resendPhase = false;

View File

@ -94,7 +94,7 @@ public final class LargeStreamletTest extends TestCase {
}); });
final Thread writerThread = new Thread(new Runnable() { final Thread writerThread = new Thread(new Runnable() {
private final Random random = new Random();
public void run() { public void run() {
totalWritten.set(0); totalWritten.set(0);
int count = MESSAGE_COUNT; int count = MESSAGE_COUNT;
@ -103,7 +103,7 @@ public final class LargeStreamletTest extends TestCase {
.createOutputStream(destination); .createOutputStream(destination);
try { try {
final byte[] buf = new byte[BUFFER_SIZE]; final byte[] buf = new byte[BUFFER_SIZE];
new Random().nextBytes(buf); random.nextBytes(buf);
while (count > 0 && !stopThreads.get()) { while (count > 0 && !stopThreads.get()) {
outputStream.write(buf); outputStream.write(buf);
totalWritten.addAndGet(buf.length); totalWritten.addAndGet(buf.length);

View File

@ -97,25 +97,25 @@ public class LoadTestBurnIn extends JmsTestSupport {
public void initCombosForTestSendReceive() { public void initCombosForTestSendReceive() {
addCombinationValues("deliveryMode", new Object[] { addCombinationValues("deliveryMode", new Object[] {
new Integer(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.NON_PERSISTENT),
new Integer(DeliveryMode.PERSISTENT) }); Integer.valueOf(DeliveryMode.PERSISTENT) });
addCombinationValues("destinationType", new Object[] { addCombinationValues("destinationType", new Object[] {
new Byte(ActiveMQDestination.TOPIC_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE),
// new Byte(ActiveMQDestination.QUEUE_TYPE), // Byte.valueOf(ActiveMQDestination.QUEUE_TYPE),
}); });
addCombinationValues("durableConsumer", new Object[] { addCombinationValues("durableConsumer", new Object[] {
Boolean.TRUE, Boolean.TRUE,
// Boolean.FALSE, // Boolean.FALSE,
}); });
addCombinationValues("messageSize", new Object[] { addCombinationValues("messageSize", new Object[] {
new Integer(101), Integer.valueOf(101),
new Integer(102), Integer.valueOf(102),
new Integer(103), Integer.valueOf(103),
new Integer(104), Integer.valueOf(104),
new Integer(105), Integer.valueOf(105),
new Integer(106), Integer.valueOf(106),
new Integer(107), Integer.valueOf(107),
new Integer(108), Integer.valueOf(108),
}); });
} }

View File

@ -47,8 +47,8 @@ public class BrokerTest extends BrokerTestSupport {
public void initCombosForTestQueuBrowserWith2Consumers() { public void initCombosForTestQueuBrowserWith2Consumers() {
addCombinationValues( "deliveryMode", new Object[]{ addCombinationValues( "deliveryMode", new Object[]{
new Integer(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.NON_PERSISTENT),
new Integer(DeliveryMode.PERSISTENT)} ); Integer.valueOf(DeliveryMode.PERSISTENT)} );
} }
/** /**
@ -114,13 +114,13 @@ public class BrokerTest extends BrokerTestSupport {
public void initCombosForTestConsumerPrefetchAndStandardAck() { public void initCombosForTestConsumerPrefetchAndStandardAck() {
addCombinationValues( "deliveryMode", new Object[]{ addCombinationValues( "deliveryMode", new Object[]{
// new Integer(DeliveryMode.NON_PERSISTENT), // Integer.valueOf(DeliveryMode.NON_PERSISTENT),
new Integer(DeliveryMode.PERSISTENT)} ); Integer.valueOf(DeliveryMode.PERSISTENT)} );
addCombinationValues( "destinationType", new Object[]{ addCombinationValues( "destinationType", new Object[]{
new Byte(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.QUEUE_TYPE),
new Byte(ActiveMQDestination.TOPIC_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE),
new Byte(ActiveMQDestination.TEMP_QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE),
new Byte(ActiveMQDestination.TEMP_TOPIC_TYPE) Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)
} ); } );
} }
@ -168,13 +168,13 @@ public class BrokerTest extends BrokerTestSupport {
public void initCombosForTestTransactedAckWithPrefetchOfOne() { public void initCombosForTestTransactedAckWithPrefetchOfOne() {
addCombinationValues( "deliveryMode", new Object[]{ addCombinationValues( "deliveryMode", new Object[]{
new Integer(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.NON_PERSISTENT),
new Integer(DeliveryMode.PERSISTENT)} ); Integer.valueOf(DeliveryMode.PERSISTENT)} );
addCombinationValues( "destinationType", new Object[]{ addCombinationValues( "destinationType", new Object[]{
new Byte(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.QUEUE_TYPE),
new Byte(ActiveMQDestination.TOPIC_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE),
new Byte(ActiveMQDestination.TEMP_QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE),
new Byte(ActiveMQDestination.TEMP_TOPIC_TYPE) Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)
} ); } );
} }
@ -222,13 +222,13 @@ public class BrokerTest extends BrokerTestSupport {
public void initCombosForTestTransactedSend() { public void initCombosForTestTransactedSend() {
addCombinationValues( "deliveryMode", new Object[]{ addCombinationValues( "deliveryMode", new Object[]{
new Integer(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.NON_PERSISTENT),
new Integer(DeliveryMode.PERSISTENT)} ); Integer.valueOf(DeliveryMode.PERSISTENT)} );
addCombinationValues( "destinationType", new Object[]{ addCombinationValues( "destinationType", new Object[]{
new Byte(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.QUEUE_TYPE),
new Byte(ActiveMQDestination.TOPIC_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE),
new Byte(ActiveMQDestination.TEMP_QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE),
new Byte(ActiveMQDestination.TEMP_TOPIC_TYPE)} ); Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)} );
} }
public void testTransactedSend() throws Exception { public void testTransactedSend() throws Exception {
@ -276,11 +276,11 @@ public class BrokerTest extends BrokerTestSupport {
public void initCombosForTestQueueTransactedAck() { public void initCombosForTestQueueTransactedAck() {
addCombinationValues( "deliveryMode", new Object[]{ addCombinationValues( "deliveryMode", new Object[]{
new Integer(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.NON_PERSISTENT),
new Integer(DeliveryMode.PERSISTENT)} ); Integer.valueOf(DeliveryMode.PERSISTENT)} );
addCombinationValues( "destinationType", new Object[]{ addCombinationValues( "destinationType", new Object[]{
new Byte(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.QUEUE_TYPE),
new Byte(ActiveMQDestination.TEMP_QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE),
} ); } );
} }
@ -329,8 +329,8 @@ public class BrokerTest extends BrokerTestSupport {
public void initCombosForTestConsumerCloseCausesRedelivery() { public void initCombosForTestConsumerCloseCausesRedelivery() {
addCombinationValues( "deliveryMode", new Object[]{ addCombinationValues( "deliveryMode", new Object[]{
new Integer(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.NON_PERSISTENT),
new Integer(DeliveryMode.PERSISTENT)} ); Integer.valueOf(DeliveryMode.PERSISTENT)} );
addCombinationValues( "destination", new Object[]{ addCombinationValues( "destination", new Object[]{
new ActiveMQQueue("TEST")} ); new ActiveMQQueue("TEST")} );
} }
@ -442,8 +442,8 @@ public class BrokerTest extends BrokerTestSupport {
public void initCombosForTestGroupedMessagesDeliveredToOnlyOneConsumer() { public void initCombosForTestGroupedMessagesDeliveredToOnlyOneConsumer() {
addCombinationValues( "deliveryMode", new Object[]{ addCombinationValues( "deliveryMode", new Object[]{
new Integer(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.NON_PERSISTENT),
new Integer(DeliveryMode.PERSISTENT)} ); Integer.valueOf(DeliveryMode.PERSISTENT)} );
} }
public void testGroupedMessagesDeliveredToOnlyOneConsumer() throws Exception { public void testGroupedMessagesDeliveredToOnlyOneConsumer() throws Exception {
@ -503,8 +503,8 @@ public class BrokerTest extends BrokerTestSupport {
public void initCombosForTestTopicConsumerOnlySeeMessagesAfterCreation() { public void initCombosForTestTopicConsumerOnlySeeMessagesAfterCreation() {
addCombinationValues( "deliveryMode", new Object[]{ addCombinationValues( "deliveryMode", new Object[]{
new Integer(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.NON_PERSISTENT),
new Integer(DeliveryMode.PERSISTENT)} ); Integer.valueOf(DeliveryMode.PERSISTENT)} );
addCombinationValues( "durableConsumer", new Object[]{ addCombinationValues( "durableConsumer", new Object[]{
Boolean.TRUE, Boolean.TRUE,
Boolean.FALSE}); Boolean.FALSE});
@ -551,8 +551,8 @@ public class BrokerTest extends BrokerTestSupport {
public void initCombosForTestTopicRetroactiveConsumerSeeMessagesBeforeCreation() { public void initCombosForTestTopicRetroactiveConsumerSeeMessagesBeforeCreation() {
addCombinationValues( "deliveryMode", new Object[]{ addCombinationValues( "deliveryMode", new Object[]{
new Integer(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.NON_PERSISTENT),
new Integer(DeliveryMode.PERSISTENT)} ); Integer.valueOf(DeliveryMode.PERSISTENT)} );
addCombinationValues( "durableConsumer", new Object[]{ addCombinationValues( "durableConsumer", new Object[]{
Boolean.TRUE, Boolean.TRUE,
Boolean.FALSE}); Boolean.FALSE});
@ -611,11 +611,11 @@ public class BrokerTest extends BrokerTestSupport {
// //
// public void initCombosForTestTempDestinationsRemovedOnConnectionClose() { // public void initCombosForTestTempDestinationsRemovedOnConnectionClose() {
// addCombinationValues( "deliveryMode", new Object[]{ // addCombinationValues( "deliveryMode", new Object[]{
// new Integer(DeliveryMode.NON_PERSISTENT), // Integer.valueOf(DeliveryMode.NON_PERSISTENT),
// new Integer(DeliveryMode.PERSISTENT)} ); // Integer.valueOf(DeliveryMode.PERSISTENT)} );
// addCombinationValues( "destinationType", new Object[]{ // addCombinationValues( "destinationType", new Object[]{
// new Byte(ActiveMQDestination.TEMP_QUEUE_TYPE), // Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE),
// new Byte(ActiveMQDestination.TEMP_TOPIC_TYPE)} ); // Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)} );
// } // }
// //
// public void testTempDestinationsRemovedOnConnectionClose() throws Exception { // public void testTempDestinationsRemovedOnConnectionClose() throws Exception {
@ -657,11 +657,11 @@ public class BrokerTest extends BrokerTestSupport {
// public void initCombosForTestTempDestinationsAreNotAutoCreated() { // public void initCombosForTestTempDestinationsAreNotAutoCreated() {
// addCombinationValues( "deliveryMode", new Object[]{ // addCombinationValues( "deliveryMode", new Object[]{
// new Integer(DeliveryMode.NON_PERSISTENT), // Integer.valueOf(DeliveryMode.NON_PERSISTENT),
// new Integer(DeliveryMode.PERSISTENT)} ); // Integer.valueOf(DeliveryMode.PERSISTENT)} );
// addCombinationValues( "destinationType", new Object[]{ // addCombinationValues( "destinationType", new Object[]{
// new Byte(ActiveMQDestination.TEMP_QUEUE_TYPE), // Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE),
// new Byte(ActiveMQDestination.TEMP_TOPIC_TYPE)} ); // Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)} );
// } // }
// //
// //
@ -697,11 +697,11 @@ public class BrokerTest extends BrokerTestSupport {
public void initCombosForTestTempDestinationsOnlyAllowsLocalConsumers() { public void initCombosForTestTempDestinationsOnlyAllowsLocalConsumers() {
addCombinationValues( "deliveryMode", new Object[]{ addCombinationValues( "deliveryMode", new Object[]{
new Integer(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.NON_PERSISTENT),
new Integer(DeliveryMode.PERSISTENT)} ); Integer.valueOf(DeliveryMode.PERSISTENT)} );
addCombinationValues( "destinationType", new Object[]{ addCombinationValues( "destinationType", new Object[]{
new Byte(ActiveMQDestination.TEMP_QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE),
new Byte(ActiveMQDestination.TEMP_TOPIC_TYPE)} ); Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)} );
} }
public void testTempDestinationsOnlyAllowsLocalConsumers() throws Exception { public void testTempDestinationsOnlyAllowsLocalConsumers() throws Exception {
@ -739,8 +739,8 @@ public class BrokerTest extends BrokerTestSupport {
public void initCombosForTestExclusiveQueueDeliversToOnlyOneConsumer() { public void initCombosForTestExclusiveQueueDeliversToOnlyOneConsumer() {
addCombinationValues( "deliveryMode", new Object[]{ addCombinationValues( "deliveryMode", new Object[]{
new Integer(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.NON_PERSISTENT),
new Integer(DeliveryMode.PERSISTENT)} ); Integer.valueOf(DeliveryMode.PERSISTENT)} );
} }
public void testExclusiveQueueDeliversToOnlyOneConsumer() throws Exception { public void testExclusiveQueueDeliversToOnlyOneConsumer() throws Exception {
@ -803,11 +803,11 @@ public class BrokerTest extends BrokerTestSupport {
public void initCombosForTestWildcardConsume() { public void initCombosForTestWildcardConsume() {
addCombinationValues( "deliveryMode", new Object[]{ addCombinationValues( "deliveryMode", new Object[]{
new Integer(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.NON_PERSISTENT),
new Integer(DeliveryMode.PERSISTENT)} ); Integer.valueOf(DeliveryMode.PERSISTENT)} );
addCombinationValues( "destinationType", new Object[]{ addCombinationValues( "destinationType", new Object[]{
new Byte(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.QUEUE_TYPE),
new Byte(ActiveMQDestination.TOPIC_TYPE)} ); Byte.valueOf(ActiveMQDestination.TOPIC_TYPE)} );
} }
public void testWildcardConsume() throws Exception { public void testWildcardConsume() throws Exception {
@ -850,11 +850,11 @@ public class BrokerTest extends BrokerTestSupport {
public void initCombosForTestCompositeConsume() { public void initCombosForTestCompositeConsume() {
addCombinationValues( "deliveryMode", new Object[]{ addCombinationValues( "deliveryMode", new Object[]{
new Integer(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.NON_PERSISTENT),
new Integer(DeliveryMode.PERSISTENT)} ); Integer.valueOf(DeliveryMode.PERSISTENT)} );
addCombinationValues( "destinationType", new Object[]{ addCombinationValues( "destinationType", new Object[]{
new Byte(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.QUEUE_TYPE),
new Byte(ActiveMQDestination.TOPIC_TYPE)} ); Byte.valueOf(ActiveMQDestination.TOPIC_TYPE)} );
} }
public void testCompositeConsume() throws Exception { public void testCompositeConsume() throws Exception {
@ -895,11 +895,11 @@ public class BrokerTest extends BrokerTestSupport {
public void initCombosForTestCompositeSend() { public void initCombosForTestCompositeSend() {
addCombinationValues( "deliveryMode", new Object[]{ addCombinationValues( "deliveryMode", new Object[]{
new Integer(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.NON_PERSISTENT),
new Integer(DeliveryMode.PERSISTENT)} ); Integer.valueOf(DeliveryMode.PERSISTENT)} );
addCombinationValues( "destinationType", new Object[]{ addCombinationValues( "destinationType", new Object[]{
new Byte(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.QUEUE_TYPE),
new Byte(ActiveMQDestination.TOPIC_TYPE)} ); Byte.valueOf(ActiveMQDestination.TOPIC_TYPE)} );
} }
public void testCompositeSend() throws Exception { public void testCompositeSend() throws Exception {
@ -964,8 +964,8 @@ public class BrokerTest extends BrokerTestSupport {
public void initCombosForTestConnectionCloseCascades() { public void initCombosForTestConnectionCloseCascades() {
addCombinationValues( "deliveryMode", new Object[]{ addCombinationValues( "deliveryMode", new Object[]{
new Integer(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.NON_PERSISTENT),
new Integer(DeliveryMode.PERSISTENT)} ); Integer.valueOf(DeliveryMode.PERSISTENT)} );
addCombinationValues( "destination", new Object[]{ addCombinationValues( "destination", new Object[]{
new ActiveMQTopic("TEST"), new ActiveMQTopic("TEST"),
new ActiveMQQueue("TEST")} ); new ActiveMQQueue("TEST")} );
@ -1018,8 +1018,8 @@ public class BrokerTest extends BrokerTestSupport {
public void initCombosForTestSessionCloseCascades() { public void initCombosForTestSessionCloseCascades() {
addCombinationValues( "deliveryMode", new Object[]{ addCombinationValues( "deliveryMode", new Object[]{
new Integer(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.NON_PERSISTENT),
new Integer(DeliveryMode.PERSISTENT)} ); Integer.valueOf(DeliveryMode.PERSISTENT)} );
addCombinationValues( "destination", new Object[]{ addCombinationValues( "destination", new Object[]{
new ActiveMQTopic("TEST"), new ActiveMQTopic("TEST"),
new ActiveMQQueue("TEST")} ); new ActiveMQQueue("TEST")} );
@ -1072,8 +1072,8 @@ public class BrokerTest extends BrokerTestSupport {
public void initCombosForTestConsumerClose() { public void initCombosForTestConsumerClose() {
addCombinationValues( "deliveryMode", new Object[]{ addCombinationValues( "deliveryMode", new Object[]{
new Integer(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.NON_PERSISTENT),
new Integer(DeliveryMode.PERSISTENT)} ); Integer.valueOf(DeliveryMode.PERSISTENT)} );
addCombinationValues( "destination", new Object[]{ addCombinationValues( "destination", new Object[]{
new ActiveMQTopic("TEST"), new ActiveMQTopic("TEST"),
new ActiveMQQueue("TEST")} ); new ActiveMQQueue("TEST")} );
@ -1125,8 +1125,8 @@ public class BrokerTest extends BrokerTestSupport {
} }
public void initCombosForTestTopicNoLocal() { public void initCombosForTestTopicNoLocal() {
addCombinationValues( "deliveryMode", new Object[]{ addCombinationValues( "deliveryMode", new Object[]{
new Integer(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.NON_PERSISTENT),
new Integer(DeliveryMode.PERSISTENT)} ); Integer.valueOf(DeliveryMode.PERSISTENT)} );
} }
public void testTopicNoLocal() throws Exception { public void testTopicNoLocal() throws Exception {
@ -1192,8 +1192,8 @@ public class BrokerTest extends BrokerTestSupport {
public void initCombosForTopicDispatchIsBroadcast() { public void initCombosForTopicDispatchIsBroadcast() {
addCombinationValues( "deliveryMode", new Object[]{ addCombinationValues( "deliveryMode", new Object[]{
new Integer(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.NON_PERSISTENT),
new Integer(DeliveryMode.PERSISTENT)} ); Integer.valueOf(DeliveryMode.PERSISTENT)} );
} }
public void testTopicDispatchIsBroadcast() throws Exception { public void testTopicDispatchIsBroadcast() throws Exception {
@ -1242,11 +1242,11 @@ public class BrokerTest extends BrokerTestSupport {
public void initCombosForTestQueueDispatchedAreRedeliveredOnConsumerClose() { public void initCombosForTestQueueDispatchedAreRedeliveredOnConsumerClose() {
addCombinationValues( "deliveryMode", new Object[]{ addCombinationValues( "deliveryMode", new Object[]{
new Integer(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.NON_PERSISTENT),
new Integer(DeliveryMode.PERSISTENT)} ); Integer.valueOf(DeliveryMode.PERSISTENT)} );
addCombinationValues( "destinationType", new Object[]{ addCombinationValues( "destinationType", new Object[]{
new Byte(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.QUEUE_TYPE),
new Byte(ActiveMQDestination.TEMP_QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE),
} ); } );
} }
@ -1301,11 +1301,11 @@ public class BrokerTest extends BrokerTestSupport {
public void initCombosForTestQueueBrowseMessages() { public void initCombosForTestQueueBrowseMessages() {
addCombinationValues( "deliveryMode", new Object[]{ addCombinationValues( "deliveryMode", new Object[]{
new Integer(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.NON_PERSISTENT),
new Integer(DeliveryMode.PERSISTENT)} ); Integer.valueOf(DeliveryMode.PERSISTENT)} );
addCombinationValues( "destinationType", new Object[]{ addCombinationValues( "destinationType", new Object[]{
new Byte(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.QUEUE_TYPE),
new Byte(ActiveMQDestination.TEMP_QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE),
} ); } );
} }
public void testQueueBrowseMessages() throws Exception { public void testQueueBrowseMessages() throws Exception {
@ -1343,8 +1343,8 @@ public class BrokerTest extends BrokerTestSupport {
public void initCombosForTestQueueOnlyOnceDeliveryWith2Consumers() { public void initCombosForTestQueueOnlyOnceDeliveryWith2Consumers() {
addCombinationValues( "deliveryMode", new Object[]{ addCombinationValues( "deliveryMode", new Object[]{
new Integer(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.NON_PERSISTENT),
new Integer(DeliveryMode.PERSISTENT)} ); Integer.valueOf(DeliveryMode.PERSISTENT)} );
} }
public void testQueueOnlyOnceDeliveryWith2Consumers() throws Exception { public void testQueueOnlyOnceDeliveryWith2Consumers() throws Exception {
@ -1397,11 +1397,11 @@ public class BrokerTest extends BrokerTestSupport {
public void initCombosForTestQueueSendThenAddConsumer() { public void initCombosForTestQueueSendThenAddConsumer() {
addCombinationValues( "deliveryMode", new Object[]{ addCombinationValues( "deliveryMode", new Object[]{
new Integer(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.NON_PERSISTENT),
new Integer(DeliveryMode.PERSISTENT)} ); Integer.valueOf(DeliveryMode.PERSISTENT)} );
addCombinationValues( "destinationType", new Object[]{ addCombinationValues( "destinationType", new Object[]{
new Byte(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.QUEUE_TYPE),
new Byte(ActiveMQDestination.TEMP_QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE),
} ); } );
} }
public void testQueueSendThenAddConsumer() throws Exception { public void testQueueSendThenAddConsumer() throws Exception {
@ -1432,11 +1432,11 @@ public class BrokerTest extends BrokerTestSupport {
public void initCombosForTestQueueAckRemovesMessage() { public void initCombosForTestQueueAckRemovesMessage() {
addCombinationValues( "deliveryMode", new Object[]{ addCombinationValues( "deliveryMode", new Object[]{
new Integer(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.NON_PERSISTENT),
new Integer(DeliveryMode.PERSISTENT)} ); Integer.valueOf(DeliveryMode.PERSISTENT)} );
addCombinationValues( "destinationType", new Object[]{ addCombinationValues( "destinationType", new Object[]{
new Byte(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.QUEUE_TYPE),
new Byte(ActiveMQDestination.TEMP_QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE),
} ); } );
} }
@ -1477,10 +1477,10 @@ public class BrokerTest extends BrokerTestSupport {
new ActiveMQTopic("TEST_TOPIC"), new ActiveMQTopic("TEST_TOPIC"),
new ActiveMQQueue("TEST_QUEUE")} ); new ActiveMQQueue("TEST_QUEUE")} );
addCombinationValues( "destinationType", new Object[]{ addCombinationValues( "destinationType", new Object[]{
new Byte(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.QUEUE_TYPE),
new Byte(ActiveMQDestination.TOPIC_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE),
new Byte(ActiveMQDestination.TEMP_QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE),
new Byte(ActiveMQDestination.TEMP_TOPIC_TYPE)} ); Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)} );
} }
public void testSelectorSkipsMessages() throws Exception { public void testSelectorSkipsMessages() throws Exception {
@ -1518,13 +1518,13 @@ public class BrokerTest extends BrokerTestSupport {
public void initCombosForTestAddConsumerThenSend() { public void initCombosForTestAddConsumerThenSend() {
addCombinationValues( "deliveryMode", new Object[]{ addCombinationValues( "deliveryMode", new Object[]{
new Integer(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.NON_PERSISTENT),
new Integer(DeliveryMode.PERSISTENT)} ); Integer.valueOf(DeliveryMode.PERSISTENT)} );
addCombinationValues( "destinationType", new Object[]{ addCombinationValues( "destinationType", new Object[]{
new Byte(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.QUEUE_TYPE),
new Byte(ActiveMQDestination.TOPIC_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE),
new Byte(ActiveMQDestination.TEMP_QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE),
new Byte(ActiveMQDestination.TEMP_TOPIC_TYPE)} ); Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)} );
} }
public void testAddConsumerThenSend() throws Exception { public void testAddConsumerThenSend() throws Exception {
@ -1552,13 +1552,13 @@ public class BrokerTest extends BrokerTestSupport {
public void initCombosForTestConsumerPrefetchAtOne() { public void initCombosForTestConsumerPrefetchAtOne() {
addCombinationValues( "deliveryMode", new Object[]{ addCombinationValues( "deliveryMode", new Object[]{
new Integer(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.NON_PERSISTENT),
new Integer(DeliveryMode.PERSISTENT)} ); Integer.valueOf(DeliveryMode.PERSISTENT)} );
addCombinationValues( "destinationType", new Object[]{ addCombinationValues( "destinationType", new Object[]{
new Byte(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.QUEUE_TYPE),
new Byte(ActiveMQDestination.TOPIC_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE),
new Byte(ActiveMQDestination.TEMP_QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE),
new Byte(ActiveMQDestination.TEMP_TOPIC_TYPE)} ); Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)} );
} }
public void testConsumerPrefetchAtOne() throws Exception { public void testConsumerPrefetchAtOne() throws Exception {
@ -1591,13 +1591,13 @@ public class BrokerTest extends BrokerTestSupport {
public void initCombosForTestConsumerPrefetchAtTwo() { public void initCombosForTestConsumerPrefetchAtTwo() {
addCombinationValues( "deliveryMode", new Object[]{ addCombinationValues( "deliveryMode", new Object[]{
new Integer(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.NON_PERSISTENT),
new Integer(DeliveryMode.PERSISTENT)} ); Integer.valueOf(DeliveryMode.PERSISTENT)} );
addCombinationValues( "destinationType", new Object[]{ addCombinationValues( "destinationType", new Object[]{
new Byte(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.QUEUE_TYPE),
new Byte(ActiveMQDestination.TOPIC_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE),
new Byte(ActiveMQDestination.TEMP_QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE),
new Byte(ActiveMQDestination.TEMP_TOPIC_TYPE)} ); Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)} );
} }
public void testConsumerPrefetchAtTwo() throws Exception { public void testConsumerPrefetchAtTwo() throws Exception {
@ -1633,13 +1633,13 @@ public class BrokerTest extends BrokerTestSupport {
public void initCombosForTestConsumerPrefetchAndDeliveredAck() { public void initCombosForTestConsumerPrefetchAndDeliveredAck() {
addCombinationValues( "deliveryMode", new Object[]{ addCombinationValues( "deliveryMode", new Object[]{
new Integer(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.NON_PERSISTENT),
new Integer(DeliveryMode.PERSISTENT)} ); Integer.valueOf(DeliveryMode.PERSISTENT)} );
addCombinationValues( "destinationType", new Object[]{ addCombinationValues( "destinationType", new Object[]{
new Byte(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.QUEUE_TYPE),
new Byte(ActiveMQDestination.TOPIC_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE),
new Byte(ActiveMQDestination.TEMP_QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE),
new Byte(ActiveMQDestination.TEMP_TOPIC_TYPE)} ); Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)} );
} }
public void testConsumerPrefetchAndDeliveredAck() throws Exception { public void testConsumerPrefetchAndDeliveredAck() throws Exception {

View File

@ -65,7 +65,7 @@ public class BrokerTestSupport extends CombinationTestSupport {
/** /**
* Setting this to false makes the test run faster but they may be less accurate. * Setting this to false makes the test run faster but they may be less accurate.
*/ */
public static boolean FAST_NO_MESSAGE_LEFT_ASSERT = System.getProperty("FAST_NO_MESSAGE_LEFT_ASSERT", "true").equals("true"); public static final boolean FAST_NO_MESSAGE_LEFT_ASSERT = System.getProperty("FAST_NO_MESSAGE_LEFT_ASSERT", "true").equals("true");
protected RegionBroker regionBroker; protected RegionBroker regionBroker;
protected BrokerService broker; protected BrokerService broker;

View File

@ -54,13 +54,13 @@ public class MessageExpirationTest extends BrokerTestSupport {
public void initCombosForTestMessagesWaitingForUssageDecreaseExpire() { public void initCombosForTestMessagesWaitingForUssageDecreaseExpire() {
addCombinationValues( "deliveryMode", new Object[]{ addCombinationValues( "deliveryMode", new Object[]{
new Integer(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.NON_PERSISTENT),
new Integer(DeliveryMode.PERSISTENT)} ); Integer.valueOf(DeliveryMode.PERSISTENT)} );
addCombinationValues( "destinationType", new Object[]{ addCombinationValues( "destinationType", new Object[]{
new Byte(ActiveMQDestination.TEMP_QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE),
new Byte(ActiveMQDestination.TEMP_TOPIC_TYPE), Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE),
new Byte(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.QUEUE_TYPE),
new Byte(ActiveMQDestination.TOPIC_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE),
} ); } );
} }
@ -162,14 +162,14 @@ public class MessageExpirationTest extends BrokerTestSupport {
*/ */
public void initCombosForTestMessagesInLongTransactionExpire() { public void initCombosForTestMessagesInLongTransactionExpire() {
addCombinationValues( "deliveryMode", new Object[]{ addCombinationValues( "deliveryMode", new Object[]{
new Integer(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.NON_PERSISTENT),
//new Integer(DeliveryMode.PERSISTENT) //Integer.valueOf(DeliveryMode.PERSISTENT)
} ); } );
addCombinationValues( "destinationType", new Object[]{ addCombinationValues( "destinationType", new Object[]{
new Byte(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.QUEUE_TYPE),
new Byte(ActiveMQDestination.TOPIC_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE),
new Byte(ActiveMQDestination.TEMP_QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE),
new Byte(ActiveMQDestination.TEMP_TOPIC_TYPE) Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)
} ); } );
} }
@ -232,25 +232,25 @@ public class MessageExpirationTest extends BrokerTestSupport {
public void TestMessagesInSubscriptionPendingListExpire() { public void TestMessagesInSubscriptionPendingListExpire() {
addCombinationValues( "deliveryMode", new Object[]{ addCombinationValues( "deliveryMode", new Object[]{
new Integer(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.NON_PERSISTENT),
new Integer(DeliveryMode.PERSISTENT)} ); Integer.valueOf(DeliveryMode.PERSISTENT)} );
addCombinationValues( "destinationType", new Object[]{ addCombinationValues( "destinationType", new Object[]{
new Byte(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.QUEUE_TYPE),
new Byte(ActiveMQDestination.TOPIC_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE),
new Byte(ActiveMQDestination.TEMP_QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE),
new Byte(ActiveMQDestination.TEMP_TOPIC_TYPE) Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)
} ); } );
} }
public void initCombosForTestMessagesInSubscriptionPendingListExpire() { public void initCombosForTestMessagesInSubscriptionPendingListExpire() {
addCombinationValues( "deliveryMode", new Object[]{ addCombinationValues( "deliveryMode", new Object[]{
new Integer(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.NON_PERSISTENT),
new Integer(DeliveryMode.PERSISTENT)} ); Integer.valueOf(DeliveryMode.PERSISTENT)} );
addCombinationValues( "destinationType", new Object[]{ addCombinationValues( "destinationType", new Object[]{
new Byte(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.QUEUE_TYPE),
new Byte(ActiveMQDestination.TOPIC_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE),
new Byte(ActiveMQDestination.TEMP_QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE),
new Byte(ActiveMQDestination.TEMP_TOPIC_TYPE) Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)
} ); } );
} }

View File

@ -58,7 +58,7 @@ public class StubBroker implements Broker {
} }
} }
public class RemoveConnectionData { public static class RemoveConnectionData {
public final ConnectionContext connectionContext; public final ConnectionContext connectionContext;
public final ConnectionInfo connectionInfo; public final ConnectionInfo connectionInfo;
public final Throwable error; public final Throwable error;

View File

@ -92,7 +92,7 @@ public class CompositeQueueTest extends EmbeddedBrokerTestSupport {
protected TextMessage createMessage(Session session, int i) throws JMSException { protected TextMessage createMessage(Session session, int i) throws JMSException {
TextMessage textMessage = session.createTextMessage("message: " + i); TextMessage textMessage = session.createTextMessage("message: " + i);
if (i % 2 == 1) { if (i % 2 != 0) {
textMessage.setStringProperty("odd", "yes"); textMessage.setStringProperty("odd", "yes");
} }
textMessage.setIntProperty("i", i); textMessage.setIntProperty("i", i);

View File

@ -46,12 +46,12 @@ public class JmsDurableTopicSlowReceiveTest extends JmsTopicSendReceiveTest{
protected MessageProducer producer2; protected MessageProducer producer2;
protected Destination consumerDestination2; protected Destination consumerDestination2;
BrokerService broker; BrokerService broker;
final int NMSG=100; static final int NMSG=100;
final int MSIZE=256000; static final int MSIZE=256000;
private Connection connection3; private Connection connection3;
private Session consumeSession3; private Session consumeSession3;
private TopicSubscriber consumer3; private TopicSubscriber consumer3;
private final String countProperyName = "count"; private static final String countProperyName = "count";
/** /**
* Set up a durable suscriber test. * Set up a durable suscriber test.

View File

@ -243,11 +243,11 @@ public class ActiveMQBytesMessageTest extends TestCase {
try { try {
msg.writeObject("fred"); msg.writeObject("fred");
msg.writeObject(Boolean.TRUE); msg.writeObject(Boolean.TRUE);
msg.writeObject(new Character('q')); msg.writeObject(Character.valueOf('q'));
msg.writeObject(new Byte((byte) 1)); msg.writeObject(Byte.valueOf((byte) 1));
msg.writeObject(new Short((short) 3)); msg.writeObject(Short.valueOf((short) 3));
msg.writeObject(new Integer(3)); msg.writeObject(Integer.valueOf(3));
msg.writeObject(new Long(300l)); msg.writeObject(Long.valueOf(300l));
msg.writeObject(new Float(3.3f)); msg.writeObject(new Float(3.3f));
msg.writeObject(new Double(3.3)); msg.writeObject(new Double(3.3));
msg.writeObject(new byte[3]); msg.writeObject(new byte[3]);

View File

@ -364,7 +364,7 @@ public class ActiveMQStreamMessageTest extends TestCase {
msg.reset(); msg.reset();
assertTrue(msg.readLong() == test); assertTrue(msg.readLong() == test);
msg.reset(); msg.reset();
assertTrue(msg.readString().equals(new Long(test).toString())); assertTrue(msg.readString().equals(Long.valueOf(test).toString()));
msg.reset(); msg.reset();
try { try {
msg.readBoolean(); msg.readBoolean();

View File

@ -61,6 +61,7 @@ public class SimpleNetworkTest extends TestCase{
public void testRequestReply() throws Exception{ public void testRequestReply() throws Exception{
System.err.println("START TEST!");
final MessageProducer remoteProducer=remoteSession.createProducer(null); final MessageProducer remoteProducer=remoteSession.createProducer(null);
MessageConsumer remoteConsumer=remoteSession.createConsumer(included); MessageConsumer remoteConsumer=remoteSession.createConsumer(included);
remoteConsumer.setMessageListener(new MessageListener(){ remoteConsumer.setMessageListener(new MessageListener(){
@ -88,9 +89,11 @@ public class SimpleNetworkTest extends TestCase{
assertNotNull(result); assertNotNull(result);
log.info(result.getText()); log.info(result.getText());
} }
System.err.println("FIN TEST!");
} }
public void testFiltering() throws Exception{ public void XtestFiltering() throws Exception{
MessageConsumer includedConsumer=remoteSession.createConsumer(included); MessageConsumer includedConsumer=remoteSession.createConsumer(included);
MessageConsumer excludedConsumer=remoteSession.createConsumer(excluded); MessageConsumer excludedConsumer=remoteSession.createConsumer(excluded);
MessageProducer includedProducer=localSession.createProducer(included); MessageProducer includedProducer=localSession.createProducer(included);
@ -101,9 +104,10 @@ public class SimpleNetworkTest extends TestCase{
excludedProducer.send(test); excludedProducer.send(test);
assertNull(excludedConsumer.receive(500)); assertNull(excludedConsumer.receive(500));
assertNotNull(includedConsumer.receive(500)); assertNotNull(includedConsumer.receive(500));
System.err.println("FIN TEST!");
} }
public void testConduitBridge() throws Exception{ public void XtestConduitBridge() throws Exception{
MessageConsumer consumer1=remoteSession.createConsumer(included); MessageConsumer consumer1=remoteSession.createConsumer(included);
MessageConsumer consumer2=remoteSession.createConsumer(included); MessageConsumer consumer2=remoteSession.createConsumer(included);
MessageProducer producer=localSession.createProducer(included); MessageProducer producer=localSession.createProducer(included);
@ -120,7 +124,7 @@ public class SimpleNetworkTest extends TestCase{
assertNull(consumer2.receive(500)); assertNull(consumer2.receive(500));
} }
public void testDurableStoreAndForward() throws Exception{ public void XtestDurableStoreAndForward() throws Exception{
// create a remote durable consumer // create a remote durable consumer
MessageConsumer remoteConsumer=remoteSession.createDurableSubscriber(included,consumerName); MessageConsumer remoteConsumer=remoteSession.createDurableSubscriber(included,consumerName);
Thread.sleep(1000); Thread.sleep(1000);
@ -165,19 +169,10 @@ public class SimpleNetworkTest extends TestCase{
} }
protected void doSetUp() throws Exception{ protected void doSetUp() throws Exception{
Resource resource=new ClassPathResource(getRemoteBrokerURI()); remoteBroker=createRemoteBroker();
BrokerFactoryBean factory=new BrokerFactoryBean(resource);
factory.afterPropertiesSet();
remoteBroker=factory.getBroker();
remoteBroker.start(); remoteBroker.start();
localBroker=createLocalBroker();
resource=new ClassPathResource(getLocalBrokerURI());
factory=new BrokerFactoryBean(resource);
factory.afterPropertiesSet();
localBroker=factory.getBroker();
localBroker.start(); localBroker.start();
URI localURI=localBroker.getVmConnectorURI(); URI localURI=localBroker.getVmConnectorURI();
ActiveMQConnectionFactory fac=new ActiveMQConnectionFactory(localURI); ActiveMQConnectionFactory fac=new ActiveMQConnectionFactory(localURI);
localConnection=fac.createConnection(); localConnection=fac.createConnection();
@ -194,6 +189,7 @@ public class SimpleNetworkTest extends TestCase{
remoteSession=remoteConnection.createSession(false,Session.AUTO_ACKNOWLEDGE); remoteSession=remoteConnection.createSession(false,Session.AUTO_ACKNOWLEDGE);
} }
protected String getRemoteBrokerURI() { protected String getRemoteBrokerURI() {
return "org/apache/activemq/network/remoteBroker.xml"; return "org/apache/activemq/network/remoteBroker.xml";
} }
@ -201,4 +197,22 @@ public class SimpleNetworkTest extends TestCase{
protected String getLocalBrokerURI() { protected String getLocalBrokerURI() {
return "org/apache/activemq/network/localBroker.xml"; return "org/apache/activemq/network/localBroker.xml";
} }
protected BrokerService createBroker(String URI) throws Exception {
Resource resource=new ClassPathResource(URI);
BrokerFactoryBean factory=new BrokerFactoryBean(resource);
resource=new ClassPathResource(URI);
factory=new BrokerFactoryBean(resource);
factory.afterPropertiesSet();
BrokerService result=factory.getBroker();
return result;
}
protected BrokerService createLocalBroker() throws Exception {
return createBroker(getLocalBrokerURI());
}
protected BrokerService createRemoteBroker() throws Exception {
return createBroker(getRemoteBrokerURI());
}
} }

View File

@ -39,7 +39,7 @@ import org.apache.activemq.command.*;
public class ActiveMQTextMessageTest extends ActiveMQMessageTest { public class ActiveMQTextMessageTest extends ActiveMQMessageTest {
public static ActiveMQTextMessageTest SINGLETON = new ActiveMQTextMessageTest(); public static final ActiveMQTextMessageTest SINGLETON = new ActiveMQTextMessageTest();
public Object createObject() throws Exception { public Object createObject() throws Exception {
ActiveMQTextMessage info = new ActiveMQTextMessage(); ActiveMQTextMessage info = new ActiveMQTextMessage();

View File

@ -39,7 +39,7 @@ import org.apache.activemq.command.*;
public class BrokerInfoTest extends BaseCommandTestSupport { public class BrokerInfoTest extends BaseCommandTestSupport {
public static BrokerInfoTest SINGLETON = new BrokerInfoTest(); public static final BrokerInfoTest SINGLETON = new BrokerInfoTest();
public Object createObject() throws Exception { public Object createObject() throws Exception {
BrokerInfo info = new BrokerInfo(); BrokerInfo info = new BrokerInfo();

View File

@ -39,7 +39,7 @@ import org.apache.activemq.command.*;
public class MessageAckTest extends BaseCommandTestSupport { public class MessageAckTest extends BaseCommandTestSupport {
public static MessageAckTest SINGLETON = new MessageAckTest(); public static final MessageAckTest SINGLETON = new MessageAckTest();
public Object createObject() throws Exception { public Object createObject() throws Exception {
MessageAck info = new MessageAck(); MessageAck info = new MessageAck();

View File

@ -36,7 +36,7 @@ public class AMQStoreQueueTest extends SimpleQueueTest{
answer.setPersistenceAdapter(adaptor); answer.setPersistenceAdapter(adaptor);
answer.addConnector(bindAddress); answer.addConnector(bindAddress);
answer.setDeleteAllMessagesOnStartup(true); //answer.setDeleteAllMessagesOnStartup(true);
} }

View File

@ -43,7 +43,7 @@ public class SimpleTopicTest extends TestCase{
protected String DESTINATION_NAME=getClass().getName(); protected String DESTINATION_NAME=getClass().getName();
protected int SAMPLE_COUNT=10; protected int SAMPLE_COUNT=10;
protected long SAMPLE_INTERVAL=1000; protected long SAMPLE_INTERVAL=1000;
protected int NUMBER_OF_CONSUMERS=1; protected int NUMBER_OF_CONSUMERS=10;
protected int NUMBER_OF_PRODUCERS=1; protected int NUMBER_OF_PRODUCERS=1;
protected int PAYLOAD_SIZE=1024; protected int PAYLOAD_SIZE=1024;
protected byte[] array=null; protected byte[] array=null;

View File

@ -51,11 +51,11 @@ public class ProxyConnectorTest extends ProxyTestSupport {
public void initCombosForTestSendAndConsume() { public void initCombosForTestSendAndConsume() {
addCombinationValues( "deliveryMode", new Object[]{ addCombinationValues( "deliveryMode", new Object[]{
new Integer(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.NON_PERSISTENT),
new Integer(DeliveryMode.PERSISTENT) Integer.valueOf(DeliveryMode.PERSISTENT)
} ); } );
addCombinationValues( "destinationType", new Object[]{ addCombinationValues( "destinationType", new Object[]{
new Byte(ActiveMQDestination.TOPIC_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE),
} ); } );
} }
public void testSendAndConsume() throws Exception { public void testSendAndConsume() throws Exception {

View File

@ -48,7 +48,6 @@ import junit.framework.TestCase;
* *
*/ */
public class LDAPAuthorizationMapTest extends TestCase { public class LDAPAuthorizationMapTest extends TestCase {
private HashMap options;
private LDAPAuthorizationMap authMap; private LDAPAuthorizationMap authMap;
protected void setUp() throws Exception { protected void setUp() throws Exception {

View File

@ -104,7 +104,7 @@ public class SimpleSecurityBrokerSystemTest extends SecurityTestSupport {
return new SimpleAuthorizationMap(writeAccess, readAccess, adminAccess); return new SimpleAuthorizationMap(writeAccess, readAccess, adminAccess);
} }
class SimpleAuthenticationFactory implements BrokerPlugin { static class SimpleAuthenticationFactory implements BrokerPlugin {
public Broker installPlugin(Broker broker) { public Broker installPlugin(Broker broker) {
HashMap u = new HashMap(); HashMap u = new HashMap();

View File

@ -49,8 +49,8 @@ public class NestedMapMessageTest extends JmsTopicSendReceiveWithTwoConnectionsA
Map map = (Map) mapMessage.getObject("mapField"); Map map = (Map) mapMessage.getObject("mapField");
assertNotNull(map); assertNotNull(map);
assertEquals("mapField.a", "foo", map.get("a")); assertEquals("mapField.a", "foo", map.get("a"));
assertEquals("mapField.b", new Integer(23), map.get("b")); assertEquals("mapField.b", Integer.valueOf(23), map.get("b"));
assertEquals("mapField.c", new Long(45), map.get("c")); assertEquals("mapField.c", Long.valueOf(45), map.get("c"));
value = map.get("d"); value = map.get("d");
assertTrue("mapField.d should be a Map", value instanceof Map); assertTrue("mapField.d should be a Map", value instanceof Map);
@ -84,8 +84,8 @@ public class NestedMapMessageTest extends JmsTopicSendReceiveWithTwoConnectionsA
Map nestedMap = new HashMap(); Map nestedMap = new HashMap();
nestedMap.put("a", "foo"); nestedMap.put("a", "foo");
nestedMap.put("b", new Integer(23)); nestedMap.put("b", Integer.valueOf(23));
nestedMap.put("c", new Long(45)); nestedMap.put("c", Long.valueOf(45));
nestedMap.put("d", grandChildMap); nestedMap.put("d", grandChildMap);
answer.setObject("mapField", nestedMap); answer.setObject("mapField", nestedMap);

View File

@ -34,7 +34,7 @@ public class DummyMessageQuery implements MessageQuery {
protected static final Log log = LogFactory.getLog(DummyMessageQuery.class); protected static final Log log = LogFactory.getLog(DummyMessageQuery.class);
public static int messageCount = 10; public static final int messageCount = 10;
public void execute(ActiveMQDestination destination, MessageListener listener) throws Exception { public void execute(ActiveMQDestination destination, MessageListener listener) throws Exception {
log.info("Initial query is creating: " + messageCount + " messages"); log.info("Initial query is creating: " + messageCount + " messages");

View File

@ -54,8 +54,8 @@ public class TopicClusterTest extends TestCase implements MessageListener {
protected Destination destination; protected Destination destination;
protected boolean topic = true; protected boolean topic = true;
protected AtomicInteger receivedMessageCount = new AtomicInteger(0); protected AtomicInteger receivedMessageCount = new AtomicInteger(0);
protected static int MESSAGE_COUNT = 50; protected static final int MESSAGE_COUNT = 50;
protected static int NUMBER_IN_CLUSTER = 3; protected static final int NUMBER_IN_CLUSTER = 3;
protected int deliveryMode = DeliveryMode.NON_PERSISTENT; protected int deliveryMode = DeliveryMode.NON_PERSISTENT;
protected MessageProducer[] producers; protected MessageProducer[] producers;
protected Connection[] connections; protected Connection[] connections;

View File

@ -47,8 +47,8 @@ public class FailoverTransportBrokerTest extends NetworkTestSupport {
public void initCombosForTestPublisherFailsOver() { public void initCombosForTestPublisherFailsOver() {
addCombinationValues( "deliveryMode", new Object[]{ addCombinationValues( "deliveryMode", new Object[]{
new Integer(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.NON_PERSISTENT),
new Integer(DeliveryMode.PERSISTENT) Integer.valueOf(DeliveryMode.PERSISTENT)
} ); } );
addCombinationValues( "destination", new Object[]{ addCombinationValues( "destination", new Object[]{
new ActiveMQQueue("TEST"), new ActiveMQQueue("TEST"),

View File

@ -61,8 +61,8 @@ public class FanoutTransportBrokerTest extends NetworkTestSupport {
} }
public void initCombosForTestPublisherFansout() { public void initCombosForTestPublisherFansout() {
addCombinationValues("deliveryMode", new Object[] { new Integer(DeliveryMode.NON_PERSISTENT), addCombinationValues("deliveryMode", new Object[] { Integer.valueOf(DeliveryMode.NON_PERSISTENT),
new Integer(DeliveryMode.PERSISTENT) }); Integer.valueOf(DeliveryMode.PERSISTENT) });
addCombinationValues("destination", new Object[] { new ActiveMQQueue("TEST"), new ActiveMQTopic("TEST"), }); addCombinationValues("destination", new Object[] { new ActiveMQQueue("TEST"), new ActiveMQTopic("TEST"), });
} }
@ -109,8 +109,8 @@ public class FanoutTransportBrokerTest extends NetworkTestSupport {
public void initCombosForTestPublisherWaitsForServerToBeUp() { public void initCombosForTestPublisherWaitsForServerToBeUp() {
addCombinationValues("deliveryMode", new Object[] { new Integer(DeliveryMode.NON_PERSISTENT), addCombinationValues("deliveryMode", new Object[] { Integer.valueOf(DeliveryMode.NON_PERSISTENT),
new Integer(DeliveryMode.PERSISTENT) }); Integer.valueOf(DeliveryMode.PERSISTENT) });
addCombinationValues("destination", new Object[] { new ActiveMQQueue("TEST"), new ActiveMQTopic("TEST"), }); addCombinationValues("destination", new Object[] { new ActiveMQQueue("TEST"), new ActiveMQTopic("TEST"), });
} }
public void testPublisherWaitsForServerToBeUp() throws Exception { public void testPublisherWaitsForServerToBeUp() throws Exception {

View File

@ -48,8 +48,8 @@ public class PeerTransportTest extends TestCase {
protected Log log = LogFactory.getLog(getClass()); protected Log log = LogFactory.getLog(getClass());
protected ActiveMQDestination destination; protected ActiveMQDestination destination;
protected boolean topic = true; protected boolean topic = true;
protected static int MESSAGE_COUNT = 50; protected static final int MESSAGE_COUNT = 50;
protected static int NUMBER_IN_CLUSTER = 3; protected static final int NUMBER_IN_CLUSTER = 3;
protected int deliveryMode = DeliveryMode.NON_PERSISTENT; protected int deliveryMode = DeliveryMode.NON_PERSISTENT;
protected MessageProducer[] producers; protected MessageProducer[] producers;
protected Connection[] connections; protected Connection[] connections;

View File

@ -204,8 +204,8 @@ public class InactivityMonitorTest extends CombinationTestSupport implements Tra
startClient(); startClient();
addCombinationValues("clientInactivityLimit", new Object[] { new Long(1000)}); addCombinationValues("clientInactivityLimit", new Object[] { Long.valueOf(1000)});
addCombinationValues("serverInactivityLimit", new Object[] { new Long(1000)}); addCombinationValues("serverInactivityLimit", new Object[] { Long.valueOf(1000)});
addCombinationValues("serverRunOnCommand", new Object[] { new Runnable() { addCombinationValues("serverRunOnCommand", new Object[] { new Runnable() {
public void run() { public void run() {
try { try {

View File

@ -37,7 +37,6 @@ import org.apache.activemq.wireformat.ObjectStreamWireFormat;
public class SslTransportTest extends TestCase { public class SslTransportTest extends TestCase {
SSLSocket sslSocket; SSLSocket sslSocket;
SslTransport transport;
StubTransportListener stubListener; StubTransportListener stubListener;
String username; String username;

View File

@ -241,7 +241,7 @@ public class AMQDeadlockTestW4Brokers extends TestCase {
return acf; return acf;
} }
private class TestMessageListener1 implements MessageListener { private static class TestMessageListener1 implements MessageListener {
private final long waitTime; private final long waitTime;
final AtomicInteger count = new AtomicInteger(0); final AtomicInteger count = new AtomicInteger(0);

View File

@ -174,7 +174,7 @@ public class AMQFailoverIssue extends TestCase{
} }
} }
private class PooledProducerTask implements Runnable{ private static class PooledProducerTask implements Runnable{
private final String queueName; private final String queueName;
private final PooledConnectionFactory pcf; private final PooledConnectionFactory pcf;

View File

@ -49,7 +49,7 @@ public class ChangeSentMessageTest extends TestSupport {
HashMap map = new HashMap(); HashMap map = new HashMap();
ObjectMessage message = publisherSession.createObjectMessage(); ObjectMessage message = publisherSession.createObjectMessage();
for (int i = 0;i < COUNT;i++) { for (int i = 0;i < COUNT;i++) {
map.put(VALUE_NAME, new Integer(i)); map.put(VALUE_NAME, Integer.valueOf(i));
message.setObject(map); message.setObject(map);
producer.send(message); producer.send(message);
assertTrue(message.getObject()==map); assertTrue(message.getObject()==map);

View File

@ -45,7 +45,7 @@ public class TopicRedeliverTest extends TestSupport {
super(n); super(n);
} }
protected void setup() throws Exception{ protected void setUp() throws Exception{
super.setUp(); super.setUp();
topic = true; topic = true;
} }