You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by js...@apache.org on 2006/03/10 16:53:34 UTC

svn commit: r384826 [2/3] - in /incubator/activemq/trunk/activemq-core: ./ src/gram/java/org/apache/activemq/openwire/tool/ src/main/java/org/apache/activemq/broker/ src/main/java/org/apache/activemq/broker/ft/ src/main/java/org/apache/activemq/command...

Added: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/multicast/MulticastTransportFactory.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/multicast/MulticastTransportFactory.java?rev=384826&view=auto
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/multicast/MulticastTransportFactory.java (added)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/multicast/MulticastTransportFactory.java Fri Mar 10 07:53:21 2006
@@ -0,0 +1,39 @@
+/**
+ *
+ * Copyright 2005-2006 The Apache Software Foundation
+ *
+ * Licensed 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.multicast;
+
+import org.activeio.command.WireFormat;
+import org.apache.activemq.openwire.OpenWireFormat;
+import org.apache.activemq.transport.Transport;
+import org.apache.activemq.transport.udp.UdpTransportFactory;
+
+import java.io.IOException;
+import java.net.URI;
+import java.net.UnknownHostException;
+
+/**
+ * A factory of multicast transport classes
+ * 
+ * @version $Revision$
+ */
+public class MulticastTransportFactory extends UdpTransportFactory {
+
+    protected Transport createTransport(URI location, WireFormat wf) throws UnknownHostException, IOException {
+        OpenWireFormat wireFormat = asOpenWireFormat(wf);
+        return new MulticastTransport(wireFormat, location);
+    }
+}

Propchange: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/multicast/MulticastTransportFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/multicast/MulticastTransportFactory.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/multicast/MulticastTransportFactory.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/multicast/package.html
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/multicast/package.html?rev=384826&view=auto
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/multicast/package.html (added)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/multicast/package.html Fri Mar 10 07:53:21 2006
@@ -0,0 +1,9 @@
+<html>
+<head>
+</head>
+<body>
+
+A Multicast based Transport implementation.
+
+</body>
+</html>

Propchange: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/multicast/package.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/multicast/package.html
------------------------------------------------------------------------------
    svn:executable = *

Propchange: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/multicast/package.html
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/multicast/package.html
------------------------------------------------------------------------------
    svn:mime-type = text/html

Added: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/replay/ExceptionIfDroppedReplayStrategy.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/replay/ExceptionIfDroppedReplayStrategy.java?rev=384826&view=auto
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/replay/ExceptionIfDroppedReplayStrategy.java (added)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/replay/ExceptionIfDroppedReplayStrategy.java Fri Mar 10 07:53:21 2006
@@ -0,0 +1,38 @@
+/**
+ *
+ * Copyright 2005-2006 The Apache Software Foundation
+ *
+ * Licensed 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.replay;
+
+import org.apache.activemq.transport.ReliableTransport;
+
+import java.io.IOException;
+
+/**
+ * Throws an exception if packets are dropped causing the transport to be closed.
+ * 
+ * @version $Revision$
+ */
+public class ExceptionIfDroppedReplayStrategy implements ReplayStrategy {
+
+    public void onDroppedPackets(ReliableTransport transport, long expectedCounter, long actualCounter) throws IOException {
+        long count = actualCounter - expectedCounter;
+        throw new IOException("Packets dropped on: " + transport + " count: " + count +  " expected: " + expectedCounter + " but was: " + actualCounter);
+    }
+
+    public void onReceivedPacket(ReliableTransport transport, long expectedCounter) {
+    }
+
+}

Propchange: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/replay/ExceptionIfDroppedReplayStrategy.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/replay/ExceptionIfDroppedReplayStrategy.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/replay/ExceptionIfDroppedReplayStrategy.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/replay/ReplayStrategy.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/replay/ReplayStrategy.java?rev=384826&view=auto
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/replay/ReplayStrategy.java (added)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/replay/ReplayStrategy.java Fri Mar 10 07:53:21 2006
@@ -0,0 +1,35 @@
+/**
+ *
+ * Copyright 2005-2006 The Apache Software Foundation
+ *
+ * Licensed 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.replay;
+
+import org.apache.activemq.transport.ReliableTransport;
+
+import java.io.IOException;
+
+/**
+ * A pluggable strategy for how to deal with dropped packets.
+ * 
+ * @version $Revision$
+ */
+public interface ReplayStrategy {
+
+    void onDroppedPackets(ReliableTransport transport, long expectedCounter, long actualCounter) throws IOException;
+
+    void onReceivedPacket(ReliableTransport transport, long expectedCounter);
+
+}
+

Propchange: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/replay/ReplayStrategy.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/replay/ReplayStrategy.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/replay/ReplayStrategy.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/CommandChannel.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/CommandChannel.java?rev=384826&r1=384825&r2=384826&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/CommandChannel.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/CommandChannel.java Fri Mar 10 07:53:21 2006
@@ -16,11 +16,15 @@
  */
 package org.apache.activemq.transport.udp;
 
+import org.activeio.ByteSequence;
 import org.apache.activemq.Service;
 import org.apache.activemq.command.Command;
+import org.apache.activemq.command.Endpoint;
+import org.apache.activemq.command.LastPartialCommand;
+import org.apache.activemq.command.PartialCommand;
 import org.apache.activemq.openwire.BooleanStream;
 import org.apache.activemq.openwire.OpenWireFormat;
-import org.apache.activemq.transport.udp.replay.DatagramReplayStrategy;
+import org.apache.activemq.transport.TransportListener;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
@@ -47,34 +51,27 @@
     private OpenWireFormat wireFormat;
     private ByteBufferPool bufferPool;
     private int datagramSize = 4 * 1024;
-    private DatagramReplayStrategy replayStrategy;
     private SocketAddress targetAddress;
     private DatagramHeaderMarshaller headerMarshaller;
-    private final boolean checkSequenceNumbers;
 
     // reading
     private Object readLock = new Object();
     private ByteBuffer readBuffer;
-    private DatagramReadBuffer readStack;
     private SocketAddress lastReadDatagramAddress;
 
     // writing
     private Object writeLock = new Object();
     private ByteBuffer writeBuffer;
-    private BooleanStream bs = new BooleanStream();
-    private int largeMessageBufferSize = 128 * 1024;
-    private DatagramHeader header = new DatagramHeader();
+    private int defaultMarshalBufferSize = 64 * 1024;
 
     public CommandChannel(String name, DatagramChannel channel, OpenWireFormat wireFormat, ByteBufferPool bufferPool, int datagramSize,
-            DatagramReplayStrategy replayStrategy, SocketAddress targetAddress, boolean checkSequenceNumbers, DatagramHeaderMarshaller headerMarshaller) {
+            SocketAddress targetAddress, DatagramHeaderMarshaller headerMarshaller) {
         this.name = name;
         this.channel = channel;
         this.wireFormat = wireFormat;
         this.bufferPool = bufferPool;
         this.datagramSize = datagramSize;
-        this.replayStrategy = replayStrategy;
         this.targetAddress = targetAddress;
-        this.checkSequenceNumbers = checkSequenceNumbers;
         this.headerMarshaller = headerMarshaller;
     }
 
@@ -87,9 +84,6 @@
         wireFormat.setCacheEnabled(false);
         wireFormat.setTightEncodingEnabled(true);
 
-        if (checkSequenceNumbers) {
-            readStack = new CommandReadBuffer(name, wireFormat, replayStrategy);
-        }
         bufferPool.setDefaultSize(datagramSize);
         bufferPool.start();
         readBuffer = bufferPool.borrowBuffer();
@@ -100,8 +94,7 @@
         bufferPool.stop();
     }
 
-    public void read(CommandProcessor processor) throws IOException {
-        DatagramHeader header = null;
+    public Command read() throws IOException {
         Command answer = null;
         lastReadDatagramAddress = null;
         synchronized (readLock) {
@@ -109,53 +102,26 @@
             lastReadDatagramAddress = channel.receive(readBuffer);
             readBuffer.flip();
 
-            header = headerMarshaller.readHeader(readBuffer);
-            header.setFromAddress(lastReadDatagramAddress);
+            Endpoint from = headerMarshaller.createEndpoint(readBuffer, lastReadDatagramAddress);
 
-            if (log.isDebugEnabled()) {
-                log.debug("Received datagram on: " + name + " from: " + lastReadDatagramAddress + " header: " + header);
-            }
             int remaining = readBuffer.remaining();
-            int size = header.getDataSize();
-            /*
-             * if (size > remaining) { throw new IOException("Invalid command
-             * size: " + size + " when there are only: " + remaining + " byte(s)
-             * remaining"); } else if (size < remaining) { log.warn("Extra bytes
-             * in buffer. Expecting: " + size + " but has: " + remaining); }
-             */
-            if (size != remaining) {
-                log.warn("Expecting: " + size + " but has: " + remaining);
-            }
-            if (header.isPartial()) {
-                byte[] data = new byte[size];
-                readBuffer.get(data);
-                header.setPartialData(data);
-            }
-            else {
-                byte[] data = new byte[remaining];
-                readBuffer.get(data);
-
-                // TODO use a DataInput implementation that talks direct to the
-                // ByteBuffer
-                DataInputStream dataIn = new DataInputStream(new ByteArrayInputStream(data));
-                Command command = (Command) wireFormat.unmarshal(dataIn);
-                // Command command = (Command) wireFormat.doUnmarshal(dataIn);
-                header.setCommand(command);
-            }
-
-            if (readStack != null) {
-                answer = readStack.read(header);
-            }
-            else {
-                answer = header.getCommand();
-            }
+            
+            byte[] data = new byte[remaining];
+            readBuffer.get(data);
+
+            // TODO could use a DataInput implementation that talks direct to
+            // the
+            // ByteBuffer
+            DataInputStream dataIn = new DataInputStream(new ByteArrayInputStream(data));
+            answer = (Command) wireFormat.unmarshal(dataIn);
+            answer.setFrom(from);
         }
         if (answer != null) {
             if (log.isDebugEnabled()) {
                 log.debug("Channel: " + name + " about to process: " + answer);
             }
-            processor.process(answer, header);
         }
+        return answer;
     }
 
     /**
@@ -164,13 +130,7 @@
      * 
      * @throws IOException
      */
-    public Command onDatagramReceived(DatagramHeader header) throws IOException {
-        if (readStack != null) {
-            return readStack.read(header);
-        }
-        else {
-            return header.getCommand();
-        }
+    public void setWireFormatInfoEndpoint(DatagramEndpoint endpoint) throws IOException {
     }
 
     public void write(Command command) throws IOException {
@@ -180,46 +140,62 @@
     public void write(Command command, SocketAddress address) throws IOException {
         synchronized (writeLock) {
 
-            ByteArrayOutputStream largeBuffer = new ByteArrayOutputStream(largeMessageBufferSize);
+            ByteArrayOutputStream largeBuffer = new ByteArrayOutputStream(defaultMarshalBufferSize);
             wireFormat.marshal(command, new DataOutputStream(largeBuffer));
             byte[] data = largeBuffer.toByteArray();
             int size = data.length;
 
             if (size < datagramSize) {
-                header.incrementCounter();
-                header.setPartial(false);
-                header.setComplete(true);
-                header.setDataSize(size);
                 writeBuffer.clear();
-                headerMarshaller.writeHeader(header, writeBuffer);
+                headerMarshaller.writeHeader(command, writeBuffer);
 
                 writeBuffer.put(data);
 
                 sendWriteBuffer(address);
             }
             else {
-                header.setPartial(true);
-                header.setComplete(false);
-
                 // lets split the command up into chunks
-
                 int offset = 0;
                 boolean lastFragment = false;
                 for (int fragment = 0, length = data.length; !lastFragment; fragment++) {
                     // write the header
                     writeBuffer.clear();
-                    int chunkSize = writeBuffer.capacity() - headerMarshaller.getHeaderSize(header);
+                    headerMarshaller.writeHeader(command, writeBuffer);
+                    
+                    int chunkSize = writeBuffer.remaining();
+
+                    // we need to remove the amount of overhead to write the partial command
+
+                    // lets remove the header of the partial command
+                    // which is the byte for the type and an int for the size of the byte[]
+                    chunkSize -= 1 + 4 + 4;
+                    
+                    if (!wireFormat.isSizePrefixDisabled()) {
+                        // lets write the size of the command buffer
+                        writeBuffer.putInt(chunkSize);
+                        chunkSize -= 4;
+                    }
+                    
                     lastFragment = offset + chunkSize >= length;
                     if (chunkSize + offset > length) {
                         chunkSize = length - offset;
                     }
-                    header.incrementCounter();
-                    header.setDataSize(chunkSize);
-                    header.setComplete(lastFragment);
-                    headerMarshaller.writeHeader(header, writeBuffer);
 
+                    if (lastFragment) {
+                        writeBuffer.put(LastPartialCommand.DATA_STRUCTURE_TYPE);
+                    }
+                    else {
+                        writeBuffer.put(PartialCommand.DATA_STRUCTURE_TYPE);
+                    }
+                    
+                    writeBuffer.putInt(command.getCommandId());
+                    
+                    // size of byte array
+                    writeBuffer.putInt(chunkSize);
+                    
                     // now the data
                     writeBuffer.put(data, offset, chunkSize);
+
                     offset += chunkSize;
                     sendWriteBuffer(address);
                 }
@@ -272,7 +248,7 @@
         writeBuffer.flip();
 
         if (log.isDebugEnabled()) {
-            log.debug("Channel: " + name + " sending datagram to: " + address + " header: " + header);
+            log.debug("Channel: " + name + " sending datagram to: " + address);
         }
         channel.send(writeBuffer, address);
     }

Added: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/DatagramEndpoint.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/DatagramEndpoint.java?rev=384826&view=auto
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/DatagramEndpoint.java (added)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/DatagramEndpoint.java Fri Mar 10 07:53:21 2006
@@ -0,0 +1,40 @@
+/**
+ *
+ * Copyright 2005-2006 The Apache Software Foundation
+ *
+ * Licensed 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.udp;
+
+import org.apache.activemq.command.BaseEndpoint;
+
+import java.net.SocketAddress;
+
+/**
+ * 
+ * @version $Revision$
+ */
+public class DatagramEndpoint extends BaseEndpoint {
+
+    private final SocketAddress address;
+
+    public DatagramEndpoint(String name, SocketAddress address) {
+        super(name);
+        this.address = address;
+    }
+
+    public SocketAddress getAddress() {
+        return address;
+    }
+
+}

Propchange: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/DatagramEndpoint.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/DatagramEndpoint.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/DatagramEndpoint.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/DatagramHeaderMarshaller.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/DatagramHeaderMarshaller.java?rev=384826&r1=384825&r2=384826&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/DatagramHeaderMarshaller.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/DatagramHeaderMarshaller.java Fri Mar 10 07:53:21 2006
@@ -17,6 +17,10 @@
 package org.apache.activemq.transport.udp;
 
 
+import org.apache.activemq.command.Command;
+import org.apache.activemq.command.Endpoint;
+
+import java.net.SocketAddress;
 import java.nio.ByteBuffer;
 
 /**
@@ -25,29 +29,20 @@
  */
 public class DatagramHeaderMarshaller {
 
-    public DatagramHeader createDatagramHeader() {
-        return new DatagramHeader();
-    }
-
-    public DatagramHeader readHeader(ByteBuffer readBuffer) {
-        DatagramHeader answer = createDatagramHeader();
-        answer.setCounter(readBuffer.getLong());
-        answer.setDataSize(readBuffer.getInt());
-        byte flags = readBuffer.get();
-        answer.setFlags(flags);
-        //System.out.println("Read header with counter: " + answer.getCounter() + "size: " + answer.getDataSize() + " with flags: " + flags);
-        return answer;
+    /**
+     * Reads any header if applicable and then creates an endpoint object
+     */
+    public Endpoint createEndpoint(ByteBuffer readBuffer, SocketAddress address) {
+        return new DatagramEndpoint(address.toString(), address);
     }
 
-    public void writeHeader(DatagramHeader header, ByteBuffer writeBuffer) {
-        writeBuffer.putLong(header.getCounter());
-        writeBuffer.putInt(header.getDataSize());
-        byte flags = header.getFlags();
+    public void writeHeader(Command command, ByteBuffer writeBuffer) {
+        /*
+        writeBuffer.putLong(command.getCounter());
+        writeBuffer.putInt(command.getDataSize());
+        byte flags = command.getFlags();
         //System.out.println("Writing header with counter: " + header.getCounter() + " size: " + header.getDataSize() + " with flags: " + flags);
         writeBuffer.put(flags);
-    }
-
-    public int getHeaderSize(DatagramHeader header) {
-        return 8 + 4 + 1;
+        */
     }
 }

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransport.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransport.java?rev=384826&r1=384825&r2=384826&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransport.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransport.java Fri Mar 10 07:53:21 2006
@@ -21,8 +21,8 @@
 import org.apache.activemq.openwire.OpenWireFormat;
 import org.apache.activemq.transport.Transport;
 import org.apache.activemq.transport.TransportThreadSupport;
-import org.apache.activemq.transport.udp.replay.DatagramReplayStrategy;
-import org.apache.activemq.transport.udp.replay.ExceptionIfDroppedPacketStrategy;
+import org.apache.activemq.transport.replay.ReplayStrategy;
+import org.apache.activemq.transport.replay.ExceptionIfDroppedReplayStrategy;
 import org.apache.activemq.util.ServiceStopper;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -48,7 +48,7 @@
     private CommandChannel commandChannel;
     private OpenWireFormat wireFormat;
     private ByteBufferPool bufferPool;
-    private DatagramReplayStrategy replayStrategy = new ExceptionIfDroppedPacketStrategy();
+    private ReplayStrategy replayStrategy = new ExceptionIfDroppedReplayStrategy();
     private int datagramSize = 4 * 1024;
     private long maxInactivityDuration = 0; // 30000;
     private SocketAddress targetAddress;
@@ -60,14 +60,7 @@
     private int port;
     private int minmumWireFormatVersion;
     private String description = null;
-
-    private CommandProcessor commandProcessor = new CommandProcessor() {
-        public void process(Command command, DatagramHeader header) {
-            doConsume(command);
-        }
-    };
-
-    private DatagramHeader wireFormatHeader;
+    private DatagramEndpoint wireFormatHeader;
 
     protected UdpTransport(OpenWireFormat wireFormat) throws IOException {
         this.wireFormat = wireFormat;
@@ -113,8 +106,8 @@
         commandChannel.write(command, address);
     }
 
-    public void receivedHeader(DatagramHeader header) {
-        wireFormatHeader = header;
+    public void receivedHeader(DatagramEndpoint endpoint) {
+        wireFormatHeader = endpoint;
     }
 
     /**
@@ -136,7 +129,8 @@
         log.trace("Consumer thread starting for: " + toString());
         while (!isStopped()) {
             try {
-                commandChannel.read(commandProcessor);
+                Command command = commandChannel.read();
+                doConsume(command);
             }
             /*
              * catch (SocketTimeoutException e) { } catch
@@ -237,14 +231,14 @@
         this.commandChannel = commandChannel;
     }
 
-    public DatagramReplayStrategy getReplayStrategy() {
+    public ReplayStrategy getReplayStrategy() {
         return replayStrategy;
     }
 
     /**
      * Sets the strategy used to replay missed datagrams
      */
-    public void setReplayStrategy(DatagramReplayStrategy replayStrategy) {
+    public void setReplayStrategy(ReplayStrategy replayStrategy) {
         this.replayStrategy = replayStrategy;
     }
 
@@ -281,13 +275,6 @@
 
     // Implementation methods
     // -------------------------------------------------------------------------
-    protected CommandProcessor getCommandProcessor() {
-        return commandProcessor;
-    }
-
-    protected void setCommandProcessor(CommandProcessor commandProcessor) {
-        this.commandProcessor = commandProcessor;
-    }
 
     /**
      * Creates an address from the given URI
@@ -328,13 +315,13 @@
         if (bufferPool == null) {
             bufferPool = new DefaultBufferPool();
         }
-        commandChannel = new CommandChannel(toString(), channel, wireFormat, bufferPool, datagramSize, replayStrategy, targetAddress, isCheckSequenceNumbers(), createDatagramHeaderMarshaller());
+        commandChannel = new CommandChannel(toString(), channel, wireFormat, bufferPool, datagramSize, targetAddress, createDatagramHeaderMarshaller());
         commandChannel.start();
 
         // lets pass the header & address into the channel so it avoids a
         // re-request
         if (wireFormatHeader != null) {
-            commandChannel.onDatagramReceived(wireFormatHeader);
+            commandChannel.setWireFormatInfoEndpoint(wireFormatHeader);
         }
 
         super.doStart();

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransportFactory.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransportFactory.java?rev=384826&r1=384825&r2=384826&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransportFactory.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransportFactory.java Fri Mar 10 07:53:21 2006
@@ -19,6 +19,7 @@
 import org.activeio.command.WireFormat;
 import org.apache.activemq.command.WireFormatInfo;
 import org.apache.activemq.openwire.OpenWireFormat;
+import org.apache.activemq.transport.CommandJoiner;
 import org.apache.activemq.transport.InactivityMonitor;
 import org.apache.activemq.transport.ResponseCorrelator;
 import org.apache.activemq.transport.Transport;
@@ -47,11 +48,11 @@
             }
             WireFormat wf = createWireFormat(options);
             int port = location.getPort();
-            UdpTransport transport = new UdpTransport(asOpenWireFormat(wf), port);
+            OpenWireFormat openWireFormat = asOpenWireFormat(wf);
+            UdpTransport transport = new UdpTransport(openWireFormat, port);
 
             Transport configuredTransport = configure(transport, wf, options, true);
             UdpTransportServer server = new UdpTransportServer(location, transport, configuredTransport);
-            transport.setCommandProcessor(server);
             return server;
         }
         catch (URISyntaxException e) {
@@ -69,6 +70,10 @@
     public Transport compositeConfigure(Transport transport, WireFormat format, Map options) {
         IntrospectionSupport.setProperties(transport, options);
         final UdpTransport udpTransport = (UdpTransport) transport;
+        
+        // deal with fragmentation
+        transport = new CommandJoiner(transport, asOpenWireFormat(format));
+
         if (udpTransport.isTrace()) {
             transport = new TransportLogger(transport);
         }
@@ -105,6 +110,10 @@
         }
 
         transport = new ResponseCorrelator(transport);
+
+        // deal with fragmentation
+        transport = new CommandJoiner(transport, asOpenWireFormat(format));
+        
         return transport;
     }
 

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransportServer.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransportServer.java?rev=384826&r1=384825&r2=384826&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransportServer.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransportServer.java Fri Mar 10 07:53:21 2006
@@ -18,8 +18,10 @@
 
 import org.apache.activemq.command.BrokerInfo;
 import org.apache.activemq.command.Command;
+import org.apache.activemq.command.Endpoint;
 import org.apache.activemq.command.WireFormatInfo;
 import org.apache.activemq.openwire.OpenWireFormat;
+import org.apache.activemq.transport.CommandJoiner;
 import org.apache.activemq.transport.InactivityMonitor;
 import org.apache.activemq.transport.ResponseCorrelator;
 import org.apache.activemq.transport.Transport;
@@ -43,7 +45,7 @@
  * @version $Revision$
  */
 
-public class UdpTransportServer extends TransportServerSupport implements CommandProcessor {
+public class UdpTransportServer extends TransportServerSupport {
     private static final Log log = LogFactory.getLog(UdpTransportServer.class);
 
     private UdpTransport serverTransport;
@@ -53,6 +55,8 @@
     public UdpTransportServer(URI connectURI, UdpTransport serverTransport, Transport configuredTransport) {
         super(connectURI);
         this.serverTransport = serverTransport;
+        
+        
         this.configuredTransport = configuredTransport;
 
         // lets disable the incremental checking of the sequence numbers
@@ -79,6 +83,7 @@
 
         configuredTransport.setTransportListener(new TransportListener() {
             public void onCommand(Command command) {
+                processInboundConnection(command);
             }
 
             public void onException(IOException error) {
@@ -97,24 +102,29 @@
         configuredTransport.stop();
     }
 
-    public void process(Command command, DatagramHeader header) throws IOException {
-        SocketAddress address = header.getFromAddress();
+    protected void processInboundConnection(Command command) {
+        DatagramEndpoint endpoint = (DatagramEndpoint) command.getFrom();
         if (log.isDebugEnabled()) {
-            log.debug("Received command on: " + this + " from address: " + address + " command: " + command);
+            log.debug("Received command on: " + this + " from address: " + endpoint + " command: " + command);
         }
         Transport transport = null;
         synchronized (transports) {
-            transport = (Transport) transports.get(address);
+            transport = (Transport) transports.get(endpoint);
             if (transport == null) {
                 if (log.isDebugEnabled()) {
                     log.debug("Creating a new UDP server connection");
                 }
-                transport = createTransport(command, header);
-                transport = configureTransport(transport);
-                transports.put(address, transport);
+                try {
+                    transport = createTransport(command, endpoint);
+                    transport = configureTransport(transport);
+                    transports.put(endpoint, transport);
+                }
+                catch (IOException e) {
+                    getAcceptListener().onAcceptError(e);
+                }
             }
             else {
-                log.warn("Discarding duplicate command to server: " + command + " from: " + address);
+                log.warn("Discarding duplicate command to server from: " + endpoint + " command: " + command);
             }
         }
     }
@@ -125,19 +135,22 @@
         if (serverTransport.getMaxInactivityDuration() > 0) {
             transport = new InactivityMonitor(transport, serverTransport.getMaxInactivityDuration());
         }
-        
+
         getAcceptListener().onAccept(transport);
         return transport;
     }
 
-    protected Transport createTransport(final Command command, DatagramHeader header) throws IOException {
-        final SocketAddress address = header.getFromAddress();
+    protected Transport createTransport(final Command command, DatagramEndpoint endpoint) throws IOException {
+        final SocketAddress address = endpoint.getAddress();
         final OpenWireFormat connectionWireFormat = serverTransport.getWireFormat().copy();
         final UdpTransport transport = new UdpTransport(connectionWireFormat, address);
 
-        transport.receivedHeader(header);
+        // TODO - is this still required?
+        transport.receivedHeader(endpoint);
 
-        return new WireFormatNegotiator(transport, transport.getWireFormat(), serverTransport.getMinmumWireFormatVersion()) {
+        Transport configuredTransport = new CommandJoiner(transport, connectionWireFormat);
+        
+        return new WireFormatNegotiator(configuredTransport, transport.getWireFormat(), serverTransport.getMinmumWireFormatVersion()) {
 
             public void start() throws Exception {
                 super.start();

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/ServiceSupport.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/ServiceSupport.java?rev=384826&r1=384825&r2=384826&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/ServiceSupport.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/ServiceSupport.java Fri Mar 10 07:53:21 2006
@@ -27,7 +27,7 @@
  *  
  * @version $Revision: 1.1 $
  */
-public abstract class ServiceSupport {
+public abstract class ServiceSupport implements Service {
     private static final Log log = LogFactory.getLog(ServiceSupport.class);
 
     private AtomicBoolean started = new AtomicBoolean(false);

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/BrokerTestSupport.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/BrokerTestSupport.java?rev=384826&r1=384825&r2=384826&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/BrokerTestSupport.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/BrokerTestSupport.java Fri Mar 10 07:53:21 2006
@@ -71,7 +71,7 @@
     protected int tempDestGenerator=0;
     protected PersistenceAdapter persistenceAdapter;
 
-    protected int MAX_WAIT = 1000;
+    protected int MAX_WAIT = 4000;
 
     protected UsageManager memoryManager;
 

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/RecoveryBrokerTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/RecoveryBrokerTest.java?rev=384826&r1=384825&r2=384826&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/RecoveryBrokerTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/RecoveryBrokerTest.java Fri Mar 10 07:53:21 2006
@@ -207,7 +207,7 @@
         
         // Message should have been dropped due to broker restart.
         Message m = receiveMessage(connection);
-        assertNotNull(m);
+        assertNotNull("Should have received a message by now!", m);
         assertEquals( m.getMessageId(), message.getMessageId() );
     }
     

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/StubConnection.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/StubConnection.java?rev=384826&r1=384825&r2=384826&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/StubConnection.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/StubConnection.java Fri Mar 10 07:53:21 2006
@@ -23,6 +23,7 @@
 import org.apache.activemq.command.Message;
 import org.apache.activemq.command.Response;
 import org.apache.activemq.command.ShutdownInfo;
+import org.apache.activemq.openwire.OpenWireFormat;
 import org.apache.activemq.thread.TaskRunnerFactory;
 import org.apache.activemq.transport.DefaultTransportListener;
 import org.apache.activemq.transport.Transport;
@@ -38,7 +39,8 @@
     private Connection connection;
     private Transport transport;
     boolean shuttingDown = false;
-
+    private OpenWireFormat wireFormat = new OpenWireFormat();
+    
     public StubConnection(BrokerService broker) throws Exception {
         this(broker, null);
     }
@@ -52,6 +54,10 @@
                 catch (Exception e) {
                     serviceException(e);
                 }
+            }
+
+            protected OpenWireFormat getWireFormat() {
+                return wireFormat;
             }
         };
     }

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQBytesMessageTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQBytesMessageTest.java?rev=384826&r1=384825&r2=384826&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQBytesMessageTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQBytesMessageTest.java Fri Mar 10 07:53:21 2006
@@ -33,7 +33,7 @@
  *        under src/gram/script and then use maven openwire:generate to regenerate 
  *        this file.
  *
- * @version $Revision$
+ * @version $Revision: $
  */
 public class ActiveMQBytesMessageTest extends ActiveMQMessageTest {
 

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQDestinationTestSupport.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQDestinationTestSupport.java?rev=384826&r1=384825&r2=384826&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQDestinationTestSupport.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQDestinationTestSupport.java Fri Mar 10 07:53:21 2006
@@ -33,7 +33,7 @@
  *        under src/gram/script and then use maven openwire:generate to regenerate 
  *        this file.
  *
- * @version $Revision$
+ * @version $Revision: $
  */
 public abstract class ActiveMQDestinationTestSupport extends DataFileGeneratorTestSupport {
 

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQMapMessageTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQMapMessageTest.java?rev=384826&r1=384825&r2=384826&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQMapMessageTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQMapMessageTest.java Fri Mar 10 07:53:21 2006
@@ -33,7 +33,7 @@
  *        under src/gram/script and then use maven openwire:generate to regenerate 
  *        this file.
  *
- * @version $Revision$
+ * @version $Revision: $
  */
 public class ActiveMQMapMessageTest extends ActiveMQMessageTest {
 

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQMessageTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQMessageTest.java?rev=384826&r1=384825&r2=384826&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQMessageTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQMessageTest.java Fri Mar 10 07:53:21 2006
@@ -33,7 +33,7 @@
  *        under src/gram/script and then use maven openwire:generate to regenerate 
  *        this file.
  *
- * @version $Revision$
+ * @version $Revision: $
  */
 public class ActiveMQMessageTest extends MessageTestSupport {
 

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQObjectMessageTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQObjectMessageTest.java?rev=384826&r1=384825&r2=384826&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQObjectMessageTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQObjectMessageTest.java Fri Mar 10 07:53:21 2006
@@ -33,7 +33,7 @@
  *        under src/gram/script and then use maven openwire:generate to regenerate 
  *        this file.
  *
- * @version $Revision$
+ * @version $Revision: $
  */
 public class ActiveMQObjectMessageTest extends ActiveMQMessageTest {
 

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQQueueTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQQueueTest.java?rev=384826&r1=384825&r2=384826&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQQueueTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQQueueTest.java Fri Mar 10 07:53:21 2006
@@ -33,7 +33,7 @@
  *        under src/gram/script and then use maven openwire:generate to regenerate 
  *        this file.
  *
- * @version $Revision$
+ * @version $Revision: $
  */
 public class ActiveMQQueueTest extends ActiveMQDestinationTestSupport {
 

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQStreamMessageTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQStreamMessageTest.java?rev=384826&r1=384825&r2=384826&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQStreamMessageTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQStreamMessageTest.java Fri Mar 10 07:53:21 2006
@@ -33,7 +33,7 @@
  *        under src/gram/script and then use maven openwire:generate to regenerate 
  *        this file.
  *
- * @version $Revision$
+ * @version $Revision: $
  */
 public class ActiveMQStreamMessageTest extends ActiveMQMessageTest {
 

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQTempDestinationTestSupport.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQTempDestinationTestSupport.java?rev=384826&r1=384825&r2=384826&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQTempDestinationTestSupport.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQTempDestinationTestSupport.java Fri Mar 10 07:53:21 2006
@@ -33,7 +33,7 @@
  *        under src/gram/script and then use maven openwire:generate to regenerate 
  *        this file.
  *
- * @version $Revision$
+ * @version $Revision: $
  */
 public abstract class ActiveMQTempDestinationTestSupport extends ActiveMQDestinationTestSupport {
 

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQTempQueueTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQTempQueueTest.java?rev=384826&r1=384825&r2=384826&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQTempQueueTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQTempQueueTest.java Fri Mar 10 07:53:21 2006
@@ -33,7 +33,7 @@
  *        under src/gram/script and then use maven openwire:generate to regenerate 
  *        this file.
  *
- * @version $Revision$
+ * @version $Revision: $
  */
 public class ActiveMQTempQueueTest extends ActiveMQTempDestinationTestSupport {
 

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQTempTopicTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQTempTopicTest.java?rev=384826&r1=384825&r2=384826&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQTempTopicTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQTempTopicTest.java Fri Mar 10 07:53:21 2006
@@ -33,7 +33,7 @@
  *        under src/gram/script and then use maven openwire:generate to regenerate 
  *        this file.
  *
- * @version $Revision$
+ * @version $Revision: $
  */
 public class ActiveMQTempTopicTest extends ActiveMQTempDestinationTestSupport {
 

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQTextMessageTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQTextMessageTest.java?rev=384826&r1=384825&r2=384826&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQTextMessageTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQTextMessageTest.java Fri Mar 10 07:53:21 2006
@@ -33,7 +33,7 @@
  *        under src/gram/script and then use maven openwire:generate to regenerate 
  *        this file.
  *
- * @version $Revision$
+ * @version $Revision: $
  */
 public class ActiveMQTextMessageTest extends ActiveMQMessageTest {
 

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQTopicTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQTopicTest.java?rev=384826&r1=384825&r2=384826&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQTopicTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ActiveMQTopicTest.java Fri Mar 10 07:53:21 2006
@@ -33,7 +33,7 @@
  *        under src/gram/script and then use maven openwire:generate to regenerate 
  *        this file.
  *
- * @version $Revision$
+ * @version $Revision: $
  */
 public class ActiveMQTopicTest extends ActiveMQDestinationTestSupport {
 

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/BaseCommandTestSupport.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/BaseCommandTestSupport.java?rev=384826&r1=384825&r2=384826&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/BaseCommandTestSupport.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/BaseCommandTestSupport.java Fri Mar 10 07:53:21 2006
@@ -33,7 +33,7 @@
  *        under src/gram/script and then use maven openwire:generate to regenerate 
  *        this file.
  *
- * @version $Revision$
+ * @version $Revision: $
  */
 public abstract class BaseCommandTestSupport extends DataFileGeneratorTestSupport {
 
@@ -41,7 +41,7 @@
     protected void populateObject(Object object) throws Exception {
     		super.populateObject(object);
     		BaseCommand info = (BaseCommand) object;
-        info.setCommandId((short) 1);
+        info.setCommandId(1);
         info.setResponseRequired(true);
 
             }

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/BrokerIdTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/BrokerIdTest.java?rev=384826&r1=384825&r2=384826&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/BrokerIdTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/BrokerIdTest.java Fri Mar 10 07:53:21 2006
@@ -33,7 +33,7 @@
  *        under src/gram/script and then use maven openwire:generate to regenerate 
  *        this file.
  *
- * @version $Revision$
+ * @version $Revision: $
  */
 public class BrokerIdTest extends DataFileGeneratorTestSupport {
 

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/BrokerInfoTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/BrokerInfoTest.java?rev=384826&r1=384825&r2=384826&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/BrokerInfoTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/BrokerInfoTest.java Fri Mar 10 07:53:21 2006
@@ -33,7 +33,7 @@
  *        under src/gram/script and then use maven openwire:generate to regenerate 
  *        this file.
  *
- * @version $Revision$
+ * @version $Revision: $
  */
 public class BrokerInfoTest extends BaseCommandTestSupport {
 

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ConnectionErrorTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ConnectionErrorTest.java?rev=384826&r1=384825&r2=384826&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ConnectionErrorTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ConnectionErrorTest.java Fri Mar 10 07:53:21 2006
@@ -33,7 +33,7 @@
  *        under src/gram/script and then use maven openwire:generate to regenerate 
  *        this file.
  *
- * @version $Revision$
+ * @version $Revision: $
  */
 public class ConnectionErrorTest extends BaseCommandTestSupport {
 

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ConnectionIdTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ConnectionIdTest.java?rev=384826&r1=384825&r2=384826&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ConnectionIdTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ConnectionIdTest.java Fri Mar 10 07:53:21 2006
@@ -33,7 +33,7 @@
  *        under src/gram/script and then use maven openwire:generate to regenerate 
  *        this file.
  *
- * @version $Revision$
+ * @version $Revision: $
  */
 public class ConnectionIdTest extends DataFileGeneratorTestSupport {
 

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ConnectionInfoTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ConnectionInfoTest.java?rev=384826&r1=384825&r2=384826&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ConnectionInfoTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ConnectionInfoTest.java Fri Mar 10 07:53:21 2006
@@ -33,7 +33,7 @@
  *        under src/gram/script and then use maven openwire:generate to regenerate 
  *        this file.
  *
- * @version $Revision$
+ * @version $Revision: $
  */
 public class ConnectionInfoTest extends BaseCommandTestSupport {
 

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ConsumerIdTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ConsumerIdTest.java?rev=384826&r1=384825&r2=384826&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ConsumerIdTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ConsumerIdTest.java Fri Mar 10 07:53:21 2006
@@ -33,7 +33,7 @@
  *        under src/gram/script and then use maven openwire:generate to regenerate 
  *        this file.
  *
- * @version $Revision$
+ * @version $Revision: $
  */
 public class ConsumerIdTest extends DataFileGeneratorTestSupport {
 

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ConsumerInfoTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ConsumerInfoTest.java?rev=384826&r1=384825&r2=384826&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ConsumerInfoTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ConsumerInfoTest.java Fri Mar 10 07:53:21 2006
@@ -33,7 +33,7 @@
  *        under src/gram/script and then use maven openwire:generate to regenerate 
  *        this file.
  *
- * @version $Revision$
+ * @version $Revision: $
  */
 public class ConsumerInfoTest extends BaseCommandTestSupport {
 

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ControlCommandTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ControlCommandTest.java?rev=384826&r1=384825&r2=384826&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ControlCommandTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ControlCommandTest.java Fri Mar 10 07:53:21 2006
@@ -33,7 +33,7 @@
  *        under src/gram/script and then use maven openwire:generate to regenerate 
  *        this file.
  *
- * @version $Revision$
+ * @version $Revision: $
  */
 public class ControlCommandTest extends BaseCommandTestSupport {
 

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/DataArrayResponseTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/DataArrayResponseTest.java?rev=384826&r1=384825&r2=384826&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/DataArrayResponseTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/DataArrayResponseTest.java Fri Mar 10 07:53:21 2006
@@ -33,7 +33,7 @@
  *        under src/gram/script and then use maven openwire:generate to regenerate 
  *        this file.
  *
- * @version $Revision$
+ * @version $Revision: $
  */
 public class DataArrayResponseTest extends ResponseTest {
 

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/DataResponseTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/DataResponseTest.java?rev=384826&r1=384825&r2=384826&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/DataResponseTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/DataResponseTest.java Fri Mar 10 07:53:21 2006
@@ -33,7 +33,7 @@
  *        under src/gram/script and then use maven openwire:generate to regenerate 
  *        this file.
  *
- * @version $Revision$
+ * @version $Revision: $
  */
 public class DataResponseTest extends ResponseTest {
 

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/DestinationInfoTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/DestinationInfoTest.java?rev=384826&r1=384825&r2=384826&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/DestinationInfoTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/DestinationInfoTest.java Fri Mar 10 07:53:21 2006
@@ -33,7 +33,7 @@
  *        under src/gram/script and then use maven openwire:generate to regenerate 
  *        this file.
  *
- * @version $Revision$
+ * @version $Revision: $
  */
 public class DestinationInfoTest extends BaseCommandTestSupport {
 

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/DiscoveryEventTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/DiscoveryEventTest.java?rev=384826&r1=384825&r2=384826&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/DiscoveryEventTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/DiscoveryEventTest.java Fri Mar 10 07:53:21 2006
@@ -33,7 +33,7 @@
  *        under src/gram/script and then use maven openwire:generate to regenerate 
  *        this file.
  *
- * @version $Revision$
+ * @version $Revision: $
  */
 public class DiscoveryEventTest extends DataFileGeneratorTestSupport {
 

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ExceptionResponseTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ExceptionResponseTest.java?rev=384826&r1=384825&r2=384826&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ExceptionResponseTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ExceptionResponseTest.java Fri Mar 10 07:53:21 2006
@@ -33,7 +33,7 @@
  *        under src/gram/script and then use maven openwire:generate to regenerate 
  *        this file.
  *
- * @version $Revision$
+ * @version $Revision: $
  */
 public class ExceptionResponseTest extends ResponseTest {
 

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/FlushCommandTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/FlushCommandTest.java?rev=384826&r1=384825&r2=384826&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/FlushCommandTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/FlushCommandTest.java Fri Mar 10 07:53:21 2006
@@ -33,7 +33,7 @@
  *        under src/gram/script and then use maven openwire:generate to regenerate 
  *        this file.
  *
- * @version $Revision$
+ * @version $Revision: $
  */
 public class FlushCommandTest extends BaseCommandTestSupport {
 

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/IntegerResponseTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/IntegerResponseTest.java?rev=384826&r1=384825&r2=384826&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/IntegerResponseTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/IntegerResponseTest.java Fri Mar 10 07:53:21 2006
@@ -33,7 +33,7 @@
  *        under src/gram/script and then use maven openwire:generate to regenerate 
  *        this file.
  *
- * @version $Revision$
+ * @version $Revision: $
  */
 public class IntegerResponseTest extends ResponseTest {
 

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/JournalQueueAckTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/JournalQueueAckTest.java?rev=384826&r1=384825&r2=384826&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/JournalQueueAckTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/JournalQueueAckTest.java Fri Mar 10 07:53:21 2006
@@ -33,7 +33,7 @@
  *        under src/gram/script and then use maven openwire:generate to regenerate 
  *        this file.
  *
- * @version $Revision$
+ * @version $Revision: $
  */
 public class JournalQueueAckTest extends DataFileGeneratorTestSupport {
 

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/JournalTopicAckTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/JournalTopicAckTest.java?rev=384826&r1=384825&r2=384826&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/JournalTopicAckTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/JournalTopicAckTest.java Fri Mar 10 07:53:21 2006
@@ -33,7 +33,7 @@
  *        under src/gram/script and then use maven openwire:generate to regenerate 
  *        this file.
  *
- * @version $Revision$
+ * @version $Revision: $
  */
 public class JournalTopicAckTest extends DataFileGeneratorTestSupport {
 

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/JournalTraceTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/JournalTraceTest.java?rev=384826&r1=384825&r2=384826&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/JournalTraceTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/JournalTraceTest.java Fri Mar 10 07:53:21 2006
@@ -33,7 +33,7 @@
  *        under src/gram/script and then use maven openwire:generate to regenerate 
  *        this file.
  *
- * @version $Revision$
+ * @version $Revision: $
  */
 public class JournalTraceTest extends DataFileGeneratorTestSupport {
 

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/JournalTransactionTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/JournalTransactionTest.java?rev=384826&r1=384825&r2=384826&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/JournalTransactionTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/JournalTransactionTest.java Fri Mar 10 07:53:21 2006
@@ -33,7 +33,7 @@
  *        under src/gram/script and then use maven openwire:generate to regenerate 
  *        this file.
  *
- * @version $Revision$
+ * @version $Revision: $
  */
 public class JournalTransactionTest extends DataFileGeneratorTestSupport {
 

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/KeepAliveInfoTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/KeepAliveInfoTest.java?rev=384826&r1=384825&r2=384826&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/KeepAliveInfoTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/KeepAliveInfoTest.java Fri Mar 10 07:53:21 2006
@@ -33,7 +33,7 @@
  *        under src/gram/script and then use maven openwire:generate to regenerate 
  *        this file.
  *
- * @version $Revision$
+ * @version $Revision: $
  */
 public class KeepAliveInfoTest extends DataFileGeneratorTestSupport {
 

Added: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/LastPartialCommandTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/LastPartialCommandTest.java?rev=384826&view=auto
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/LastPartialCommandTest.java (added)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/LastPartialCommandTest.java Fri Mar 10 07:53:21 2006
@@ -0,0 +1,55 @@
+/**
+ *
+ * Copyright 2005-2006 The Apache Software Foundation
+ *
+ * Licensed 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.openwire.v1;
+
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.activemq.openwire.*;
+import org.apache.activemq.command.*;
+
+
+/**
+ * Test case for the OpenWire marshalling for LastPartialCommand
+ *
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *        if you need to make a change, please see the modify the groovy scripts in the
+ *        under src/gram/script and then use maven openwire:generate to regenerate 
+ *        this file.
+ *
+ * @version $Revision: $
+ */
+public class LastPartialCommandTest extends PartialCommandTest {
+
+
+    public static LastPartialCommandTest SINGLETON = new LastPartialCommandTest();
+
+    public Object createObject() throws Exception {
+    		LastPartialCommand info = new LastPartialCommand();
+    		populateObject(info);
+    		return info;
+    }
+
+    
+    protected void populateObject(Object object) throws Exception {
+    		super.populateObject(object);
+    		LastPartialCommand info = (LastPartialCommand) object;
+
+            }
+        }

Propchange: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/LastPartialCommandTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/LastPartialCommandTest.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/LastPartialCommandTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/LocalTransactionIdTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/LocalTransactionIdTest.java?rev=384826&r1=384825&r2=384826&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/LocalTransactionIdTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/LocalTransactionIdTest.java Fri Mar 10 07:53:21 2006
@@ -33,7 +33,7 @@
  *        under src/gram/script and then use maven openwire:generate to regenerate 
  *        this file.
  *
- * @version $Revision$
+ * @version $Revision: $
  */
 public class LocalTransactionIdTest extends TransactionIdTestSupport {
 

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/MessageAckTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/MessageAckTest.java?rev=384826&r1=384825&r2=384826&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/MessageAckTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/MessageAckTest.java Fri Mar 10 07:53:21 2006
@@ -33,7 +33,7 @@
  *        under src/gram/script and then use maven openwire:generate to regenerate 
  *        this file.
  *
- * @version $Revision$
+ * @version $Revision: $
  */
 public class MessageAckTest extends BaseCommandTestSupport {
 

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/MessageDispatchNotificationTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/MessageDispatchNotificationTest.java?rev=384826&r1=384825&r2=384826&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/MessageDispatchNotificationTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/MessageDispatchNotificationTest.java Fri Mar 10 07:53:21 2006
@@ -33,7 +33,7 @@
  *        under src/gram/script and then use maven openwire:generate to regenerate 
  *        this file.
  *
- * @version $Revision$
+ * @version $Revision: $
  */
 public class MessageDispatchNotificationTest extends BaseCommandTestSupport {
 

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/MessageDispatchTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/MessageDispatchTest.java?rev=384826&r1=384825&r2=384826&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/MessageDispatchTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/MessageDispatchTest.java Fri Mar 10 07:53:21 2006
@@ -33,7 +33,7 @@
  *        under src/gram/script and then use maven openwire:generate to regenerate 
  *        this file.
  *
- * @version $Revision$
+ * @version $Revision: $
  */
 public class MessageDispatchTest extends BaseCommandTestSupport {
 

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/MessageIdTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/MessageIdTest.java?rev=384826&r1=384825&r2=384826&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/MessageIdTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/MessageIdTest.java Fri Mar 10 07:53:21 2006
@@ -33,7 +33,7 @@
  *        under src/gram/script and then use maven openwire:generate to regenerate 
  *        this file.
  *
- * @version $Revision$
+ * @version $Revision: $
  */
 public class MessageIdTest extends DataFileGeneratorTestSupport {
 

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/MessageTestSupport.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/MessageTestSupport.java?rev=384826&r1=384825&r2=384826&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/MessageTestSupport.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/MessageTestSupport.java Fri Mar 10 07:53:21 2006
@@ -33,7 +33,7 @@
  *        under src/gram/script and then use maven openwire:generate to regenerate 
  *        this file.
  *
- * @version $Revision$
+ * @version $Revision: $
  */
 public abstract class MessageTestSupport extends BaseCommandTestSupport {
 

Added: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/PartialCommandTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/PartialCommandTest.java?rev=384826&view=auto
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/PartialCommandTest.java (added)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/PartialCommandTest.java Fri Mar 10 07:53:21 2006
@@ -0,0 +1,56 @@
+/**
+ *
+ * Copyright 2005-2006 The Apache Software Foundation
+ *
+ * Licensed 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.openwire.v1;
+
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.activemq.openwire.*;
+import org.apache.activemq.command.*;
+
+
+/**
+ * Test case for the OpenWire marshalling for PartialCommand
+ *
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *        if you need to make a change, please see the modify the groovy scripts in the
+ *        under src/gram/script and then use maven openwire:generate to regenerate 
+ *        this file.
+ *
+ * @version $Revision: $
+ */
+public class PartialCommandTest extends BaseCommandTestSupport {
+
+
+    public static PartialCommandTest SINGLETON = new PartialCommandTest();
+
+    public Object createObject() throws Exception {
+    		PartialCommand info = new PartialCommand();
+    		populateObject(info);
+    		return info;
+    }
+
+    
+    protected void populateObject(Object object) throws Exception {
+    		super.populateObject(object);
+    		PartialCommand info = (PartialCommand) object;
+        info.setData("Data:1".getBytes());
+
+            }
+        }

Propchange: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/PartialCommandTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/PartialCommandTest.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/PartialCommandTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ProducerIdTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ProducerIdTest.java?rev=384826&r1=384825&r2=384826&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ProducerIdTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ProducerIdTest.java Fri Mar 10 07:53:21 2006
@@ -33,7 +33,7 @@
  *        under src/gram/script and then use maven openwire:generate to regenerate 
  *        this file.
  *
- * @version $Revision$
+ * @version $Revision: $
  */
 public class ProducerIdTest extends DataFileGeneratorTestSupport {
 

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ProducerInfoTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ProducerInfoTest.java?rev=384826&r1=384825&r2=384826&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ProducerInfoTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ProducerInfoTest.java Fri Mar 10 07:53:21 2006
@@ -33,7 +33,7 @@
  *        under src/gram/script and then use maven openwire:generate to regenerate 
  *        this file.
  *
- * @version $Revision$
+ * @version $Revision: $
  */
 public class ProducerInfoTest extends BaseCommandTestSupport {
 

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/RemoveInfoTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/RemoveInfoTest.java?rev=384826&r1=384825&r2=384826&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/RemoveInfoTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/RemoveInfoTest.java Fri Mar 10 07:53:21 2006
@@ -33,7 +33,7 @@
  *        under src/gram/script and then use maven openwire:generate to regenerate 
  *        this file.
  *
- * @version $Revision$
+ * @version $Revision: $
  */
 public class RemoveInfoTest extends BaseCommandTestSupport {
 

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/RemoveSubscriptionInfoTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/RemoveSubscriptionInfoTest.java?rev=384826&r1=384825&r2=384826&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/RemoveSubscriptionInfoTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/RemoveSubscriptionInfoTest.java Fri Mar 10 07:53:21 2006
@@ -33,7 +33,7 @@
  *        under src/gram/script and then use maven openwire:generate to regenerate 
  *        this file.
  *
- * @version $Revision$
+ * @version $Revision: $
  */
 public class RemoveSubscriptionInfoTest extends BaseCommandTestSupport {
 

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ReplayCommandTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ReplayCommandTest.java?rev=384826&r1=384825&r2=384826&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ReplayCommandTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/ReplayCommandTest.java Fri Mar 10 07:53:21 2006
@@ -33,7 +33,7 @@
  *        under src/gram/script and then use maven openwire:generate to regenerate 
  *        this file.
  *
- * @version $Revision$
+ * @version $Revision: $
  */
 public class ReplayCommandTest extends BaseCommandTestSupport {
 
@@ -50,6 +50,8 @@
     protected void populateObject(Object object) throws Exception {
     		super.populateObject(object);
     		ReplayCommand info = (ReplayCommand) object;
+        info.setFirstNakNumber(1);
+        info.setLastNakNumber(2);
 
             }
         }