[jboss-cvs] JBoss Messaging SVN: r4275 - in trunk/src/main/org/jboss/messaging/core: server/impl and 1 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed May 21 15:23:21 EDT 2008


Author: timfox
Date: 2008-05-21 15:23:21 -0400 (Wed, 21 May 2008)
New Revision: 4275

Modified:
   trunk/src/main/org/jboss/messaging/core/client/impl/ClientProducerImpl.java
   trunk/src/main/org/jboss/messaging/core/client/impl/ClientSessionImpl.java
   trunk/src/main/org/jboss/messaging/core/server/impl/ServerSessionImpl.java
   trunk/src/main/org/jboss/messaging/core/transaction/impl/TransactionImpl.java
Log:
Fixed security tests


Modified: trunk/src/main/org/jboss/messaging/core/client/impl/ClientProducerImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/client/impl/ClientProducerImpl.java	2008-05-21 18:00:09 UTC (rev 4274)
+++ trunk/src/main/org/jboss/messaging/core/client/impl/ClientProducerImpl.java	2008-05-21 19:23:21 UTC (rev 4275)
@@ -169,7 +169,7 @@
    	
    	boolean sendBlocking = msg.isDurable() && sendPersistentMessagesSynchronously ||
    	                       !msg.isDurable() && sendNonPersistentMessagesSynchronously;
-   	
+   		
    	if (sendBlocking)
    	{
    	   remotingConnection.sendBlocking(serverTargetID, session.getServerTargetID(), message);

Modified: trunk/src/main/org/jboss/messaging/core/client/impl/ClientSessionImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/client/impl/ClientSessionImpl.java	2008-05-21 18:00:09 UTC (rev 4274)
+++ trunk/src/main/org/jboss/messaging/core/client/impl/ClientSessionImpl.java	2008-05-21 19:23:21 UTC (rev 4275)
@@ -369,7 +369,7 @@
       	producer = new ClientProducerImpl(this, response.getProducerTargetID(), clientTargetID, address,
       			                            remotingConnection, response.getWindowSize(),
       			                            response.getMaxRate(),
-      			                            sendNonPersistentMessagesBlocking, !autoCommitSends);  
+      			                            sendNonPersistentMessagesBlocking, autoCommitSends);  
       	
       	remotingConnection.getPacketDispatcher().register(new ClientProducerPacketHandler(producer, clientTargetID));
       }

Modified: trunk/src/main/org/jboss/messaging/core/server/impl/ServerSessionImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/server/impl/ServerSessionImpl.java	2008-05-21 18:00:09 UTC (rev 4274)
+++ trunk/src/main/org/jboss/messaging/core/server/impl/ServerSessionImpl.java	2008-05-21 19:23:21 UTC (rev 4275)
@@ -282,8 +282,8 @@
       {
          securityStore.check(msg.getDestination(), CheckType.WRITE, connection);
       }
-      catch (Exception e)
-      {
+      catch (MessagingException e)
+      {       
          if (!autoCommitSends)
          {
             MessagingException messagingException;
@@ -297,10 +297,7 @@
             }
             tx.markAsRollbackOnly(messagingException);
          }
-         else
-         {
-            throw e;
-         }
+         throw e;         
       }
 
       msg.setMessageID(persistenceManager.generateMessageID());

Modified: trunk/src/main/org/jboss/messaging/core/transaction/impl/TransactionImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/transaction/impl/TransactionImpl.java	2008-05-21 18:00:09 UTC (rev 4274)
+++ trunk/src/main/org/jboss/messaging/core/transaction/impl/TransactionImpl.java	2008-05-21 19:23:21 UTC (rev 4275)
@@ -239,7 +239,7 @@
       }
       else
       {
-         if (state != State.ACTIVE)
+         if (state != State.ACTIVE && state != State.ROLLBACK_ONLY)
          {
             throw new IllegalStateException("Transaction is in invalid state " + state);
          }




More information about the jboss-cvs-commits mailing list