activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [16/53] [abbrv] [partial] activemq-artemis git commit: automatic checkstyle change
Date Mon, 10 Aug 2015 15:13:15 GMT
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/bac96047/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQSession.java
----------------------------------------------------------------------
diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQSession.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQSession.java
index 30397e8..758ad36 100644
--- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQSession.java
+++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQSession.java
@@ -66,8 +66,8 @@ import org.apache.activemq.artemis.api.core.client.ClientSession.QueueQuery;
  * Note that we *do not* support JMS ASF (Application Server Facilities) optional
  * constructs such as ConnectionConsumer
  */
-public class ActiveMQSession implements QueueSession, TopicSession
-{
+public class ActiveMQSession implements QueueSession, TopicSession {
+
    public static final int TYPE_GENERIC_SESSION = 0;
 
    public static final int TYPE_QUEUE_SESSION = 1;
@@ -99,8 +99,7 @@ public class ActiveMQSession implements QueueSession, TopicSession
                              final boolean xa,
                              final int ackMode,
                              final ClientSession session,
-                             final int sessionType)
-   {
+                             final int sessionType) {
       this.connection = connection;
 
       this.ackMode = ackMode;
@@ -116,36 +115,31 @@ public class ActiveMQSession implements QueueSession, TopicSession
 
    // Session implementation ----------------------------------------
 
-   public BytesMessage createBytesMessage() throws JMSException
-   {
+   public BytesMessage createBytesMessage() throws JMSException {
       checkClosed();
 
       return new ActiveMQBytesMessage(session);
    }
 
-   public MapMessage createMapMessage() throws JMSException
-   {
+   public MapMessage createMapMessage() throws JMSException {
       checkClosed();
 
       return new ActiveMQMapMessage(session);
    }
 
-   public Message createMessage() throws JMSException
-   {
+   public Message createMessage() throws JMSException {
       checkClosed();
 
       return new ActiveMQMessage(session);
    }
 
-   public ObjectMessage createObjectMessage() throws JMSException
-   {
+   public ObjectMessage createObjectMessage() throws JMSException {
       checkClosed();
 
       return new ActiveMQObjectMessage(session);
    }
 
-   public ObjectMessage createObjectMessage(final Serializable object) throws JMSException
-   {
+   public ObjectMessage createObjectMessage(final Serializable object) throws JMSException {
       checkClosed();
 
       ActiveMQObjectMessage msg = new ActiveMQObjectMessage(session);
@@ -155,15 +149,13 @@ public class ActiveMQSession implements QueueSession, TopicSession
       return msg;
    }
 
-   public StreamMessage createStreamMessage() throws JMSException
-   {
+   public StreamMessage createStreamMessage() throws JMSException {
       checkClosed();
 
       return new ActiveMQStreamMessage(session);
    }
 
-   public TextMessage createTextMessage() throws JMSException
-   {
+   public TextMessage createTextMessage() throws JMSException {
       checkClosed();
 
       ActiveMQTextMessage msg = new ActiveMQTextMessage(session);
@@ -173,8 +165,7 @@ public class ActiveMQSession implements QueueSession, TopicSession
       return msg;
    }
 
-   public TextMessage createTextMessage(final String text) throws JMSException
-   {
+   public TextMessage createTextMessage(final String text) throws JMSException {
       checkClosed();
 
       ActiveMQTextMessage msg = new ActiveMQTextMessage(session);
@@ -184,76 +175,59 @@ public class ActiveMQSession implements QueueSession, TopicSession
       return msg;
    }
 
-   public boolean getTransacted() throws JMSException
-   {
+   public boolean getTransacted() throws JMSException {
       checkClosed();
 
       return transacted;
    }
 
-   public int getAcknowledgeMode() throws JMSException
-   {
+   public int getAcknowledgeMode() throws JMSException {
       checkClosed();
 
       return ackMode;
    }
 
-   public boolean isXA()
-   {
+   public boolean isXA() {
       return xa;
    }
 
-   public void commit() throws JMSException
-   {
-      if (!transacted)
-      {
+   public void commit() throws JMSException {
+      if (!transacted) {
          throw new IllegalStateException("Cannot commit a non-transacted session");
       }
-      if (xa)
-      {
+      if (xa) {
          throw new TransactionInProgressException("Cannot call commit on an XA session");
       }
-      try
-      {
+      try {
          session.commit();
       }
-      catch (ActiveMQException e)
-      {
+      catch (ActiveMQException e) {
          throw JMSExceptionHelper.convertFromActiveMQException(e);
       }
    }
 
-   public void rollback() throws JMSException
-   {
-      if (!transacted)
-      {
+   public void rollback() throws JMSException {
+      if (!transacted) {
          throw new IllegalStateException("Cannot rollback a non-transacted session");
       }
-      if (xa)
-      {
+      if (xa) {
          throw new TransactionInProgressException("Cannot call rollback on an XA session");
       }
 
-      try
-      {
+      try {
          session.rollback();
       }
-      catch (ActiveMQException e)
-      {
+      catch (ActiveMQException e) {
          throw JMSExceptionHelper.convertFromActiveMQException(e);
       }
    }
 
-   public void close() throws JMSException
-   {
+   public void close() throws JMSException {
       connection.getThreadAwareContext().assertNotCompletionListenerThread();
       connection.getThreadAwareContext().assertNotMessageListenerThread();
-      synchronized (connection)
-      {
-         try
-         {
-            for (ActiveMQMessageConsumer cons : new HashSet<ActiveMQMessageConsumer>(consumers))
-            {
+      synchronized (connection) {
+         try {
+            for (ActiveMQMessageConsumer cons : new HashSet<ActiveMQMessageConsumer>(consumers)) {
                cons.close();
             }
 
@@ -261,71 +235,56 @@ public class ActiveMQSession implements QueueSession, TopicSession
 
             connection.removeSession(this);
          }
-         catch (ActiveMQException e)
-         {
+         catch (ActiveMQException e) {
             throw JMSExceptionHelper.convertFromActiveMQException(e);
          }
       }
    }
 
-   public void recover() throws JMSException
-   {
-      if (transacted)
-      {
+   public void recover() throws JMSException {
+      if (transacted) {
          throw new IllegalStateException("Cannot recover a transacted session");
       }
 
-      try
-      {
+      try {
          session.rollback(true);
       }
-      catch (ActiveMQException e)
-      {
+      catch (ActiveMQException e) {
          throw JMSExceptionHelper.convertFromActiveMQException(e);
       }
 
       recoverCalled = true;
    }
 
-   public MessageListener getMessageListener() throws JMSException
-   {
+   public MessageListener getMessageListener() throws JMSException {
       checkClosed();
 
       return null;
    }
 
-   public void setMessageListener(final MessageListener listener) throws JMSException
-   {
+   public void setMessageListener(final MessageListener listener) throws JMSException {
       checkClosed();
    }
 
-   public void run()
-   {
+   public void run() {
    }
 
-   public MessageProducer createProducer(final Destination destination) throws JMSException
-   {
-      if (destination != null && !(destination instanceof ActiveMQDestination))
-      {
+   public MessageProducer createProducer(final Destination destination) throws JMSException {
+      if (destination != null && !(destination instanceof ActiveMQDestination)) {
          throw new InvalidDestinationException("Not an ActiveMQ Artemis Destination:" + destination);
       }
 
-      try
-      {
-         ActiveMQDestination jbd = (ActiveMQDestination)destination;
+      try {
+         ActiveMQDestination jbd = (ActiveMQDestination) destination;
 
-         if (jbd != null)
-         {
+         if (jbd != null) {
             ClientSession.AddressQuery response = session.addressQuery(jbd.getSimpleAddress());
 
-            if (!response.isExists())
-            {
-               if (response.isAutoCreateJmsQueues())
-               {
+            if (!response.isExists()) {
+               if (response.isAutoCreateJmsQueues()) {
                   session.createQueue(jbd.getSimpleAddress(), jbd.getSimpleAddress(), true);
                }
-               else
-               {
+               else {
                   throw new InvalidDestinationException("Destination " + jbd.getName() + " does not exist");
                }
             }
@@ -337,157 +296,128 @@ public class ActiveMQSession implements QueueSession, TopicSession
 
          return new ActiveMQMessageProducer(connection, producer, jbd, session);
       }
-      catch (ActiveMQException e)
-      {
+      catch (ActiveMQException e) {
          throw JMSExceptionHelper.convertFromActiveMQException(e);
       }
    }
 
-   public MessageConsumer createConsumer(final Destination destination) throws JMSException
-   {
+   public MessageConsumer createConsumer(final Destination destination) throws JMSException {
       return createConsumer(destination, null, false);
    }
 
-   public MessageConsumer createConsumer(final Destination destination, final String messageSelector) throws JMSException
-   {
+   public MessageConsumer createConsumer(final Destination destination,
+                                         final String messageSelector) throws JMSException {
       return createConsumer(destination, messageSelector, false);
    }
 
    public MessageConsumer createConsumer(final Destination destination,
                                          final String messageSelector,
-                                         final boolean noLocal) throws JMSException
-   {
-      if (destination == null)
-      {
+                                         final boolean noLocal) throws JMSException {
+      if (destination == null) {
          throw new InvalidDestinationException("Cannot create a consumer with a null destination");
       }
 
-      if (!(destination instanceof ActiveMQDestination))
-      {
+      if (!(destination instanceof ActiveMQDestination)) {
          throw new InvalidDestinationException("Not an ActiveMQDestination:" + destination);
       }
 
-      ActiveMQDestination jbdest = (ActiveMQDestination)destination;
+      ActiveMQDestination jbdest = (ActiveMQDestination) destination;
 
-      if (jbdest.isTemporary() && !connection.containsTemporaryQueue(jbdest.getSimpleAddress()))
-      {
+      if (jbdest.isTemporary() && !connection.containsTemporaryQueue(jbdest.getSimpleAddress())) {
          throw new JMSException("Can not create consumer for temporary destination " + destination +
-                                " from another JMS connection");
+                                   " from another JMS connection");
       }
 
       return createConsumer(jbdest, null, messageSelector, noLocal, ConsumerDurability.NON_DURABLE);
    }
 
-   public Queue createQueue(final String queueName) throws JMSException
-   {
+   public Queue createQueue(final String queueName) throws JMSException {
       // As per spec. section 4.11
-      if (sessionType == ActiveMQSession.TYPE_TOPIC_SESSION)
-      {
+      if (sessionType == ActiveMQSession.TYPE_TOPIC_SESSION) {
          throw new IllegalStateException("Cannot create a queue using a TopicSession");
       }
 
-      try
-      {
+      try {
          ActiveMQQueue queue = lookupQueue(queueName, false);
 
-         if (queue == null)
-         {
+         if (queue == null) {
             queue = lookupQueue(queueName, true);
          }
 
-         if (queue == null)
-         {
+         if (queue == null) {
             throw new JMSException("There is no queue with name " + queueName);
          }
-         else
-         {
+         else {
             return queue;
          }
       }
-      catch (ActiveMQException e)
-      {
+      catch (ActiveMQException e) {
          throw JMSExceptionHelper.convertFromActiveMQException(e);
       }
    }
 
-   public Topic createTopic(final String topicName) throws JMSException
-   {
+   public Topic createTopic(final String topicName) throws JMSException {
       // As per spec. section 4.11
-      if (sessionType == ActiveMQSession.TYPE_QUEUE_SESSION)
-      {
+      if (sessionType == ActiveMQSession.TYPE_QUEUE_SESSION) {
          throw new IllegalStateException("Cannot create a topic on a QueueSession");
       }
 
-      try
-      {
+      try {
          ActiveMQTopic topic = lookupTopic(topicName, false);
 
-         if (topic == null)
-         {
+         if (topic == null) {
             topic = lookupTopic(topicName, true);
          }
 
-         if (topic == null)
-         {
+         if (topic == null) {
             throw new JMSException("There is no topic with name " + topicName);
          }
-         else
-         {
+         else {
             return topic;
          }
       }
-      catch (ActiveMQException e)
-      {
+      catch (ActiveMQException e) {
          throw JMSExceptionHelper.convertFromActiveMQException(e);
       }
    }
 
-   public TopicSubscriber createDurableSubscriber(final Topic topic, final String name) throws JMSException
-   {
+   public TopicSubscriber createDurableSubscriber(final Topic topic, final String name) throws JMSException {
       return createDurableSubscriber(topic, name, null, false);
    }
 
    public TopicSubscriber createDurableSubscriber(final Topic topic,
                                                   final String name,
                                                   String messageSelector,
-                                                  final boolean noLocal) throws JMSException
-   {
+                                                  final boolean noLocal) throws JMSException {
       // As per spec. section 4.11
-      if (sessionType == ActiveMQSession.TYPE_QUEUE_SESSION)
-      {
+      if (sessionType == ActiveMQSession.TYPE_QUEUE_SESSION) {
          throw new IllegalStateException("Cannot create a durable subscriber on a QueueSession");
       }
       checkTopic(topic);
-      if (!(topic instanceof ActiveMQDestination))
-      {
+      if (!(topic instanceof ActiveMQDestination)) {
          throw new InvalidDestinationException("Not an ActiveMQTopic:" + topic);
       }
-      if ("".equals(messageSelector))
-      {
+      if ("".equals(messageSelector)) {
          messageSelector = null;
       }
 
-      ActiveMQDestination jbdest = (ActiveMQDestination)topic;
+      ActiveMQDestination jbdest = (ActiveMQDestination) topic;
 
-      if (jbdest.isQueue())
-      {
+      if (jbdest.isQueue()) {
          throw new InvalidDestinationException("Cannot create a subscriber on a queue");
       }
 
       return createConsumer(jbdest, name, messageSelector, noLocal, ConsumerDurability.DURABLE);
    }
 
-   private void checkTopic(Topic topic) throws InvalidDestinationException
-   {
-      if (topic == null)
-      {
+   private void checkTopic(Topic topic) throws InvalidDestinationException {
+      if (topic == null) {
          throw ActiveMQJMSClientBundle.BUNDLE.nullTopic();
       }
    }
 
    @Override
-   public MessageConsumer createSharedConsumer(Topic topic, String sharedSubscriptionName) throws JMSException
-   {
+   public MessageConsumer createSharedConsumer(Topic topic, String sharedSubscriptionName) throws JMSException {
       return createSharedConsumer(topic, sharedSubscriptionName, null);
    }
 
@@ -506,62 +436,55 @@ public class ActiveMQSession implements QueueSession, TopicSession
     * @throws JMSException
     */
    @Override
-   public MessageConsumer createSharedConsumer(Topic topic, String name, String messageSelector) throws JMSException
-   {
-      if (sessionType == ActiveMQSession.TYPE_QUEUE_SESSION)
-      {
+   public MessageConsumer createSharedConsumer(Topic topic, String name, String messageSelector) throws JMSException {
+      if (sessionType == ActiveMQSession.TYPE_QUEUE_SESSION) {
          throw new IllegalStateException("Cannot create a shared consumer on a QueueSession");
       }
       checkTopic(topic);
       ActiveMQTopic localTopic;
-      if (topic instanceof ActiveMQTopic)
-      {
-         localTopic = (ActiveMQTopic)topic;
+      if (topic instanceof ActiveMQTopic) {
+         localTopic = (ActiveMQTopic) topic;
       }
-      else
-      {
+      else {
          localTopic = new ActiveMQTopic(topic.getTopicName());
       }
       return internalCreateSharedConsumer(localTopic, name, messageSelector, ConsumerDurability.NON_DURABLE, true);
    }
 
    @Override
-   public MessageConsumer createDurableConsumer(Topic topic, String name) throws JMSException
-   {
+   public MessageConsumer createDurableConsumer(Topic topic, String name) throws JMSException {
       return createDurableConsumer(topic, name, null, false);
    }
 
    @Override
-   public MessageConsumer createDurableConsumer(Topic topic, String name, String messageSelector, boolean noLocal) throws JMSException
-   {
-      if (sessionType == ActiveMQSession.TYPE_QUEUE_SESSION)
-      {
+   public MessageConsumer createDurableConsumer(Topic topic,
+                                                String name,
+                                                String messageSelector,
+                                                boolean noLocal) throws JMSException {
+      if (sessionType == ActiveMQSession.TYPE_QUEUE_SESSION) {
          throw new IllegalStateException("Cannot create a durable consumer on a QueueSession");
       }
       checkTopic(topic);
       ActiveMQTopic localTopic;
-      if (topic instanceof ActiveMQTopic)
-      {
-         localTopic = (ActiveMQTopic)topic;
+      if (topic instanceof ActiveMQTopic) {
+         localTopic = (ActiveMQTopic) topic;
       }
-      else
-      {
+      else {
          localTopic = new ActiveMQTopic(topic.getTopicName());
       }
       return createConsumer(localTopic, name, messageSelector, noLocal, ConsumerDurability.DURABLE);
    }
 
    @Override
-   public MessageConsumer createSharedDurableConsumer(Topic topic, String name) throws JMSException
-   {
+   public MessageConsumer createSharedDurableConsumer(Topic topic, String name) throws JMSException {
       return createSharedDurableConsumer(topic, name, null);
    }
 
    @Override
-   public MessageConsumer createSharedDurableConsumer(Topic topic, String name, String messageSelector) throws JMSException
-   {
-      if (sessionType == ActiveMQSession.TYPE_QUEUE_SESSION)
-      {
+   public MessageConsumer createSharedDurableConsumer(Topic topic,
+                                                      String name,
+                                                      String messageSelector) throws JMSException {
+      if (sessionType == ActiveMQSession.TYPE_QUEUE_SESSION) {
          throw new IllegalStateException("Cannot create a shared durable consumer on a QueueSession");
       }
 
@@ -569,44 +492,36 @@ public class ActiveMQSession implements QueueSession, TopicSession
 
       ActiveMQTopic localTopic;
 
-      if (topic instanceof ActiveMQTopic)
-      {
-         localTopic = (ActiveMQTopic)topic;
+      if (topic instanceof ActiveMQTopic) {
+         localTopic = (ActiveMQTopic) topic;
       }
-      else
-      {
+      else {
          localTopic = new ActiveMQTopic(topic.getTopicName());
       }
       return internalCreateSharedConsumer(localTopic, name, messageSelector, ConsumerDurability.DURABLE, true);
    }
 
-   enum ConsumerDurability
-   {
+   enum ConsumerDurability {
       DURABLE, NON_DURABLE;
    }
 
-
    /**
     * This is an internal method for shared consumers
     */
    private ActiveMQMessageConsumer internalCreateSharedConsumer(final ActiveMQDestination dest,
-                                                               final String subscriptionName,
-                                                               String selectorString,
-                                                               ConsumerDurability durability,
-                                                               final boolean shared) throws JMSException
-   {
-      try
-      {
-
-         if (dest.isQueue())
-         {
+                                                                final String subscriptionName,
+                                                                String selectorString,
+                                                                ConsumerDurability durability,
+                                                                final boolean shared) throws JMSException {
+      try {
+
+         if (dest.isQueue()) {
             // This is not really possible unless someone makes a mistake on code
             // createSharedConsumer only accpets Topics by declaration
             throw new RuntimeException("Internal error: createSharedConsumer is only meant for Topics");
          }
 
-         if (subscriptionName == null)
-         {
+         if (subscriptionName == null) {
             throw ActiveMQJMSClientBundle.BUNDLE.invalidSubscriptionName();
          }
 
@@ -614,8 +529,7 @@ public class ActiveMQSession implements QueueSession, TopicSession
 
          SimpleString coreFilterString = null;
 
-         if (selectorString != null)
-         {
+         if (selectorString != null) {
             coreFilterString = new SimpleString(SelectorTranslator.convertToActiveMQFilterString(selectorString));
          }
 
@@ -625,99 +539,76 @@ public class ActiveMQSession implements QueueSession, TopicSession
 
          AddressQuery response = session.addressQuery(dest.getSimpleAddress());
 
-         if (!response.isExists())
-         {
+         if (!response.isExists()) {
             throw ActiveMQJMSClientBundle.BUNDLE.destinationDoesNotExist(dest.getSimpleAddress());
          }
 
          SimpleString queueName;
 
-         if (dest.isTemporary() && durability == ConsumerDurability.DURABLE)
-         {
+         if (dest.isTemporary() && durability == ConsumerDurability.DURABLE) {
             throw new InvalidDestinationException("Cannot create a durable subscription on a temporary topic");
          }
 
-         queueName = new SimpleString(ActiveMQDestination.createQueueNameForDurableSubscription(durability == ConsumerDurability.DURABLE, connection.getClientID(),
-                                                                                                subscriptionName));
+         queueName = new SimpleString(ActiveMQDestination.createQueueNameForDurableSubscription(durability == ConsumerDurability.DURABLE, connection.getClientID(), subscriptionName));
 
-         if (durability == ConsumerDurability.DURABLE)
-         {
-            try
-            {
+         if (durability == ConsumerDurability.DURABLE) {
+            try {
                session.createSharedQueue(dest.getSimpleAddress(), queueName, coreFilterString, true);
             }
-            catch (ActiveMQQueueExistsException ignored)
-            {
+            catch (ActiveMQQueueExistsException ignored) {
                // We ignore this because querying and then creating the queue wouldn't be idempotent
                // we could also add a parameter to ignore existence what would require a bigger work around to avoid
                // compatibility.
             }
          }
-         else
-         {
+         else {
             session.createSharedQueue(dest.getSimpleAddress(), queueName, coreFilterString, false);
          }
 
          consumer = session.createConsumer(queueName, null, false);
 
-         ActiveMQMessageConsumer jbc = new ActiveMQMessageConsumer(connection, this,
-                                                                 consumer,
-                                                                 false,
-                                                                 dest,
-                                                                 selectorString,
-                                                                 autoDeleteQueueName);
+         ActiveMQMessageConsumer jbc = new ActiveMQMessageConsumer(connection, this, consumer, false, dest, selectorString, autoDeleteQueueName);
 
          consumers.add(jbc);
 
          return jbc;
       }
-      catch (ActiveMQException e)
-      {
+      catch (ActiveMQException e) {
          throw JMSExceptionHelper.convertFromActiveMQException(e);
       }
    }
 
-
-
    private ActiveMQMessageConsumer createConsumer(final ActiveMQDestination dest,
-                                                 final String subscriptionName,
-                                                 String selectorString, final boolean noLocal,
-                                                 ConsumerDurability durability) throws JMSException
-   {
-      try
-      {
+                                                  final String subscriptionName,
+                                                  String selectorString,
+                                                  final boolean noLocal,
+                                                  ConsumerDurability durability) throws JMSException {
+      try {
          selectorString = "".equals(selectorString) ? null : selectorString;
 
-         if (noLocal)
-         {
+         if (noLocal) {
             connection.setHasNoLocal();
 
             String filter;
-            if (connection.getClientID() != null)
-            {
-               filter =
-                        ActiveMQConnection.CONNECTION_ID_PROPERTY_NAME.toString() + "<>'" + connection.getClientID() +
-                                 "'";
+            if (connection.getClientID() != null) {
+               filter = ActiveMQConnection.CONNECTION_ID_PROPERTY_NAME.toString() + "<>'" + connection.getClientID() +
+                  "'";
             }
-            else
-            {
+            else {
                filter = ActiveMQConnection.CONNECTION_ID_PROPERTY_NAME.toString() + "<>'" + connection.getUID() + "'";
             }
 
-            if (selectorString != null)
-            {
+            if (selectorString != null) {
                selectorString += " AND " + filter;
             }
-            else
-            {
+            else {
                selectorString = filter;
             }
          }
 
          SimpleString coreFilterString = null;
 
-         if (selectorString != null)
-         {
+         if (selectorString != null) {
             coreFilterString = new SimpleString(SelectorTranslator.convertToActiveMQFilterString(selectorString));
          }
 
@@ -725,18 +616,14 @@ public class ActiveMQSession implements QueueSession, TopicSession
 
          SimpleString autoDeleteQueueName = null;
 
-         if (dest.isQueue())
-         {
+         if (dest.isQueue()) {
             AddressQuery response = session.addressQuery(dest.getSimpleAddress());
 
-            if (!response.isExists())
-            {
-               if (response.isAutoCreateJmsQueues())
-               {
+            if (!response.isExists()) {
+               if (response.isAutoCreateJmsQueues()) {
                   session.createQueue(dest.getSimpleAddress(), dest.getSimpleAddress(), true);
                }
-               else
-               {
+               else {
                   throw new InvalidDestinationException("Destination " + dest.getName() + " does not exist");
                }
             }
@@ -745,12 +632,10 @@ public class ActiveMQSession implements QueueSession, TopicSession
 
             consumer = session.createConsumer(dest.getSimpleAddress(), coreFilterString, false);
          }
-         else
-         {
+         else {
             AddressQuery response = session.addressQuery(dest.getSimpleAddress());
 
-            if (!response.isExists())
-            {
+            if (!response.isExists()) {
                throw new InvalidDestinationException("Topic " + dest.getName() + " does not exist");
             }
 
@@ -758,8 +643,7 @@ public class ActiveMQSession implements QueueSession, TopicSession
 
             SimpleString queueName;
 
-            if (subscriptionName == null)
-            {
+            if (subscriptionName == null) {
                if (durability != ConsumerDurability.NON_DURABLE)
                   throw new RuntimeException("Subscription name cannot be null for durable topic consumer");
                // Non durable sub
@@ -772,35 +656,28 @@ public class ActiveMQSession implements QueueSession, TopicSession
 
                autoDeleteQueueName = queueName;
             }
-            else
-            {
+            else {
                // Durable sub
                if (durability != ConsumerDurability.DURABLE)
                   throw new RuntimeException("Subscription name must be null for non-durable topic consumer");
-               if (connection.getClientID() == null)
-               {
+               if (connection.getClientID() == null) {
                   throw new IllegalStateException("Cannot create durable subscription - client ID has not been set");
                }
 
-               if (dest.isTemporary())
-               {
+               if (dest.isTemporary()) {
                   throw new InvalidDestinationException("Cannot create a durable subscription on a temporary topic");
                }
 
-               queueName = new SimpleString(ActiveMQDestination.createQueueNameForDurableSubscription(true, connection.getClientID(),
-                                                                                                      subscriptionName));
+               queueName = new SimpleString(ActiveMQDestination.createQueueNameForDurableSubscription(true, connection.getClientID(), subscriptionName));
 
                QueueQuery subResponse = session.queueQuery(queueName);
 
-               if (!subResponse.isExists())
-               {
+               if (!subResponse.isExists()) {
                   session.createQueue(dest.getSimpleAddress(), queueName, coreFilterString, true);
                }
-               else
-               {
+               else {
                   // Already exists
-                  if (subResponse.getConsumerCount() > 0)
-                  {
+                  if (subResponse.getConsumerCount() > 0) {
                      throw new IllegalStateException("Cannot create a subscriber on the durable subscription since it already has subscriber(s)");
                   }
 
@@ -816,18 +693,16 @@ public class ActiveMQSession implements QueueSession, TopicSession
                   SimpleString oldFilterString = subResponse.getFilterString();
 
                   boolean selectorChanged = coreFilterString == null && oldFilterString != null ||
-                                            oldFilterString == null &&
-                                            coreFilterString != null ||
-                                            oldFilterString != null &&
-                                            coreFilterString != null &&
-                                            !oldFilterString.equals(coreFilterString);
+                     oldFilterString == null && coreFilterString != null ||
+                     oldFilterString != null &&
+                        coreFilterString != null &&
+                        !oldFilterString.equals(coreFilterString);
 
                   SimpleString oldTopicName = subResponse.getAddress();
 
                   boolean topicChanged = !oldTopicName.equals(dest.getSimpleAddress());
 
-                  if (selectorChanged || topicChanged)
-                  {
+                  if (selectorChanged || topicChanged) {
                      // Delete the old durable sub
                      session.deleteQueue(queueName);
 
@@ -840,108 +715,82 @@ public class ActiveMQSession implements QueueSession, TopicSession
             }
          }
 
-         ActiveMQMessageConsumer jbc = new ActiveMQMessageConsumer(connection,
-                                                                 this,
-                                                                 consumer,
-                                                                 noLocal,
-                                                                 dest,
-                                                                 selectorString,
-                                                                 autoDeleteQueueName);
+         ActiveMQMessageConsumer jbc = new ActiveMQMessageConsumer(connection, this, consumer, noLocal, dest, selectorString, autoDeleteQueueName);
 
          consumers.add(jbc);
 
          return jbc;
       }
-      catch (ActiveMQException e)
-      {
+      catch (ActiveMQException e) {
          throw JMSExceptionHelper.convertFromActiveMQException(e);
       }
    }
 
-   public void ackAllConsumers() throws JMSException
-   {
+   public void ackAllConsumers() throws JMSException {
       checkClosed();
    }
 
-   public QueueBrowser createBrowser(final Queue queue) throws JMSException
-   {
+   public QueueBrowser createBrowser(final Queue queue) throws JMSException {
       return createBrowser(queue, null);
    }
 
-   public QueueBrowser createBrowser(final Queue queue, String filterString) throws JMSException
-   {
+   public QueueBrowser createBrowser(final Queue queue, String filterString) throws JMSException {
       // As per spec. section 4.11
-      if (sessionType == ActiveMQSession.TYPE_TOPIC_SESSION)
-      {
+      if (sessionType == ActiveMQSession.TYPE_TOPIC_SESSION) {
          throw new IllegalStateException("Cannot create a browser on a TopicSession");
       }
-      if (queue == null)
-      {
+      if (queue == null) {
          throw new InvalidDestinationException("Cannot create a browser with a null queue");
       }
-      if (!(queue instanceof ActiveMQDestination))
-      {
+      if (!(queue instanceof ActiveMQDestination)) {
          throw new InvalidDestinationException("Not an ActiveMQQueue:" + queue);
       }
-      if ("".equals(filterString))
-      {
+      if ("".equals(filterString)) {
          filterString = null;
       }
 
       // eager test of the filter syntax as required by JMS spec
-      try
-      {
-         if (filterString != null)
-         {
+      try {
+         if (filterString != null) {
             SelectorParser.parse(filterString.trim());
          }
       }
-      catch (FilterException e)
-      {
+      catch (FilterException e) {
          throw JMSExceptionHelper.convertFromActiveMQException(ActiveMQJMSClientBundle.BUNDLE.invalidFilter(e, new SimpleString(filterString)));
       }
 
-      ActiveMQDestination jbq = (ActiveMQDestination)queue;
+      ActiveMQDestination jbq = (ActiveMQDestination) queue;
 
-      if (!jbq.isQueue())
-      {
+      if (!jbq.isQueue()) {
          throw new InvalidDestinationException("Cannot create a browser on a topic");
       }
 
-      try
-      {
+      try {
          AddressQuery response = session.addressQuery(new SimpleString(jbq.getAddress()));
-         if (!response.isExists())
-         {
-            if (response.isAutoCreateJmsQueues())
-            {
+         if (!response.isExists()) {
+            if (response.isAutoCreateJmsQueues()) {
                session.createQueue(jbq.getSimpleAddress(), jbq.getSimpleAddress(), true);
             }
-            else
-            {
+            else {
                throw new InvalidDestinationException("Destination " + jbq.getName() + " does not exist");
             }
          }
       }
-      catch (ActiveMQException e)
-      {
+      catch (ActiveMQException e) {
          throw JMSExceptionHelper.convertFromActiveMQException(e);
       }
 
-      return new ActiveMQQueueBrowser((ActiveMQQueue)jbq, filterString, session);
+      return new ActiveMQQueueBrowser((ActiveMQQueue) jbq, filterString, session);
 
    }
 
-   public TemporaryQueue createTemporaryQueue() throws JMSException
-   {
+   public TemporaryQueue createTemporaryQueue() throws JMSException {
       // As per spec. section 4.11
-      if (sessionType == ActiveMQSession.TYPE_TOPIC_SESSION)
-      {
+      if (sessionType == ActiveMQSession.TYPE_TOPIC_SESSION) {
          throw new IllegalStateException("Cannot create a temporary queue using a TopicSession");
       }
 
-      try
-      {
+      try {
          ActiveMQTemporaryQueue queue = ActiveMQDestination.createTemporaryQueue(this);
 
          SimpleString simpleAddress = queue.getSimpleAddress();
@@ -952,22 +801,18 @@ public class ActiveMQSession implements QueueSession, TopicSession
 
          return queue;
       }
-      catch (ActiveMQException e)
-      {
+      catch (ActiveMQException e) {
          throw JMSExceptionHelper.convertFromActiveMQException(e);
       }
    }
 
-   public TemporaryTopic createTemporaryTopic() throws JMSException
-   {
+   public TemporaryTopic createTemporaryTopic() throws JMSException {
       // As per spec. section 4.11
-      if (sessionType == ActiveMQSession.TYPE_QUEUE_SESSION)
-      {
+      if (sessionType == ActiveMQSession.TYPE_QUEUE_SESSION) {
          throw new IllegalStateException("Cannot create a temporary topic on a QueueSession");
       }
 
-      try
-      {
+      try {
          ActiveMQTemporaryTopic topic = ActiveMQDestination.createTemporaryTopic(this);
 
          SimpleString simpleAddress = topic.getSimpleAddress();
@@ -983,156 +828,130 @@ public class ActiveMQSession implements QueueSession, TopicSession
 
          return topic;
       }
-      catch (ActiveMQException e)
-      {
+      catch (ActiveMQException e) {
          throw JMSExceptionHelper.convertFromActiveMQException(e);
       }
    }
 
-   public void unsubscribe(final String name) throws JMSException
-   {
+   public void unsubscribe(final String name) throws JMSException {
       // As per spec. section 4.11
-      if (sessionType == ActiveMQSession.TYPE_QUEUE_SESSION)
-      {
+      if (sessionType == ActiveMQSession.TYPE_QUEUE_SESSION) {
          throw new IllegalStateException("Cannot unsubscribe using a QueueSession");
       }
 
-      SimpleString queueName = new SimpleString(ActiveMQDestination.createQueueNameForDurableSubscription(true, connection.getClientID(),
-                                                                                                          name));
+      SimpleString queueName = new SimpleString(ActiveMQDestination.createQueueNameForDurableSubscription(true, connection.getClientID(), name));
 
-      try
-      {
+      try {
          QueueQuery response = session.queueQuery(queueName);
 
-         if (!response.isExists())
-         {
+         if (!response.isExists()) {
             throw new InvalidDestinationException("Cannot unsubscribe, subscription with name " + name +
-                                                  " does not exist");
+                                                     " does not exist");
          }
 
-         if (response.getConsumerCount() != 0)
-         {
+         if (response.getConsumerCount() != 0) {
             throw new IllegalStateException("Cannot unsubscribe durable subscription " + name +
-                                            " since it has active subscribers");
+                                               " since it has active subscribers");
          }
 
          session.deleteQueue(queueName);
       }
-      catch (ActiveMQException e)
-      {
+      catch (ActiveMQException e) {
          throw JMSExceptionHelper.convertFromActiveMQException(e);
       }
    }
 
    // XASession implementation
 
-   public Session getSession() throws JMSException
-   {
-      if (!xa)
-      {
+   public Session getSession() throws JMSException {
+      if (!xa) {
          throw new IllegalStateException("Isn't an XASession");
       }
 
       return this;
    }
 
-   public XAResource getXAResource()
-   {
+   public XAResource getXAResource() {
       return session.getXAResource();
    }
 
    // QueueSession implementation
 
-   public QueueReceiver createReceiver(final Queue queue, final String messageSelector) throws JMSException
-   {
-      return (QueueReceiver)createConsumer(queue, messageSelector);
+   public QueueReceiver createReceiver(final Queue queue, final String messageSelector) throws JMSException {
+      return (QueueReceiver) createConsumer(queue, messageSelector);
    }
 
-   public QueueReceiver createReceiver(final Queue queue) throws JMSException
-   {
-      return (QueueReceiver)createConsumer(queue);
+   public QueueReceiver createReceiver(final Queue queue) throws JMSException {
+      return (QueueReceiver) createConsumer(queue);
    }
 
-   public QueueSender createSender(final Queue queue) throws JMSException
-   {
-      return (QueueSender)createProducer(queue);
+   public QueueSender createSender(final Queue queue) throws JMSException {
+      return (QueueSender) createProducer(queue);
    }
 
    // XAQueueSession implementation
 
-   public QueueSession getQueueSession() throws JMSException
-   {
-      return (QueueSession)getSession();
+   public QueueSession getQueueSession() throws JMSException {
+      return (QueueSession) getSession();
    }
 
    // TopicSession implementation
 
-   public TopicPublisher createPublisher(final Topic topic) throws JMSException
-   {
-      return (TopicPublisher)createProducer(topic);
+   public TopicPublisher createPublisher(final Topic topic) throws JMSException {
+      return (TopicPublisher) createProducer(topic);
    }
 
-   public TopicSubscriber createSubscriber(final Topic topic, final String messageSelector, final boolean noLocal) throws JMSException
-   {
-      return (TopicSubscriber)createConsumer(topic, messageSelector, noLocal);
+   public TopicSubscriber createSubscriber(final Topic topic,
+                                           final String messageSelector,
+                                           final boolean noLocal) throws JMSException {
+      return (TopicSubscriber) createConsumer(topic, messageSelector, noLocal);
    }
 
-   public TopicSubscriber createSubscriber(final Topic topic) throws JMSException
-   {
-      return (TopicSubscriber)createConsumer(topic);
+   public TopicSubscriber createSubscriber(final Topic topic) throws JMSException {
+      return (TopicSubscriber) createConsumer(topic);
    }
 
    // XATopicSession implementation
 
-   public TopicSession getTopicSession() throws JMSException
-   {
-      return (TopicSession)getSession();
+   public TopicSession getTopicSession() throws JMSException {
+      return (TopicSession) getSession();
    }
 
    // Public --------------------------------------------------------
 
    @Override
-   public String toString()
-   {
+   public String toString() {
       return "ActiveMQSession->" + session;
    }
 
-   public ClientSession getCoreSession()
-   {
+   public ClientSession getCoreSession() {
       return session;
    }
 
-   public boolean isRecoverCalled()
-   {
+   public boolean isRecoverCalled() {
       return recoverCalled;
    }
 
-   public void setRecoverCalled(final boolean recoverCalled)
-   {
+   public void setRecoverCalled(final boolean recoverCalled) {
       this.recoverCalled = recoverCalled;
    }
 
-   public void deleteTemporaryTopic(final ActiveMQDestination tempTopic) throws JMSException
-   {
-      if (!tempTopic.isTemporary())
-      {
+   public void deleteTemporaryTopic(final ActiveMQDestination tempTopic) throws JMSException {
+      if (!tempTopic.isTemporary()) {
          throw new InvalidDestinationException("Not a temporary topic " + tempTopic);
       }
 
-      try
-      {
+      try {
          AddressQuery response = session.addressQuery(tempTopic.getSimpleAddress());
 
-         if (!response.isExists())
-         {
+         if (!response.isExists()) {
             throw new InvalidDestinationException("Cannot delete temporary topic " + tempTopic.getName() +
-                                                  " does not exist");
+                                                     " does not exist");
          }
 
-         if (response.getQueueNames().size() > 1)
-         {
+         if (response.getQueueNames().size() > 1) {
             throw new IllegalStateException("Cannot delete temporary topic " + tempTopic.getName() +
-                                            " since it has subscribers");
+                                               " since it has subscribers");
          }
 
          SimpleString address = tempTopic.getSimpleAddress();
@@ -1141,32 +960,26 @@ public class ActiveMQSession implements QueueSession, TopicSession
 
          connection.removeTemporaryQueue(address);
       }
-      catch (ActiveMQException e)
-      {
+      catch (ActiveMQException e) {
          throw JMSExceptionHelper.convertFromActiveMQException(e);
       }
    }
 
-   public void deleteTemporaryQueue(final ActiveMQDestination tempQueue) throws JMSException
-   {
-      if (!tempQueue.isTemporary())
-      {
+   public void deleteTemporaryQueue(final ActiveMQDestination tempQueue) throws JMSException {
+      if (!tempQueue.isTemporary()) {
          throw new InvalidDestinationException("Not a temporary queue " + tempQueue);
       }
-      try
-      {
+      try {
          QueueQuery response = session.queueQuery(tempQueue.getSimpleAddress());
 
-         if (!response.isExists())
-         {
+         if (!response.isExists()) {
             throw new InvalidDestinationException("Cannot delete temporary queue " + tempQueue.getName() +
-                                                  " does not exist");
+                                                     " does not exist");
          }
 
-         if (response.getConsumerCount() > 0)
-         {
+         if (response.getConsumerCount() > 0) {
             throw new IllegalStateException("Cannot delete temporary queue " + tempQueue.getName() +
-                                            " since it has subscribers");
+                                               " since it has subscribers");
          }
 
          SimpleString address = tempQueue.getSimpleAddress();
@@ -1175,53 +988,41 @@ public class ActiveMQSession implements QueueSession, TopicSession
 
          connection.removeTemporaryQueue(address);
       }
-      catch (ActiveMQException e)
-      {
+      catch (ActiveMQException e) {
          throw JMSExceptionHelper.convertFromActiveMQException(e);
       }
    }
 
-   public void start() throws JMSException
-   {
-      try
-      {
+   public void start() throws JMSException {
+      try {
          session.start();
       }
-      catch (ActiveMQException e)
-      {
+      catch (ActiveMQException e) {
          throw JMSExceptionHelper.convertFromActiveMQException(e);
       }
    }
 
-   public void stop() throws JMSException
-   {
-      try
-      {
+   public void stop() throws JMSException {
+      try {
          session.stop();
       }
-      catch (ActiveMQException e)
-      {
+      catch (ActiveMQException e) {
          throw JMSExceptionHelper.convertFromActiveMQException(e);
       }
    }
 
-   public void removeConsumer(final ActiveMQMessageConsumer consumer)
-   {
+   public void removeConsumer(final ActiveMQMessageConsumer consumer) {
       consumers.remove(consumer);
    }
 
    // Package protected ---------------------------------------------
 
-   void deleteQueue(final SimpleString queueName) throws JMSException
-   {
-      if (!session.isClosed())
-      {
-         try
-         {
+   void deleteQueue(final SimpleString queueName) throws JMSException {
+      if (!session.isClosed()) {
+         try {
             session.deleteQueue(queueName);
          }
-         catch (ActiveMQException ignore)
-         {
+         catch (ActiveMQException ignore) {
             // Exception on deleting queue shouldn't prevent close from completing
          }
       }
@@ -1231,61 +1032,49 @@ public class ActiveMQSession implements QueueSession, TopicSession
 
    // Private -------------------------------------------------------
 
-   private void checkClosed() throws JMSException
-   {
-      if (session.isClosed())
-      {
+   private void checkClosed() throws JMSException {
+      if (session.isClosed()) {
          throw new IllegalStateException("Session is closed");
       }
    }
 
-   private ActiveMQQueue lookupQueue(final String queueName, boolean isTemporary) throws ActiveMQException
-   {
+   private ActiveMQQueue lookupQueue(final String queueName, boolean isTemporary) throws ActiveMQException {
       ActiveMQQueue queue;
 
-      if (isTemporary)
-      {
+      if (isTemporary) {
          queue = ActiveMQDestination.createTemporaryQueue(queueName);
       }
-      else
-      {
+      else {
          queue = ActiveMQDestination.createQueue(queueName);
       }
 
       QueueQuery response = session.queueQuery(queue.getSimpleAddress());
 
-      if (!response.isExists() && !response.isAutoCreateJmsQueues())
-      {
+      if (!response.isExists() && !response.isAutoCreateJmsQueues()) {
          return null;
       }
-      else
-      {
+      else {
          return queue;
       }
    }
 
-   private ActiveMQTopic lookupTopic(final String topicName, final boolean isTemporary) throws ActiveMQException
-   {
+   private ActiveMQTopic lookupTopic(final String topicName, final boolean isTemporary) throws ActiveMQException {
 
       ActiveMQTopic topic;
 
-      if (isTemporary)
-      {
+      if (isTemporary) {
          topic = ActiveMQDestination.createTemporaryTopic(topicName);
       }
-      else
-      {
+      else {
          topic = ActiveMQDestination.createTopic(topicName);
       }
 
       AddressQuery query = session.addressQuery(topic.getSimpleAddress());
 
-      if (!query.isExists())
-      {
+      if (!query.isExists()) {
          return null;
       }
-      else
-      {
+      else {
          return topic;
       }
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/bac96047/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQStreamMessage.java
----------------------------------------------------------------------
diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQStreamMessage.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQStreamMessage.java
index 32c63da..4a8d5a8 100644
--- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQStreamMessage.java
+++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQStreamMessage.java
@@ -44,206 +44,162 @@ import static org.apache.activemq.artemis.reader.StreamMessageUtil.streamReadStr
 /**
  * ActiveMQ Artemis implementation of a JMS StreamMessage.
  */
-public final class ActiveMQStreamMessage extends ActiveMQMessage implements StreamMessage
-{
+public final class ActiveMQStreamMessage extends ActiveMQMessage implements StreamMessage {
+
    public static final byte TYPE = Message.STREAM_TYPE;
 
-   protected ActiveMQStreamMessage(final ClientSession session)
-   {
+   protected ActiveMQStreamMessage(final ClientSession session) {
       super(ActiveMQStreamMessage.TYPE, session);
    }
 
-   protected ActiveMQStreamMessage(final ClientMessage message, final ClientSession session)
-   {
+   protected ActiveMQStreamMessage(final ClientMessage message, final ClientSession session) {
       super(message, session);
    }
 
-   public ActiveMQStreamMessage(final StreamMessage foreign, final ClientSession session) throws JMSException
-   {
+   public ActiveMQStreamMessage(final StreamMessage foreign, final ClientSession session) throws JMSException {
       super(foreign, ActiveMQStreamMessage.TYPE, session);
 
       foreign.reset();
 
-      try
-      {
-         while (true)
-         {
+      try {
+         while (true) {
             Object obj = foreign.readObject();
             writeObject(obj);
          }
       }
-      catch (MessageEOFException e)
-      {
+      catch (MessageEOFException e) {
          // Ignore
       }
    }
 
    // For testing only
-   public ActiveMQStreamMessage()
-   {
-      message = new ClientMessageImpl((byte)0, false, 0, 0, (byte)4, 1500);
+   public ActiveMQStreamMessage() {
+      message = new ClientMessageImpl((byte) 0, false, 0, 0, (byte) 4, 1500);
    }
 
    // Public --------------------------------------------------------
 
    @Override
-   public byte getType()
-   {
+   public byte getType() {
       return ActiveMQStreamMessage.TYPE;
    }
 
    // StreamMessage implementation ----------------------------------
 
-   public boolean readBoolean() throws JMSException
-   {
+   public boolean readBoolean() throws JMSException {
       checkRead();
-      try
-      {
+      try {
          return streamReadBoolean(message);
       }
-      catch (IllegalStateException e)
-      {
+      catch (IllegalStateException e) {
          throw new MessageFormatException(e.getMessage());
       }
-      catch (IndexOutOfBoundsException e)
-      {
+      catch (IndexOutOfBoundsException e) {
          throw new MessageEOFException("");
       }
    }
 
-   public byte readByte() throws JMSException
-   {
+   public byte readByte() throws JMSException {
       checkRead();
 
-      try
-      {
+      try {
          return streamReadByte(message);
       }
-      catch (IllegalStateException e)
-      {
+      catch (IllegalStateException e) {
          throw new MessageFormatException(e.getMessage());
       }
-      catch (IndexOutOfBoundsException e)
-      {
+      catch (IndexOutOfBoundsException e) {
          throw new MessageEOFException("");
       }
    }
 
-   public short readShort() throws JMSException
-   {
+   public short readShort() throws JMSException {
       checkRead();
-      try
-      {
+      try {
          return streamReadShort(message);
       }
-      catch (IllegalStateException e)
-      {
+      catch (IllegalStateException e) {
          throw new MessageFormatException(e.getMessage());
       }
-      catch (IndexOutOfBoundsException e)
-      {
+      catch (IndexOutOfBoundsException e) {
          throw new MessageEOFException("");
       }
    }
 
-   public char readChar() throws JMSException
-   {
+   public char readChar() throws JMSException {
       checkRead();
-      try
-      {
+      try {
          return streamReadChar(message);
       }
-      catch (IllegalStateException e)
-      {
+      catch (IllegalStateException e) {
          throw new MessageFormatException(e.getMessage());
       }
-      catch (IndexOutOfBoundsException e)
-      {
+      catch (IndexOutOfBoundsException e) {
          throw new MessageEOFException("");
       }
    }
 
-   public int readInt() throws JMSException
-   {
+   public int readInt() throws JMSException {
       checkRead();
-      try
-      {
+      try {
          return streamReadInteger(message);
       }
-      catch (IllegalStateException e)
-      {
+      catch (IllegalStateException e) {
          throw new MessageFormatException(e.getMessage());
       }
-      catch (IndexOutOfBoundsException e)
-      {
+      catch (IndexOutOfBoundsException e) {
          throw new MessageEOFException("");
       }
    }
 
-   public long readLong() throws JMSException
-   {
+   public long readLong() throws JMSException {
       checkRead();
-      try
-      {
+      try {
          return streamReadLong(message);
       }
-      catch (IllegalStateException e)
-      {
+      catch (IllegalStateException e) {
          throw new MessageFormatException(e.getMessage());
       }
-      catch (IndexOutOfBoundsException e)
-      {
+      catch (IndexOutOfBoundsException e) {
          throw new MessageEOFException("");
       }
    }
 
-   public float readFloat() throws JMSException
-   {
+   public float readFloat() throws JMSException {
       checkRead();
-      try
-      {
+      try {
          return streamReadFloat(message);
       }
-      catch (IllegalStateException e)
-      {
+      catch (IllegalStateException e) {
          throw new MessageFormatException(e.getMessage());
       }
-      catch (IndexOutOfBoundsException e)
-      {
+      catch (IndexOutOfBoundsException e) {
          throw new MessageEOFException("");
       }
    }
 
-   public double readDouble() throws JMSException
-   {
+   public double readDouble() throws JMSException {
       checkRead();
-      try
-      {
+      try {
          return streamReadDouble(message);
       }
-      catch (IllegalStateException e)
-      {
+      catch (IllegalStateException e) {
          throw new MessageFormatException(e.getMessage());
       }
-      catch (IndexOutOfBoundsException e)
-      {
+      catch (IndexOutOfBoundsException e) {
          throw new MessageEOFException("");
       }
    }
 
-   public String readString() throws JMSException
-   {
+   public String readString() throws JMSException {
       checkRead();
-      try
-      {
+      try {
          return streamReadString(message);
       }
-      catch (IllegalStateException e)
-      {
+      catch (IllegalStateException e) {
          throw new MessageFormatException(e.getMessage());
       }
-      catch (IndexOutOfBoundsException e)
-      {
+      catch (IndexOutOfBoundsException e) {
          throw new MessageEOFException("");
       }
    }
@@ -253,178 +209,144 @@ public final class ActiveMQStreamMessage extends ActiveMQMessage implements Stre
     */
    private int len = 0;
 
-   public int readBytes(final byte[] value) throws JMSException
-   {
+   public int readBytes(final byte[] value) throws JMSException {
       checkRead();
-      try
-      {
+      try {
          Pair<Integer, Integer> pairRead = streamReadBytes(message, len, value);
 
          len = pairRead.getA();
          return pairRead.getB();
       }
-      catch (IllegalStateException e)
-      {
+      catch (IllegalStateException e) {
          throw new MessageFormatException(e.getMessage());
       }
-      catch (IndexOutOfBoundsException e)
-      {
+      catch (IndexOutOfBoundsException e) {
          throw new MessageEOFException("");
       }
    }
 
-   public Object readObject() throws JMSException
-   {
+   public Object readObject() throws JMSException {
       checkRead();
-      try
-      {
+      try {
          return streamReadObject(message);
       }
-      catch (IllegalStateException e)
-      {
+      catch (IllegalStateException e) {
          throw new MessageFormatException(e.getMessage());
       }
-      catch (IndexOutOfBoundsException e)
-      {
+      catch (IndexOutOfBoundsException e) {
          throw new MessageEOFException("");
       }
    }
 
-   public void writeBoolean(final boolean value) throws JMSException
-   {
+   public void writeBoolean(final boolean value) throws JMSException {
       checkWrite();
       getBuffer().writeByte(DataConstants.BOOLEAN);
       getBuffer().writeBoolean(value);
    }
 
-   public void writeByte(final byte value) throws JMSException
-   {
+   public void writeByte(final byte value) throws JMSException {
       checkWrite();
       getBuffer().writeByte(DataConstants.BYTE);
       getBuffer().writeByte(value);
    }
 
-   public void writeShort(final short value) throws JMSException
-   {
+   public void writeShort(final short value) throws JMSException {
       checkWrite();
       getBuffer().writeByte(DataConstants.SHORT);
       getBuffer().writeShort(value);
    }
 
-   public void writeChar(final char value) throws JMSException
-   {
+   public void writeChar(final char value) throws JMSException {
       checkWrite();
       getBuffer().writeByte(DataConstants.CHAR);
-      getBuffer().writeShort((short)value);
+      getBuffer().writeShort((short) value);
    }
 
-   public void writeInt(final int value) throws JMSException
-   {
+   public void writeInt(final int value) throws JMSException {
       checkWrite();
       getBuffer().writeByte(DataConstants.INT);
       getBuffer().writeInt(value);
    }
 
-   public void writeLong(final long value) throws JMSException
-   {
+   public void writeLong(final long value) throws JMSException {
       checkWrite();
       getBuffer().writeByte(DataConstants.LONG);
       getBuffer().writeLong(value);
    }
 
-   public void writeFloat(final float value) throws JMSException
-   {
+   public void writeFloat(final float value) throws JMSException {
       checkWrite();
       getBuffer().writeByte(DataConstants.FLOAT);
       getBuffer().writeInt(Float.floatToIntBits(value));
    }
 
-   public void writeDouble(final double value) throws JMSException
-   {
+   public void writeDouble(final double value) throws JMSException {
       checkWrite();
       getBuffer().writeByte(DataConstants.DOUBLE);
       getBuffer().writeLong(Double.doubleToLongBits(value));
    }
 
-   public void writeString(final String value) throws JMSException
-   {
+   public void writeString(final String value) throws JMSException {
       checkWrite();
       getBuffer().writeByte(DataConstants.STRING);
       getBuffer().writeNullableString(value);
    }
 
-   public void writeBytes(final byte[] value) throws JMSException
-   {
+   public void writeBytes(final byte[] value) throws JMSException {
       checkWrite();
       getBuffer().writeByte(DataConstants.BYTES);
       getBuffer().writeInt(value.length);
       getBuffer().writeBytes(value);
    }
 
-   public void writeBytes(final byte[] value, final int offset, final int length) throws JMSException
-   {
+   public void writeBytes(final byte[] value, final int offset, final int length) throws JMSException {
       checkWrite();
       getBuffer().writeByte(DataConstants.BYTES);
       getBuffer().writeInt(length);
       getBuffer().writeBytes(value, offset, length);
    }
 
-   public void writeObject(final Object value) throws JMSException
-   {
-      if (value instanceof String)
-      {
-         writeString((String)value);
+   public void writeObject(final Object value) throws JMSException {
+      if (value instanceof String) {
+         writeString((String) value);
       }
-      else if (value instanceof Boolean)
-      {
-         writeBoolean((Boolean)value);
+      else if (value instanceof Boolean) {
+         writeBoolean((Boolean) value);
       }
-      else if (value instanceof Byte)
-      {
-         writeByte((Byte)value);
+      else if (value instanceof Byte) {
+         writeByte((Byte) value);
       }
-      else if (value instanceof Short)
-      {
-         writeShort((Short)value);
+      else if (value instanceof Short) {
+         writeShort((Short) value);
       }
-      else if (value instanceof Integer)
-      {
-         writeInt((Integer)value);
+      else if (value instanceof Integer) {
+         writeInt((Integer) value);
       }
-      else if (value instanceof Long)
-      {
-         writeLong((Long)value);
+      else if (value instanceof Long) {
+         writeLong((Long) value);
       }
-      else if (value instanceof Float)
-      {
-         writeFloat((Float)value);
+      else if (value instanceof Float) {
+         writeFloat((Float) value);
       }
-      else if (value instanceof Double)
-      {
-         writeDouble((Double)value);
+      else if (value instanceof Double) {
+         writeDouble((Double) value);
       }
-      else if (value instanceof byte[])
-      {
-         writeBytes((byte[])value);
+      else if (value instanceof byte[]) {
+         writeBytes((byte[]) value);
       }
-      else if (value instanceof Character)
-      {
-         writeChar((Character)value);
+      else if (value instanceof Character) {
+         writeChar((Character) value);
       }
-      else if (value == null)
-      {
+      else if (value == null) {
          writeString(null);
       }
-      else
-      {
+      else {
          throw new MessageFormatException("Invalid object type: " + value.getClass());
       }
    }
 
-   public void reset() throws JMSException
-   {
-      if (!readOnly)
-      {
+   public void reset() throws JMSException {
+      if (!readOnly) {
          readOnly = true;
       }
       getBuffer().resetReaderIndex();
@@ -433,28 +355,24 @@ public final class ActiveMQStreamMessage extends ActiveMQMessage implements Stre
    // ActiveMQRAMessage overrides ----------------------------------------
 
    @Override
-   public void clearBody() throws JMSException
-   {
+   public void clearBody() throws JMSException {
       super.clearBody();
 
       getBuffer().clear();
    }
 
    @Override
-   public void doBeforeSend() throws Exception
-   {
+   public void doBeforeSend() throws Exception {
       reset();
    }
 
-   private ActiveMQBuffer getBuffer()
-   {
+   private ActiveMQBuffer getBuffer() {
       return message.getBodyBuffer();
    }
 
    @SuppressWarnings("rawtypes")
    @Override
-   public boolean isBodyAssignableTo(Class c)
-   {
+   public boolean isBodyAssignableTo(Class c) {
       return false;
    }
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/bac96047/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQTemporaryQueue.java
----------------------------------------------------------------------
diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQTemporaryQueue.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQTemporaryQueue.java
index b61d835..fa01409 100644
--- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQTemporaryQueue.java
+++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQTemporaryQueue.java
@@ -18,14 +18,12 @@ package org.apache.activemq.artemis.jms.client;
 
 import javax.jms.TemporaryQueue;
 
-
 /**
  * ActiveMQ Artemis implementation of a JMS TemporaryQueue.
  * <br>
  * This class can be instantiated directly.
  */
-public class ActiveMQTemporaryQueue extends ActiveMQQueue implements TemporaryQueue
-{
+public class ActiveMQTemporaryQueue extends ActiveMQQueue implements TemporaryQueue {
    // Constants -----------------------------------------------------
 
    private static final long serialVersionUID = -4624930377557954624L;
@@ -36,7 +34,6 @@ public class ActiveMQTemporaryQueue extends ActiveMQQueue implements TemporaryQu
 
    // Constructors --------------------------------------------------
 
-
    // TemporaryQueue implementation ------------------------------------------
 
    // Public --------------------------------------------------------
@@ -46,14 +43,12 @@ public class ActiveMQTemporaryQueue extends ActiveMQQueue implements TemporaryQu
     * @param name
     * @param session
     */
-   public ActiveMQTemporaryQueue(String address, String name, ActiveMQSession session)
-   {
+   public ActiveMQTemporaryQueue(String address, String name, ActiveMQSession session) {
       super(address, name, true, session);
    }
 
    @Override
-   public String toString()
-   {
+   public String toString() {
       return "ActiveMQTemporaryQueue[" + name + "]";
    }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/bac96047/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQTemporaryTopic.java
----------------------------------------------------------------------
diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQTemporaryTopic.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQTemporaryTopic.java
index 609eaea..07c3ec9 100644
--- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQTemporaryTopic.java
+++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQTemporaryTopic.java
@@ -18,8 +18,7 @@ package org.apache.activemq.artemis.jms.client;
 
 import javax.jms.TemporaryTopic;
 
-public class ActiveMQTemporaryTopic extends ActiveMQTopic implements TemporaryTopic
-{
+public class ActiveMQTemporaryTopic extends ActiveMQTopic implements TemporaryTopic {
 
    // Constants -----------------------------------------------------
 
@@ -31,9 +30,7 @@ public class ActiveMQTemporaryTopic extends ActiveMQTopic implements TemporaryTo
 
    // Constructors --------------------------------------------------
 
-   protected ActiveMQTemporaryTopic(final String address, final String name,
-                                    final ActiveMQSession session)
-   {
+   protected ActiveMQTemporaryTopic(final String address, final String name, final ActiveMQSession session) {
       super(address, name, true, session);
    }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/bac96047/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQTextMessage.java
----------------------------------------------------------------------
diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQTextMessage.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQTextMessage.java
index 2f95d85..b9fba2d 100644
--- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQTextMessage.java
+++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQTextMessage.java
@@ -28,14 +28,12 @@ import org.apache.activemq.artemis.api.core.client.ClientSession;
 import static org.apache.activemq.artemis.reader.TextMessageUtil.readBodyText;
 import static org.apache.activemq.artemis.reader.TextMessageUtil.writeBodyText;
 
-
 /**
  * ActiveMQ Artemis implementation of a JMS TextMessage.
  * <br>
  * This class was ported from SpyTextMessage in JBossMQ.
  */
-public class ActiveMQTextMessage extends ActiveMQMessage implements TextMessage
-{
+public class ActiveMQTextMessage extends ActiveMQMessage implements TextMessage {
    // Constants -----------------------------------------------------
 
    public static final byte TYPE = Message.TEXT_TYPE;
@@ -50,21 +48,18 @@ public class ActiveMQTextMessage extends ActiveMQMessage implements TextMessage
 
    // Constructors --------------------------------------------------
 
-   public ActiveMQTextMessage(final ClientSession session)
-   {
+   public ActiveMQTextMessage(final ClientSession session) {
       super(ActiveMQTextMessage.TYPE, session);
    }
 
-   public ActiveMQTextMessage(final ClientMessage message, final ClientSession session)
-   {
+   public ActiveMQTextMessage(final ClientMessage message, final ClientSession session) {
       super(message, session);
    }
 
    /**
     * A copy constructor for non-ActiveMQ Artemis JMS TextMessages.
     */
-   public ActiveMQTextMessage(final TextMessage foreign, final ClientSession session) throws JMSException
-   {
+   public ActiveMQTextMessage(final TextMessage foreign, final ClientSession session) throws JMSException {
       super(foreign, ActiveMQTextMessage.TYPE, session);
 
       setText(foreign.getText());
@@ -73,44 +68,36 @@ public class ActiveMQTextMessage extends ActiveMQMessage implements TextMessage
    // Public --------------------------------------------------------
 
    @Override
-   public byte getType()
-   {
+   public byte getType() {
       return ActiveMQTextMessage.TYPE;
    }
 
    // TextMessage implementation ------------------------------------
 
-   public void setText(final String text) throws JMSException
-   {
+   public void setText(final String text) throws JMSException {
       checkWrite();
 
-      if (text != null)
-      {
+      if (text != null) {
          this.text = new SimpleString(text);
       }
-      else
-      {
+      else {
          this.text = null;
       }
 
       writeBodyText(message, this.text);
    }
 
-   public String getText()
-   {
-      if (text != null)
-      {
+   public String getText() {
+      if (text != null) {
          return text.toString();
       }
-      else
-      {
+      else {
          return null;
       }
    }
 
    @Override
-   public void clearBody() throws JMSException
-   {
+   public void clearBody() throws JMSException {
       super.clearBody();
 
       text = null;
@@ -119,22 +106,19 @@ public class ActiveMQTextMessage extends ActiveMQMessage implements TextMessage
    // ActiveMQRAMessage override -----------------------------------------
 
    @Override
-   public void doBeforeReceive() throws ActiveMQException
-   {
+   public void doBeforeReceive() throws ActiveMQException {
       super.doBeforeReceive();
 
       text = readBodyText(message);
    }
 
    @Override
-   protected <T> T getBodyInternal(Class<T> c)
-   {
+   protected <T> T getBodyInternal(Class<T> c) {
       return (T) getText();
    }
 
    @Override
-   public boolean isBodyAssignableTo(@SuppressWarnings("rawtypes") Class c)
-   {
+   public boolean isBodyAssignableTo(@SuppressWarnings("rawtypes") Class c) {
       if (text == null)
          return true;
       return c.isAssignableFrom(java.lang.String.class);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/bac96047/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQTopic.java
----------------------------------------------------------------------
diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQTopic.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQTopic.java
index d7a6f38..d959d26 100644
--- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQTopic.java
+++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQTopic.java
@@ -25,15 +25,13 @@ import org.apache.activemq.artemis.api.core.SimpleString;
  * <br>
  * This class can be instantiated directly.
  */
-public class ActiveMQTopic extends ActiveMQDestination implements Topic
-{
+public class ActiveMQTopic extends ActiveMQDestination implements Topic {
    // Constants -----------------------------------------------------
 
    private static final long serialVersionUID = 7873614001276404156L;
    // Static --------------------------------------------------------
 
-   public static SimpleString createAddressFromName(final String name)
-   {
+   public static SimpleString createAddressFromName(final String name) {
       return new SimpleString(JMS_TOPIC_ADDRESS_PREFIX + name);
    }
 
@@ -41,41 +39,34 @@ public class ActiveMQTopic extends ActiveMQDestination implements Topic
 
    // Constructors --------------------------------------------------
 
-   public ActiveMQTopic(final String name)
-   {
+   public ActiveMQTopic(final String name) {
       this(name, false);
    }
 
-   public ActiveMQTopic(final String name, boolean temporary)
-   {
+   public ActiveMQTopic(final String name, boolean temporary) {
       super(JMS_TOPIC_ADDRESS_PREFIX + name, name, temporary, false, null);
    }
 
-
    /**
     * @param address
     * @param name
     * @param temporary
     * @param session
     */
-   protected ActiveMQTopic(String address, String name, boolean temporary, ActiveMQSession session)
-   {
+   protected ActiveMQTopic(String address, String name, boolean temporary, ActiveMQSession session) {
       super(address, name, temporary, false, session);
    }
 
-
    // Topic implementation ------------------------------------------
 
-   public String getTopicName()
-   {
+   public String getTopicName() {
       return name;
    }
 
    // Public --------------------------------------------------------
 
    @Override
-   public String toString()
-   {
+   public String toString() {
       return "ActiveMQTopic[" + name + "]";
    }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/bac96047/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQTopicConnectionFactory.java
----------------------------------------------------------------------
diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQTopicConnectionFactory.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQTopicConnectionFactory.java
index ab88238..bc588d3 100644
--- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQTopicConnectionFactory.java
+++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQTopicConnectionFactory.java
@@ -26,42 +26,35 @@ import org.apache.activemq.artemis.api.jms.JMSFactoryType;
 /**
  * {@inheritDoc}
  */
-public class ActiveMQTopicConnectionFactory extends ActiveMQConnectionFactory implements TopicConnectionFactory
-{
+public class ActiveMQTopicConnectionFactory extends ActiveMQConnectionFactory implements TopicConnectionFactory {
+
    private static final long serialVersionUID = 7317051989866548455L;
 
-   public ActiveMQTopicConnectionFactory()
-   {
+   public ActiveMQTopicConnectionFactory() {
       super();
    }
 
-   public ActiveMQTopicConnectionFactory(String url)
-   {
+   public ActiveMQTopicConnectionFactory(String url) {
       super(url);
    }
 
-   public ActiveMQTopicConnectionFactory(String url, String user, String password)
-   {
+   public ActiveMQTopicConnectionFactory(String url, String user, String password) {
       super(url, user, password);
    }
 
-   public ActiveMQTopicConnectionFactory(ServerLocator serverLocator)
-   {
+   public ActiveMQTopicConnectionFactory(ServerLocator serverLocator) {
       super(serverLocator);
    }
 
-   public ActiveMQTopicConnectionFactory(final boolean ha, final DiscoveryGroupConfiguration groupConfiguration)
-   {
+   public ActiveMQTopicConnectionFactory(final boolean ha, final DiscoveryGroupConfiguration groupConfiguration) {
       super(ha, groupConfiguration);
    }
 
-   public ActiveMQTopicConnectionFactory(final boolean ha, final TransportConfiguration... initialConnectors)
-   {
+   public ActiveMQTopicConnectionFactory(final boolean ha, final TransportConfiguration... initialConnectors) {
       super(ha, initialConnectors);
    }
 
-   public int getFactoryType()
-   {
+   public int getFactoryType() {
       return JMSFactoryType.TOPIC_CF.intValue();
    }
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/bac96047/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQXAConnection.java
----------------------------------------------------------------------
diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQXAConnection.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQXAConnection.java
index 772d75e..bae4e89 100644
--- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQXAConnection.java
+++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQXAConnection.java
@@ -32,41 +32,39 @@ import org.apache.activemq.artemis.api.core.client.ClientSessionFactory;
  * The flat implementation of {@link XATopicConnection} and {@link XAQueueConnection} is per design,
  * following common practices of JMS 1.1.
  */
-public final class ActiveMQXAConnection extends ActiveMQConnection implements XATopicConnection, XAQueueConnection
-{
+public final class ActiveMQXAConnection extends ActiveMQConnection implements XATopicConnection, XAQueueConnection {
 
-   public ActiveMQXAConnection(final String username, final String password, final int connectionType,
-                               final String clientID, final int dupsOKBatchSize, final int transactionBatchSize,
-                               final ClientSessionFactory sessionFactory)
-   {
+   public ActiveMQXAConnection(final String username,
+                               final String password,
+                               final int connectionType,
+                               final String clientID,
+                               final int dupsOKBatchSize,
+                               final int transactionBatchSize,
+                               final ClientSessionFactory sessionFactory) {
       super(username, password, connectionType, clientID, dupsOKBatchSize, transactionBatchSize, sessionFactory);
    }
 
    @Override
-   public XASession createXASession() throws JMSException
-   {
+   public XASession createXASession() throws JMSException {
       checkClosed();
-      return (XASession)createSessionInternal(isXA(), true, Session.SESSION_TRANSACTED, ActiveMQSession.TYPE_GENERIC_SESSION);
+      return (XASession) createSessionInternal(isXA(), true, Session.SESSION_TRANSACTED, ActiveMQSession.TYPE_GENERIC_SESSION);
    }
 
    @Override
-   public XAQueueSession createXAQueueSession() throws JMSException
-   {
+   public XAQueueSession createXAQueueSession() throws JMSException {
       checkClosed();
-      return (XAQueueSession)createSessionInternal(isXA(), true, Session.SESSION_TRANSACTED, ActiveMQSession.TYPE_QUEUE_SESSION);
+      return (XAQueueSession) createSessionInternal(isXA(), true, Session.SESSION_TRANSACTED, ActiveMQSession.TYPE_QUEUE_SESSION);
 
    }
 
    @Override
-   public XATopicSession createXATopicSession() throws JMSException
-   {
+   public XATopicSession createXATopicSession() throws JMSException {
       checkClosed();
-      return (XATopicSession)createSessionInternal(isXA(), true, Session.SESSION_TRANSACTED, ActiveMQSession.TYPE_TOPIC_SESSION);
+      return (XATopicSession) createSessionInternal(isXA(), true, Session.SESSION_TRANSACTED, ActiveMQSession.TYPE_TOPIC_SESSION);
    }
 
    @Override
-   protected boolean isXA()
-   {
+   protected boolean isXA() {
       return true;
    }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/bac96047/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQXAConnectionFactory.java
----------------------------------------------------------------------
diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQXAConnectionFactory.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQXAConnectionFactory.java
index d520fc0..ec2ddb2 100644
--- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQXAConnectionFactory.java
+++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQXAConnectionFactory.java
@@ -29,46 +29,37 @@ import org.apache.activemq.artemis.api.jms.JMSFactoryType;
  * <p>
  * We consider the XAConnectionFactory to be the most complete possible option. It can be casted to any other connection factory since it is fully functional
  */
-public class ActiveMQXAConnectionFactory extends ActiveMQConnectionFactory implements XATopicConnectionFactory,
-   XAQueueConnectionFactory
-{
+public class ActiveMQXAConnectionFactory extends ActiveMQConnectionFactory implements XATopicConnectionFactory, XAQueueConnectionFactory {
+
    private static final long serialVersionUID = 743611571839154115L;
 
-   public ActiveMQXAConnectionFactory()
-   {
+   public ActiveMQXAConnectionFactory() {
       super();
    }
 
-   public ActiveMQXAConnectionFactory(String uri)
-   {
+   public ActiveMQXAConnectionFactory(String uri) {
       super(uri);
    }
 
-   public ActiveMQXAConnectionFactory(String url, String user, String password)
-   {
+   public ActiveMQXAConnectionFactory(String url, String user, String password) {
       super(url, user, password);
    }
 
-   public ActiveMQXAConnectionFactory(ServerLocator serverLocator)
-   {
+   public ActiveMQXAConnectionFactory(ServerLocator serverLocator) {
       super(serverLocator);
    }
 
-   public ActiveMQXAConnectionFactory(final boolean ha, final DiscoveryGroupConfiguration groupConfiguration)
-   {
+   public ActiveMQXAConnectionFactory(final boolean ha, final DiscoveryGroupConfiguration groupConfiguration) {
       super(ha, groupConfiguration);
    }
 
-   public ActiveMQXAConnectionFactory(final boolean ha, final TransportConfiguration... initialConnectors)
-   {
+   public ActiveMQXAConnectionFactory(final boolean ha, final TransportConfiguration... initialConnectors) {
       super(ha, initialConnectors);
    }
 
    @Override
-   public int getFactoryType()
-   {
+   public int getFactoryType() {
       return JMSFactoryType.XA_CF.intValue();
    }
 
-
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/bac96047/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQXAJMSContext.java
----------------------------------------------------------------------
diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQXAJMSContext.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQXAJMSContext.java
index 2449d26..ac330b0 100644
--- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQXAJMSContext.java
+++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQXAJMSContext.java
@@ -18,10 +18,9 @@ package org.apache.activemq.artemis.jms.client;
 
 import javax.jms.XAJMSContext;
 
-public class ActiveMQXAJMSContext extends ActiveMQJMSContext implements XAJMSContext
-{
-   public ActiveMQXAJMSContext(ActiveMQConnectionForContext connection, ThreadAwareContext threadAwareContext)
-   {
+public class ActiveMQXAJMSContext extends ActiveMQJMSContext implements XAJMSContext {
+
+   public ActiveMQXAJMSContext(ActiveMQConnectionForContext connection, ThreadAwareContext threadAwareContext) {
       super(connection, threadAwareContext);
    }
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/bac96047/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQXAQueueConnectionFactory.java
----------------------------------------------------------------------
diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQXAQueueConnectionFactory.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQXAQueueConnectionFactory.java
index 445b069..fca6856 100644
--- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQXAQueueConnectionFactory.java
+++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQXAQueueConnectionFactory.java
@@ -26,42 +26,35 @@ import org.apache.activemq.artemis.api.jms.JMSFactoryType;
 /**
  * {@inheritDoc}
  */
-public class ActiveMQXAQueueConnectionFactory extends ActiveMQConnectionFactory implements XAQueueConnectionFactory
-{
+public class ActiveMQXAQueueConnectionFactory extends ActiveMQConnectionFactory implements XAQueueConnectionFactory {
+
    private static final long serialVersionUID = 8612457847251087454L;
 
-   public ActiveMQXAQueueConnectionFactory()
-   {
+   public ActiveMQXAQueueConnectionFactory() {
       super();
    }
 
-   public ActiveMQXAQueueConnectionFactory(String uri)
-   {
+   public ActiveMQXAQueueConnectionFactory(String uri) {
       super(uri);
    }
 
-   public ActiveMQXAQueueConnectionFactory(String url, String user, String password)
-   {
+   public ActiveMQXAQueueConnectionFactory(String url, String user, String password) {
       super(url, user, password);
    }
 
-   public ActiveMQXAQueueConnectionFactory(ServerLocator serverLocator)
-   {
+   public ActiveMQXAQueueConnectionFactory(ServerLocator serverLocator) {
       super(serverLocator);
    }
 
-   public ActiveMQXAQueueConnectionFactory(final boolean ha, final DiscoveryGroupConfiguration groupConfiguration)
-   {
+   public ActiveMQXAQueueConnectionFactory(final boolean ha, final DiscoveryGroupConfiguration groupConfiguration) {
       super(ha, groupConfiguration);
    }
 
-   public ActiveMQXAQueueConnectionFactory(final boolean ha, final TransportConfiguration... initialConnectors)
-   {
+   public ActiveMQXAQueueConnectionFactory(final boolean ha, final TransportConfiguration... initialConnectors) {
       super(ha, initialConnectors);
    }
 
-   public int getFactoryType()
-   {
+   public int getFactoryType() {
       return JMSFactoryType.QUEUE_XA_CF.intValue();
    }
 


Mime
View raw message