[jboss-cvs] JBoss Messaging SVN: r5328 - in trunk: src/main/org/jboss/messaging/core/client/impl and 13 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Nov 10 11:50:14 EST 2008


Author: timfox
Date: 2008-11-10 11:50:14 -0500 (Mon, 10 Nov 2008)
New Revision: 5328

Removed:
   trunk/src/main/org/jboss/messaging/util/GroupIdGenerator.java
   trunk/src/main/org/jboss/messaging/util/SimpleStringIdGenerator.java
Modified:
   trunk/src/main/org/jboss/messaging/core/client/ClientSessionFactory.java
   trunk/src/main/org/jboss/messaging/core/client/impl/ClientProducerImpl.java
   trunk/src/main/org/jboss/messaging/core/client/impl/ClientSessionFactoryImpl.java
   trunk/src/main/org/jboss/messaging/core/client/impl/ClientSessionImpl.java
   trunk/src/main/org/jboss/messaging/core/remoting/impl/wireformat/SessionCreateProducerMessage.java
   trunk/src/main/org/jboss/messaging/core/remoting/impl/wireformat/SessionCreateProducerResponseMessage.java
   trunk/src/main/org/jboss/messaging/core/server/impl/GroupingRoundRobinDistributionPolicy.java
   trunk/src/main/org/jboss/messaging/core/server/impl/MessagingServerImpl.java
   trunk/src/main/org/jboss/messaging/core/server/impl/ServerSessionImpl.java
   trunk/src/main/org/jboss/messaging/jms/client/JBossConnectionFactory.java
   trunk/src/main/org/jboss/messaging/jms/client/JBossMessage.java
   trunk/src/main/org/jboss/messaging/jms/server/JMSServerManager.java
   trunk/src/main/org/jboss/messaging/jms/server/impl/JMSServerDeployer.java
   trunk/src/main/org/jboss/messaging/jms/server/impl/JMSServerManagerImpl.java
   trunk/src/main/org/jboss/messaging/jms/server/management/JMSServerControlMBean.java
   trunk/src/main/org/jboss/messaging/jms/server/management/impl/JMSServerControl.java
   trunk/tests/jms-tests/src/org/jboss/test/messaging/jms/CTSMiscellaneousTest.java
   trunk/tests/jms-tests/src/org/jboss/test/messaging/jms/JMSTestCase.java
   trunk/tests/src/org/jboss/messaging/tests/integration/basic/AutoGroupClientTest.java
   trunk/tests/src/org/jboss/messaging/tests/integration/clientcrash/ClientCrashTest.java
   trunk/tests/src/org/jboss/messaging/tests/integration/cluster/ReplicateConnectionFailureTest.java
   trunk/tests/src/org/jboss/messaging/tests/integration/jms/cluster/JMSFailoverTest.java
Log:
Removed auto group id generation from server and redundant code


Modified: trunk/src/main/org/jboss/messaging/core/client/ClientSessionFactory.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/client/ClientSessionFactory.java	2008-11-10 15:34:50 UTC (rev 5327)
+++ trunk/src/main/org/jboss/messaging/core/client/ClientSessionFactory.java	2008-11-10 16:50:14 UTC (rev 5328)
@@ -74,9 +74,9 @@
 
    void setBlockOnAcknowledge(final boolean blocking);
 
-   boolean isAutoGroupID();
+   boolean isAutoGroup();
 
-   void setAutoGroupId(boolean autoGroupId);
+   void setAutoGroup(boolean autoGroup);
    
    int getAckBatchSize();
    

Modified: trunk/src/main/org/jboss/messaging/core/client/impl/ClientProducerImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/client/impl/ClientProducerImpl.java	2008-11-10 15:34:50 UTC (rev 5327)
+++ trunk/src/main/org/jboss/messaging/core/client/impl/ClientProducerImpl.java	2008-11-10 16:50:14 UTC (rev 5328)
@@ -22,6 +22,7 @@
 import org.jboss.messaging.core.remoting.impl.wireformat.SessionSendMessage;
 import org.jboss.messaging.util.SimpleString;
 import org.jboss.messaging.util.TokenBucketLimiter;
+import org.jboss.messaging.util.UUIDGenerator;
 
 /**
  * The client-side Producer connectionFactory class.
@@ -59,7 +60,7 @@
 
    private final boolean blockOnPersistentSend;
 
-   private final SimpleString autoGroupId;
+   private final SimpleString groupID;
 
    // Static ---------------------------------------------------------------------------------------
 
@@ -71,7 +72,7 @@
                              final TokenBucketLimiter rateLimiter,
                              final boolean blockOnNonPersistentSend,
                              final boolean blockOnPersistentSend,
-                             final SimpleString autoGroupId,
+                             final boolean autoGroup,
                              final Channel channel)
    {
       this.channel = channel;
@@ -88,7 +89,14 @@
       
       this.blockOnPersistentSend = blockOnPersistentSend;
 
-      this.autoGroupId = autoGroupId;
+      if (autoGroup)
+      {
+         this.groupID = UUIDGenerator.getInstance().generateSimpleStringUUID();
+      }
+      else
+      {
+         this.groupID = null;
+      }
    }
 
    // ClientProducer implementation ----------------------------------------------------------------
@@ -209,9 +217,9 @@
          rateLimiter.limit();
       }
 
-      if (autoGroupId != null)
+      if (groupID != null)
       {
-         msg.putStringProperty(MessageImpl.HDR_GROUP_ID, autoGroupId);
+         msg.putStringProperty(MessageImpl.HDR_GROUP_ID, groupID);
       }
 
       boolean sendBlocking = msg.isDurable() ? blockOnPersistentSend : blockOnNonPersistentSend;

Modified: trunk/src/main/org/jboss/messaging/core/client/impl/ClientSessionFactoryImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/client/impl/ClientSessionFactoryImpl.java	2008-11-10 15:34:50 UTC (rev 5327)
+++ trunk/src/main/org/jboss/messaging/core/client/impl/ClientSessionFactoryImpl.java	2008-11-10 16:50:14 UTC (rev 5328)
@@ -71,7 +71,7 @@
 
    public static final boolean DEFAULT_BLOCK_ON_NON_PERSISTENT_SEND = false;
 
-   public static final boolean DEFAULT_AUTO_GROUP_ID = false;
+   public static final boolean DEFAULT_AUTO_GROUP = false;
    
    public static final long DEFAULT_CALL_TIMEOUT = 30000;
       
@@ -117,7 +117,7 @@
 
    private volatile boolean blockOnNonPersistentSend;
 
-   private volatile boolean autoGroupId;
+   private volatile boolean autoGroup;
    
    private volatile int ackBatchSize;
 
@@ -152,7 +152,7 @@
                                    final boolean blockOnAcknowledge,
                                    final boolean blockOnNonPersistentSend,
                                    final boolean blockOnPersistentSend,
-                                   final boolean autoGroupId,
+                                   final boolean autoGroup,
                                    final int maxConnections,
                                    final int ackBatchSize)
    {
@@ -194,7 +194,7 @@
       this.blockOnAcknowledge = blockOnAcknowledge;
       this.blockOnNonPersistentSend = blockOnNonPersistentSend;
       this.blockOnPersistentSend = blockOnPersistentSend;
-      this.autoGroupId = autoGroupId;
+      this.autoGroup = autoGroup;
       this.maxConnections = maxConnections;
       this.ackBatchSize = ackBatchSize;
    }
@@ -213,7 +213,7 @@
            DEFAULT_BLOCK_ON_ACKNOWLEDGE,
            DEFAULT_BLOCK_ON_PERSISTENT_SEND,
            DEFAULT_BLOCK_ON_NON_PERSISTENT_SEND,
-           DEFAULT_AUTO_GROUP_ID,
+           DEFAULT_AUTO_GROUP,
            DEFAULT_MAX_CONNECTIONS,
            DEFAULT_ACK_BATCH_SIZE);
 
@@ -319,14 +319,14 @@
       blockOnAcknowledge = blocking;
    }
 
-   public boolean isAutoGroupID()
+   public boolean isAutoGroup()
    {
-      return autoGroupId;
+      return autoGroup;
    }
 
-   public void setAutoGroupId(boolean autoGroupId)
+   public void setAutoGroup(boolean autoGroup)
    {
-      this.autoGroupId = autoGroupId;
+      this.autoGroup = autoGroup;
    }
    
    public int getAckBatchSize()
@@ -618,7 +618,7 @@
                                                                         autoCommitSends,
                                                                         autoCommitAcks,
                                                                         blockOnAcknowledge,
-                                                                        autoGroupId,
+                                                                        autoGroup,
                                                                         ackBatchSize,
                                                                         connection,
                                                                         backupConnection,                                                                       

Modified: trunk/src/main/org/jboss/messaging/core/client/impl/ClientSessionImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/client/impl/ClientSessionImpl.java	2008-11-10 15:34:50 UTC (rev 5327)
+++ trunk/src/main/org/jboss/messaging/core/client/impl/ClientSessionImpl.java	2008-11-10 16:50:14 UTC (rev 5328)
@@ -143,7 +143,7 @@
 
    private final boolean blockOnAcknowledge;
 
-   private final boolean autoGroupId;
+   private final boolean autoGroup;
    
    private final int ackBatchSize;
 
@@ -167,7 +167,7 @@
                             final boolean autoCommitSends,
                             final boolean autoCommitAcks,
                             final boolean blockOnAcknowledge,
-                            final boolean autoGroupId,                     
+                            final boolean autoGroup,                     
                             final int ackBatchSize,
                             final RemotingConnection remotingConnection,
                             final RemotingConnection backupConnection,
@@ -203,7 +203,7 @@
 
       this.blockOnAcknowledge = blockOnAcknowledge;
 
-      this.autoGroupId = autoGroupId;
+      this.autoGroup = autoGroup;
       
       this.channel = channel;
 
@@ -407,7 +407,7 @@
 
       if (producer == null)
       {
-         SessionCreateProducerMessage request = new SessionCreateProducerMessage(maxRate, autoGroupId);
+         SessionCreateProducerMessage request = new SessionCreateProducerMessage(maxRate);
 
          SessionCreateProducerResponseMessage response = (SessionCreateProducerResponseMessage)channel.sendBlocking(request);
 
@@ -425,7 +425,7 @@
                                                                                                    false),
                                            autoCommitSends && blockOnNonPersistentSend,
                                            autoCommitSends && blockOnPersistentSend,
-                                           response.getAutoGroupId(),
+                                           autoGroup,
                                            channel);
       }
 

Modified: trunk/src/main/org/jboss/messaging/core/remoting/impl/wireformat/SessionCreateProducerMessage.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/remoting/impl/wireformat/SessionCreateProducerMessage.java	2008-11-10 15:34:50 UTC (rev 5327)
+++ trunk/src/main/org/jboss/messaging/core/remoting/impl/wireformat/SessionCreateProducerMessage.java	2008-11-10 16:50:14 UTC (rev 5328)
@@ -36,22 +36,17 @@
 
    // Attributes ----------------------------------------------------
 
-
    private int maxRate;
 
-   private boolean autoGroupId;
-
    // Static --------------------------------------------------------
 
    // Constructors --------------------------------------------------
 
-   public SessionCreateProducerMessage(final int maxRate, final boolean autoGroupId)
+   public SessionCreateProducerMessage(final int maxRate)
    {
       super(SESS_CREATEPRODUCER);
 
       this.maxRate = maxRate;
-
-      this.autoGroupId = autoGroupId;
    }
 
    public SessionCreateProducerMessage()
@@ -66,7 +61,6 @@
    {
       StringBuffer buff = new StringBuffer(getParentString());
       buff.append(", maxrate=" + maxRate);
-      buff.append(", autoGroupId=" + autoGroupId);
       buff.append("]");
       return buff.toString();
    }
@@ -76,35 +70,16 @@
       return maxRate;
    }
 
-   public boolean isAutoGroupId()
-   {
-      return autoGroupId;
-   }
-
    public void encodeBody(final MessagingBuffer buffer)
    {
       buffer.putInt(maxRate);
-      buffer.putBoolean(autoGroupId);
    }
 
    public void decodeBody(final MessagingBuffer buffer)
    {
       maxRate = buffer.getInt();
-      autoGroupId = buffer.getBoolean();
    }
 
-   public boolean equals(Object other)
-   {
-      if (other instanceof SessionCreateProducerMessage == false)
-      {
-         return false;
-      }
-
-      SessionCreateProducerMessage r = (SessionCreateProducerMessage)other;
-
-      return super.equals(other) && this.autoGroupId == autoGroupId;
-   }
-
    // Package protected ---------------------------------------------
 
    // Protected -----------------------------------------------------

Modified: trunk/src/main/org/jboss/messaging/core/remoting/impl/wireformat/SessionCreateProducerResponseMessage.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/remoting/impl/wireformat/SessionCreateProducerResponseMessage.java	2008-11-10 15:34:50 UTC (rev 5327)
+++ trunk/src/main/org/jboss/messaging/core/remoting/impl/wireformat/SessionCreateProducerResponseMessage.java	2008-11-10 16:50:14 UTC (rev 5328)
@@ -23,7 +23,6 @@
 package org.jboss.messaging.core.remoting.impl.wireformat;
 
 import org.jboss.messaging.core.remoting.spi.MessagingBuffer;
-import org.jboss.messaging.util.SimpleString;
 
 /**
  * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
@@ -38,19 +37,15 @@
   
    private int maxRate;
 
-   private SimpleString autoGroupId;
-
    // Static --------------------------------------------------------
 
    // Constructors --------------------------------------------------
 
-   public SessionCreateProducerResponseMessage(final int maxRate, final SimpleString autoGroupId)
+   public SessionCreateProducerResponseMessage(final int maxRate)
    {
       super(SESS_CREATEPRODUCER_RESP);
  
       this.maxRate = maxRate;
-
-      this.autoGroupId = autoGroupId;
    }
    
    public SessionCreateProducerResponseMessage()
@@ -70,21 +65,14 @@
    	return maxRate;
    }
 
-   public SimpleString getAutoGroupId()
-   {
-      return autoGroupId;
-   }
-
    public void encodeBody(final MessagingBuffer buffer)
    {
       buffer.putInt(maxRate);
-      buffer.putNullableSimpleString(autoGroupId);
    }
    
    public void decodeBody(final MessagingBuffer buffer)
    {     
       maxRate = buffer.getInt();
-      autoGroupId = buffer.getNullableSimpleString();
    }
    
 

Modified: trunk/src/main/org/jboss/messaging/core/server/impl/GroupingRoundRobinDistributionPolicy.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/server/impl/GroupingRoundRobinDistributionPolicy.java	2008-11-10 15:34:50 UTC (rev 5327)
+++ trunk/src/main/org/jboss/messaging/core/server/impl/GroupingRoundRobinDistributionPolicy.java	2008-11-10 16:50:14 UTC (rev 5328)
@@ -30,7 +30,7 @@
 import org.jboss.messaging.util.SimpleString;
 
 /**
- * Distributes message based on the message property 'JMSXGroupID'. Once a message has been successfully delivered to a
+ * Distributes message based on the message property 'JBM_GROUP_ID'. Once a message has been successfully delivered to a
  * consumer that consumer is then bound to that group. Any message that has the same group id set will always be
  * delivered to the same consumer.
  * The Initial consumer is the first consumer found, using the round robin policy, that hasn't been bound to a group, If

Modified: trunk/src/main/org/jboss/messaging/core/server/impl/MessagingServerImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/server/impl/MessagingServerImpl.java	2008-11-10 15:34:50 UTC (rev 5327)
+++ trunk/src/main/org/jboss/messaging/core/server/impl/MessagingServerImpl.java	2008-11-10 16:50:14 UTC (rev 5328)
@@ -61,11 +61,8 @@
 import org.jboss.messaging.core.transaction.impl.ResourceManagerImpl;
 import org.jboss.messaging.core.version.Version;
 import org.jboss.messaging.util.ExecutorFactory;
-import org.jboss.messaging.util.GroupIdGenerator;
 import org.jboss.messaging.util.JBMThreadFactory;
 import org.jboss.messaging.util.OrderedExecutorFactory;
-import org.jboss.messaging.util.SimpleString;
-import org.jboss.messaging.util.SimpleStringIdGenerator;
 import org.jboss.messaging.util.VersionLoader;
 
 /**
@@ -130,8 +127,6 @@
 
    private ManagementService managementService;
 
-   private final SimpleStringIdGenerator simpleStringIdGenerator = new GroupIdGenerator(new SimpleString("AutoGroupId-"));
-
    private ConnectionManager replicatingConnectionManager;
 
    // Constructors
@@ -634,8 +629,7 @@
                                                               executorFactory.getExecutor(),
                                                               channel,
                                                               managementService,
-                                                              this,
-                                                              simpleStringIdGenerator,
+                                                              this,                                                    
                                                               configuration.getManagementAddress());
 
       sessions.put(name, session);

Modified: trunk/src/main/org/jboss/messaging/core/server/impl/ServerSessionImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/server/impl/ServerSessionImpl.java	2008-11-10 15:34:50 UTC (rev 5327)
+++ trunk/src/main/org/jboss/messaging/core/server/impl/ServerSessionImpl.java	2008-11-10 16:50:14 UTC (rev 5328)
@@ -99,7 +99,6 @@
 import org.jboss.messaging.util.IDGenerator;
 import org.jboss.messaging.util.SimpleIDGenerator;
 import org.jboss.messaging.util.SimpleString;
-import org.jboss.messaging.util.SimpleStringIdGenerator;
 
 /*
  * Session implementation 
@@ -167,8 +166,6 @@
 
    private final MessagingServer server;
 
-   private final SimpleStringIdGenerator simpleStringIdGenerator;
-   
    private final SimpleString managementAddress;
 
    // Constructors ---------------------------------------------------------------------------------
@@ -189,8 +186,7 @@
                             final Executor executor,
                             final Channel channel,
                             final ManagementService managementService,
-                            final MessagingServer server,
-                            final SimpleStringIdGenerator simpleStringIdGenerator,
+                            final MessagingServer server,                      
                             final SimpleString managementAddress) throws Exception
    {
       this.id = id;
@@ -232,8 +228,6 @@
 
       this.server = server;
 
-      this.simpleStringIdGenerator = simpleStringIdGenerator;
-      
       this.managementAddress = managementAddress;
    }
 
@@ -847,8 +841,6 @@
    {      
       int maxRate = packet.getMaxRate();
 
-      boolean autoGroupID = packet.isAutoGroupId();
-
       Packet response = null;
 
       try
@@ -860,14 +852,7 @@
 
          producers.put(producer.getID(), producer);
 
-         SimpleString groupId = null;
-
-         if (autoGroupID)
-         {
-            groupId = simpleStringIdGenerator.generateID();
-         }
-
-         response = new SessionCreateProducerResponseMessage(maxRateToUse, groupId);
+         response = new SessionCreateProducerResponseMessage(maxRateToUse);
       }
       catch (Exception e)
       {

Modified: trunk/src/main/org/jboss/messaging/jms/client/JBossConnectionFactory.java
===================================================================
--- trunk/src/main/org/jboss/messaging/jms/client/JBossConnectionFactory.java	2008-11-10 15:34:50 UTC (rev 5327)
+++ trunk/src/main/org/jboss/messaging/jms/client/JBossConnectionFactory.java	2008-11-10 16:50:14 UTC (rev 5328)
@@ -92,7 +92,7 @@
 
    private final boolean blockOnPersistentSend;
 
-   private final boolean autoGroupId;
+   private final boolean autoGroup;
 
    private final int maxConnections;
 
@@ -112,7 +112,7 @@
                                  final boolean blockOnAcknowledge,
                                  final boolean blockOnNonPersistentSend,
                                  final boolean blockOnPersistentSend,
-                                 final boolean autoGroupId,
+                                 final boolean autoGroup,
                                  final int maxConnections)
    {
       this.connectorConfig = connectorConfig;
@@ -129,7 +129,7 @@
       this.blockOnAcknowledge = blockOnAcknowledge;
       this.blockOnNonPersistentSend = blockOnNonPersistentSend;
       this.blockOnPersistentSend = blockOnPersistentSend;
-      this.autoGroupId = autoGroupId;
+      this.autoGroup = autoGroup;
       this.maxConnections = maxConnections;
    }
 
@@ -277,9 +277,9 @@
       return blockOnPersistentSend;
    }
 
-   public boolean isAutoGroupId()
+   public boolean isAutoGroup()
    {
-      return autoGroupId;
+      return autoGroup;
    }
 
    // Package protected ----------------------------------------------------------------------------
@@ -304,7 +304,7 @@
                                                        blockOnAcknowledge,
                                                        blockOnNonPersistentSend,
                                                        blockOnPersistentSend,
-                                                       autoGroupId,
+                                                       autoGroup,
                                                        maxConnections,
                                                        DEFAULT_ACK_BATCH_SIZE);
 

Modified: trunk/src/main/org/jboss/messaging/jms/client/JBossMessage.java
===================================================================
--- trunk/src/main/org/jboss/messaging/jms/client/JBossMessage.java	2008-11-10 15:34:50 UTC (rev 5327)
+++ trunk/src/main/org/jboss/messaging/jms/client/JBossMessage.java	2008-11-10 16:50:14 UTC (rev 5328)
@@ -545,8 +545,8 @@
 
    public boolean propertyExists(final String name) throws JMSException
    {
-      return message.containsProperty(new SimpleString(name)) || name.equals(JMSXDELIVERYCOUNT)
-            || (JMSXGROUPID.equals(name) && message.containsProperty(MessageImpl.HDR_GROUP_ID));
+      return message.containsProperty(new SimpleString(name)) || name.equals(JMSXDELIVERYCOUNT) ||
+             (JMSXGROUPID.equals(name) && message.containsProperty(MessageImpl.HDR_GROUP_ID));
    }
 
    public boolean getBooleanProperty(final String name) throws JMSException
@@ -706,7 +706,7 @@
          return String.valueOf(message.getDeliveryCount());
       }
       Object value;
-      if(JMSXGROUPID.equals(name))
+      if (JMSXGROUPID.equals(name))
       {
          value = message.getProperty(MessageImpl.HDR_GROUP_ID);
       }
@@ -838,7 +838,7 @@
    public void setStringProperty(final String name, final String value) throws JMSException
    {
       checkProperty(name, value);
-      if(JMSXGROUPID.equals(name))
+      if (JMSXGROUPID.equals(name))
       {
          message.putStringProperty(MessageImpl.HDR_GROUP_ID, new SimpleString(value));
       }

Modified: trunk/src/main/org/jboss/messaging/jms/server/JMSServerManager.java
===================================================================
--- trunk/src/main/org/jboss/messaging/jms/server/JMSServerManager.java	2008-11-10 15:34:50 UTC (rev 5327)
+++ trunk/src/main/org/jboss/messaging/jms/server/JMSServerManager.java	2008-11-10 16:50:14 UTC (rev 5328)
@@ -120,7 +120,7 @@
                                    boolean blockOnAcknowledge,
                                    boolean blockOnNonPersistentSend,
                                    boolean blockOnPersistentSend,
-                                   boolean autoGroupId,
+                                   boolean autoGroup,
                                    int maxConnections,
                                    String jndiBinding) throws Exception;
 

Modified: trunk/src/main/org/jboss/messaging/jms/server/impl/JMSServerDeployer.java
===================================================================
--- trunk/src/main/org/jboss/messaging/jms/server/impl/JMSServerDeployer.java	2008-11-10 15:34:50 UTC (rev 5327)
+++ trunk/src/main/org/jboss/messaging/jms/server/impl/JMSServerDeployer.java	2008-11-10 16:50:14 UTC (rev 5328)
@@ -140,7 +140,7 @@
          boolean blockOnAcknowledge = ClientSessionFactoryImpl.DEFAULT_BLOCK_ON_ACKNOWLEDGE;
          boolean blockOnNonPersistentSend = ClientSessionFactoryImpl.DEFAULT_BLOCK_ON_NON_PERSISTENT_SEND;
          boolean blockOnPersistentSend = ClientSessionFactoryImpl.DEFAULT_BLOCK_ON_PERSISTENT_SEND;
-         boolean autoGroupId = ClientSessionFactoryImpl.DEFAULT_AUTO_GROUP_ID;
+         boolean autoGroup = ClientSessionFactoryImpl.DEFAULT_AUTO_GROUP;
          int maxConnections = ClientSessionFactoryImpl.DEFAULT_MAX_CONNECTIONS;
          List<String> jndiBindings = new ArrayList<String>();
          String connectorFactoryClassName = null;
@@ -200,7 +200,7 @@
             }
             else if(AUTO_GROUP_ID_ELEMENT.equalsIgnoreCase(children.item(j).getNodeName()))
             {
-               autoGroupId = Boolean.parseBoolean(children.item(j).getTextContent().trim());
+               autoGroup = Boolean.parseBoolean(children.item(j).getTextContent().trim());
             }
             else if(MAX_CONNECTIONS_ELEMENT.equalsIgnoreCase(children.item(j).getNodeName()))
             {
@@ -410,7 +410,7 @@
                                                   blockOnAcknowledge,
                                                   blockOnNonPersistentSend,
                                                   blockOnPersistentSend,
-                                                  autoGroupId,
+                                                  autoGroup,
                                                   maxConnections,
                                                   jndiBindings);
       }

Modified: trunk/src/main/org/jboss/messaging/jms/server/impl/JMSServerManagerImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/jms/server/impl/JMSServerManagerImpl.java	2008-11-10 15:34:50 UTC (rev 5327)
+++ trunk/src/main/org/jboss/messaging/jms/server/impl/JMSServerManagerImpl.java	2008-11-10 16:50:14 UTC (rev 5328)
@@ -201,7 +201,7 @@
                                           boolean blockOnAcknowledge,
                                           boolean blockOnNonPersistentSend,
                                           boolean blockOnPersistentSend,
-                                          boolean autoGroupId,
+                                          boolean autoGroup,
                                           int maxConnections,
                                           String jndiBinding) throws Exception
    {
@@ -222,7 +222,7 @@
                                          blockOnAcknowledge,
                                          blockOnNonPersistentSend,
                                          blockOnPersistentSend,
-                                         autoGroupId,
+                                         autoGroup,
                                          maxConnections);
          connectionFactories.put(name, cf);
       }
@@ -258,7 +258,7 @@
                                           boolean blockOnAcknowledge,
                                           boolean blockOnNonPersistentSend,
                                           boolean blockOnPersistentSend,
-                                          boolean autoGroupId,
+                                          boolean autoGroup,
                                           int maxConnections,
                                           List<String> jndiBindings) throws Exception
    {
@@ -279,7 +279,7 @@
                                          blockOnAcknowledge,
                                          blockOnNonPersistentSend,
                                          blockOnPersistentSend,
-                                         autoGroupId,
+                                         autoGroup,
                                          maxConnections);
       }
       for (String jndiBinding : jndiBindings)

Modified: trunk/src/main/org/jboss/messaging/jms/server/management/JMSServerControlMBean.java
===================================================================
--- trunk/src/main/org/jboss/messaging/jms/server/management/JMSServerControlMBean.java	2008-11-10 15:34:50 UTC (rev 5327)
+++ trunk/src/main/org/jboss/messaging/jms/server/management/JMSServerControlMBean.java	2008-11-10 16:50:14 UTC (rev 5328)
@@ -93,8 +93,8 @@
                                 boolean blockOnNonPersistentSend,
                                 @Parameter(name = "blockOnPersistentSend", desc = "Does sending persistent messages block?")
                                 boolean blockOnPersistentSend,
-                                @Parameter(name = "autoGroupId", desc = "Any Messages sent via this factories connections will automatically set th eproperty 'JMSXGroupId'")
-                                boolean autoGroupId,
+                                @Parameter(name = "autoGroup", desc = "Any Messages sent via this factories connections will automatically set the property 'JBM_GroupID'")
+                                boolean autoGroup,
                                 @Parameter(name = "maxConnections", desc = "The maximum number of physical connections created per client using this connection factory. Sessions created will be assigned a connection in a round-robin fashion")
                                 int maxConnections,
                                 @Parameter(name = "jndiBinding", desc = "JNDI Binding")

Modified: trunk/src/main/org/jboss/messaging/jms/server/management/impl/JMSServerControl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/jms/server/management/impl/JMSServerControl.java	2008-11-10 15:34:50 UTC (rev 5327)
+++ trunk/src/main/org/jboss/messaging/jms/server/management/impl/JMSServerControl.java	2008-11-10 16:50:14 UTC (rev 5328)
@@ -91,7 +91,7 @@
                                        boolean blockOnAcknowledge,
                                        boolean blockOnNonPersistentSend,
                                        boolean blockOnPersistentSend,
-                                       boolean autoGroupId,
+                                       boolean autoGroup,
                                        int maxConnections,
                                        String jndiBinding) throws Exception
    {
@@ -113,7 +113,7 @@
                                                        blockOnAcknowledge,
                                                        blockOnNonPersistentSend,
                                                        blockOnPersistentSend,
-                                                       autoGroupId,
+                                                       autoGroup,
                                                        maxConnections,
                                                        jndiBinding);
       if (created)

Deleted: trunk/src/main/org/jboss/messaging/util/GroupIdGenerator.java
===================================================================
--- trunk/src/main/org/jboss/messaging/util/GroupIdGenerator.java	2008-11-10 15:34:50 UTC (rev 5327)
+++ trunk/src/main/org/jboss/messaging/util/GroupIdGenerator.java	2008-11-10 16:50:14 UTC (rev 5328)
@@ -1,46 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005-2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.messaging.util;
-
-import java.util.concurrent.atomic.AtomicInteger;
-
-/**
- * @author <a href="mailto:andy.taylor at jboss.org">Andy Taylor</a>
- */
-public class GroupIdGenerator implements SimpleStringIdGenerator
-{
-   private final AtomicInteger ai = new AtomicInteger(1);
-
-   private final SimpleString prefix;
-
-   public GroupIdGenerator(final SimpleString prefix)
-   {
-      this.prefix = prefix;
-   }
-
-   public SimpleString generateID()
-   {
-      SimpleString suffix = new SimpleString("" + ai.getAndIncrement());
-      return prefix.concat(suffix);
-   }
-
-}

Deleted: trunk/src/main/org/jboss/messaging/util/SimpleStringIdGenerator.java
===================================================================
--- trunk/src/main/org/jboss/messaging/util/SimpleStringIdGenerator.java	2008-11-10 15:34:50 UTC (rev 5327)
+++ trunk/src/main/org/jboss/messaging/util/SimpleStringIdGenerator.java	2008-11-10 16:50:14 UTC (rev 5328)
@@ -1,30 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005-2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.messaging.util;
-
-/**
- * @author <a href="mailto:andy.taylor at jboss.org">Andy Taylor</a>
- */
-public interface SimpleStringIdGenerator
-{
-   SimpleString generateID();
-}

Modified: trunk/tests/jms-tests/src/org/jboss/test/messaging/jms/CTSMiscellaneousTest.java
===================================================================
--- trunk/tests/jms-tests/src/org/jboss/test/messaging/jms/CTSMiscellaneousTest.java	2008-11-10 15:34:50 UTC (rev 5327)
+++ trunk/tests/jms-tests/src/org/jboss/test/messaging/jms/CTSMiscellaneousTest.java	2008-11-10 16:50:14 UTC (rev 5328)
@@ -102,7 +102,7 @@
                                                        true,
                                                        true,
                                                        true,
-                                                       ClientSessionFactoryImpl.DEFAULT_AUTO_GROUP_ID,
+                                                       ClientSessionFactoryImpl.DEFAULT_AUTO_GROUP,
                                                        ClientSessionFactoryImpl.DEFAULT_MAX_CONNECTIONS,
                                                        "/StrictTCKConnectionFactory");
 

Modified: trunk/tests/jms-tests/src/org/jboss/test/messaging/jms/JMSTestCase.java
===================================================================
--- trunk/tests/jms-tests/src/org/jboss/test/messaging/jms/JMSTestCase.java	2008-11-10 15:34:50 UTC (rev 5327)
+++ trunk/tests/jms-tests/src/org/jboss/test/messaging/jms/JMSTestCase.java	2008-11-10 16:50:14 UTC (rev 5328)
@@ -52,7 +52,7 @@
                                                     true,
                                                     true,
                                                     true,
-                                                    ClientSessionFactoryImpl.DEFAULT_AUTO_GROUP_ID,
+                                                    ClientSessionFactoryImpl.DEFAULT_AUTO_GROUP,
                                                     ClientSessionFactoryImpl.DEFAULT_MAX_CONNECTIONS,
                                                     "/testsuitecf");
       

Modified: trunk/tests/src/org/jboss/messaging/tests/integration/basic/AutoGroupClientTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/basic/AutoGroupClientTest.java	2008-11-10 15:34:50 UTC (rev 5327)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/basic/AutoGroupClientTest.java	2008-11-10 16:50:14 UTC (rev 5328)
@@ -66,7 +66,7 @@
       messagingService.start();
 
       ClientSessionFactory sf = new ClientSessionFactoryImpl(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.invm.InVMConnectorFactory"));
-      sf.setAutoGroupId(true);
+      sf.setAutoGroup(true);
       ClientSession session = sf.createSession(false, true, true, false);
 
       session.createQueue(QUEUE, QUEUE, null, false, false);
@@ -124,7 +124,7 @@
       messagingService.start();
 
       ClientSessionFactory sf = new ClientSessionFactoryImpl(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.invm.InVMConnectorFactory"));
-      sf.setAutoGroupId(true);
+      sf.setAutoGroup(true);
       ClientSession session = sf.createSession(false, true, true, false);
 
       session.createQueue(QUEUE, QUEUE, null, false, false);

Modified: trunk/tests/src/org/jboss/messaging/tests/integration/clientcrash/ClientCrashTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/clientcrash/ClientCrashTest.java	2008-11-10 15:34:50 UTC (rev 5327)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/clientcrash/ClientCrashTest.java	2008-11-10 16:50:14 UTC (rev 5328)
@@ -23,7 +23,7 @@
 package org.jboss.messaging.tests.integration.clientcrash;
 
 import static org.jboss.messaging.core.client.impl.ClientSessionFactoryImpl.DEFAULT_ACK_BATCH_SIZE;
-import static org.jboss.messaging.core.client.impl.ClientSessionFactoryImpl.DEFAULT_AUTO_GROUP_ID;
+import static org.jboss.messaging.core.client.impl.ClientSessionFactoryImpl.DEFAULT_AUTO_GROUP;
 import static org.jboss.messaging.core.client.impl.ClientSessionFactoryImpl.DEFAULT_BLOCK_ON_ACKNOWLEDGE;
 import static org.jboss.messaging.core.client.impl.ClientSessionFactoryImpl.DEFAULT_BLOCK_ON_NON_PERSISTENT_SEND;
 import static org.jboss.messaging.core.client.impl.ClientSessionFactoryImpl.DEFAULT_BLOCK_ON_PERSISTENT_SEND;
@@ -171,7 +171,7 @@
                                         DEFAULT_BLOCK_ON_ACKNOWLEDGE,
                                         DEFAULT_BLOCK_ON_PERSISTENT_SEND,
                                         DEFAULT_BLOCK_ON_NON_PERSISTENT_SEND,
-                                        DEFAULT_AUTO_GROUP_ID,
+                                        DEFAULT_AUTO_GROUP,
                                         DEFAULT_MAX_CONNECTIONS,
                                         DEFAULT_ACK_BATCH_SIZE);
    }

Modified: trunk/tests/src/org/jboss/messaging/tests/integration/cluster/ReplicateConnectionFailureTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/cluster/ReplicateConnectionFailureTest.java	2008-11-10 15:34:50 UTC (rev 5327)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/cluster/ReplicateConnectionFailureTest.java	2008-11-10 16:50:14 UTC (rev 5328)
@@ -90,7 +90,7 @@
                                                                       ClientSessionFactoryImpl.DEFAULT_BLOCK_ON_ACKNOWLEDGE,
                                                                       ClientSessionFactoryImpl.DEFAULT_BLOCK_ON_NON_PERSISTENT_SEND,
                                                                       ClientSessionFactoryImpl.DEFAULT_BLOCK_ON_PERSISTENT_SEND,
-                                                                      ClientSessionFactoryImpl.DEFAULT_AUTO_GROUP_ID,
+                                                                      ClientSessionFactoryImpl.DEFAULT_AUTO_GROUP,
                                                                       ClientSessionFactoryImpl.DEFAULT_MAX_CONNECTIONS,
                                                                       ClientSessionFactoryImpl.DEFAULT_ACK_BATCH_SIZE);
 

Modified: trunk/tests/src/org/jboss/messaging/tests/integration/jms/cluster/JMSFailoverTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/jms/cluster/JMSFailoverTest.java	2008-11-10 15:34:50 UTC (rev 5327)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/jms/cluster/JMSFailoverTest.java	2008-11-10 16:50:14 UTC (rev 5328)
@@ -104,7 +104,7 @@
                                                                ClientSessionFactoryImpl.DEFAULT_BLOCK_ON_ACKNOWLEDGE,
                                                                ClientSessionFactoryImpl.DEFAULT_BLOCK_ON_NON_PERSISTENT_SEND,
                                                                ClientSessionFactoryImpl.DEFAULT_BLOCK_ON_PERSISTENT_SEND,
-                                                               ClientSessionFactoryImpl.DEFAULT_AUTO_GROUP_ID,
+                                                               ClientSessionFactoryImpl.DEFAULT_AUTO_GROUP,
                                                                ClientSessionFactoryImpl.DEFAULT_MAX_CONNECTIONS);
 
       Connection conn = jbcf.createConnection();
@@ -182,7 +182,7 @@
                                                                    ClientSessionFactoryImpl.DEFAULT_BLOCK_ON_ACKNOWLEDGE,
                                                                    ClientSessionFactoryImpl.DEFAULT_BLOCK_ON_NON_PERSISTENT_SEND,
                                                                    true,
-                                                                   ClientSessionFactoryImpl.DEFAULT_AUTO_GROUP_ID,
+                                                                   ClientSessionFactoryImpl.DEFAULT_AUTO_GROUP,
                                                                    ClientSessionFactoryImpl.DEFAULT_MAX_CONNECTIONS);
 
       JBossConnectionFactory jbcfBackup = new JBossConnectionFactory(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.invm.InVMConnectorFactory",
@@ -200,7 +200,7 @@
                                                                      ClientSessionFactoryImpl.DEFAULT_BLOCK_ON_ACKNOWLEDGE,
                                                                      ClientSessionFactoryImpl.DEFAULT_BLOCK_ON_NON_PERSISTENT_SEND,
                                                                      ClientSessionFactoryImpl.DEFAULT_BLOCK_ON_PERSISTENT_SEND,
-                                                                     ClientSessionFactoryImpl.DEFAULT_AUTO_GROUP_ID,
+                                                                     ClientSessionFactoryImpl.DEFAULT_AUTO_GROUP,
                                                                      ClientSessionFactoryImpl.DEFAULT_MAX_CONNECTIONS);
 
       Connection connLive = jbcfLive.createConnection();




More information about the jboss-cvs-commits mailing list