[jboss-cvs] JBoss Messaging SVN: r3803 - in trunk/src/main/org/jboss/messaging/core: client/impl and 7 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Feb 26 14:10:31 EST 2008
Author: timfox
Date: 2008-02-26 14:10:31 -0500 (Tue, 26 Feb 2008)
New Revision: 3803
Modified:
trunk/src/main/org/jboss/messaging/core/channelfactory/impl/MultiplexerChannelFactory.java
trunk/src/main/org/jboss/messaging/core/channelfactory/impl/XMLChannelFactory.java
trunk/src/main/org/jboss/messaging/core/client/impl/ClientBrowserImpl.java
trunk/src/main/org/jboss/messaging/core/client/impl/ClientConnectionFactoryImpl.java
trunk/src/main/org/jboss/messaging/core/client/impl/ClientConnectionImpl.java
trunk/src/main/org/jboss/messaging/core/client/impl/ClientConsumerImpl.java
trunk/src/main/org/jboss/messaging/core/client/impl/ClientConsumerPacketHandler.java
trunk/src/main/org/jboss/messaging/core/client/impl/ClientProducerImpl.java
trunk/src/main/org/jboss/messaging/core/client/impl/ClientSessionImpl.java
trunk/src/main/org/jboss/messaging/core/client/impl/RemotingConnectionImpl.java
trunk/src/main/org/jboss/messaging/core/filter/impl/FilterImpl.java
trunk/src/main/org/jboss/messaging/core/filter/impl/Identifier.java
trunk/src/main/org/jboss/messaging/core/filter/impl/Operator.java
trunk/src/main/org/jboss/messaging/core/filter/impl/RegExp.java
trunk/src/main/org/jboss/messaging/core/list/impl/PriorityLinkedListImpl.java
trunk/src/main/org/jboss/messaging/core/management/impl/MessagingServerManagementImpl.java
trunk/src/main/org/jboss/messaging/core/persistence/impl/bdbje/integration/RealBDBJEDatabase.java
trunk/src/main/org/jboss/messaging/core/persistence/impl/bdbje/integration/RealBDBJEEnvironment.java
trunk/src/main/org/jboss/messaging/core/persistence/impl/bdbje/integration/RealBDBJETransaction.java
trunk/src/main/org/jboss/messaging/core/security/CheckType.java
trunk/src/main/org/jboss/messaging/core/security/Role.java
trunk/src/main/org/jboss/messaging/core/security/impl/SecurityStoreImpl.java
trunk/src/main/org/jboss/messaging/core/server/impl/BindingImpl.java
trunk/src/main/org/jboss/messaging/core/server/impl/DeliveryImpl.java
trunk/src/main/org/jboss/messaging/core/server/impl/MessageImpl.java
trunk/src/main/org/jboss/messaging/core/server/impl/MessageReferenceImpl.java
trunk/src/main/org/jboss/messaging/core/server/impl/PostOfficeImpl.java
trunk/src/main/org/jboss/messaging/core/server/impl/QueueImpl.java
trunk/src/main/org/jboss/messaging/core/server/impl/ResourceManagerImpl.java
trunk/src/main/org/jboss/messaging/core/server/impl/ServerBrowserImpl.java
trunk/src/main/org/jboss/messaging/core/server/impl/ServerConsumerImpl.java
trunk/src/main/org/jboss/messaging/core/server/impl/ServerPacketHandlerSupport.java
trunk/src/main/org/jboss/messaging/core/server/impl/ServerProducerImpl.java
trunk/src/main/org/jboss/messaging/core/server/impl/ServerProducerPacketHandler.java
trunk/src/main/org/jboss/messaging/core/server/impl/ServerSessionImpl.java
trunk/src/main/org/jboss/messaging/core/server/impl/TransactionImpl.java
trunk/src/main/org/jboss/messaging/core/server/impl/XidImpl.java
Log:
Final fields and method params
Modified: trunk/src/main/org/jboss/messaging/core/channelfactory/impl/MultiplexerChannelFactory.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/channelfactory/impl/MultiplexerChannelFactory.java 2008-02-26 18:19:23 UTC (rev 3802)
+++ trunk/src/main/org/jboss/messaging/core/channelfactory/impl/MultiplexerChannelFactory.java 2008-02-26 19:10:31 UTC (rev 3803)
@@ -31,6 +31,7 @@
*
* @author <a href="mailto:clebert.suconic at jboss.org">Clebert Suconic</a>
* @author <a href="mailto:ataylor at redhat.com">Andy Taylor</a>
+ * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
* @version <tt>$Revision: 3465 $</tt>
* $Id: MultiplexerChannelFactory.java 3465 2007-12-10 17:32:22Z ataylor $
*/
@@ -41,19 +42,19 @@
// Attributes -----------------------------------------------------------------------------------
- JChannelFactory jChannelFactory;
- String dataStack;
- String controlStack;
- String uniqueID;
+ private final JChannelFactory jChannelFactory;
+ private final String dataStack;
+ private final String controlStack;
+ private final String uniqueID;
// Static ---------------------------------------------------------------------------------------
// Constructors ---------------------------------------------------------------------------------
- public MultiplexerChannelFactory(JChannelFactory jChannelFactory,
- String uniqueID,
- String controlStack,
- String dataStack)
+ public MultiplexerChannelFactory(final JChannelFactory jChannelFactory,
+ final String uniqueID,
+ final String controlStack,
+ final String dataStack)
{
this.jChannelFactory = jChannelFactory;
this.uniqueID = uniqueID;
@@ -69,31 +70,16 @@
return dataStack;
}
- public void setDataStack(String dataStack)
- {
- this.dataStack = dataStack;
- }
-
public String getControlStack()
{
return controlStack;
}
- public void setControlStack(String controlStack)
- {
- this.controlStack = controlStack;
- }
-
public String getUniqueID()
{
return uniqueID;
}
- public void setUniqueID(String uniqueID)
- {
- this.uniqueID = uniqueID;
- }
-
public Channel createControlChannel() throws Exception
{
return jChannelFactory.createMultiplexerChannel(controlStack, uniqueID + "-CTRL", Boolean.TRUE, uniqueID);
Modified: trunk/src/main/org/jboss/messaging/core/channelfactory/impl/XMLChannelFactory.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/channelfactory/impl/XMLChannelFactory.java 2008-02-26 18:19:23 UTC (rev 3802)
+++ trunk/src/main/org/jboss/messaging/core/channelfactory/impl/XMLChannelFactory.java 2008-02-26 19:10:31 UTC (rev 3803)
@@ -30,6 +30,7 @@
/**
* A ChannelFactory that will use Elements to create channels.
* @author <a href="mailto:clebert.suconic at jboss.org">Clebert Suconic</a>
+ * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
* @version <tt>$Revision:1909 $</tt>
* $Id:XMLJChannelFactory.java 1909 2007-01-06 06:08:03Z clebert.suconic at jboss.com $
*/
@@ -39,14 +40,14 @@
// Constants ------------------------------------------------------------------------------------
// Attributes -----------------------------------------------------------------------------------
- Element controlConfig;
- Element dataConfig;
+ private final Element controlConfig;
+ private final Element dataConfig;
// Static ---------------------------------------------------------------------------------------
// Constructors ---------------------------------------------------------------------------------
- public XMLChannelFactory(Element controlConfig, Element dataConfig)
+ public XMLChannelFactory(final Element controlConfig, final Element dataConfig)
{
this.controlConfig = controlConfig;
this.dataConfig = dataConfig;
@@ -59,21 +60,11 @@
return controlConfig;
}
- public void setControlConfig(Element controlConfig)
- {
- this.controlConfig = controlConfig;
- }
-
public Element getDataConfig()
{
return dataConfig;
}
- public void setDataConfig(Element dataConfig)
- {
- this.dataConfig = dataConfig;
- }
-
// implementation of JChannelFactory ------------------------------------------------------------
public Channel createControlChannel() throws Exception
{
Modified: trunk/src/main/org/jboss/messaging/core/client/impl/ClientBrowserImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/client/impl/ClientBrowserImpl.java 2008-02-26 18:19:23 UTC (rev 3802)
+++ trunk/src/main/org/jboss/messaging/core/client/impl/ClientBrowserImpl.java 2008-02-26 19:10:31 UTC (rev 3803)
@@ -48,11 +48,11 @@
// Attributes -----------------------------------------------------------------------------------
- private String id;
+ private final String id;
- private ClientSessionInternal session;
+ private final ClientSessionInternal session;
- private RemotingConnection remotingConnection;
+ private final RemotingConnection remotingConnection;
private volatile boolean closed;
@@ -60,7 +60,8 @@
// Constructors ---------------------------------------------------------------------------------
- public ClientBrowserImpl(RemotingConnection remotingConnection, ClientSessionInternal session, String id)
+ public ClientBrowserImpl(final String id, final ClientSessionInternal session,
+ final RemotingConnection remotingConnection)
{
this.remotingConnection = remotingConnection;
@@ -122,7 +123,7 @@
return response.getMessage();
}
- public Message[] nextMessageBlock(int maxMessages) throws MessagingException
+ public Message[] nextMessageBlock(final int maxMessages) throws MessagingException
{
checkClosed();
Modified: trunk/src/main/org/jboss/messaging/core/client/impl/ClientConnectionFactoryImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/client/impl/ClientConnectionFactoryImpl.java 2008-02-26 18:19:23 UTC (rev 3802)
+++ trunk/src/main/org/jboss/messaging/core/client/impl/ClientConnectionFactoryImpl.java 2008-02-26 19:10:31 UTC (rev 3803)
@@ -84,11 +84,6 @@
this.prefetchSize = prefetchSize;
}
- public ClientConnectionFactoryImpl(RemotingConfiguration remotingConfig)
- {
- this.remotingConfig = remotingConfig;
- }
-
public ClientConnectionFactoryImpl()
{
}
Modified: trunk/src/main/org/jboss/messaging/core/client/impl/ClientConnectionImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/client/impl/ClientConnectionImpl.java 2008-02-26 18:19:23 UTC (rev 3802)
+++ trunk/src/main/org/jboss/messaging/core/client/impl/ClientConnectionImpl.java 2008-02-26 19:10:31 UTC (rev 3803)
@@ -58,15 +58,15 @@
// Attributes -----------------------------------------------------------------------------------
- private String id;
+ private final String id;
- private int serverID;
+ private final int serverID;
- private RemotingConnection remotingConnection;
+ private final RemotingConnection remotingConnection;
- private boolean strictTck;
+ private final boolean strictTck;
- private Map<String, ClientSession> children = new ConcurrentHashMap<String, ClientSession>();
+ private final Map<String, ClientSession> children = new ConcurrentHashMap<String, ClientSession>();
private volatile boolean closed;
@@ -74,8 +74,8 @@
// Constructors ---------------------------------------------------------------------------------
- public ClientConnectionImpl(String id, int serverID, boolean strictTck,
- RemotingConnection connection)
+ public ClientConnectionImpl(final String id, final int serverID, final boolean strictTck,
+ final RemotingConnection connection)
{
this.id = id;
@@ -88,8 +88,8 @@
// ClientConnection implementation --------------------------------------------------------------
- public ClientSession createClientSession(boolean xa, boolean autoCommitSends, boolean autoCommitAcks,
- int ackBatchSize, boolean cacheProducers) throws MessagingException
+ public ClientSession createClientSession(final boolean xa, final boolean autoCommitSends, final boolean autoCommitAcks,
+ final int ackBatchSize, final boolean cacheProducers) throws MessagingException
{
checkClosed();
@@ -118,7 +118,7 @@
remotingConnection.send(id, new ConnectionStopMessage());
}
- public void setFailureListener(FailureListener listener) throws MessagingException
+ public void setFailureListener(final FailureListener listener) throws MessagingException
{
checkClosed();
Modified: trunk/src/main/org/jboss/messaging/core/client/impl/ClientConsumerImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/client/impl/ClientConsumerImpl.java 2008-02-26 18:19:23 UTC (rev 3802)
+++ trunk/src/main/org/jboss/messaging/core/client/impl/ClientConsumerImpl.java 2008-02-26 19:10:31 UTC (rev 3803)
@@ -200,7 +200,7 @@
return handler;
}
- public void setMessageHandler(MessageHandler handler) throws MessagingException
+ public void setMessageHandler(final MessageHandler handler) throws MessagingException
{
checkClosed();
@@ -332,7 +332,7 @@
}
}
- public void recover(long lastDeliveryID)
+ public void recover(final long lastDeliveryID)
{
ignoreDeliveryMark = lastDeliveryID;
Modified: trunk/src/main/org/jboss/messaging/core/client/impl/ClientConsumerPacketHandler.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/client/impl/ClientConsumerPacketHandler.java 2008-02-26 18:19:23 UTC (rev 3802)
+++ trunk/src/main/org/jboss/messaging/core/client/impl/ClientConsumerPacketHandler.java 2008-02-26 19:10:31 UTC (rev 3803)
@@ -21,7 +21,7 @@
private final String consumerID;
- public ClientConsumerPacketHandler(ClientConsumerInternal clientConsumer, String consumerID)
+ public ClientConsumerPacketHandler(final ClientConsumerInternal clientConsumer, final String consumerID)
{
this.clientConsumer = clientConsumer;
@@ -33,7 +33,7 @@
return consumerID;
}
- public void handle(Packet packet, PacketSender sender)
+ public void handle(final Packet packet, final PacketSender sender)
{
try
{
Modified: trunk/src/main/org/jboss/messaging/core/client/impl/ClientProducerImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/client/impl/ClientProducerImpl.java 2008-02-26 18:19:23 UTC (rev 3802)
+++ trunk/src/main/org/jboss/messaging/core/client/impl/ClientProducerImpl.java 2008-02-26 19:10:31 UTC (rev 3803)
@@ -81,7 +81,7 @@
return address;
}
- public void send(Message msg) throws MessagingException
+ public void send(final Message msg) throws MessagingException
{
checkClosed();
@@ -90,7 +90,7 @@
remotingConnection.send(id, message, !msg.isDurable());
}
- public void send(String address, Message msg) throws MessagingException
+ public void send(final String address, final Message msg) throws MessagingException
{
checkClosed();
@@ -99,12 +99,12 @@
remotingConnection.send(id, message, !msg.isDurable());
}
- public void registerAcknowledgementHandler(AcknowledgementHandler handler)
+ public void registerAcknowledgementHandler(final AcknowledgementHandler handler)
{
// TODO
}
- public void unregisterAcknowledgementHandler(AcknowledgementHandler handler)
+ public void unregisterAcknowledgementHandler(final AcknowledgementHandler handler)
{
// TODO
}
Modified: trunk/src/main/org/jboss/messaging/core/client/impl/ClientSessionImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/client/impl/ClientSessionImpl.java 2008-02-26 18:19:23 UTC (rev 3802)
+++ trunk/src/main/org/jboss/messaging/core/client/impl/ClientSessionImpl.java 2008-02-26 19:10:31 UTC (rev 3803)
@@ -164,7 +164,8 @@
// ClientSession implementation -----------------------------------------------------------------
- public void createQueue(String address, String queueName, String filterString, boolean durable, boolean temporary)
+ public void createQueue(final String address, final String queueName, final String filterString,
+ final boolean durable, final boolean temporary)
throws MessagingException
{
checkClosed();
@@ -174,14 +175,14 @@
remotingConnection.send(id, request);
}
- public void deleteQueue(String queueName) throws MessagingException
+ public void deleteQueue(final String queueName) throws MessagingException
{
checkClosed();
remotingConnection.send(id, new SessionDeleteQueueMessage(queueName));
}
- public SessionQueueQueryResponseMessage queueQuery(String queueName) throws MessagingException
+ public SessionQueueQueryResponseMessage queueQuery(final String queueName) throws MessagingException
{
checkClosed();
@@ -192,7 +193,7 @@
return response;
}
- public SessionBindingQueryResponseMessage bindingQuery(String address) throws MessagingException
+ public SessionBindingQueryResponseMessage bindingQuery(final String address) throws MessagingException
{
checkClosed();
@@ -203,7 +204,7 @@
return response;
}
- public void addAddress(String address) throws MessagingException
+ public void addAddress(final String address) throws MessagingException
{
checkClosed();
@@ -212,7 +213,7 @@
remotingConnection.send(id, request);
}
- public void removeAddress(String address) throws MessagingException
+ public void removeAddress(final String address) throws MessagingException
{
checkClosed();
@@ -221,8 +222,8 @@
remotingConnection.send(id, request);
}
- public ClientConsumer createConsumer(String queueName, String filterString, boolean noLocal,
- boolean autoDeleteQueue, boolean direct) throws MessagingException
+ public ClientConsumer createConsumer(final String queueName, final String filterString, final boolean noLocal,
+ final boolean autoDeleteQueue, final boolean direct) throws MessagingException
{
checkClosed();
@@ -260,7 +261,7 @@
return consumer;
}
- public ClientBrowser createBrowser(String queueName, String messageSelector) throws MessagingException
+ public ClientBrowser createBrowser(final String queueName, final String messageSelector) throws MessagingException
{
checkClosed();
@@ -270,14 +271,14 @@
SessionCreateBrowserResponseMessage response = (SessionCreateBrowserResponseMessage)remotingConnection.send(id, request);
- ClientBrowser browser = new ClientBrowserImpl(remotingConnection, this, response.getBrowserID());
+ ClientBrowser browser = new ClientBrowserImpl(response.getBrowserID(), this, remotingConnection);
browsers.add(browser);
return browser;
}
- public ClientProducer createProducer(String address) throws MessagingException
+ public ClientProducer createProducer(final String address) throws MessagingException
{
checkClosed();
@@ -424,7 +425,7 @@
return connection;
}
- public void delivered(long deliverID, boolean expired)
+ public void delivered(final long deliverID, final boolean expired)
{
this.deliverID = deliverID;
@@ -436,7 +437,7 @@
acknowledgeInternal(false);
}
- public void removeConsumer(ClientConsumerInternal consumer) throws MessagingException
+ public void removeConsumer(final ClientConsumerInternal consumer) throws MessagingException
{
consumers.remove(consumer.getID());
@@ -449,7 +450,7 @@
remotingConnection.send(id, new SessionCancelMessage(-1, false));
}
- public void removeProducer(ClientProducer producer)
+ public void removeProducer(final ClientProducer producer)
{
producers.remove(producer);
@@ -459,7 +460,7 @@
}
}
- public void removeBrowser(ClientBrowser browser)
+ public void removeBrowser(final ClientBrowser browser)
{
browsers.remove(browser);
}
@@ -468,7 +469,7 @@
// XAResource implementation --------------------------------------------------------------------
- public void commit(Xid xid, boolean onePhase) throws XAException
+ public void commit(final Xid xid, final boolean onePhase) throws XAException
{
try
{
@@ -489,7 +490,7 @@
}
}
- public void end(Xid xid, int flags) throws XAException
+ public void end(final Xid xid, final int flags) throws XAException
{
try
{
@@ -530,7 +531,7 @@
}
}
- public void forget(Xid xid) throws XAException
+ public void forget(final Xid xid) throws XAException
{
try
{
@@ -567,7 +568,7 @@
}
}
- public boolean isSameRM(XAResource xares) throws XAException
+ public boolean isSameRM(final XAResource xares) throws XAException
{
if (!(xares instanceof ClientSessionImpl))
{
@@ -584,7 +585,7 @@
return this.connection.getServerID() == other.getConnection().getServerID();
}
- public int prepare(Xid xid) throws XAException
+ public int prepare(final Xid xid) throws XAException
{
try
{
@@ -609,7 +610,7 @@
}
}
- public Xid[] recover(int flag) throws XAException
+ public Xid[] recover(final int flag) throws XAException
{
try
{
@@ -630,7 +631,7 @@
}
}
- public void rollback(Xid xid) throws XAException
+ public void rollback(final Xid xid) throws XAException
{
try
{
@@ -651,7 +652,7 @@
}
}
- public boolean setTransactionTimeout(int seconds) throws XAException
+ public boolean setTransactionTimeout(final int seconds) throws XAException
{
try
{
@@ -667,7 +668,7 @@
}
}
- public void start(Xid xid, int flags) throws XAException
+ public void start(final Xid xid, final int flags) throws XAException
{
try
{
@@ -714,7 +715,7 @@
// Public ---------------------------------------------------------------------------------------
- public void setForceNotSameRM(boolean force)
+ public void setForceNotSameRM(final boolean force)
{
this.forceNotSameRM = force;
}
@@ -725,7 +726,7 @@
// Private --------------------------------------------------------------------------------------
- private void acknowledgeInternal(boolean block) throws MessagingException
+ private void acknowledgeInternal(final boolean block) throws MessagingException
{
if (acked)
{
Modified: trunk/src/main/org/jboss/messaging/core/client/impl/RemotingConnectionImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/client/impl/RemotingConnectionImpl.java 2008-02-26 18:19:23 UTC (rev 3802)
+++ trunk/src/main/org/jboss/messaging/core/client/impl/RemotingConnectionImpl.java 2008-02-26 19:10:31 UTC (rev 3803)
@@ -55,7 +55,7 @@
// Attributes -----------------------------------------------------------------------------------
- private RemotingConfiguration remotingConfig;
+ private final RemotingConfiguration remotingConfig;
private NIOConnector connector;
@@ -65,7 +65,7 @@
// Constructors ---------------------------------------------------------------------------------
- public RemotingConnectionImpl(RemotingConfiguration remotingConfig) throws Exception
+ public RemotingConnectionImpl(final RemotingConfiguration remotingConfig) throws Exception
{
assert remotingConfig != null;
@@ -126,12 +126,12 @@
/**
* send the packet and block until a response is received (<code>oneWay</code> is set to <code>false</code>)
*/
- public AbstractPacket send(String id, AbstractPacket packet) throws MessagingException
+ public AbstractPacket send(final String id, final AbstractPacket packet) throws MessagingException
{
return send(id, packet, false);
}
- public AbstractPacket send(String id, AbstractPacket packet, boolean oneWay) throws MessagingException
+ public AbstractPacket send(final String id, final AbstractPacket packet, final boolean oneWay) throws MessagingException
{
assert packet != null;
@@ -167,7 +167,7 @@
}
}
- public synchronized void setFailureListener(FailureListener newListener)
+ public synchronized void setFailureListener(final FailureListener newListener)
{
if (listener != null && newListener != null)
{
@@ -191,7 +191,7 @@
// Private --------------------------------------------------------------------------------------
- private AbstractPacket send(AbstractPacket packet, boolean oneWay) throws Exception
+ private AbstractPacket send(final AbstractPacket packet, final boolean oneWay) throws Exception
{
assert packet != null;
checkConnected();
Modified: trunk/src/main/org/jboss/messaging/core/filter/impl/FilterImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/filter/impl/FilterImpl.java 2008-02-26 18:19:23 UTC (rev 3802)
+++ trunk/src/main/org/jboss/messaging/core/filter/impl/FilterImpl.java 2008-02-26 19:10:31 UTC (rev 3803)
@@ -61,15 +61,15 @@
{
private static final Logger log = Logger.getLogger(FilterImpl.class);
- private String filterString;
+ private final String filterString;
- private Map<String, Identifier> identifiers = new HashMap<String, Identifier>();
+ private final Map<String, Identifier> identifiers = new HashMap<String, Identifier>();
- private Operator operator;
+ private final Operator operator;
- private FilterParser parser = new FilterParser();
+ private final FilterParser parser = new FilterParser();
- public FilterImpl(String filterString) throws MessagingException
+ public FilterImpl(final String filterString) throws MessagingException
{
this.filterString = filterString;
@@ -90,7 +90,7 @@
return filterString;
}
- public boolean match(Message message)
+ public boolean match(final Message message)
{
try
{
@@ -100,23 +100,23 @@
{
Object val = null;
- if (id.name.startsWith("JBM"))
+ if (id.getName().startsWith("JBM"))
{
//Look it up as header fields
- val = getHeaderFieldValue(message, id.name);
+ val = getHeaderFieldValue(message, id.getName());
}
if (val == null)
{
//First look it up in the headers
- val = message.getHeader(id.name);
+ val = message.getHeader(id.getName());
}
if (val != null)
{
- id.value = val;
+ id.setValue(val);
}
}
@@ -136,7 +136,7 @@
// Private --------------------------------------------------------------------------
- private Object getHeaderFieldValue(Message msg, String fieldName)
+ private Object getHeaderFieldValue(final Message msg, final String fieldName)
{
if ("JBMMessageID".equals(fieldName))
{
Modified: trunk/src/main/org/jboss/messaging/core/filter/impl/Identifier.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/filter/impl/Identifier.java 2008-02-26 18:19:23 UTC (rev 3802)
+++ trunk/src/main/org/jboss/messaging/core/filter/impl/Identifier.java 2008-02-26 19:10:31 UTC (rev 3803)
@@ -22,22 +22,29 @@
package org.jboss.messaging.core.filter.impl;
/**
- * This is a JMS identifier
+ *
+ * A Identifier
+ *
+ * @author Norbert Lataille (Norbert.Lataille at m4x.org)
+ * @author Scott.Stark at jboss.org
+ * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
+ * @version $Revision: 2681 $
*
- * @author Norbert Lataille (Norbert.Lataille at m4x.org)
- * @author Scott.Stark at jboss.org
- * @version $Revision: 2681 $
*/
public class Identifier
{
- String name;
- Object value;
- private int hash;
+ private final String name;
- public Identifier( String name )
+ private Object value;
+
+ private final int hash;
+
+ public Identifier(final String name)
{
this.name = name;
+
hash = name.hashCode();
+
value = null;
}
@@ -46,7 +53,7 @@
return "Identifier@" + name;
}
- public boolean equals( Object obj )
+ public boolean equals(Object obj)
{
if ( obj.getClass() != Identifier.class )
{
@@ -68,11 +75,13 @@
{
return name;
}
+
public Object getValue()
{
return value;
}
- public void setValue(Object value)
+
+ public void setValue(final Object value)
{
this.value = value;
}
Modified: trunk/src/main/org/jboss/messaging/core/filter/impl/Operator.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/filter/impl/Operator.java 2008-02-26 18:19:23 UTC (rev 3802)
+++ trunk/src/main/org/jboss/messaging/core/filter/impl/Operator.java 2008-02-26 19:10:31 UTC (rev 3803)
@@ -760,7 +760,7 @@
Class className = oper1.getClass();
if (className == Identifier.class)
- arg1 = ((Identifier) oper1).value;
+ arg1 = ((Identifier) oper1).getValue();
else if (className == Operator.class)
arg1 = ((Operator) oper1).apply();
else
@@ -811,7 +811,7 @@
Class className = oper2.getClass();
if (className == Identifier.class)
- arg2 = ((Identifier) oper2).value;
+ arg2 = ((Identifier) oper2).getValue();
else if (className == Operator.class)
arg2 = ((Operator) oper2).apply();
else
@@ -862,7 +862,7 @@
Class className = oper3.getClass();
if (className == Identifier.class)
- arg3 = ((Identifier) oper3).value;
+ arg3 = ((Identifier) oper3).getValue();
else if (className == Operator.class)
arg3 = ((Operator ) oper3).apply();
else
Modified: trunk/src/main/org/jboss/messaging/core/filter/impl/RegExp.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/filter/impl/RegExp.java 2008-02-26 18:19:23 UTC (rev 3802)
+++ trunk/src/main/org/jboss/messaging/core/filter/impl/RegExp.java 2008-02-26 19:10:31 UTC (rev 3803)
@@ -33,67 +33,87 @@
* @author droy at boostmyscore.com
* @author Scott.Stark at jboss.org
* @author Loren Rosen
+ * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
*
* $Id: RegExp.java 2681 2007-05-15 00:09:10Z timfox $
*/
public class RegExp
{
- protected Pattern re;
+ private final Pattern re;
- public RegExp (String pattern, Character escapeChar)
+ public RegExp(final String pattern, final Character escapeChar)
throws Exception
{
String pat = adjustPattern(pattern, escapeChar);
+
re = Pattern.compile(pat);
}
- public boolean isMatch (Object target)
+ public boolean isMatch(final Object target)
{
String str = target != null ? target.toString() : "";
+
return re.matcher(str).matches();
}
- protected String adjustPattern (String pattern, Character escapeChar)
+ protected String adjustPattern(final String pattern, final Character escapeChar)
throws Exception
{
int patternLen = pattern.length();
+
StringBuffer REpattern = new StringBuffer(patternLen + 10);
+
boolean useEscape = (escapeChar != null);
+
char escape = Character.UNASSIGNED;
- if (useEscape) {
+
+ if (useEscape)
+ {
escape = escapeChar.charValue();
}
REpattern.append ('^');
- for ( int i = 0; i < patternLen; i++ ) {
+ for (int i = 0; i < patternLen; i++)
+ {
boolean escaped = false;
+
char c = pattern.charAt( i );
- if ( useEscape && escape == c ) {
+ if (useEscape && escape == c)
+ {
i++;
- if ( i < patternLen ) {
+
+ if ( i < patternLen )
+ {
escaped = true;
c = pattern.charAt( i );
- } else {
+ }
+ else
+ {
throw new Exception( "LIKE ESCAPE: Bad use of escape character" );
}
}
// Match characters, or escape ones special to the underlying
// regex engine
- switch ( c ) {
+ switch ( c )
+ {
case '_':
- if ( escaped ) {
+ if ( escaped )
+ {
REpattern.append( c );
- } else {
+ } else
+ {
REpattern.append( '.' );
}
break;
case '%':
- if ( escaped ) {
+ if ( escaped )
+ {
REpattern.append( c );
- } else {
+ } else
+ {
REpattern.append( ".*" );
}
break;
Modified: trunk/src/main/org/jboss/messaging/core/list/impl/PriorityLinkedListImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/list/impl/PriorityLinkedListImpl.java 2008-02-26 18:19:23 UTC (rev 3802)
+++ trunk/src/main/org/jboss/messaging/core/list/impl/PriorityLinkedListImpl.java 2008-02-26 19:10:31 UTC (rev 3803)
@@ -41,27 +41,32 @@
*/
public class PriorityLinkedListImpl<T> implements PriorityLinkedList<T>
{
- private List<LinkedList<T>> linkedLists;
+ private final List<LinkedList<T>> linkedLists;
- private int priorities;
+ private final int priorities;
private int size;
- public PriorityLinkedListImpl(int priorities)
+ public PriorityLinkedListImpl(final int priorities)
{
this.priorities = priorities;
- initLists();
+ linkedLists = new ArrayList<LinkedList<T>>();
+
+ for (int i = 0; i < priorities; i++)
+ {
+ linkedLists.add(new LinkedList<T>());
+ }
}
- public void addFirst(T t, int priority)
+ public void addFirst(final T t, final int priority)
{
linkedLists.get(priority).addFirst(t);
size++;
}
- public void addLast(T t, int priority)
+ public void addLast(final T t, final int priority)
{
linkedLists.get(priority).addLast(t);
@@ -157,7 +162,12 @@
public void clear()
{
- initLists();
+ for (LinkedList<T> list: linkedLists)
+ {
+ list.clear();
+ }
+
+ size = 0;
}
public int size()
@@ -170,10 +180,11 @@
return size == 0;
}
- public void remove(T messageReference, int priority)
+ public void remove(final T messageReference, final int priority)
{
- LinkedList linkedList = linkedLists.get(priority);
- if(linkedList != null)
+ LinkedList<T> linkedList = linkedLists.get(priority);
+
+ if (linkedList != null)
{
linkedList.remove(messageReference);
}
@@ -183,19 +194,7 @@
{
return new PriorityLinkedListIterator();
}
-
- private void initLists()
- {
- linkedLists = new ArrayList<LinkedList<T>>();
- for (int i = 0; i < priorities; i++)
- {
- linkedLists.add(new LinkedList<T>());
- }
-
- size = 0;
- }
-
private class PriorityLinkedListIterator implements ListIterator<T>
{
private int index;
@@ -209,7 +208,7 @@
currentIter = linkedLists.get(index).listIterator();
}
- public void add(Object arg0)
+ public void add(final Object obj)
{
throw new UnsupportedOperationException();
}
@@ -271,7 +270,7 @@
size--;
}
- public void set(Object obj)
+ public void set(final Object obj)
{
throw new UnsupportedOperationException();
}
Modified: trunk/src/main/org/jboss/messaging/core/management/impl/MessagingServerManagementImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/management/impl/MessagingServerManagementImpl.java 2008-02-26 18:19:23 UTC (rev 3802)
+++ trunk/src/main/org/jboss/messaging/core/management/impl/MessagingServerManagementImpl.java 2008-02-26 19:10:31 UTC (rev 3803)
@@ -72,6 +72,7 @@
private HashMap<String, ScheduledFuture> currentRunningCounters = new HashMap<String, ScheduledFuture>();
private ScheduledExecutorService scheduler;
+
private int maxMessageCounters = 20;
public void setMessagingServer(MessagingServer messagingServer)
Modified: trunk/src/main/org/jboss/messaging/core/persistence/impl/bdbje/integration/RealBDBJEDatabase.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/persistence/impl/bdbje/integration/RealBDBJEDatabase.java 2008-02-26 18:19:23 UTC (rev 3802)
+++ trunk/src/main/org/jboss/messaging/core/persistence/impl/bdbje/integration/RealBDBJEDatabase.java 2008-02-26 19:10:31 UTC (rev 3803)
@@ -23,16 +23,17 @@
*/
public class RealBDBJEDatabase implements BDBJEDatabase
{
- private Database database;
+ private final Database database;
- RealBDBJEDatabase(Database database)
+ RealBDBJEDatabase(final Database database)
{
this.database = database;
}
// BDBJEDatabase implementation ------------------------------------------
- public void put(BDBJETransaction tx, long id, byte[] bytes, int offset, int length) throws Exception
+ public void put(final BDBJETransaction tx, final long id, final byte[] bytes,
+ final int offset, final int length) throws Exception
{
DatabaseEntry key = createKey(id);
@@ -50,7 +51,7 @@
database.put(bdbTx, key, value);
}
- public void remove(BDBJETransaction tx, long id) throws Exception
+ public void remove(final BDBJETransaction tx, final long id) throws Exception
{
DatabaseEntry key = createKey(id);
@@ -71,7 +72,7 @@
// For testing
- public byte[] get(long id) throws Exception
+ public byte[] get(final long id) throws Exception
{
DatabaseEntry key = createKey(id);
@@ -94,7 +95,7 @@
// Private ----------------------------------------------------------------------
- private DatabaseEntry createKey(long id)
+ private DatabaseEntry createKey(final long id)
{
DatabaseEntry key = new DatabaseEntry();
@@ -105,7 +106,7 @@
return key;
}
- private Transaction getBDBTx(BDBJETransaction tx)
+ private Transaction getBDBTx(final BDBJETransaction tx)
{
Transaction bdbTx = null;
@@ -123,7 +124,7 @@
private class RealBDBJECursor implements BDBJECursor
{
- private Cursor cursor;
+ private final Cursor cursor;
RealBDBJECursor() throws Exception
{
Modified: trunk/src/main/org/jboss/messaging/core/persistence/impl/bdbje/integration/RealBDBJEEnvironment.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/persistence/impl/bdbje/integration/RealBDBJEEnvironment.java 2008-02-26 18:19:23 UTC (rev 3802)
+++ trunk/src/main/org/jboss/messaging/core/persistence/impl/bdbje/integration/RealBDBJEEnvironment.java 2008-02-26 19:10:31 UTC (rev 3803)
@@ -96,7 +96,7 @@
/**
* Are we in debug mode? Used in testing
*/
- private boolean debug;
+ private final boolean debug;
/**
* Used for debug only to ensure the XA operations are called in the right order
@@ -106,9 +106,10 @@
public RealBDBJEEnvironment()
{
+ this.debug = false;
}
- public RealBDBJEEnvironment(boolean debug)
+ public RealBDBJEEnvironment(final boolean debug)
{
this.debug = debug;
@@ -204,7 +205,7 @@
return new RealBDBJETransaction(environment.beginTransaction(null, null));
}
- public BDBJEDatabase getDatabase(String databaseName) throws Exception
+ public BDBJEDatabase getDatabase(final String databaseName) throws Exception
{
DatabaseConfig dbConfig = new DatabaseConfig();
@@ -249,7 +250,7 @@
return this.transacted;
}
- public void setEnvironmentPath(String environmentPath)
+ public void setEnvironmentPath(final String environmentPath)
{
if (started)
{
@@ -258,7 +259,7 @@
this.environmentPath = environmentPath;
}
- public void setCreateEnvironment(boolean createEnvironment)
+ public void setCreateEnvironment(final boolean createEnvironment)
{
if (started)
{
@@ -267,7 +268,7 @@
this.createEnvironment = createEnvironment;
}
- public void setMemoryCacheSize(long size)
+ public void setMemoryCacheSize(final long size)
{
if (started)
{
@@ -276,7 +277,7 @@
this.memoryCacheSize = size;
}
- public void setSyncOS(boolean sync)
+ public void setSyncOS(final boolean sync)
{
if (started)
{
@@ -285,7 +286,7 @@
this.syncOS = sync;
}
- public void setSyncVM(boolean sync)
+ public void setSyncVM(final boolean sync)
{
if (started)
{
@@ -294,7 +295,7 @@
this.syncVM = sync;
}
- public void setTransacted(boolean transacted)
+ public void setTransacted(final boolean transacted)
{
if (started)
{
@@ -312,7 +313,7 @@
return list;
}
- public void startWork(Xid xid) throws Exception
+ public void startWork(final Xid xid) throws Exception
{
if (debug)
{
@@ -322,7 +323,7 @@
environment.start(xid, XAResource.TMNOFLAGS);
}
- public void endWork(Xid xid, boolean failed) throws Exception
+ public void endWork(final Xid xid, final boolean failed) throws Exception
{
if (debug)
{
@@ -332,7 +333,7 @@
environment.end(xid, failed ? XAResource.TMFAIL : XAResource.TMSUCCESS);
}
- public void prepare(Xid xid) throws Exception
+ public void prepare(final Xid xid) throws Exception
{
if (debug)
{
@@ -342,7 +343,7 @@
environment.prepare(xid);
}
- public void commit(Xid xid) throws Exception
+ public void commit(final Xid xid) throws Exception
{
if (debug)
{
@@ -352,7 +353,7 @@
environment.commit(xid, false);
}
- public void rollback(Xid xid) throws Exception
+ public void rollback(final Xid xid) throws Exception
{
if (debug)
{
@@ -368,7 +369,7 @@
* Used for debug only
*/
- private void checkStartWork(Xid xid)
+ private void checkStartWork(final Xid xid)
{
if (threadTXStatuses.get(Thread.currentThread()) != null)
{
@@ -383,7 +384,7 @@
threadTXStatuses.put(Thread.currentThread(), new ThreadTXStatus(xid));
}
- private void checkEndWork(Xid xid)
+ private void checkEndWork(final Xid xid)
{
ThreadTXStatus status = threadTXStatuses.get(Thread.currentThread());
@@ -402,7 +403,7 @@
transactions.put(xid, status);
}
- private void checkPrepare(Xid xid)
+ private void checkPrepare(final Xid xid)
{
ThreadTXStatus status = this.transactions.get(xid);
@@ -419,7 +420,7 @@
status.prepared = true;
}
- private void checkCommitRollback(Xid xid)
+ private void checkCommitRollback(final Xid xid)
{
ThreadTXStatus status = this.transactions.get(xid);
@@ -453,9 +454,9 @@
this.implicitXid = xid;
}
- Xid implicitXid;
+ final Xid implicitXid;
- boolean prepared;
+ volatile boolean prepared;
}
}
Modified: trunk/src/main/org/jboss/messaging/core/persistence/impl/bdbje/integration/RealBDBJETransaction.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/persistence/impl/bdbje/integration/RealBDBJETransaction.java 2008-02-26 18:19:23 UTC (rev 3802)
+++ trunk/src/main/org/jboss/messaging/core/persistence/impl/bdbje/integration/RealBDBJETransaction.java 2008-02-26 19:10:31 UTC (rev 3803)
@@ -13,9 +13,9 @@
*/
public class RealBDBJETransaction implements BDBJETransaction
{
- private Transaction transaction;
+ private final Transaction transaction;
- RealBDBJETransaction(Transaction transaction)
+ RealBDBJETransaction(final Transaction transaction)
{
this.transaction = transaction;
}
Modified: trunk/src/main/org/jboss/messaging/core/security/CheckType.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/security/CheckType.java 2008-02-26 18:19:23 UTC (rev 3802)
+++ trunk/src/main/org/jboss/messaging/core/security/CheckType.java 2008-02-26 19:10:31 UTC (rev 3803)
@@ -30,8 +30,8 @@
* $Id: $
*/
public class CheckType
-{
- public int type;
+{
+ public final int type;
public CheckType(int type)
{
this.type = type;
Modified: trunk/src/main/org/jboss/messaging/core/security/Role.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/security/Role.java 2008-02-26 18:19:23 UTC (rev 3802)
+++ trunk/src/main/org/jboss/messaging/core/security/Role.java 2008-02-26 19:10:31 UTC (rev 3803)
@@ -35,7 +35,7 @@
public static final String CREATE_NAME="create";
- String name;
+ private String name;
private boolean read = false;
@@ -43,12 +43,12 @@
private boolean create = false;
- public Role(String name)
+ public Role(final String name)
{
this.name = name;
}
- public Role(String name, boolean read, boolean write, boolean create)
+ public Role(final String name, final boolean read, final boolean write, final boolean create)
{
this.name = name;
this.read = read;
@@ -61,7 +61,7 @@
return name;
}
- public void setName(String name)
+ public void setName(final String name)
{
this.name = name;
}
@@ -71,7 +71,7 @@
return read;
}
- public void setRead(boolean read)
+ public void setRead(final boolean read)
{
this.read = read;
}
@@ -81,7 +81,7 @@
return write;
}
- public void setWrite(boolean write)
+ public void setWrite(final boolean write)
{
this.write = write;
}
@@ -91,12 +91,12 @@
return create;
}
- public void setCreate(boolean create)
+ public void setCreate(final boolean create)
{
this.create = create;
}
- public boolean isCheckType(CheckType checkType)
+ public boolean isCheckType(final CheckType checkType)
{
return checkType.equals(CheckType.READ) ? read : checkType.equals(CheckType.WRITE) ? write : create;
}
Modified: trunk/src/main/org/jboss/messaging/core/security/impl/SecurityStoreImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/security/impl/SecurityStoreImpl.java 2008-02-26 18:19:23 UTC (rev 3802)
+++ trunk/src/main/org/jboss/messaging/core/security/impl/SecurityStoreImpl.java 2008-02-26 19:10:31 UTC (rev 3803)
@@ -73,15 +73,15 @@
private RealmMapping realmMapping;
- private Set<String> readCache = new ConcurrentHashSet<String>();
+ private final Set<String> readCache = new ConcurrentHashSet<String>();
- private Set<String> writeCache = new ConcurrentHashSet<String>();
+ private final Set<String> writeCache = new ConcurrentHashSet<String>();
- private Set<String> createCache = new ConcurrentHashSet<String>();
+ private final Set<String> createCache = new ConcurrentHashSet<String>();
- private long invalidationInterval;
+ private final long invalidationInterval;
- private long lastCheck;
+ private volatile long lastCheck;
// Constructors --------------------------------------------------
Modified: trunk/src/main/org/jboss/messaging/core/server/impl/BindingImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/server/impl/BindingImpl.java 2008-02-26 18:19:23 UTC (rev 3802)
+++ trunk/src/main/org/jboss/messaging/core/server/impl/BindingImpl.java 2008-02-26 19:10:31 UTC (rev 3803)
@@ -33,17 +33,17 @@
*/
public class BindingImpl implements Binding
{
- private int nodeID;
+ private final int nodeID;
- private String address;
+ private final String address;
- private Queue queue;
+ private final Queue queue;
private boolean hashAssigned;
private int hash;
- public BindingImpl(int nodeID, String address, Queue queue)
+ public BindingImpl(final int nodeID, final String address, final Queue queue)
{
this.nodeID = nodeID;
Modified: trunk/src/main/org/jboss/messaging/core/server/impl/DeliveryImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/server/impl/DeliveryImpl.java 2008-02-26 18:19:23 UTC (rev 3802)
+++ trunk/src/main/org/jboss/messaging/core/server/impl/DeliveryImpl.java 2008-02-26 19:10:31 UTC (rev 3803)
@@ -39,16 +39,16 @@
{
private static final Logger log = Logger.getLogger(DeliveryImpl.class);
- private MessageReference reference;
+ private final MessageReference reference;
- private String consumerID;
+ private final String consumerID;
- private long deliveryID;
+ private final long deliveryID;
- private PacketSender sender;
+ private final PacketSender sender;
- public DeliveryImpl(MessageReference reference, String consumerID,
- long deliveryID, PacketSender sender)
+ public DeliveryImpl(final MessageReference reference, final String consumerID,
+ final long deliveryID, final PacketSender sender)
{
this.reference = reference;
this.consumerID = consumerID;
Modified: trunk/src/main/org/jboss/messaging/core/server/impl/MessageImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/server/impl/MessageImpl.java 2008-02-26 18:19:23 UTC (rev 3802)
+++ trunk/src/main/org/jboss/messaging/core/server/impl/MessageImpl.java 2008-02-26 19:10:31 UTC (rev 3803)
@@ -80,7 +80,7 @@
private byte[] payload;
//We keep track of the persisted references for this message
- private List<MessageReference> references = new ArrayList<MessageReference>();
+ private final List<MessageReference> references = new ArrayList<MessageReference>();
private String connectionID;
@@ -108,8 +108,8 @@
/*
* Construct a message before sending
*/
- public MessageImpl(int type, boolean durable, long expiration,
- long timestamp, byte priority)
+ public MessageImpl(final int type, final boolean durable, final long expiration,
+ final long timestamp, final byte priority)
{
this();
this.type = type;
@@ -122,8 +122,8 @@
/*
* Construct a MessageImpl from storage
*/
- public MessageImpl(long messageID, int type, boolean durable, long expiration,
- long timestamp, byte priority, byte[] headers, byte[] payload)
+ public MessageImpl(final long messageID, final int type, final boolean durable, final long expiration,
+ final long timestamp, final byte priority, final byte[] headers, final byte[] payload)
throws Exception
{
this.messageID = messageID;
@@ -156,7 +156,7 @@
*
* @param other
*/
- public MessageImpl(MessageImpl other)
+ public MessageImpl(final MessageImpl other)
{
this.messageID = other.messageID;
this.type = other.type;
@@ -175,7 +175,7 @@
return messageID;
}
- public void setMessageID(long id)
+ public void setMessageID(final long id)
{
this.messageID = id;
}
@@ -190,7 +190,7 @@
return durable;
}
- public void setDurable(boolean durable)
+ public void setDurable(final boolean durable)
{
this.durable = durable;
}
@@ -200,7 +200,7 @@
return expiration;
}
- public void setExpiration(long expiration)
+ public void setExpiration(final long expiration)
{
this.expiration = expiration;
}
@@ -210,27 +210,27 @@
return timestamp;
}
- public void setTimestamp(long timestamp)
+ public void setTimestamp(final long timestamp)
{
this.timestamp = timestamp;
}
- public Object putHeader(String name, Object value)
+ public Object putHeader(final String name, final Object value)
{
return headers.put(name, value);
}
- public Object getHeader(String name)
+ public Object getHeader(final String name)
{
return headers.get(name);
}
- public Object removeHeader(String name)
+ public Object removeHeader(final String name)
{
return headers.remove(name);
}
- public boolean containsHeader(String name)
+ public boolean containsHeader(final String name)
{
return headers.containsKey(name);
}
@@ -245,7 +245,7 @@
return priority;
}
- public void setPriority(byte priority)
+ public void setPriority(final byte priority)
{
this.priority = priority;
}
@@ -269,7 +269,7 @@
return payload;
}
- public void setPayload(byte[] payload)
+ public void setPayload(final byte[] payload)
{
this.payload = payload;
}
@@ -279,12 +279,12 @@
return connectionID;
}
- public void setConnectionID(String connectionID)
+ public void setConnectionID(final String connectionID)
{
this.connectionID = connectionID;
}
- public void setDeliveryCount(int deliveryCount)
+ public void setDeliveryCount(final int deliveryCount)
{
this.deliveryCount = deliveryCount;
}
@@ -304,7 +304,7 @@
return System.currentTimeMillis() - expiration >= 0;
}
- public MessageReference createReference(Queue queue)
+ public MessageReference createReference(final Queue queue)
{
MessageReference ref = new MessageReferenceImpl(this, queue);
@@ -328,7 +328,7 @@
return references;
}
- public void removeDurableReference(MessageReference reference, int pos) throws Exception
+ public void removeDurableReference(final MessageReference reference, final int pos) throws Exception
{
refsLock.acquire();
@@ -345,7 +345,7 @@
}
//TODO optimise to avoid scan
- public int getDurableReferencePos(MessageReference reference)
+ public int getDurableReferencePos(final MessageReference reference)
{
int pos = 0;
@@ -365,7 +365,7 @@
return pos;
}
- public void addBackDurableReference(MessageReference reference)
+ public void addBackDurableReference(final MessageReference reference)
{
references.add(reference);
@@ -425,7 +425,7 @@
// Streamable implementation ---------------------------------
- public void write(DataOutputStream out) throws Exception
+ public void write(final DataOutputStream out) throws Exception
{
out.writeLong(messageID);
@@ -455,7 +455,7 @@
}
}
- public void read(DataInputStream in) throws Exception
+ public void read(final DataInputStream in) throws Exception
{
messageID = in.readLong();
Modified: trunk/src/main/org/jboss/messaging/core/server/impl/MessageReferenceImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/server/impl/MessageReferenceImpl.java 2008-02-26 18:19:23 UTC (rev 3802)
+++ trunk/src/main/org/jboss/messaging/core/server/impl/MessageReferenceImpl.java 2008-02-26 19:10:31 UTC (rev 3803)
@@ -57,7 +57,7 @@
{
}
- public MessageReferenceImpl(MessageReferenceImpl other, Queue queue)
+ public MessageReferenceImpl(final MessageReferenceImpl other, final Queue queue)
{
this.deliveryCount = other.deliveryCount;
@@ -68,7 +68,7 @@
this.queue = queue;
}
- protected MessageReferenceImpl(Message message, Queue queue)
+ protected MessageReferenceImpl(final Message message, final Queue queue)
{
this.message = message;
@@ -77,7 +77,7 @@
// MessageReference implementation -------------------------------
- public MessageReference copy(Queue queue)
+ public MessageReference copy(final Queue queue)
{
return new MessageReferenceImpl(this, queue);
}
@@ -87,7 +87,7 @@
return deliveryCount;
}
- public void setDeliveryCount(int deliveryCount)
+ public void setDeliveryCount(final int deliveryCount)
{
this.deliveryCount = deliveryCount;
}
@@ -102,7 +102,7 @@
return scheduledDeliveryTime;
}
- public void setScheduledDeliveryTime(long scheduledDeliveryTime)
+ public void setScheduledDeliveryTime(final long scheduledDeliveryTime)
{
this.scheduledDeliveryTime = scheduledDeliveryTime;
}
@@ -117,7 +117,7 @@
return queue;
}
- public void acknowledge(PersistenceManager persistenceManager) throws Exception
+ public void acknowledge(final PersistenceManager persistenceManager) throws Exception
{
if (message.isDurable())
{
@@ -127,7 +127,7 @@
queue.decrementDeliveringCount();
}
- public boolean cancel(PersistenceManager persistenceManager) throws Exception
+ public boolean cancel(final PersistenceManager persistenceManager) throws Exception
{
if (message.isDurable() && queue.isDurable())
{
@@ -170,7 +170,7 @@
}
}
- public void expire(PersistenceManager persistenceManager) throws Exception
+ public void expire(final PersistenceManager persistenceManager) throws Exception
{
Queue expiryQueue = queue.getQueueSettings().getMatch(queue.getName()).getExpiryQueue();
if (expiryQueue != null)
@@ -200,8 +200,8 @@
// Private -------------------------------------------------------
- private void moveInTransaction(Queue destinationQueue, Message copyMessage,
- PersistenceManager persistenceManager) throws Exception
+ private void moveInTransaction(final Queue destinationQueue, final Message copyMessage,
+ final PersistenceManager persistenceManager) throws Exception
{
copyMessage.createReference(destinationQueue);
@@ -214,7 +214,7 @@
tx.commit(true, persistenceManager);
}
- private Message makeCopyForDLQOrExpiry(boolean expiry, PersistenceManager pm) throws Exception
+ private Message makeCopyForDLQOrExpiry(final boolean expiry, final PersistenceManager pm) throws Exception
{
/*
We copy the message and send that to the dlq/expiry queue - this is
Modified: trunk/src/main/org/jboss/messaging/core/server/impl/PostOfficeImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/server/impl/PostOfficeImpl.java 2008-02-26 18:19:23 UTC (rev 3802)
+++ trunk/src/main/org/jboss/messaging/core/server/impl/PostOfficeImpl.java 2008-02-26 19:10:31 UTC (rev 3803)
@@ -53,22 +53,22 @@
{
private static final Logger log = Logger.getLogger(PostOfficeImpl.class);
- private int nodeID;
+ private final int nodeID;
- private ConcurrentMap<String, List<Binding>> mappings = new ConcurrentHashMap<String, List<Binding>>();
+ private final ConcurrentMap<String, List<Binding>> mappings = new ConcurrentHashMap<String, List<Binding>>();
- private Set<String> allowableAddresses = new ConcurrentHashSet<String>();
+ private final Set<String> allowableAddresses = new ConcurrentHashSet<String>();
- private ConcurrentMap<String, Binding> nameMap = new ConcurrentHashMap<String, Binding>();
+ private final ConcurrentMap<String, Binding> nameMap = new ConcurrentHashMap<String, Binding>();
- private PersistenceManager persistenceManager;
+ private final PersistenceManager persistenceManager;
- private QueueFactory queueFactory;
+ private final QueueFactory queueFactory;
- private boolean checkAllowable;
+ private final boolean checkAllowable;
- public PostOfficeImpl(int nodeID, PersistenceManager persistenceManager, QueueFactory queueFactory,
- boolean checkAllowable)
+ public PostOfficeImpl(final int nodeID, final PersistenceManager persistenceManager,
+ final QueueFactory queueFactory, final boolean checkAllowable)
{
this.nodeID = nodeID;
@@ -95,17 +95,17 @@
// PostOffice implementation -----------------------------------------------
- public void addAllowableAddress(String address)
+ public void addAllowableAddress(final String address)
{
allowableAddresses.add(address);
}
- public boolean removeAllowableAddress(String address)
+ public boolean removeAllowableAddress(final String address)
{
return allowableAddresses.remove(address);
}
- public boolean containsAllowableAddress(String address)
+ public boolean containsAllowableAddress(final String address)
{
return allowableAddresses.contains(address);
}
@@ -116,8 +116,8 @@
return allowableAddresses;
}
- public Binding addBinding(String address, String queueName, Filter filter,
- boolean durable, boolean temporary) throws Exception
+ public Binding addBinding(final String address, final String queueName, final Filter filter,
+ final boolean durable, final boolean temporary) throws Exception
{
Binding binding = createBinding(address, queueName, filter, durable, temporary);
@@ -131,7 +131,7 @@
return binding;
}
- public Binding removeBinding(String queueName) throws Exception
+ public Binding removeBinding(final String queueName) throws Exception
{
Binding binding = removeQueueInMemory(queueName);
@@ -143,7 +143,7 @@
return binding;
}
- public List<Binding> getBindingsForAddress(String address)
+ public List<Binding> getBindingsForAddress(final String address)
{
List<Binding> list = new ArrayList<Binding>();
@@ -163,12 +163,12 @@
return list;
}
- public Binding getBinding(String queueName)
+ public Binding getBinding(final String queueName)
{
return nameMap.get(queueName);
}
- public void route(String address, Message message) throws Exception
+ public void route(final String address, final Message message) throws Exception
{
// boolean routeRemote = false;
@@ -218,7 +218,7 @@
// }
}
- public void routeFromCluster(String address, Message message) throws Exception
+ public void routeFromCluster(final String address, final Message message) throws Exception
{
List<Binding> bindings = mappings.get(address);
@@ -249,8 +249,8 @@
// Private -----------------------------------------------------------------
- private Binding createBinding(String address, String name, Filter filter,
- boolean durable, boolean temporary)
+ private Binding createBinding(final String address, final String name, final Filter filter,
+ final boolean durable, final boolean temporary)
{
Queue queue = queueFactory.createQueue(-1, name, filter, durable, temporary);
@@ -259,7 +259,7 @@
return binding;
}
- private void addBindingInMemory(Binding binding)
+ private void addBindingInMemory(final Binding binding)
{
List<Binding> bindings = new CopyOnWriteArrayList<Binding>();
@@ -278,7 +278,7 @@
}
}
- private Binding removeQueueInMemory(String queueName) throws Exception
+ private Binding removeQueueInMemory(final String queueName) throws Exception
{
Binding binding = nameMap.remove(queueName);
Modified: trunk/src/main/org/jboss/messaging/core/server/impl/QueueImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/server/impl/QueueImpl.java 2008-02-26 18:19:23 UTC (rev 3802)
+++ trunk/src/main/org/jboss/messaging/core/server/impl/QueueImpl.java 2008-02-26 19:10:31 UTC (rev 3803)
@@ -143,17 +143,17 @@
return name;
}
- public synchronized HandleStatus addLast(MessageReference ref)
+ public synchronized HandleStatus addLast(final MessageReference ref)
{
return add(ref, false);
}
- public synchronized HandleStatus addFirst(MessageReference ref)
+ public synchronized HandleStatus addFirst(final MessageReference ref)
{
return add(ref, true);
}
- public synchronized void addListFirst(LinkedList<MessageReference> list)
+ public synchronized void addListFirst(final LinkedList<MessageReference> list)
{
ListIterator<MessageReference> iter = list.listIterator(list.size());
@@ -233,12 +233,12 @@
}
}
- public synchronized void addConsumer(Consumer consumer)
+ public synchronized void addConsumer(final Consumer consumer)
{
consumers.add(consumer);
}
- public synchronized boolean removeConsumer(Consumer consumer)
+ public synchronized boolean removeConsumer(final Consumer consumer)
{
boolean removed = consumers.remove(consumer);
@@ -260,7 +260,7 @@
return consumers.size();
}
- public synchronized List<MessageReference> list(Filter filter)
+ public synchronized List<MessageReference> list(final Filter filter)
{
if (filter == null)
{
@@ -299,30 +299,23 @@
}
}
- public synchronized void removeReference(MessageReference messageReference)
+ public synchronized void removeReference(final MessageReference messageReference)
{
messageReferences.remove(messageReference , messageReference.getMessage().getPriority());
- if (!scheduledRunnables.isEmpty())
- {
- Set<ScheduledDeliveryRunnable> clone = new HashSet<ScheduledDeliveryRunnable>(scheduledRunnables);
-
- for (ScheduledDeliveryRunnable runnable: clone)
- {
- runnable.cancel();
- }
-
- scheduledRunnables.clear();
- }
+ //FIXME - what about scheduled??
}
- public synchronized List<MessageReference> removeReferences(Filter filter)
+ //FIXME - review this
+ public synchronized List<MessageReference> removeReferences(final Filter filter)
{
List<MessageReference> allRefs = list(filter);
+
for (MessageReference messageReference : allRefs)
{
removeReference(messageReference);
}
+
return allRefs;
}
@@ -331,7 +324,7 @@
return persistenceID;
}
- public void setPersistenceID(long id)
+ public void setPersistenceID(final long id)
{
this.persistenceID = id;
}
@@ -341,7 +334,7 @@
return filter;
}
- public synchronized void setFilter(Filter filter)
+ public synchronized void setFilter(final Filter filter)
{
this.filter = filter;
}
@@ -371,7 +364,7 @@
return maxSize;
}
- public synchronized void setMaxSize(int maxSize)
+ public synchronized void setMaxSize(final int maxSize)
{
int num = messageReferences.size() + scheduledRunnables.size();
@@ -387,7 +380,7 @@
return distributionPolicy;
}
- public synchronized void setDistributionPolicy(DistributionPolicy distributionPolicy)
+ public synchronized void setDistributionPolicy(final DistributionPolicy distributionPolicy)
{
this.distributionPolicy = distributionPolicy;
}
@@ -423,7 +416,7 @@
// Private ------------------------------------------------------------------------------
- private HandleStatus add(MessageReference ref, boolean first)
+ private HandleStatus add(final MessageReference ref, final boolean first)
{
if (!checkFull())
{
@@ -492,7 +485,7 @@
return HandleStatus.HANDLED;
}
- private boolean checkAndSchedule(MessageReference ref)
+ private boolean checkAndSchedule(final MessageReference ref)
{
long now = System.currentTimeMillis();
@@ -532,7 +525,7 @@
}
}
- private HandleStatus deliver(MessageReference reference)
+ private HandleStatus deliver(final MessageReference reference)
{
if (consumers.isEmpty())
{
@@ -601,18 +594,18 @@
private class ScheduledDeliveryRunnable implements Runnable
{
- private MessageReference ref;
+ private final MessageReference ref;
private volatile Future<?> future;
private boolean cancelled;
- public ScheduledDeliveryRunnable(MessageReference ref)
+ public ScheduledDeliveryRunnable(final MessageReference ref)
{
this.ref = ref;
}
- public synchronized void setFuture(Future<?> future)
+ public synchronized void setFuture(final Future<?> future)
{
if (cancelled)
{
Modified: trunk/src/main/org/jboss/messaging/core/server/impl/ResourceManagerImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/server/impl/ResourceManagerImpl.java 2008-02-26 18:19:23 UTC (rev 3802)
+++ trunk/src/main/org/jboss/messaging/core/server/impl/ResourceManagerImpl.java 2008-02-26 19:10:31 UTC (rev 3803)
@@ -42,28 +42,28 @@
{
private ConcurrentMap<Xid, Transaction> transactions = new ConcurrentHashMap<Xid, Transaction>();
- private int defaultTimeoutSeconds;
+ private final int defaultTimeoutSeconds;
- private int timeoutSeconds;
+ private volatile int timeoutSeconds;
- public ResourceManagerImpl(int defaultTimeoutSeconds)
+ public ResourceManagerImpl(final int defaultTimeoutSeconds)
{
this.defaultTimeoutSeconds = defaultTimeoutSeconds;
}
// ResourceManager implementation ---------------------------------------------
- public Transaction getTransaction(Xid xid)
+ public Transaction getTransaction(final Xid xid)
{
return transactions.get(xid);
}
- public boolean putTransaction(Xid xid, Transaction tx)
+ public boolean putTransaction(final Xid xid, final Transaction tx)
{
return transactions.putIfAbsent(xid, tx) == null;
}
- public boolean removeTransaction(Xid xid)
+ public boolean removeTransaction(final Xid xid)
{
return transactions.remove(xid) != null;
}
@@ -73,12 +73,12 @@
return this.timeoutSeconds;
}
- public boolean setTimeoutSeconds(int timeoutSeconds)
+ public boolean setTimeoutSeconds(final int timeoutSeconds)
{
if (timeoutSeconds == 0)
{
//reset to default
- timeoutSeconds = defaultTimeoutSeconds;
+ this.timeoutSeconds = defaultTimeoutSeconds;
}
else
{
Modified: trunk/src/main/org/jboss/messaging/core/server/impl/ServerBrowserImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/server/impl/ServerBrowserImpl.java 2008-02-26 18:19:23 UTC (rev 3802)
+++ trunk/src/main/org/jboss/messaging/core/server/impl/ServerBrowserImpl.java 2008-02-26 19:10:31 UTC (rev 3803)
@@ -77,7 +77,7 @@
// Constructors ---------------------------------------------------------------------------------
ServerBrowserImpl(ServerSession session,
- Queue destination, String messageFilter) throws Exception
+ Queue destination, String messageFilter) throws Exception
{
this.session = session;
id = UUID.randomUUID().toString();
Modified: trunk/src/main/org/jboss/messaging/core/server/impl/ServerConsumerImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/server/impl/ServerConsumerImpl.java 2008-02-26 18:19:23 UTC (rev 3802)
+++ trunk/src/main/org/jboss/messaging/core/server/impl/ServerConsumerImpl.java 2008-02-26 19:10:31 UTC (rev 3803)
@@ -218,7 +218,7 @@
sessionEndpoint.removeConsumer(id);
}
- public void setStarted(boolean started)
+ public void setStarted(final boolean started)
{
boolean useStarted;
@@ -236,7 +236,7 @@
}
}
- public void receiveTokens(int tokens) throws Exception
+ public void receiveTokens(final int tokens) throws Exception
{
availableTokens.addAndGet(tokens);
Modified: trunk/src/main/org/jboss/messaging/core/server/impl/ServerPacketHandlerSupport.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/server/impl/ServerPacketHandlerSupport.java 2008-02-26 18:19:23 UTC (rev 3802)
+++ trunk/src/main/org/jboss/messaging/core/server/impl/ServerPacketHandlerSupport.java 2008-02-26 19:10:31 UTC (rev 3803)
@@ -38,9 +38,8 @@
public abstract class ServerPacketHandlerSupport implements PacketHandler
{
private static final Logger log = Logger.getLogger(ServerPacketHandlerSupport.class);
-
-
- public void handle(Packet packet, PacketSender sender)
+
+ public void handle(final Packet packet, final PacketSender sender)
{
Packet response;
@@ -82,6 +81,6 @@
}
}
- protected abstract Packet doHandle(Packet packet, PacketSender sender) throws Exception;
+ protected abstract Packet doHandle(final Packet packet, final PacketSender sender) throws Exception;
}
Modified: trunk/src/main/org/jboss/messaging/core/server/impl/ServerProducerImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/server/impl/ServerProducerImpl.java 2008-02-26 18:19:23 UTC (rev 3802)
+++ trunk/src/main/org/jboss/messaging/core/server/impl/ServerProducerImpl.java 2008-02-26 19:10:31 UTC (rev 3803)
@@ -84,7 +84,7 @@
return 0;
}
- public void sendCredits(int credits)
+ public void sendCredits(final int credits)
{
// TODO Auto-generated method stub
Modified: trunk/src/main/org/jboss/messaging/core/server/impl/ServerProducerPacketHandler.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/server/impl/ServerProducerPacketHandler.java 2008-02-26 18:19:23 UTC (rev 3802)
+++ trunk/src/main/org/jboss/messaging/core/server/impl/ServerProducerPacketHandler.java 2008-02-26 19:10:31 UTC (rev 3803)
@@ -22,11 +22,9 @@
package org.jboss.messaging.core.server.impl;
import static org.jboss.messaging.core.remoting.impl.wireformat.PacketType.CLOSE;
-import static org.jboss.messaging.core.remoting.impl.wireformat.PacketType.CONS_FLOWTOKEN;
import static org.jboss.messaging.core.remoting.impl.wireformat.PacketType.PROD_SEND;
import org.jboss.messaging.core.remoting.PacketSender;
-import org.jboss.messaging.core.remoting.impl.wireformat.ConsumerFlowTokenMessage;
import org.jboss.messaging.core.remoting.impl.wireformat.NullPacket;
import org.jboss.messaging.core.remoting.impl.wireformat.Packet;
import org.jboss.messaging.core.remoting.impl.wireformat.PacketType;
@@ -34,7 +32,13 @@
import org.jboss.messaging.core.server.MessagingException;
import org.jboss.messaging.core.server.ServerProducer;
-
+/**
+ *
+ * A ServerProducerPacketHandler
+ *
+ * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
+ *
+ */
public class ServerProducerPacketHandler extends ServerPacketHandlerSupport
{
private final ServerProducer producer;
Modified: trunk/src/main/org/jboss/messaging/core/server/impl/ServerSessionImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/server/impl/ServerSessionImpl.java 2008-02-26 18:19:23 UTC (rev 3802)
+++ trunk/src/main/org/jboss/messaging/core/server/impl/ServerSessionImpl.java 2008-02-26 19:10:31 UTC (rev 3803)
@@ -1001,7 +1001,7 @@
return new SessionCreateBrowserResponseMessage(browser.getID());
}
- public SessionCreateProducerResponseMessage createProducer(String address) throws Exception
+ public SessionCreateProducerResponseMessage createProducer(final String address) throws Exception
{
ServerProducerImpl producer = new ServerProducerImpl(this, address);
Modified: trunk/src/main/org/jboss/messaging/core/server/impl/TransactionImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/server/impl/TransactionImpl.java 2008-02-26 18:19:23 UTC (rev 3802)
+++ trunk/src/main/org/jboss/messaging/core/server/impl/TransactionImpl.java 2008-02-26 19:10:31 UTC (rev 3803)
@@ -48,32 +48,33 @@
{
private static final Logger log = Logger.getLogger(TransactionImpl.class);
- private List<Message> messagesToAdd = new ArrayList<Message>();
+ private final List<Message> messagesToAdd = new ArrayList<Message>();
- private List<MessageReference> acknowledgements = new ArrayList<MessageReference>();
+ private final List<MessageReference> acknowledgements = new ArrayList<MessageReference>();
- private List<TransactionSynchronization> synchronizations = new ArrayList<TransactionSynchronization>();
+ private final List<TransactionSynchronization> synchronizations = new ArrayList<TransactionSynchronization>();
- private Xid xid;
+ private final Xid xid;
- private boolean containsPersistent;
+ private volatile boolean containsPersistent;
private volatile boolean prepared;
private volatile boolean suspended;
public TransactionImpl()
- {
+ {
+ this.xid = null;
}
- public TransactionImpl(Xid xid)
+ public TransactionImpl(final Xid xid)
{
this.xid = xid;
}
// Transaction implementation -----------------------------------------------------------
- public void addMessage(Message message)
+ public void addMessage(final Message message)
{
messagesToAdd.add(message);
@@ -83,7 +84,7 @@
}
}
- public void addAcknowledgement(MessageReference acknowledgement)
+ public void addAcknowledgement(final MessageReference acknowledgement)
{
acknowledgements.add(acknowledgement);
@@ -93,12 +94,12 @@
}
}
- public void addSynchronization(TransactionSynchronization sync)
+ public void addSynchronization(final TransactionSynchronization sync)
{
synchronizations.add(sync);
}
- public void prepare(PersistenceManager persistenceManager) throws Exception
+ public void prepare(final PersistenceManager persistenceManager) throws Exception
{
if (xid == null)
{
@@ -112,7 +113,7 @@
prepared = true;
}
- public void commit(boolean onePhase, PersistenceManager persistenceManager) throws Exception
+ public void commit(final boolean onePhase, final PersistenceManager persistenceManager) throws Exception
{
callSynchronizations(SyncType.BEFORE_COMMIT);
@@ -152,7 +153,7 @@
clear();
}
- public void rollback(PersistenceManager persistenceManager) throws Exception
+ public void rollback(final PersistenceManager persistenceManager) throws Exception
{
callSynchronizations(SyncType.BEFORE_ROLLBACK);
@@ -200,7 +201,7 @@
// Private -------------------------------------------------------------------
- private void callSynchronizations(SyncType type) throws Exception
+ private void callSynchronizations(final SyncType type) throws Exception
{
for (TransactionSynchronization sync: synchronizations)
{
@@ -234,7 +235,7 @@
containsPersistent = false;
}
- private void cancelDeliveries(PersistenceManager persistenceManager) throws Exception
+ private void cancelDeliveries(final PersistenceManager persistenceManager) throws Exception
{
Map<Queue, LinkedList<MessageReference>> queueMap = new HashMap<Queue, LinkedList<MessageReference>>();
Modified: trunk/src/main/org/jboss/messaging/core/server/impl/XidImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/server/impl/XidImpl.java 2008-02-26 18:19:23 UTC (rev 3802)
+++ trunk/src/main/org/jboss/messaging/core/server/impl/XidImpl.java 2008-02-26 19:10:31 UTC (rev 3803)
@@ -62,7 +62,7 @@
* @param formatId
* @param globalTransactionId
*/
- public XidImpl(byte[] branchQualifier, int formatId, byte[] globalTransactionId)
+ public XidImpl(final byte[] branchQualifier, final int formatId, final byte[] globalTransactionId)
{
this.branchQualifier = branchQualifier;
this.formatId = formatId;
@@ -73,7 +73,7 @@
* Copy constructor
* @param other
*/
- public XidImpl(Xid other)
+ public XidImpl(final Xid other)
{
this.branchQualifier = copyBytes(other.getBranchQualifier());
this.formatId = other.getFormatId();
@@ -158,7 +158,7 @@
// Private -------------------------------------------------------------------------------
- private String stringRep(byte[] bytes)
+ private String stringRep(final byte[] bytes)
{
StringBuffer buff = new StringBuffer();
for (int i = 0; i < bytes.length; i++)
More information about the jboss-cvs-commits
mailing list