activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r564271 [9/18] - in /activemq/trunk: activemq-core/src/main/java/org/apache/activemq/ activemq-core/src/main/java/org/apache/activemq/advisory/ activemq-core/src/main/java/org/apache/activemq/blob/ activemq-core/src/main/java/org/apache/act...
Date Thu, 09 Aug 2007 16:40:08 GMT
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalPersistenceAdapter.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalPersistenceAdapter.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalPersistenceAdapter.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalPersistenceAdapter.java Thu Aug  9 09:37:49 2007
@@ -79,7 +79,7 @@
  */
 public class JournalPersistenceAdapter implements PersistenceAdapter, JournalEventListener, UsageListener {
 
-    private static final Log log = LogFactory.getLog(JournalPersistenceAdapter.class);
+    private static final Log LOG = LogFactory.getLog(JournalPersistenceAdapter.class);
 
     private final Journal journal;
     private final PersistenceAdapter longTermPersistence;
@@ -233,8 +233,9 @@
     public void stop() throws Exception {
 
         this.usageManager.removeUsageListener(this);
-        if (!started.compareAndSet(true, false))
+        if (!started.compareAndSet(true, false)) {
             return;
+        }
 
         Scheduler.cancel(periodicCheckpointTask);
 
@@ -293,8 +294,9 @@
      */
     public void checkpoint(boolean sync, boolean fullCheckpoint) {
         try {
-            if (journal == null)
+            if (journal == null) {
                 throw new IllegalStateException("Journal is closed.");
+            }
 
             long now = System.currentTimeMillis();
             CountDownLatch latch = null;
@@ -309,12 +311,12 @@
             checkpointTask.wakeup();
 
             if (sync) {
-                log.debug("Waking for checkpoint to complete.");
+                LOG.debug("Waking for checkpoint to complete.");
                 latch.await();
             }
         } catch (InterruptedException e) {
             Thread.currentThread().interrupt();
-            log.warn("Request to start checkpoint failed: " + e, e);
+            LOG.warn("Request to start checkpoint failed: " + e, e);
         }
     }
 
@@ -338,7 +340,7 @@
         }
         try {
 
-            log.debug("Checkpoint started.");
+            LOG.debug("Checkpoint started.");
             RecordLocation newMark = null;
 
             ArrayList futureTasks = new ArrayList(queues.size() + topics.size());
@@ -367,7 +369,7 @@
                         futureTasks.add(task);
                         checkpointExecutor.execute(task);
                     } catch (Exception e) {
-                        log.error("Failed to checkpoint a message store: " + e, e);
+                        LOG.error("Failed to checkpoint a message store: " + e, e);
                     }
                 }
             }
@@ -384,7 +386,7 @@
                     futureTasks.add(task);
                     checkpointExecutor.execute(task);
                 } catch (Exception e) {
-                    log.error("Failed to checkpoint a message store: " + e, e);
+                    LOG.error("Failed to checkpoint a message store: " + e, e);
                 }
             }
 
@@ -400,17 +402,17 @@
                     }
                 }
             } catch (Throwable e) {
-                log.error("Failed to checkpoint a message store: " + e, e);
+                LOG.error("Failed to checkpoint a message store: " + e, e);
             }
 
             if (fullCheckpoint) {
                 try {
                     if (newMark != null) {
-                        log.debug("Marking journal at: " + newMark);
+                        LOG.debug("Marking journal at: " + newMark);
                         journal.setMark(newMark, true);
                     }
                 } catch (Exception e) {
-                    log.error("Failed to mark the Journal: " + e, e);
+                    LOG.error("Failed to mark the Journal: " + e, e);
                 }
 
                 if (longTermPersistence instanceof JDBCPersistenceAdapter) {
@@ -425,7 +427,7 @@
                 }
             }
 
-            log.debug("Checkpoint done.");
+            LOG.debug("Checkpoint done.");
         } finally {
             latch.countDown();
         }
@@ -465,7 +467,7 @@
         RecordLocation pos = null;
         int transactionCounter = 0;
 
-        log.info("Journal Recovery Started from: " + journal);
+        LOG.info("Journal Recovery Started from: " + journal);
         ConnectionContext context = new ConnectionContext();
 
         // While we have records in the journal.
@@ -517,8 +519,9 @@
                         case JournalTransaction.XA_COMMIT:
                         case JournalTransaction.LOCAL_COMMIT:
                             Tx tx = transactionStore.replayCommit(command.getTransactionId(), command.getWasPrepared());
-                            if (tx == null)
+                            if (tx == null) {
                                 break; // We may be trying to replay a commit
+                            }
                             // that
                             // was already committed.
 
@@ -547,16 +550,16 @@
                             throw new IOException("Invalid journal command type: " + command.getType());
                         }
                     } catch (IOException e) {
-                        log.error("Recovery Failure: Could not replay: " + c + ", reason: " + e, e);
+                        LOG.error("Recovery Failure: Could not replay: " + c + ", reason: " + e, e);
                     }
                 }
                     break;
                 case JournalTrace.DATA_STRUCTURE_TYPE:
                     JournalTrace trace = (JournalTrace)c;
-                    log.debug("TRACE Entry: " + trace.getMessage());
+                    LOG.debug("TRACE Entry: " + trace.getMessage());
                     break;
                 default:
-                    log.error("Unknown type of record in transaction log which will be discarded: " + c);
+                    LOG.error("Unknown type of record in transaction log which will be discarded: " + c);
                 }
             }
         }
@@ -564,7 +567,7 @@
         RecordLocation location = writeTraceMessage("RECOVERED", true);
         journal.setMark(location, true);
 
-        log.info("Journal Recovered: " + transactionCounter + " message(s) in transactions recovered.");
+        LOG.info("Journal Recovered: " + transactionCounter + " message(s) in transactions recovered.");
     }
 
     private IOException createReadException(RecordLocation location, Exception e) {
@@ -590,8 +593,9 @@
      * @throws IOException
      */
     public RecordLocation writeCommand(DataStructure command, boolean sync) throws IOException {
-        if (started.get())
+        if (started.get()) {
             return journal.write(toPacket(wireFormat.marshal(command)), sync);
+        }
         throw new IOException("closed");
     }
 
@@ -620,7 +624,7 @@
             trace.setMessage("DELETED");
             RecordLocation location = journal.write(toPacket(wireFormat.marshal(trace)), false);
             journal.setMark(location, true);
-            log.info("Journal deleted: ");
+            LOG.info("Journal deleted: ");
         } catch (IOException e) {
             throw e;
         } catch (Throwable e) {
@@ -654,8 +658,9 @@
     }
 
     public void setUseExternalMessageReferences(boolean enable) {
-        if (enable)
+        if (enable) {
             throw new IllegalArgumentException("The journal does not support message references.");
+        }
     }
 
     public Packet toPacket(ByteSequence sequence) {

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalPersistenceAdapterFactory.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalPersistenceAdapterFactory.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalPersistenceAdapterFactory.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalPersistenceAdapterFactory.java Thu Aug  9 09:37:49 2007
@@ -41,7 +41,7 @@
 
     private static final int JOURNAL_LOCKED_WAIT_DELAY = 10 * 1000;
 
-    private static final Log log = LogFactory.getLog(JournalPersistenceAdapterFactory.class);
+    private static final Log LOG = LogFactory.getLog(JournalPersistenceAdapterFactory.class);
 
     private int journalLogFileSize = 1024 * 1024 * 20;
     private int journalLogFiles = 2;
@@ -222,7 +222,7 @@
                                               getJournalArchiveDirectory());
                     break;
                 } catch (JournalLockedException e) {
-                    log.info("Journal is locked... waiting " + (JOURNAL_LOCKED_WAIT_DELAY / 1000)
+                    LOG.info("Journal is locked... waiting " + (JOURNAL_LOCKED_WAIT_DELAY / 1000)
                              + " seconds for the journal to be unlocked.");
                     try {
                         Thread.sleep(JOURNAL_LOCKED_WAIT_DELAY);

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalTopicMessageStore.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalTopicMessageStore.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalTopicMessageStore.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalTopicMessageStore.java Thu Aug  9 09:37:49 2007
@@ -42,7 +42,7 @@
  */
 public class JournalTopicMessageStore extends JournalMessageStore implements TopicMessageStore {
 
-    private static final Log log = LogFactory.getLog(JournalTopicMessageStore.class);
+    private static final Log LOG = LogFactory.getLog(JournalTopicMessageStore.class);
 
     private TopicMessageStore longTermStore;
     private HashMap ackedLastAckLocations = new HashMap();
@@ -83,7 +83,7 @@
      */
     public void acknowledge(ConnectionContext context, String clientId, String subscriptionName,
                             final MessageId messageId) throws IOException {
-        final boolean debug = log.isDebugEnabled();
+        final boolean debug = LOG.isDebugEnabled();
 
         JournalTopicAck ack = new JournalTopicAck();
         ack.setDestination(destination);
@@ -97,20 +97,23 @@
 
         final SubscriptionKey key = new SubscriptionKey(clientId, subscriptionName);
         if (!context.isInTransaction()) {
-            if (debug)
-                log.debug("Journalled acknowledge for: " + messageId + ", at: " + location);
+            if (debug) {
+                LOG.debug("Journalled acknowledge for: " + messageId + ", at: " + location);
+            }
             acknowledge(messageId, location, key);
         } else {
-            if (debug)
-                log.debug("Journalled transacted acknowledge for: " + messageId + ", at: " + location);
+            if (debug) {
+                LOG.debug("Journalled transacted acknowledge for: " + messageId + ", at: " + location);
+            }
             synchronized (this) {
                 inFlightTxLocations.add(location);
             }
             transactionStore.acknowledge(this, ack, location);
             context.getTransaction().addSynchronization(new Synchronization() {
                 public void afterCommit() throws Exception {
-                    if (debug)
-                        log.debug("Transacted acknowledge commit for: " + messageId + ", at: " + location);
+                    if (debug) {
+                        LOG.debug("Transacted acknowledge commit for: " + messageId + ", at: " + location);
+                    }
                     synchronized (JournalTopicMessageStore.this) {
                         inFlightTxLocations.remove(location);
                         acknowledge(messageId, location, key);
@@ -118,8 +121,9 @@
                 }
 
                 public void afterRollback() throws Exception {
-                    if (debug)
-                        log.debug("Transacted acknowledge rollback for: " + messageId + ", at: " + location);
+                    if (debug) {
+                        LOG.debug("Transacted acknowledge rollback for: " + messageId + ", at: " + location);
+                    }
                     synchronized (JournalTopicMessageStore.this) {
                         inFlightTxLocations.remove(location);
                     }
@@ -137,7 +141,7 @@
                 longTermStore.acknowledge(context, clientId, subscritionName, messageId);
             }
         } catch (Throwable e) {
-            log.debug("Could not replay acknowledge for message '" + messageId
+            LOG.debug("Could not replay acknowledge for message '" + messageId
                       + "'.  Message may have already been acknowledged. reason: " + e);
         }
     }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalTransactionStore.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalTransactionStore.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalTransactionStore.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalTransactionStore.java Thu Aug  9 09:37:49 2007
@@ -133,8 +133,9 @@
         synchronized (inflightTransactions) {
             tx = (Tx)inflightTransactions.remove(txid);
         }
-        if (tx == null)
+        if (tx == null) {
             return;
+        }
         peristenceAdapter.writeCommand(new JournalTransaction(JournalTransaction.XA_PREPARE, txid, false),
                                        true);
         synchronized (preparedTransactions) {
@@ -151,8 +152,9 @@
         synchronized (inflightTransactions) {
             tx = (Tx)inflightTransactions.remove(txid);
         }
-        if (tx == null)
+        if (tx == null) {
             return;
+        }
         synchronized (preparedTransactions) {
             preparedTransactions.put(txid, tx);
         }
@@ -185,8 +187,9 @@
                 tx = (Tx)inflightTransactions.remove(txid);
             }
         }
-        if (tx == null)
+        if (tx == null) {
             return;
+        }
         if (txid.isXATransaction()) {
             peristenceAdapter.writeCommand(new JournalTransaction(JournalTransaction.XA_COMMIT, txid,
                                                                   wasPrepared), true);
@@ -221,10 +224,11 @@
         synchronized (inflightTransactions) {
             tx = (Tx)inflightTransactions.remove(txid);
         }
-        if (tx != null)
+        if (tx != null) {
             synchronized (preparedTransactions) {
                 tx = (Tx)preparedTransactions.remove(txid);
             }
+        }
         if (tx != null) {
             if (txid.isXATransaction()) {
                 peristenceAdapter.writeCommand(new JournalTransaction(JournalTransaction.XA_ROLLBACK, txid,
@@ -258,7 +262,7 @@
     public void stop() throws Exception {
     }
 
-    synchronized public void recover(TransactionRecoveryListener listener) throws IOException {
+    public synchronized void recover(TransactionRecoveryListener listener) throws IOException {
         // All the in-flight transactions get rolled back..
         synchronized (inflightTransactions) {
             inflightTransactions.clear();

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/ConsumerMessageRef.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/ConsumerMessageRef.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/ConsumerMessageRef.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/ConsumerMessageRef.java Thu Aug  9 09:37:49 2007
@@ -1,17 +1,19 @@
 /**
- * 
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE
- * file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file
- * to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
- * License. You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
-
 package org.apache.activemq.store.kahadaptor;
 
 import org.apache.activemq.command.MessageId;

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaMessageStore.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaMessageStore.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaMessageStore.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaMessageStore.java Thu Aug  9 09:37:49 2007
@@ -1,17 +1,19 @@
 /**
- * 
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE
- * file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file
- * to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
- * License. You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
-
 package org.apache.activemq.store.kahadaptor;
 
 import java.io.IOException;

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaPersistenceAdapter.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaPersistenceAdapter.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaPersistenceAdapter.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaPersistenceAdapter.java Thu Aug  9 09:37:49 2007
@@ -1,17 +1,19 @@
 /**
- * 
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE
- * file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file
- * to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
- * License. You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
-
 package org.apache.activemq.store.kahadaptor;
 
 import java.io.File;
@@ -54,7 +56,7 @@
 public class KahaPersistenceAdapter implements PersistenceAdapter {
 
     private static final int STORE_LOCKED_WAIT_DELAY = 10 * 1000;
-    private static final Log log = LogFactory.getLog(KahaPersistenceAdapter.class);
+    private static final Log LOG = LogFactory.getLog(KahaPersistenceAdapter.class);
     static final String PREPARED_TRANSACTIONS_NAME = "PreparedTransactions";
     KahaTransactionStore transactionStore;
     ConcurrentHashMap<ActiveMQTopic, TopicMessageStore> topics = new ConcurrentHashMap<ActiveMQTopic, TopicMessageStore>();
@@ -79,7 +81,7 @@
                 }
             }
         } catch (IOException e) {
-            log.error("Failed to get destinations ", e);
+            LOG.error("Failed to get destinations ", e);
         }
         return rc;
     }
@@ -136,7 +138,7 @@
                     transactionStore = new KahaTransactionStore(this, container);
                     break;
                 } catch (StoreLockedExcpetion e) {
-                    log.info("Store is locked... waiting " + (STORE_LOCKED_WAIT_DELAY / 1000)
+                    LOG.info("Store is locked... waiting " + (STORE_LOCKED_WAIT_DELAY / 1000)
                              + " seconds for the Store to be unlocked.");
                     try {
                         Thread.sleep(STORE_LOCKED_WAIT_DELAY);
@@ -200,7 +202,7 @@
         throws IOException {
         Store store = getStore();
         MapContainer<String, Object> container = store.getMapContainer(id, containerName);
-        container.setKeyMarshaller(Store.StringMarshaller);
+        container.setKeyMarshaller(Store.STRING_MARSHALLER);
         container.setValueMarshaller(createMessageMarshaller());
         container.load();
         return container;

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaReferenceStore.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaReferenceStore.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaReferenceStore.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaReferenceStore.java Thu Aug  9 09:37:49 2007
@@ -1,17 +1,19 @@
 /**
- * 
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE
- * file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file
- * to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
- * License. You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
-
 package org.apache.activemq.store.kahadaptor;
 
 import java.io.IOException;
@@ -115,8 +117,9 @@
 
     public synchronized ReferenceData getMessageReference(MessageId identity) throws IOException {
         ReferenceRecord result = messageContainer.get(identity);
-        if (result == null)
+        if (result == null) {
             return null;
+        }
         return result.getData();
     }
 

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaReferenceStoreAdapter.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaReferenceStoreAdapter.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaReferenceStoreAdapter.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaReferenceStoreAdapter.java Thu Aug  9 09:37:49 2007
@@ -48,7 +48,7 @@
 
 public class KahaReferenceStoreAdapter extends KahaPersistenceAdapter implements ReferenceStoreAdapter {
 
-    private static final Log log = LogFactory.getLog(KahaPersistenceAdapter.class);
+    private static final Log LOG = LogFactory.getLog(KahaPersistenceAdapter.class);
     private static final String STORE_STATE = "store-state";
     private static final String RECORD_REFERENCES = "record-references";
     private static final String TRANSACTIONS = "transactions-state";
@@ -91,7 +91,7 @@
         durableSubscribers.setMarshaller(new CommandMarshaller());
         preparedTransactions = store.getMapContainer("transactions", TRANSACTIONS, false);
         // need to set the Marshallers here
-        preparedTransactions.setKeyMarshaller(Store.CommandMarshaller);
+        preparedTransactions.setKeyMarshaller(Store.COMMAND_MARSHALLER);
         preparedTransactions.setValueMarshaller(new AMQTxMarshaller(wireFormat));
     }
 
@@ -274,7 +274,7 @@
         try {
             return StoreFactory.open(stateDirectory.getAbsolutePath(), "rw");
         } catch (IOException e) {
-            log.error("Failed to create the state store", e);
+            LOG.error("Failed to create the state store", e);
         }
         return null;
     }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTopicMessageStore.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTopicMessageStore.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTopicMessageStore.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTopicMessageStore.java Thu Aug  9 09:37:49 2007
@@ -1,17 +1,19 @@
 /**
- * 
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE
- * file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file
- * to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
- * License. You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
-
 package org.apache.activemq.store.kahadaptor;
 
 import java.io.IOException;

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTopicReferenceStore.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTopicReferenceStore.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTopicReferenceStore.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTopicReferenceStore.java Thu Aug  9 09:37:49 2007
@@ -1,17 +1,19 @@
 /**
- * 
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE
- * file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file
- * to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
- * License. You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
-
 package org.apache.activemq.store.kahadaptor;
 
 import java.io.IOException;
@@ -90,8 +92,9 @@
 
     public ReferenceData getMessageReference(final MessageId identity) throws IOException {
         final ReferenceRecord result = messageContainer.get(identity);
-        if (result == null)
+        if (result == null) {
             return null;
+        }
         return result.getData();
     }
 

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTransaction.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTransaction.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTransaction.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTransaction.java Thu Aug  9 09:37:49 2007
@@ -33,7 +33,7 @@
  * @version $Revision: 1.4 $
  */
 class KahaTransaction {
-    private static final Log log = LogFactory.getLog(KahaTransaction.class);
+    private static final Log LOG = LogFactory.getLog(KahaTransaction.class);
     protected List list = new ArrayList();
 
     void add(KahaMessageStore store, BaseCommand command) {

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTransactionStore.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTransactionStore.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTransactionStore.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTransactionStore.java Thu Aug  9 09:37:49 2007
@@ -116,7 +116,7 @@
     public void stop() throws Exception {
     }
 
-    synchronized public void recover(TransactionRecoveryListener listener) throws IOException {
+    public synchronized void recover(TransactionRecoveryListener listener) throws IOException {
         for (Iterator i = prepared.entrySet().iterator(); i.hasNext();) {
             Map.Entry entry = (Entry)i.next();
             XATransactionId xid = (XATransactionId)entry.getKey();

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/ReferenceRecord.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/ReferenceRecord.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/ReferenceRecord.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/ReferenceRecord.java Thu Aug  9 09:37:49 2007
@@ -1,17 +1,19 @@
 /**
- * 
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE
- * file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file
- * to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
- * License. You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
-
 package org.apache.activemq.store.kahadaptor;
 
 import org.apache.activemq.store.ReferenceStore.ReferenceData;

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/ReferenceRecordMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/ReferenceRecordMarshaller.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/ReferenceRecordMarshaller.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/ReferenceRecordMarshaller.java Thu Aug  9 09:37:49 2007
@@ -1,17 +1,19 @@
 /**
- * 
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE
- * file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file
- * to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
- * License. You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
-
 package org.apache.activemq.store.kahadaptor;
 
 import java.io.DataInput;

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/TopicSubAck.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/TopicSubAck.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/TopicSubAck.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/TopicSubAck.java Thu Aug  9 09:37:49 2007
@@ -1,17 +1,19 @@
 /**
- * 
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE
- * file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file
- * to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
- * License. You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
-
 package org.apache.activemq.store.kahadaptor;
 
 import org.apache.activemq.kaha.StoreEntry;

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/TopicSubContainer.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/TopicSubContainer.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/TopicSubContainer.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/TopicSubContainer.java Thu Aug  9 09:37:49 2007
@@ -1,15 +1,18 @@
 /**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
  *
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE
- * file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file
- * to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
- * License. You may obtain a copy of the License at
+ *      http://www.apache.org/licenses/LICENSE-2.0
  *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 package org.apache.activemq.store.kahadaptor;
 

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryMessageStore.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryMessageStore.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryMessageStore.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryMessageStore.java Thu Aug  9 09:37:49 2007
@@ -1,17 +1,19 @@
 /**
- * 
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE
- * file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file
- * to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
- * License. You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
-
 package org.apache.activemq.store.memory;
 
 import java.io.IOException;

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryPersistenceAdapter.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryPersistenceAdapter.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryPersistenceAdapter.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryPersistenceAdapter.java Thu Aug  9 09:37:49 2007
@@ -39,7 +39,7 @@
  * @version $Revision: 1.4 $
  */
 public class MemoryPersistenceAdapter implements PersistenceAdapter {
-    private static final Log log = LogFactory.getLog(MemoryPersistenceAdapter.class);
+    private static final Log LOG = LogFactory.getLog(MemoryPersistenceAdapter.class);
 
     MemoryTransactionStore transactionStore;
     ConcurrentHashMap topics = new ConcurrentHashMap();
@@ -142,7 +142,7 @@
         if (value instanceof MemoryMessageStore) {
             return (MemoryMessageStore)value;
         }
-        log.warn("Expected an instance of MemoryMessageStore but was: " + value);
+        LOG.warn("Expected an instance of MemoryMessageStore but was: " + value);
         return null;
     }
 

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryTopicMessageStore.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryTopicMessageStore.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryTopicMessageStore.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryTopicMessageStore.java Thu Aug  9 09:37:49 2007
@@ -1,17 +1,19 @@
 /**
- * 
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE
- * file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file
- * to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
- * License. You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
-
 package org.apache.activemq.store.memory;
 
 import java.io.IOException;

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryTopicSub.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryTopicSub.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryTopicSub.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryTopicSub.java Thu Aug  9 09:37:49 2007
@@ -1,17 +1,19 @@
 /**
- * 
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE
- * file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file
- * to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
- * License. You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
-
 package org.apache.activemq.store.memory;
 
 import java.util.Iterator;

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryTransactionStore.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryTransactionStore.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryTransactionStore.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/memory/MemoryTransactionStore.java Thu Aug  9 09:37:49 2007
@@ -140,8 +140,9 @@
      */
     public void prepare(TransactionId txid) {
         Tx tx = (Tx)inflightTransactions.remove(txid);
-        if (tx == null)
+        if (tx == null) {
             return;
+        }
         preparedTransactions.put(txid, tx);
     }
 
@@ -167,8 +168,9 @@
             tx = (Tx)inflightTransactions.remove(txid);
         }
 
-        if (tx == null)
+        if (tx == null) {
             return;
+        }
         tx.commit();
 
     }
@@ -187,7 +189,7 @@
     public void stop() throws Exception {
     }
 
-    synchronized public void recover(TransactionRecoveryListener listener) throws IOException {
+    public synchronized void recover(TransactionRecoveryListener listener) throws IOException {
         // All the inflight transactions get rolled back..
         inflightTransactions.clear();
         this.doingRecover = true;
@@ -208,8 +210,9 @@
      */
     void addMessage(final MessageStore destination, final Message message) throws IOException {
 
-        if (doingRecover)
+        if (doingRecover) {
             return;
+        }
 
         if (message.getTransactionId() != null) {
             Tx tx = getTx(message.getTransactionId());
@@ -232,8 +235,9 @@
      * @throws IOException
      */
     final void removeMessage(final MessageStore destination, final MessageAck ack) throws IOException {
-        if (doingRecover)
+        if (doingRecover) {
             return;
+        }
 
         if (ack.isInTransaction()) {
             Tx tx = getTx(ack.getTransactionId());

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/thread/DedicatedTaskRunner.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/thread/DedicatedTaskRunner.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/thread/DedicatedTaskRunner.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/thread/DedicatedTaskRunner.java Thu Aug  9 09:37:49 2007
@@ -46,8 +46,9 @@
      */
     public void wakeup() throws InterruptedException {
         synchronized (mutex) {
-            if (shutdown)
+            if (shutdown) {
                 return;
+            }
             pending = true;
             mutex.notifyAll();
         }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/thread/DefaultThreadPools.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/thread/DefaultThreadPools.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/thread/DefaultThreadPools.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/thread/DefaultThreadPools.java Thu Aug  9 09:37:49 2007
@@ -26,9 +26,9 @@
  */
 public class DefaultThreadPools {
 
-    private static final Executor defaultPool;
+    private static final Executor DEFAULT_POOL;
     static {
-        defaultPool = new ScheduledThreadPoolExecutor(5, new ThreadFactory() {
+        DEFAULT_POOL = new ScheduledThreadPoolExecutor(5, new ThreadFactory() {
             public Thread newThread(Runnable runnable) {
                 Thread thread = new Thread(runnable, "ActiveMQ Default Thread Pool Thread");
                 thread.setDaemon(true);
@@ -37,14 +37,14 @@
         });
     }
     
-    private static final TaskRunnerFactory defaultTaskRunnerFactory = new TaskRunnerFactory();
+    private static final TaskRunnerFactory DEFAULT_TASK_RUNNER_FACTORY = new TaskRunnerFactory();
     
     public static Executor getDefaultPool() {
-        return defaultPool;
+        return DEFAULT_POOL;
     }
     
     public static TaskRunnerFactory getDefaultTaskRunnerFactory() {
-        return defaultTaskRunnerFactory;
+        return DEFAULT_TASK_RUNNER_FACTORY;
     }
     
 }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/thread/PooledTaskRunner.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/thread/PooledTaskRunner.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/thread/PooledTaskRunner.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/thread/PooledTaskRunner.java Thu Aug  9 09:37:49 2007
@@ -61,8 +61,9 @@
             // queued=true, iterating=true : wakeup() called after task
             // execution was started.
 
-            if (queued || shutdown)
+            if (queued || shutdown) {
                 return;
+            }
 
             queued = true;
 
@@ -130,8 +131,9 @@
 
             // If we could not iterate all the items
             // then we need to re-queue.
-            if (!done)
+            if (!done) {
                 queued = true;
+            }
 
             if (queued) {
                 executor.execute(runable);

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/thread/Scheduler.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/thread/Scheduler.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/thread/Scheduler.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/thread/Scheduler.java Thu Aug  9 09:37:49 2007
@@ -28,7 +28,7 @@
  */
 public class Scheduler {
 
-    public static final ScheduledThreadPoolExecutor clockDaemon = new ScheduledThreadPoolExecutor(5, new ThreadFactory() {
+    public static final ScheduledThreadPoolExecutor CLOCK_DAEMON = new ScheduledThreadPoolExecutor(5, new ThreadFactory() {
         public Thread newThread(Runnable runnable) {
             Thread thread = new Thread(runnable, "ActiveMQ Scheduler");
             thread.setDaemon(true);
@@ -36,27 +36,27 @@
         }
     });
     static {
-        clockDaemon.setKeepAliveTime(5, TimeUnit.SECONDS);
+        CLOCK_DAEMON.setKeepAliveTime(5, TimeUnit.SECONDS);
     }
-    static HashMap clockTickets = new HashMap();
+    private static final HashMap CLOCK_TICKETS = new HashMap();
 
-    synchronized static public void executePeriodically(final Runnable task, long period) {
-        ScheduledFuture ticket = clockDaemon.scheduleAtFixedRate(task, period, period, TimeUnit.MILLISECONDS);
-        clockTickets.put(task, ticket);
+    public static synchronized void executePeriodically(final Runnable task, long period) {
+        ScheduledFuture ticket = CLOCK_DAEMON.scheduleAtFixedRate(task, period, period, TimeUnit.MILLISECONDS);
+        CLOCK_TICKETS.put(task, ticket);
     }
 
-    synchronized static public void cancel(Runnable task) {
-        ScheduledFuture ticket = (ScheduledFuture)clockTickets.remove(task);
+    public static synchronized void cancel(Runnable task) {
+        ScheduledFuture ticket = (ScheduledFuture)CLOCK_TICKETS.remove(task);
         if (ticket != null) {
             ticket.cancel(false);
-
-            if (ticket instanceof Runnable)
-                clockDaemon.remove((Runnable)ticket);
+            if (ticket instanceof Runnable) {
+                CLOCK_DAEMON.remove((Runnable)ticket);
+            }
         }
     }
 
     public static void executeAfterDelay(final Runnable task, long redeliveryDelay) {
-        clockDaemon.schedule(task, redeliveryDelay, TimeUnit.MILLISECONDS);
+        CLOCK_DAEMON.schedule(task, redeliveryDelay, TimeUnit.MILLISECONDS);
     }
 
 }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/thread/Task.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/thread/Task.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/thread/Task.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/thread/Task.java Thu Aug  9 09:37:49 2007
@@ -22,5 +22,5 @@
  * @version $Revision: 1.3 $
  */
 public interface Task {
-    public boolean iterate();
+    boolean iterate();
 }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/thread/TaskRunner.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/thread/TaskRunner.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/thread/TaskRunner.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/thread/TaskRunner.java Thu Aug  9 09:37:49 2007
@@ -22,7 +22,7 @@
  * @version $Revision: 1.3 $
  */
 public interface TaskRunner {
-    public abstract void wakeup() throws InterruptedException;
-    public abstract void shutdown() throws InterruptedException;
-    public abstract void shutdown(long timeout) throws InterruptedException;
+    void wakeup() throws InterruptedException;
+    void shutdown() throws InterruptedException;
+    void shutdown(long timeout) throws InterruptedException;
 }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/thread/Valve.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/thread/Valve.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/thread/Valve.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/thread/Valve.java Thu Aug  9 09:37:49 2007
@@ -22,7 +22,7 @@
  * 
  * @version $Revision: 1.2 $
  */
-final public class Valve {
+public final class Valve {
 
     private final Object mutex = new Object();
     private boolean on;

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transaction/LocalTransaction.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transaction/LocalTransaction.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transaction/LocalTransaction.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transaction/LocalTransaction.java Thu Aug  9 09:37:49 2007
@@ -32,7 +32,7 @@
  */
 public class LocalTransaction extends Transaction {
 
-    private static final Log log = LogFactory.getLog(LocalTransaction.class);
+    private static final Log LOG = LogFactory.getLog(LocalTransaction.class);
 
     private final TransactionStore transactionStore;
     private final LocalTransactionId xid;
@@ -51,7 +51,7 @@
         } catch (XAException e) {
             throw e;
         } catch (Throwable e) {
-            log.warn("COMMIT FAILED: ", e);
+            LOG.warn("COMMIT FAILED: ", e);
             rollback();
             // Let them know we rolled back.
             XAException xae = new XAException("COMMIT FAILED: Transaction rolled back.");
@@ -69,7 +69,7 @@
         } catch (Throwable e) {
             // I guess this could happen. Post commit task failed
             // to execute properly.
-            log.warn("POST COMMIT FAILED: ", e);
+            LOG.warn("POST COMMIT FAILED: ", e);
             XAException xae = new XAException("POST COMMIT FAILED");
             xae.errorCode = XAException.XAER_RMERR;
             xae.initCause(e);
@@ -86,7 +86,7 @@
         try {
             fireAfterRollback();
         } catch (Throwable e) {
-            log.warn("POST ROLLBACK FAILED: ", e);
+            LOG.warn("POST ROLLBACK FAILED: ", e);
             XAException xae = new XAException("POST ROLLBACK FAILED");
             xae.errorCode = XAException.XAER_RMERR;
             xae.initCause(e);

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transaction/Transaction.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transaction/Transaction.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transaction/Transaction.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transaction/Transaction.java Thu Aug  9 09:37:49 2007
@@ -32,10 +32,10 @@
  */
 public abstract class Transaction {
 
-    static final public byte START_STATE = 0; // can go to: 1,2,3
-    static final public byte IN_USE_STATE = 1; // can go to: 2,3
-    static final public byte PREPARED_STATE = 2; // can go to: 3
-    static final public byte FINISHED_STATE = 3;
+    public static final byte START_STATE = 0; // can go to: 1,2,3
+    public static final byte IN_USE_STATE = 1; // can go to: 2,3
+    public static final byte PREPARED_STATE = 2; // can go to: 3
+    public static final byte FINISHED_STATE = 3;
 
     private ArrayList synchronizations = new ArrayList();
     private byte state = START_STATE;
@@ -98,13 +98,13 @@
         return super.toString() + "[synchronizations=" + synchronizations + "]";
     }
 
-    abstract public void commit(boolean onePhase) throws XAException, IOException;
+    public abstract void commit(boolean onePhase) throws XAException, IOException;
 
-    abstract public void rollback() throws XAException, IOException;
+    public abstract void rollback() throws XAException, IOException;
 
-    abstract public int prepare() throws XAException, IOException;
+    public abstract int prepare() throws XAException, IOException;
 
-    abstract public TransactionId getTransactionId();
+    public abstract TransactionId getTransactionId();
 
     public boolean isPrepared() {
         return getState() == PREPARED_STATE;

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transaction/XATransaction.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transaction/XATransaction.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transaction/XATransaction.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transaction/XATransaction.java Thu Aug  9 09:37:49 2007
@@ -33,7 +33,7 @@
  */
 public class XATransaction extends Transaction {
 
-    private static final Log log = LogFactory.getLog(XATransaction.class);
+    private static final Log LOG = LogFactory.getLog(XATransaction.class);
 
     private final TransactionStore transactionStore;
     private final XATransactionId xid;
@@ -46,8 +46,9 @@
     }
 
     public void commit(boolean onePhase) throws XAException, IOException {
-        if (log.isDebugEnabled())
-            log.debug("XA Transaction commit: " + xid);
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("XA Transaction commit: " + xid);
+        }
 
         switch (getState()) {
         case START_STATE:
@@ -95,7 +96,7 @@
         } catch (XAException e) {
             throw e;
         } catch (Throwable e) {
-            log.warn("PRE-PREPARE FAILED: ", e);
+            LOG.warn("PRE-PREPARE FAILED: ", e);
             rollback();
             XAException xae = new XAException("PRE-PREPARE FAILED: Transaction rolled back.");
             xae.errorCode = XAException.XA_RBOTHER;
@@ -110,7 +111,7 @@
         } catch (Throwable e) {
             // I guess this could happen. Post commit task failed
             // to execute properly.
-            log.warn("POST COMMIT FAILED: ", e);
+            LOG.warn("POST COMMIT FAILED: ", e);
             XAException xae = new XAException("POST COMMIT FAILED");
             xae.errorCode = XAException.XAER_RMERR;
             xae.initCause(e);
@@ -120,8 +121,9 @@
 
     public void rollback() throws XAException, IOException {
 
-        if (log.isDebugEnabled())
-            log.debug("XA Transaction rollback: " + xid);
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("XA Transaction rollback: " + xid);
+        }
 
         switch (getState()) {
         case START_STATE:
@@ -152,7 +154,7 @@
         } catch (Throwable e) {
             // I guess this could happen. Post commit task failed
             // to execute properly.
-            log.warn("POST ROLLBACK FAILED: ", e);
+            LOG.warn("POST ROLLBACK FAILED: ", e);
             XAException xae = new XAException("POST ROLLBACK FAILED");
             xae.errorCode = XAException.XAER_RMERR;
             xae.initCause(e);
@@ -161,8 +163,9 @@
     }
 
     public int prepare() throws XAException, IOException {
-        if (log.isDebugEnabled())
-            log.debug("XA Transaction prepare: " + xid);
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("XA Transaction prepare: " + xid);
+        }
 
         switch (getState()) {
         case START_STATE:

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/CommandJoiner.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/CommandJoiner.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/CommandJoiner.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/CommandJoiner.java Thu Aug  9 09:37:49 2007
@@ -35,7 +35,7 @@
  * @version $Revision$
  */
 public class CommandJoiner extends TransportFilter {
-    private static final Log log = LogFactory.getLog(CommandJoiner.class);
+    private static final Log LOG = LogFactory.getLog(CommandJoiner.class);
 
     private ByteArrayOutputStream out = new ByteArrayOutputStream();
     private OpenWireFormat wireFormat;
@@ -68,7 +68,7 @@
 
                     getTransportListener().onCommand(completeCommand);
                 } catch (IOException e) {
-                    log.warn("Failed to unmarshal partial command: " + command);
+                    LOG.warn("Failed to unmarshal partial command: " + command);
                     getTransportListener().onException(e);
                 }
             }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/CompositeTransport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/CompositeTransport.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/CompositeTransport.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/CompositeTransport.java Thu Aug  9 09:37:49 2007
@@ -19,6 +19,6 @@
 import java.net.URI;
 
 public interface CompositeTransport extends Transport {
-    public void add(URI[] uris);
-    public void remove(URI[] uris);
+    void add(URI[] uris);
+    void remove(URI[] uris);
 }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/FutureResponse.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/FutureResponse.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/FutureResponse.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/FutureResponse.java Thu Aug  9 09:37:49 2007
@@ -26,7 +26,7 @@
 import org.apache.commons.logging.LogFactory;
 
 public class FutureResponse {
-    private static final Log log = LogFactory.getLog(FutureResponse.class);
+    private static final Log LOG = LogFactory.getLog(FutureResponse.class);
 
     private final ResponseCallback responseCallback;
     private final ArrayBlockingQueue responseSlot = new ArrayBlockingQueue(1);
@@ -40,8 +40,8 @@
             return (Response)responseSlot.take();
         } catch (InterruptedException e) {
             Thread.currentThread().interrupt();
-            if (log.isDebugEnabled()) {
-                log.debug("Operation interupted: " + e, e);
+            if (LOG.isDebugEnabled()) {
+                LOG.debug("Operation interupted: " + e, e);
             }
             throw new InterruptedIOException("Interrupted.");
         }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/InactivityMonitor.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/InactivityMonitor.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/InactivityMonitor.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/InactivityMonitor.java Thu Aug  9 09:37:49 2007
@@ -33,7 +33,7 @@
  */
 public class InactivityMonitor extends TransportFilter {
 
-    private final Log LOG = LogFactory.getLog(InactivityMonitor.class);
+    private static final Log LOG = LogFactory.getLog(InactivityMonitor.class);
 
     private WireFormatInfo localWireFormatInfo;
     private WireFormatInfo remoteWireFormatInfo;
@@ -155,13 +155,16 @@
         getTransportListener().onException(error);
     }
 
-    synchronized private void startMonitorThreads() throws IOException {
-        if (monitorStarted.get())
+    private synchronized void startMonitorThreads() throws IOException {
+        if (monitorStarted.get()) {
             return;
-        if (localWireFormatInfo == null)
+        }
+        if (localWireFormatInfo == null) {
             return;
-        if (remoteWireFormatInfo == null)
+        }
+        if (remoteWireFormatInfo == null) {
             return;
+        }
 
         long l = Math.min(localWireFormatInfo.getMaxInactivityDuration(), remoteWireFormatInfo.getMaxInactivityDuration());
         if (l > 0) {
@@ -174,7 +177,7 @@
     /**
      *
      */
-    synchronized private void stopMonitorThreads() {
+    private synchronized void stopMonitorThreads() {
         if (monitorStarted.compareAndSet(true, false)) {
             Scheduler.cancel(readChecker);
             Scheduler.cancel(writeChecker);

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/ResponseCorrelator.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/ResponseCorrelator.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/ResponseCorrelator.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/ResponseCorrelator.java Thu Aug  9 09:37:49 2007
@@ -1,17 +1,19 @@
 /**
- * 
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE
- * file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file
- * to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
- * License. You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
-
 package org.apache.activemq.transport;
 
 import java.io.IOException;
@@ -90,8 +92,9 @@
             if (future != null) {
                 future.set(response);
             } else {
-                if (debug)
+                if (debug) {
                     LOG.debug("Received unexpected response for command id: " + response.getCorrelationId());
+                }
             }
         } else {
             getTransportListener().onCommand(command);

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/Transport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/Transport.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/Transport.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/Transport.java Thu Aug  9 09:37:49 2007
@@ -34,7 +34,7 @@
      * @param command
      * @throws IOException
      */
-    public void oneway(Object command) throws IOException;
+    void oneway(Object command) throws IOException;
 
     /**
      * An asynchronous request response where the Receipt will be returned in
@@ -46,7 +46,7 @@
      * @return the FutureResponse
      * @throws IOException
      */
-    public FutureResponse asyncRequest(Object command, ResponseCallback responseCallback) throws IOException;
+    FutureResponse asyncRequest(Object command, ResponseCallback responseCallback) throws IOException;
 
     /**
      * A synchronous request response
@@ -55,7 +55,7 @@
      * @return the response
      * @throws IOException
      */
-    public Object request(Object command) throws IOException;
+    Object request(Object command) throws IOException;
 
     /**
      * A synchronous request response
@@ -65,14 +65,14 @@
      * @return the repsonse or null if timeout
      * @throws IOException
      */
-    public Object request(Object command, int timeout) throws IOException;
+    Object request(Object command, int timeout) throws IOException;
 
     // /**
     // * A one way asynchronous send
     // * @param command
     // * @throws IOException
     // */
-    // public void oneway(Command command) throws IOException;
+    // void oneway(Command command) throws IOException;
     //
     // /**
     // * An asynchronous request response where the Receipt will be returned
@@ -84,7 +84,7 @@
     // * @return the FutureResponse
     // * @throws IOException
     // */
-    // public FutureResponse asyncRequest(Command command, ResponseCallback
+    // FutureResponse asyncRequest(Command command, ResponseCallback
     // responseCallback) throws IOException;
     //    
     // /**
@@ -93,7 +93,7 @@
     // * @return the response
     // * @throws IOException
     // */
-    // public Response request(Command command) throws IOException;
+    // Response request(Command command) throws IOException;
     //
     // /**
     // * A synchronous request response
@@ -102,38 +102,38 @@
     // * @return the repsonse or null if timeout
     // * @throws IOException
     // */
-    // public Response request(Command command, int timeout) throws IOException;
+    // Response request(Command command, int timeout) throws IOException;
 
     /**
      * Returns the current transport listener
      * 
      * @return
      */
-    public TransportListener getTransportListener();
+    TransportListener getTransportListener();
 
     /**
      * Registers an inbound command listener
      * 
      * @param commandListener
      */
-    public void setTransportListener(TransportListener commandListener);
+    void setTransportListener(TransportListener commandListener);
 
     /**
      * @param target
      * @return the target
      */
-    public Object narrow(Class target);
+    Object narrow(Class target);
 
     /**
      * @return the remote address for this connection
      */
-    public String getRemoteAddress();
+    String getRemoteAddress();
 
     /**
      * Indicates if the transport can handle faults
      * 
      * @return tru if fault tolerant
      */
-    public boolean isFaultTolerant();
+    boolean isFaultTolerant();
 
 }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportFactory.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportFactory.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportFactory.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportFactory.java Thu Aug  9 09:37:49 2007
@@ -45,10 +45,10 @@
         return doCompositeConnect(location);
     }
 
-    static final private FactoryFinder transportFactoryFinder = new FactoryFinder("META-INF/services/org/apache/activemq/transport/");
-    static final private FactoryFinder wireFormatFactoryFinder = new FactoryFinder("META-INF/services/org/apache/activemq/wireformat/");
+    private static final FactoryFinder TRANSPORT_FACTORY_FINDER = new FactoryFinder("META-INF/services/org/apache/activemq/transport/");
+    private static final FactoryFinder WIREFORMAT_FACTORY_FINDER = new FactoryFinder("META-INF/services/org/apache/activemq/wireformat/");
 
-    static final private ConcurrentHashMap transportFactorys = new ConcurrentHashMap();
+    private static final ConcurrentHashMap TRANSPORT_FACTORYS = new ConcurrentHashMap();
 
     /**
      * Creates a normal transport.
@@ -155,14 +155,15 @@
      */
     private static TransportFactory findTransportFactory(URI location) throws IOException {
         String scheme = location.getScheme();
-        if (scheme == null)
+        if (scheme == null) {
             throw new IOException("Transport not scheme specified: [" + location + "]");
-        TransportFactory tf = (TransportFactory)transportFactorys.get(scheme);
+        }
+        TransportFactory tf = (TransportFactory)TRANSPORT_FACTORYS.get(scheme);
         if (tf == null) {
             // Try to load if from a META-INF property.
             try {
-                tf = (TransportFactory)transportFactoryFinder.newInstance(scheme);
-                transportFactorys.put(scheme, tf);
+                tf = (TransportFactory)TRANSPORT_FACTORY_FINDER.newInstance(scheme);
+                TRANSPORT_FACTORYS.put(scheme, tf);
             } catch (Throwable e) {
                 throw IOExceptionSupport.create("Transport scheme NOT recognized: [" + scheme + "]", e);
             }
@@ -178,11 +179,12 @@
 
     protected WireFormatFactory createWireFormatFactory(Map options) throws IOException {
         String wireFormat = (String)options.get("wireFormat");
-        if (wireFormat == null)
+        if (wireFormat == null) {
             wireFormat = getDefaultWireFormatType();
+        }
 
         try {
-            WireFormatFactory wff = (WireFormatFactory)wireFormatFactoryFinder.newInstance(wireFormat);
+            WireFormatFactory wff = (WireFormatFactory)WIREFORMAT_FACTORY_FINDER.newInstance(wireFormat);
             IntrospectionSupport.setProperties(wff, options, "wireFormat.");
             return wff;
         } catch (Throwable e) {

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportFilter.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportFilter.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportFilter.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportFilter.java Thu Aug  9 09:37:49 2007
@@ -22,7 +22,7 @@
  * @version $Revision: 1.5 $
  */
 public class TransportFilter implements TransportListener, Transport {
-    final protected Transport next;
+    protected final Transport next;
     protected TransportListener transportListener;
 
     public TransportFilter(Transport next) {
@@ -35,10 +35,11 @@
 
     public void setTransportListener(TransportListener channelListener) {
         this.transportListener = channelListener;
-        if (channelListener == null)
+        if (channelListener == null) {
             next.setTransportListener(null);
-        else
+        } else {
             next.setTransportListener(this);
+        }
     }
 
     /**
@@ -46,10 +47,12 @@
      * @throws IOException if the next channel has not been set.
      */
     public void start() throws Exception {
-        if (next == null)
+        if (next == null) {
             throw new IOException("The next channel has not been set.");
-        if (transportListener == null)
+        }
+        if (transportListener == null) {
             throw new IOException("The command listener has not been set.");
+        }
         next.start();
     }
 



Mime
View raw message