activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r367341 - in /incubator/activemq/trunk/activemq-core/src: main/java/org/apache/activemq/ main/java/org/apache/activemq/broker/ main/java/org/apache/activemq/command/ main/java/org/apache/activemq/openwire/v1/ main/java/org/apache/activemq/s...
Date Mon, 09 Jan 2006 17:22:15 GMT
Author: chirino
Date: Mon Jan  9 09:21:52 2006
New Revision: 367341

URL: http://svn.apache.org/viewcvs?rev=367341&view=rev
Log:
- Changed the command id objects so that they do not use fields that have the same name as the class (for the .net folks)
- Added a ConnectionError command that can be used to notify a connection of async errors associated with the connection.
- 

Added:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConnectionError.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConnectionErrorMarshaller.java
Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnectionConsumer.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQInputStream.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageProducer.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQQueueBrowser.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQQueueReceiver.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQSession.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQTopicSubscriber.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/AbstractConnection.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnector.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQTempQueue.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQTempTopic.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/BrokerId.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/CommandTypes.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConnectionId.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConsumerId.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConsumerInfo.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/DiscoveryEvent.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/LocalTransactionId.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ProducerId.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/SessionId.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BrokerIdMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConnectionIdMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConsumerIdMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/DiscoveryEventMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/LocalTransactionIdMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/MarshallerFactory.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/SessionIdMarshaller.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/security/SimpleAuthorizationBroker.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/DiscoveryTransportFactory.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/ClientTestSupport.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/BrokerTestSupport.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkTestSupport.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java?rev=367341&r1=367340&r2=367341&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java Mon Jan  9 09:21:52 2006
@@ -1210,7 +1210,7 @@
         waitForBrokerInfo();
         if( brokerInfo==null )
             throw new JMSException("Connection failed before Broker info was received.");            
-        return brokerInfo.getBrokerId().getBrokerId();
+        return brokerInfo.getBrokerId().getValue();
     }
 
     /**

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnectionConsumer.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnectionConsumer.java?rev=367341&r1=367340&r2=367341&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnectionConsumer.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnectionConsumer.java Mon Jan  9 09:21:52 2006
@@ -158,6 +158,6 @@
     }
     
     public String toString() {
-        return "ActiveMQConnectionConsumer { consumerId=" +consumerInfo.getConsumerId()+" }";
+        return "ActiveMQConnectionConsumer { value=" +consumerInfo.getConsumerId()+" }";
     }
 }

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQInputStream.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQInputStream.java?rev=367341&r1=367340&r2=367341&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQInputStream.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQInputStream.java Mon Jan  9 09:21:52 2006
@@ -69,7 +69,7 @@
                 throw new IllegalArgumentException("Physical name of Destination should be valid: " + dest);
             }
 
-            String connectionID = connection.getConnectionInfo().getConnectionId().getConnectionId();
+            String connectionID = connection.getConnectionInfo().getConnectionId().getValue();
 
             if (physicalName.indexOf(connectionID) < 0) {
                 throw new InvalidDestinationException("Cannot use a Temporary destination from another Connection");
@@ -226,7 +226,7 @@
     }
 
     public String toString() {
-        return "ActiveMQInputStream { consumerId="+info.getConsumerId()+", producerId=" +producerId+" }";
+        return "ActiveMQInputStream { value="+info.getConsumerId()+", producerId=" +producerId+" }";
     }
 
 }

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java?rev=367341&r1=367340&r2=367341&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java Mon Jan  9 09:21:52 2006
@@ -116,7 +116,7 @@
      * Create a MessageConsumer
      * 
      * @param session
-     * @param consumerId
+     * @param value
      * @param dest
      * @param name
      * @param selector
@@ -140,7 +140,7 @@
                 throw new IllegalArgumentException("Physical name of Destination should be valid: " + dest);
             }
 
-            String connectionID = session.connection.getConnectionInfo().getConnectionId().getConnectionId();
+            String connectionID = session.connection.getConnectionInfo().getConnectionId().getValue();
 
             if (physicalName.indexOf(connectionID) < 0) {
                 throw new InvalidDestinationException("Cannot use a Temporary destination from another Connection");
@@ -211,7 +211,7 @@
     }
 
     /**
-     * @return Returns the consumerId.
+     * @return Returns the value.
      */
     protected ConsumerId getConsumerId() {
         return info.getConsumerId();
@@ -752,7 +752,7 @@
     }
     
     public String toString() {
-        return "ActiveMQMessageConsumer { consumerId=" +info.getConsumerId()+", started=" +started.get()+" }";
+        return "ActiveMQMessageConsumer { value=" +info.getConsumerId()+", started=" +started.get()+" }";
     }
 
 }

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageProducer.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageProducer.java?rev=367341&r1=367340&r2=367341&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageProducer.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageProducer.java Mon Jan  9 09:21:52 2006
@@ -499,7 +499,7 @@
     }
 
     public String toString() {
-        return "ActiveMQMessageProducer { consumerId=" +info.getProducerId()+" }";
+        return "ActiveMQMessageProducer { value=" +info.getProducerId()+" }";
     }
 
 }

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQQueueBrowser.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQQueueBrowser.java?rev=367341&r1=367340&r2=367341&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQQueueBrowser.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQQueueBrowser.java Mon Jan  9 09:21:52 2006
@@ -242,7 +242,7 @@
     }
     
     public String toString() {
-        return "ActiveMQQueueBrowser { consumerId=" +consumerId+" }";
+        return "ActiveMQQueueBrowser { value=" +consumerId+" }";
     }
 
 }

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQQueueReceiver.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQQueueReceiver.java?rev=367341&r1=367340&r2=367341&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQQueueReceiver.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQQueueReceiver.java Mon Jan  9 09:21:52 2006
@@ -59,7 +59,7 @@
 
     /**
      * @param theSession
-     * @param consumerId
+     * @param value
      * @param destination
      * @param messageSelector
      * @param prefetch

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQSession.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQSession.java?rev=367341&r1=367340&r2=367341&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQSession.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQSession.java Mon Jan  9 09:21:52 2006
@@ -214,7 +214,7 @@
         this.acknowledgementMode = acknowledgeMode;
         this.asyncDispatch=asyncDispatch;
         
-        this.info = new SessionInfo(connection.getConnectionInfo(), sessionId.getSessionId());
+        this.info = new SessionInfo(connection.getConnectionInfo(), sessionId.getValue());
         setTransactionContext(new TransactionContext(connection));
         connection.addSession(this);
         stats = new JMSSessionStatsImpl(producers, consumers);
@@ -1433,7 +1433,7 @@
     /**
      * Returns the session id.
      * 
-     * @return sessionId - session id.
+     * @return value - session id.
      */
     protected SessionId getSessionId() {
         return info.getSessionId();
@@ -1601,7 +1601,7 @@
      * @throws JMSException
      */
     protected SessionInfo getSessionInfo() throws JMSException {
-        SessionInfo info = new SessionInfo(connection.getConnectionInfo(), getSessionId().getSessionId());
+        SessionInfo info = new SessionInfo(connection.getConnectionInfo(), getSessionId().getValue());
         return info;
     }
 

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQTopicSubscriber.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQTopicSubscriber.java?rev=367341&r1=367340&r2=367341&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQTopicSubscriber.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQTopicSubscriber.java Mon Jan  9 09:21:52 2006
@@ -101,7 +101,7 @@
 
     /**
      * @param theSession
-     * @param consumerId 
+     * @param value 
      * @param dest
      * @param name
      * @param selector

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/AbstractConnection.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/AbstractConnection.java?rev=367341&r1=367340&r2=367341&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/AbstractConnection.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/AbstractConnection.java Mon Jan  9 09:21:52 2006
@@ -20,7 +20,7 @@
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Iterator;
-import java.util.*;
+import java.util.LinkedList;
 import java.util.List;
 
 import org.apache.activemq.Service;
@@ -28,6 +28,7 @@
 import org.apache.activemq.command.ActiveMQDestination;
 import org.apache.activemq.command.BrokerInfo;
 import org.apache.activemq.command.Command;
+import org.apache.activemq.command.ConnectionError;
 import org.apache.activemq.command.ConnectionId;
 import org.apache.activemq.command.ConnectionInfo;
 import org.apache.activemq.command.ConsumerId;
@@ -61,8 +62,6 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
-import javax.jms.InvalidClientIDException;
-
 import edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap;
 
 
@@ -84,6 +83,7 @@
     
     private WireFormatInfo wireFormatInfo;    
     protected boolean disposed=false;
+    protected boolean shuttingDown=false;
 
     
     static class ConnectionState extends org.apache.activemq.state.ConnectionState {
@@ -138,7 +138,7 @@
         if( disposed) 
             return;
         
-        disposed=true;            
+        disposed=true;
         //
         // Remove all logical connection associated with this connection
         // from the broker.
@@ -150,6 +150,8 @@
             } catch (Throwable ignore) {
             }
         }
+        
+        shuttingDown=false;
     }
     
     public void serviceTransportException(IOException e) {
@@ -163,12 +165,17 @@
     }
         
     public void serviceException(Throwable e) {
-        if( !disposed ) {
+        if( !disposed && !shuttingDown ) {
+            shuttingDown=true;
             if( log.isDebugEnabled() )
                 log.debug("Async error occurred: "+e,e);
-            // TODO: think about how to handle this.  Should we send the error down to the client
-            // so that he can report it to a registered error listener?
-            // Should we terminate the connection?
+            ConnectionError ce = new ConnectionError();
+            ce.setException(e);
+            dispatchAsync(ce);
+            try {
+                stop();
+            } catch (Exception ignore) {
+            }
         } 
     }
 
@@ -238,6 +245,7 @@
     }
     
     public Response processShutdown(ShutdownInfo info) throws Throwable {
+        shuttingDown=true;
         stop();
         return null;
     }

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java?rev=367341&r1=367340&r2=367341&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java Mon Jan  9 09:21:52 2006
@@ -20,6 +20,7 @@
 
 import org.apache.activemq.command.Command;
 import org.apache.activemq.command.Response;
+import org.apache.activemq.command.ShutdownInfo;
 import org.apache.activemq.thread.TaskRunnerFactory;
 import org.apache.activemq.transport.Transport;
 import org.apache.activemq.transport.TransportListener;
@@ -70,6 +71,12 @@
     }
 
     public void stop() throws Exception {
+
+        try {
+            transport.oneway(new ShutdownInfo());
+        } catch (IOException ignore) {
+        }
+
         transport.stop();
         active = false;
         super.stop();

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnector.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnector.java?rev=367341&r1=367340&r2=367341&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnector.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnector.java Mon Jan  9 09:21:52 2006
@@ -233,7 +233,7 @@
         if (broker == null) {
             throw new IllegalArgumentException("You must specify the broker property. Maybe this connector should be added to a broker?");
         }
-        return TransportFactory.bind(broker.getBrokerId().getBrokerId(),uri);
+        return TransportFactory.bind(broker.getBrokerId().getValue(),uri);
     }
     
     public DiscoveryAgent getDiscoveryAgent() throws IOException {

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQTempQueue.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQTempQueue.java?rev=367341&r1=367340&r2=367341&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQTempQueue.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQTempQueue.java Mon Jan  9 09:21:52 2006
@@ -36,7 +36,7 @@
     }
     
     public ActiveMQTempQueue(ConnectionId connectionId, long sequenceId) {
-        super(connectionId.getConnectionId(), sequenceId);
+        super(connectionId.getValue(), sequenceId);
     }
     
     public byte getDataStructureType() {

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQTempTopic.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQTempTopic.java?rev=367341&r1=367340&r2=367341&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQTempTopic.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQTempTopic.java Mon Jan  9 09:21:52 2006
@@ -36,7 +36,7 @@
     }
     
     public ActiveMQTempTopic(ConnectionId connectionId, long sequenceId) {
-        super(connectionId.getConnectionId(), sequenceId);
+        super(connectionId.getValue(), sequenceId);
     }
 
     

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/BrokerId.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/BrokerId.java?rev=367341&r1=367340&r2=367341&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/BrokerId.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/BrokerId.java Mon Jan  9 09:21:52 2006
@@ -25,17 +25,17 @@
 public class BrokerId implements DataStructure {
     
     public static final byte DATA_STRUCTURE_TYPE=CommandTypes.BROKER_ID;    
-    protected String brokerId;
+    protected String value;
     
     public BrokerId() {        
     }
     
     public BrokerId(String brokerId) {
-        this.brokerId = brokerId;
+        this.value = brokerId;
     }
     
     public int hashCode() {
-        return brokerId.hashCode();
+        return value.hashCode();
     }
     
     public boolean equals(Object o) {
@@ -44,7 +44,7 @@
         if( o == null || o.getClass()!=BrokerId.class )
             return false;
         BrokerId id = (BrokerId) o;
-        return brokerId.equals(id.brokerId);
+        return value.equals(id.value);
     }
     
     public byte getDataStructureType() {
@@ -52,17 +52,17 @@
     }
 
     public String toString() {
-        return brokerId;
+        return value;
     }
 
     /**
      * @openwire:property version=1
      */
-    public String getBrokerId() {
-        return brokerId;
+    public String getValue() {
+        return value;
     }
-    public void setBrokerId(String brokerId) {
-        this.brokerId = brokerId;
+    public void setValue(String brokerId) {
+        this.value = brokerId;
     }    
 
     public boolean isMarshallAware() {

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/CommandTypes.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/CommandTypes.java?rev=367341&r1=367340&r2=367341&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/CommandTypes.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/CommandTypes.java Mon Jan  9 09:21:52 2006
@@ -46,6 +46,7 @@
     byte  REMOVE_INFO                       = 12;
     byte  CONTROL_COMMAND                   = 14;
     byte  FLUSH_COMMAND                     = 15;
+    byte  CONNECTION_ERROR                  = 16;
     
     ///////////////////////////////////////////////////
     //

Added: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConnectionError.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConnectionError.java?rev=367341&view=auto
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConnectionError.java (added)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConnectionError.java Mon Jan  9 09:21:52 2006
@@ -0,0 +1,63 @@
+/**
+ *
+ * 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.command;
+
+import org.apache.activemq.state.CommandVisitor;
+
+
+/**
+ * 
+ * @openwire:marshaller code="16"
+ * @version $Revision$
+ */
+public class ConnectionError extends BaseCommand {
+
+    public static final byte DATA_STRUCTURE_TYPE=CommandTypes.CONNECTION_ERROR;
+
+    protected ConnectionId connectionId;
+    Throwable exception;
+    
+    public byte getDataStructureType() {
+        return DATA_STRUCTURE_TYPE;
+    }
+       
+    public Response visit(CommandVisitor visitor) throws Throwable {
+        return null;
+    }
+
+    /**
+     * @openwire:property version=1
+     */    
+    public Throwable getException() {
+        return exception;
+    }
+    
+    public void setException(Throwable exception) {
+        this.exception = exception;
+    }
+
+    /**
+     * @openwire:property version=1
+     */    
+    public ConnectionId getConnectionId() {
+        return connectionId;
+    }
+    public void setConnectionId(ConnectionId connectionId) {
+        this.connectionId = connectionId;
+    }
+    
+}

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConnectionId.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConnectionId.java?rev=367341&r1=367340&r2=367341&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConnectionId.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConnectionId.java Mon Jan  9 09:21:52 2006
@@ -26,33 +26,33 @@
     
     public static final byte DATA_STRUCTURE_TYPE=CommandTypes.CONNECTION_ID;
     
-    protected String connectionId;
+    protected String value;
     
     public ConnectionId() {        
     }
     
     public ConnectionId(String connectionId) {
-        this.connectionId = connectionId;
+        this.value = connectionId;
     }
     
     public ConnectionId(ConnectionId id) {
-        this.connectionId = id.getConnectionId();
+        this.value = id.getValue();
     }
 
     public ConnectionId(SessionId id) {
-        this.connectionId = id.getConnectionId();
+        this.value = id.getConnectionId();
     }
 
     public ConnectionId(ProducerId id) {
-        this.connectionId = id.getConnectionId();
+        this.value = id.getConnectionId();
     }
     
     public ConnectionId(ConsumerId id) {
-        this.connectionId = id.getConnectionId();
+        this.value = id.getConnectionId();
     }
 
     public int hashCode() {
-        return connectionId.hashCode();
+        return value.hashCode();
     }
     
     public boolean equals(Object o) {
@@ -61,7 +61,7 @@
         if( o == null || o.getClass()!=ConnectionId.class )
             return false;
         ConnectionId id = (ConnectionId) o;
-        return connectionId.equals(id.connectionId);
+        return value.equals(id.value);
     }
     
     public byte getDataStructureType() {
@@ -69,17 +69,17 @@
     }
 
     public String toString() {
-        return connectionId;
+        return value;
     }
 
     /**
      * @openwire:property version=1
      */
-    public String getConnectionId() {
-        return connectionId;
+    public String getValue() {
+        return value;
     }
-    public void setConnectionId(String connectionId) {
-        this.connectionId = connectionId;
+    public void setValue(String connectionId) {
+        this.value = connectionId;
     }
     
     public boolean isMarshallAware() {

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConsumerId.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConsumerId.java?rev=367341&r1=367340&r2=367341&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConsumerId.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConsumerId.java Mon Jan  9 09:21:52 2006
@@ -28,7 +28,7 @@
     
     protected String connectionId;
     protected long sessionId;
-    protected long consumerId;
+    protected long value;
 
     protected transient int hashCode;
     protected transient String key;
@@ -39,14 +39,14 @@
     
     public ConsumerId(SessionId sessionId, long consumerId) {
         this.connectionId = sessionId.getConnectionId();
-        this.sessionId = sessionId.getSessionId();
-        this.consumerId=consumerId;
+        this.sessionId = sessionId.getValue();
+        this.value=consumerId;
     }
     
     public ConsumerId(ConsumerId id) {
         this.connectionId = id.getConnectionId();
         this.sessionId = id.getSessionId();
-        this.consumerId=id.getConsumerId();
+        this.value=id.getValue();
     }
     
     public SessionId getParentId() {
@@ -58,7 +58,7 @@
 
     public int hashCode() {
         if( hashCode == 0 ) {
-            hashCode = connectionId.hashCode() ^ (int)sessionId ^ (int)consumerId;
+            hashCode = connectionId.hashCode() ^ (int)sessionId ^ (int)value;
         }
         return hashCode;
     }
@@ -70,7 +70,7 @@
             return false;
         ConsumerId id = (ConsumerId) o;
         return sessionId==id.sessionId 
-               && consumerId==id.consumerId
+               && value==id.value
                && connectionId.equals(id.connectionId);
     }
     
@@ -80,7 +80,7 @@
 
     public String toString() {
         if( key==null ) {
-            key = connectionId+":"+sessionId+":"+consumerId;
+            key = connectionId+":"+sessionId+":"+value;
         }
         return key;
     }
@@ -109,11 +109,11 @@
     /**
      * @openwire:property version=1
      */
-    public long getConsumerId() {
-        return consumerId;
+    public long getValue() {
+        return value;
     }
-    public void setConsumerId(long consumerId) {
-        this.consumerId = consumerId;
+    public void setValue(long consumerId) {
+        this.value = consumerId;
     }
 
     public boolean isMarshallAware() {

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConsumerInfo.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConsumerInfo.java?rev=367341&r1=367340&r2=367341&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConsumerInfo.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConsumerInfo.java Mon Jan  9 09:21:52 2006
@@ -49,7 +49,7 @@
     protected BrokerId[] brokerPath;
     
     protected transient BooleanExpression additionalPredicate;
-    protected transient boolean networkSubscription; //this subscription orginated from a network connection
+    protected transient boolean networkSubscription; //this subscription originated from a network connection
     
     public ConsumerInfo() {
     }

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/DiscoveryEvent.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/DiscoveryEvent.java?rev=367341&r1=367340&r2=367341&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/DiscoveryEvent.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/DiscoveryEvent.java Mon Jan  9 09:21:52 2006
@@ -34,6 +34,9 @@
     protected String serviceName;
     protected String brokerName;
 
+    public DiscoveryEvent() {        
+    }
+    
     public DiscoveryEvent(String serviceName) {
         this.serviceName = serviceName;
     }

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/LocalTransactionId.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/LocalTransactionId.java?rev=367341&r1=367340&r2=367341&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/LocalTransactionId.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/LocalTransactionId.java Mon Jan  9 09:21:52 2006
@@ -25,7 +25,7 @@
     public static final byte DATA_STRUCTURE_TYPE=CommandTypes.ACTIVEMQ_LOCAL_TRANSACTION_ID;
 
     protected ConnectionId connectionId;
-    protected long transactionId;
+    protected long value;
 
     private transient String transactionKey;
     private transient int hashCode;
@@ -35,7 +35,7 @@
     
     public LocalTransactionId(ConnectionId connectionId, long transactionId) {
         this.connectionId=connectionId;
-        this.transactionId=transactionId;
+        this.value=transactionId;
     }
 
     public byte getDataStructureType() {
@@ -52,7 +52,7 @@
 
     public String getTransactionKey() {
         if( transactionKey==null ) {
-            transactionKey = "TX:"+connectionId+":"+transactionId;
+            transactionKey = "TX:"+connectionId+":"+value;
         }
         return transactionKey;
     }
@@ -63,7 +63,7 @@
 
     public int hashCode() {
         if( hashCode == 0 ) {
-            hashCode = connectionId.hashCode() ^ (int)transactionId;
+            hashCode = connectionId.hashCode() ^ (int)value;
         }
         return hashCode;
     }
@@ -74,18 +74,18 @@
         if( o == null || o.getClass()!=LocalTransactionId.class )
             return false;
         LocalTransactionId tx = (LocalTransactionId) o;
-        return transactionId==tx.transactionId 
+        return value==tx.value 
                 && connectionId.equals(tx.connectionId);
     }
     
     /**
      * @openwire:property version=1
      */
-    public long getTransactionId() {
-        return transactionId;
+    public long getValue() {
+        return value;
     }
-    public void setTransactionId(long transactionId) {
-        this.transactionId = transactionId;
+    public void setValue(long transactionId) {
+        this.value = transactionId;
     }
 
     /**

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ProducerId.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ProducerId.java?rev=367341&r1=367340&r2=367341&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ProducerId.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ProducerId.java Mon Jan  9 09:21:52 2006
@@ -38,7 +38,7 @@
     
     public ProducerId(SessionId sessionId, long producerId) {
         this.connectionId = sessionId.getConnectionId();
-        this.sessionId = sessionId.getSessionId();
+        this.sessionId = sessionId.getValue();
         this.producerId=producerId;
     }
 
@@ -88,13 +88,13 @@
      * @param sessionKey
      */
     private void setProducerSessionKey(String sessionKey) {
-        // Parse off the sessionId
+        // Parse off the value
         int p = sessionKey.lastIndexOf(":");
         if( p >= 0 ) {
             sessionId = Long.parseLong(sessionKey.substring(p+1));
             sessionKey = sessionKey.substring(0,p);
         }        
-        // The rest is the connectionId
+        // The rest is the value
         connectionId = sessionKey;
     }
 

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/SessionId.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/SessionId.java?rev=367341&r1=367340&r2=367341&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/SessionId.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/SessionId.java Mon Jan  9 09:21:52 2006
@@ -26,7 +26,7 @@
     public static final byte DATA_STRUCTURE_TYPE=CommandTypes.SESSION_ID;
 
     protected String connectionId;
-    protected long sessionId;
+    protected long value;
     
     protected transient int hashCode;
     protected transient String key;
@@ -36,23 +36,23 @@
     }
         
     public SessionId(ConnectionId connectionId, long sessionId) {
-        this.connectionId = connectionId.getConnectionId();
-        this.sessionId=sessionId;
+        this.connectionId = connectionId.getValue();
+        this.value=sessionId;
     }
     
     public SessionId(SessionId id) {
         this.connectionId = id.getConnectionId();
-        this.sessionId=id.getSessionId();
+        this.value=id.getValue();
     }
 
     public SessionId(ProducerId id) {
         this.connectionId = id.getConnectionId();
-        this.sessionId=id.getSessionId();
+        this.value=id.getSessionId();
     }
     
     public SessionId(ConsumerId id) {
         this.connectionId = id.getConnectionId();
-        this.sessionId=id.getSessionId();
+        this.value=id.getSessionId();
     }
     
     public ConnectionId getParentId() {
@@ -64,7 +64,7 @@
 
     public int hashCode() {
         if( hashCode == 0 ) {
-            hashCode = connectionId.hashCode() ^ (int)sessionId;
+            hashCode = connectionId.hashCode() ^ (int)value;
         }
         return hashCode;
     }
@@ -75,7 +75,7 @@
         if( o == null || o.getClass()!=SessionId.class )
             return false;
         SessionId id = (SessionId) o;
-        return sessionId==id.sessionId 
+        return value==id.value 
                && connectionId.equals(id.connectionId);
     }
 
@@ -96,16 +96,16 @@
     /**
      * @openwire:property version=1
      */
-    public long getSessionId() {
-        return sessionId;
+    public long getValue() {
+        return value;
     }
-    public void setSessionId(long sessionId) {
-        this.sessionId = sessionId;
+    public void setValue(long sessionId) {
+        this.value = sessionId;
     }
     
     public String toString() {
         if( key==null ) {
-            key = connectionId+":"+sessionId;
+            key = connectionId+":"+value;
         }
         return key;
     }

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BrokerIdMarshaller.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BrokerIdMarshaller.java?rev=367341&r1=367340&r2=367341&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BrokerIdMarshaller.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BrokerIdMarshaller.java Mon Jan  9 09:21:52 2006
@@ -64,7 +64,7 @@
         super.unmarshal(wireFormat, o, dataIn, bs);
 
         BrokerId info = (BrokerId)o;
-        info.setBrokerId(readString(dataIn, bs));
+        info.setValue(readString(dataIn, bs));
 
     }
 
@@ -77,7 +77,7 @@
         BrokerId info = (BrokerId)o;
 
         int rc = super.marshal1(wireFormat, o, bs);
-        rc += writeString(info.getBrokerId(), bs);
+        rc += writeString(info.getValue(), bs);
 
         return rc+0;
     }
@@ -93,7 +93,7 @@
         super.marshal2(wireFormat, o, dataOut, bs);
 
         BrokerId info = (BrokerId)o;
-        writeString(info.getBrokerId(), dataOut, bs);
+        writeString(info.getValue(), dataOut, bs);
 
     }
 }

Added: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConnectionErrorMarshaller.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConnectionErrorMarshaller.java?rev=367341&view=auto
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConnectionErrorMarshaller.java (added)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConnectionErrorMarshaller.java Mon Jan  9 09:21:52 2006
@@ -0,0 +1,102 @@
+/**
+ *
+ * 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.*;
+
+
+/**
+ * Marshalling code for Open Wire Format for ConnectionError
+ *
+ *
+ * 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 ConnectionErrorMarshaller extends BaseCommandMarshaller {
+
+    /**
+     * Return the type of Data Structure we marshal
+     * @return short representation of the type data structure
+     */
+    public byte getDataStructureType() {
+        return ConnectionError.DATA_STRUCTURE_TYPE;
+    }
+    
+    /**
+     * @return a new object instance
+     */
+    public DataStructure createObject() {
+        return new ConnectionError();
+    }
+
+    /**
+     * Un-marshal an object instance from the data input stream
+     *
+     * @param o the object to un-marshal
+     * @param dataIn the data input stream to build the object from
+     * @throws IOException
+     */
+    public void unmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn, BooleanStream bs) throws IOException {
+        super.unmarshal(wireFormat, o, dataIn, bs);
+
+        ConnectionError info = (ConnectionError)o;
+        info.setException((java.lang.Throwable) unmarsalThrowable(wireFormat, dataIn, bs));
+        info.setConnectionId((org.apache.activemq.command.ConnectionId) unmarsalNestedObject(wireFormat, dataIn, bs));
+
+    }
+
+
+    /**
+     * Write the booleans that this object uses to a BooleanStream
+     */
+    public int marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
+
+        ConnectionError info = (ConnectionError)o;
+
+        int rc = super.marshal1(wireFormat, o, bs);
+        rc += marshalThrowable(wireFormat, info.getException(), bs);
+        rc += marshal1NestedObject(wireFormat, info.getConnectionId(), bs);
+
+        return rc+0;
+    }
+
+    /**
+     * Write a object instance to data output stream
+     *
+     * @param o the instance to be marshaled
+     * @param dataOut the output stream
+     * @throws IOException thrown if an error occurs
+     */
+    public void marshal2(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut, BooleanStream bs) throws IOException {
+        super.marshal2(wireFormat, o, dataOut, bs);
+
+        ConnectionError info = (ConnectionError)o;
+        marshalThrowable(wireFormat, info.getException(), dataOut, bs);
+        marshal2NestedObject(wireFormat, info.getConnectionId(), dataOut, bs);
+
+    }
+}

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConnectionIdMarshaller.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConnectionIdMarshaller.java?rev=367341&r1=367340&r2=367341&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConnectionIdMarshaller.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConnectionIdMarshaller.java Mon Jan  9 09:21:52 2006
@@ -64,7 +64,7 @@
         super.unmarshal(wireFormat, o, dataIn, bs);
 
         ConnectionId info = (ConnectionId)o;
-        info.setConnectionId(readString(dataIn, bs));
+        info.setValue(readString(dataIn, bs));
 
     }
 
@@ -77,7 +77,7 @@
         ConnectionId info = (ConnectionId)o;
 
         int rc = super.marshal1(wireFormat, o, bs);
-        rc += writeString(info.getConnectionId(), bs);
+        rc += writeString(info.getValue(), bs);
 
         return rc+0;
     }
@@ -93,7 +93,7 @@
         super.marshal2(wireFormat, o, dataOut, bs);
 
         ConnectionId info = (ConnectionId)o;
-        writeString(info.getConnectionId(), dataOut, bs);
+        writeString(info.getValue(), dataOut, bs);
 
     }
 }

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConsumerIdMarshaller.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConsumerIdMarshaller.java?rev=367341&r1=367340&r2=367341&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConsumerIdMarshaller.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConsumerIdMarshaller.java Mon Jan  9 09:21:52 2006
@@ -66,7 +66,7 @@
         ConsumerId info = (ConsumerId)o;
         info.setConnectionId(readString(dataIn, bs));
         info.setSessionId(unmarshalLong(wireFormat, dataIn, bs));
-        info.setConsumerId(unmarshalLong(wireFormat, dataIn, bs));
+        info.setValue(unmarshalLong(wireFormat, dataIn, bs));
 
     }
 
@@ -81,7 +81,7 @@
         int rc = super.marshal1(wireFormat, o, bs);
         rc += writeString(info.getConnectionId(), bs);
         rc+=marshal1Long(wireFormat, info.getSessionId(), bs);
-        rc+=marshal1Long(wireFormat, info.getConsumerId(), bs);
+        rc+=marshal1Long(wireFormat, info.getValue(), bs);
 
         return rc+0;
     }
@@ -99,7 +99,7 @@
         ConsumerId info = (ConsumerId)o;
         writeString(info.getConnectionId(), dataOut, bs);
         marshal2Long(wireFormat, info.getSessionId(), dataOut, bs);
-        marshal2Long(wireFormat, info.getConsumerId(), dataOut, bs);
+        marshal2Long(wireFormat, info.getValue(), dataOut, bs);
 
     }
 }

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/DiscoveryEventMarshaller.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/DiscoveryEventMarshaller.java?rev=367341&r1=367340&r2=367341&view=diff
==============================================================================
    (empty)

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/LocalTransactionIdMarshaller.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/LocalTransactionIdMarshaller.java?rev=367341&r1=367340&r2=367341&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/LocalTransactionIdMarshaller.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/LocalTransactionIdMarshaller.java Mon Jan  9 09:21:52 2006
@@ -64,7 +64,7 @@
         super.unmarshal(wireFormat, o, dataIn, bs);
 
         LocalTransactionId info = (LocalTransactionId)o;
-        info.setTransactionId(unmarshalLong(wireFormat, dataIn, bs));
+        info.setValue(unmarshalLong(wireFormat, dataIn, bs));
         info.setConnectionId((org.apache.activemq.command.ConnectionId) unmarsalCachedObject(wireFormat, dataIn, bs));
 
     }
@@ -78,7 +78,7 @@
         LocalTransactionId info = (LocalTransactionId)o;
 
         int rc = super.marshal1(wireFormat, o, bs);
-        rc+=marshal1Long(wireFormat, info.getTransactionId(), bs);
+        rc+=marshal1Long(wireFormat, info.getValue(), bs);
         rc += marshal1CachedObject(wireFormat, info.getConnectionId(), bs);
 
         return rc+0;
@@ -95,7 +95,7 @@
         super.marshal2(wireFormat, o, dataOut, bs);
 
         LocalTransactionId info = (LocalTransactionId)o;
-        marshal2Long(wireFormat, info.getTransactionId(), dataOut, bs);
+        marshal2Long(wireFormat, info.getValue(), dataOut, bs);
         marshal2CachedObject(wireFormat, info.getConnectionId(), dataOut, bs);
 
     }

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/MarshallerFactory.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/MarshallerFactory.java?rev=367341&r1=367340&r2=367341&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/MarshallerFactory.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/MarshallerFactory.java Mon Jan  9 09:21:52 2006
@@ -55,6 +55,7 @@
         add(new JournalQueueAckMarshaller());
         add(new WireFormatInfoMarshaller());
         add(new ResponseMarshaller());
+        add(new ConnectionErrorMarshaller());
         add(new ActiveMQObjectMessageMarshaller());
         add(new ConsumerInfoMarshaller());
         add(new ConnectionIdMarshaller());

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/SessionIdMarshaller.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/SessionIdMarshaller.java?rev=367341&r1=367340&r2=367341&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/SessionIdMarshaller.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/SessionIdMarshaller.java Mon Jan  9 09:21:52 2006
@@ -65,7 +65,7 @@
 
         SessionId info = (SessionId)o;
         info.setConnectionId(readString(dataIn, bs));
-        info.setSessionId(unmarshalLong(wireFormat, dataIn, bs));
+        info.setValue(unmarshalLong(wireFormat, dataIn, bs));
 
     }
 
@@ -79,7 +79,7 @@
 
         int rc = super.marshal1(wireFormat, o, bs);
         rc += writeString(info.getConnectionId(), bs);
-        rc+=marshal1Long(wireFormat, info.getSessionId(), bs);
+        rc+=marshal1Long(wireFormat, info.getValue(), bs);
 
         return rc+0;
     }
@@ -96,7 +96,7 @@
 
         SessionId info = (SessionId)o;
         writeString(info.getConnectionId(), dataOut, bs);
-        marshal2Long(wireFormat, info.getSessionId(), dataOut, bs);
+        marshal2Long(wireFormat, info.getValue(), dataOut, bs);
 
     }
 }

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/security/SimpleAuthorizationBroker.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/security/SimpleAuthorizationBroker.java?rev=367341&r1=367340&r2=367341&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/security/SimpleAuthorizationBroker.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/security/SimpleAuthorizationBroker.java Mon Jan  9 09:21:52 2006
@@ -62,7 +62,7 @@
 
         // You don't need to be an admin to create temp destinations.
         if( !destination.isTemporary() 
-            || !((ActiveMQTempDestination)destination).getConnectionId().equals(context.getConnectionId().getConnectionId()) ) {
+            || !((ActiveMQTempDestination)destination).getConnectionId().equals(context.getConnectionId().getValue()) ) {
             
             Set allowedACLs = adminACLs.get(destination);
             if(allowedACLs!=null && !securityContext.isInOneOf(allowedACLs))
@@ -80,7 +80,7 @@
 
         // You don't need to be an admin to remove temp destinations.
         if( !destination.isTemporary() 
-            || !((ActiveMQTempDestination)destination).getConnectionId().equals(context.getConnectionId().getConnectionId()) ) {
+            || !((ActiveMQTempDestination)destination).getConnectionId().equals(context.getConnectionId().getValue()) ) {
             
             Set allowedACLs = adminACLs.get(destination);
             if(allowedACLs!=null && !securityContext.isInOneOf(allowedACLs))

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/DiscoveryTransportFactory.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/DiscoveryTransportFactory.java?rev=367341&r1=367340&r2=367341&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/DiscoveryTransportFactory.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/discovery/DiscoveryTransportFactory.java Mon Jan  9 09:21:52 2006
@@ -54,7 +54,7 @@
 //                                +components.length);
 //            }
 //            Map parameters=new HashMap(compositData.getParameters());
-//            DiscoveryTransportServer server=new DiscoveryTransportServer(TransportFactory.bind(brokerId,components[0]));
+//            DiscoveryTransportServer server=new DiscoveryTransportServer(TransportFactory.bind(value,components[0]));
 //            IntrospectionSupport.setProperties(server,parameters,"discovery");
 //            DiscoveryAgent discoveryAgent=DiscoveryAgentFactory.createDiscoveryAgent(server.getDiscovery());
 //            // Use the host name to configure the group of the discovery agent.
@@ -64,7 +64,7 @@
 //                }
 //            }
 //            if(!parameters.containsKey("discovery.brokerName")){
-//                parameters.put("discovery.brokerName",brokerId);
+//                parameters.put("discovery.brokerName",value);
 //            }
 //            IntrospectionSupport.setProperties(discoveryAgent,parameters,"discovery.");
 //            server.setDiscoveryAgent(discoveryAgent);

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/ClientTestSupport.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/ClientTestSupport.java?rev=367341&r1=367340&r2=367341&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/ClientTestSupport.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/ClientTestSupport.java Mon Jan  9 09:21:52 2006
@@ -104,7 +104,7 @@
      protected ConnectionInfo createConnectionInfo() throws Throwable {
         ConnectionInfo info = new ConnectionInfo();
         info.setConnectionId(new ConnectionId("connection:"+(++idGenerator)));
-        info.setClientId( info.getConnectionId().getConnectionId() );
+        info.setClientId( info.getConnectionId().getValue() );
         return info;
     }
 

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=367341&r1=367340&r2=367341&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 Mon Jan  9 09:21:52 2006
@@ -117,7 +117,7 @@
     protected ConnectionInfo createConnectionInfo() throws Throwable {
         ConnectionInfo info = new ConnectionInfo();
         info.setConnectionId(new ConnectionId("connection:"+(++idGenerator)));
-        info.setClientId( info.getConnectionId().getConnectionId() );
+        info.setClientId( info.getConnectionId().getValue() );
         return info;
     }
     

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkTestSupport.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkTestSupport.java?rev=367341&r1=367340&r2=367341&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkTestSupport.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkTestSupport.java Mon Jan  9 09:21:52 2006
@@ -73,7 +73,7 @@
     }
 
     /**
-     * @param brokerId
+     * @param value
      * @return
      * @throws Exception
      * @throws IOException



Mime
View raw message