[jboss-cvs] JBossAS SVN: r111552 - in projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core: connectionmanager and 3 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Jun 8 05:04:21 EDT 2011


Author: jeff.zhang
Date: 2011-06-08 05:04:21 -0400 (Wed, 08 Jun 2011)
New Revision: 111552

Modified:
   projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/CoreBundle.java
   projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/CoreLogger.java
   projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/connectionmanager/AbstractConnectionManager.java
   projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/connectionmanager/listener/TxConnectionListener.java
   projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/connectionmanager/pool/mcp/ArrayBlockingQueueManagedConnectionPool.java
   projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/connectionmanager/pool/mcp/SemaphoreArrayListManagedConnectionPool.java
   projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/connectionmanager/tx/TxConnectionManagerImpl.java
Log:
[JBJCA-592] more bundle message in the core

Modified: projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/CoreBundle.java
===================================================================
--- projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/CoreBundle.java	2011-06-07 19:58:28 UTC (rev 111551)
+++ projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/CoreBundle.java	2011-06-08 09:04:21 UTC (rev 111552)
@@ -156,13 +156,28 @@
     */
    @Message(id = 352, value = "Failure to delist resource: %s")
    public String failureDelistResource(Object obj);
-
+   
    /**
+    * Error in delist
+    * @return The value
+    */
+   @Message(id = 353, value = "Error in delist!")
+   public String errorInDelist();
+   
+   /**
+    * Unfinished local transaction - error getting local transaction from
+    * @param obj listener instance
+    * @return The value
+    */
+   @Message(id = 354, value = "Unfinished local transaction - error getting local transaction from %s")
+   public String unfinishedLocalTransaction(Object obj);
+   
+   /**
     * Unfinished local transaction but managed connection does not provide a local transaction
     * @param obj listener instance
     * @return The value
     */
-   @Message(id = 353, value = "Unfinished local transaction but managed connection does not " +
+   @Message(id = 355, value = "Unfinished local transaction but managed connection does not " +
                   "provide a local transaction: %s")
    public String unfinishedLocalTransactionNotProvideLocalTransaction(Object obj);
 
@@ -172,7 +187,7 @@
     * @param currentTx current transaction instance
     * @return The value
     */
-   @Message(id = 354, value = "%s tx=%s")
+   @Message(id = 356, value = "%s tx=%s")
    public String systemExceptionWhenFailedToEnlistEqualsCurrentTx(Object throwable, Object currentTx);
    
    
@@ -187,18 +202,26 @@
    public String connectionManagerIsShutdown(String jndiName);
 
    /**
+    * Method getManagedConnection retry wait was interrupted
+    * @param jndiName jndi name
+    * @return The value
+    */
+   @Message(id = 452, value = "Method getManagedConnection retry wait was interrupted: %s")
+   public String getManagedConnectionRetryWaitInterrupted(String jndiName);
+   
+   /**
     * Unable to get managed connection for 
     * @param jndiName jndi name
     * @return The value
     */
-   @Message(id = 452, value = "Unable to get managed connection for %s")
+   @Message(id = 453, value = "Unable to get managed connection for %s")
    public String unableGetManagedConnection(String jndiName);
    
    /**
     * You are trying to use a connection factory that has been shut down ManagedConnectionFactory is null
     * @return The value
     */
-   @Message(id = 453, value = "You are trying to use a connection factory that has been shut down: " +
+   @Message(id = 454, value = "You are trying to use a connection factory that has been shut down: " +
          "ManagedConnectionFactory is null.")
    public String tryingUseConnectionFactoryShutDown();
    
@@ -206,14 +229,30 @@
     * Wrong ManagedConnectionFactory sent to allocateConnection
     * @return The value
     */
-   @Message(id = 454, value = "Wrong ManagedConnectionFactory sent to allocateConnection!")
+   @Message(id = 455, value = "Wrong ManagedConnectionFactory sent to allocateConnection!")
    public String wrongManagedConnectionFactorySentToAllocateConnection();
+
+   /**
+    * Unchecked throwable in ManagedConnection.getConnection()
+    * @param obj ConnectionListener instance
+    * @return The value
+    */
+   @Message(id = 456, value = "Unchecked throwable in ManagedConnection.getConnection() cl=%s")
+   public String uncheckedThrowableInManagedConnectionGetConnection(Object obj);
+
+   /**
+    * Unchecked throwable in managedConnectionReconnected()
+    * @param obj ConnectionListener instance
+    * @return The value
+    */
+   @Message(id = 457, value = "Unchecked throwable in managedConnectionReconnected() cl=%s")
+   public String uncheckedThrowableInManagedConnectionReconnected(Object obj);
    
    /**
     * This method is not supported
     * @return The value
     */
-   @Message(id = 455, value = "This method is not supported")
+   @Message(id = 458, value = "This method is not supported")
    public String thisMethodNotSupported();
    
    /**
@@ -221,22 +260,36 @@
     * @param obj transaction instance
     * @return The value
     */
-   @Message(id = 456, value = "Transaction is not active: tx=%s")
+   @Message(id = 459, value = "Transaction is not active: tx=%s")
    public String transactionNotActive(Object obj);
    
    /**
+    * Error checking for a transaction.
+    * @return The value
+    */
+   @Message(id = 460, value = "Error checking for a transaction.")
+   public String errorCheckingForTransaction();
+   
+   /**
     * Could not enlist in transaction on entering meta-aware object
     * @return The value
     */
-   @Message(id = 457, value = "Could not enlist in transaction on entering meta-aware object!")
+   @Message(id = 461, value = "Could not enlist in transaction on entering meta-aware object!")
    public String notEnlistInTransactionOnEnteringMetaAwareObject();
-
+   
    /**
+    * Could not delist resource, probably a transaction rollback
+    * @return The value
+    */
+   @Message(id = 462, value = "Could not delist resource, probably a transaction rollback?")
+   public String couldNotDelistResourceThenTransactionRollback();
+   
+   /**
     * Unable to set XAResource transaction timeout
     * @param jndiName jndi name
     * @return The value
     */
-   @Message(id = 458, value = "Unable to set XAResource transaction timeout: %s")
+   @Message(id = 463, value = "Unable to set XAResource transaction timeout: %s")
    public String unableSetXAResourceTransactionTimeout(String jndiName);
       
    // TRANSACTION SYNCHRONIZER (500)
@@ -295,6 +348,14 @@
    @Message(id = 657, value = "Interrupted while requesting permit! Waited %s ms")
    public String interruptedWhileRequestingPermit(long end);
    
+   /**
+    * Unexpected throwable while trying to create a connection:
+    * @param obj connection listener instance
+    * @return The value
+    */
+   @Message(id = 658, value = "Unexpected throwable while trying to create a connection: %s")
+   public String unexpectedThrowableWhileTryingCreateConnection(Object obj);
+   
    // NAMING (700)
 
    /**

Modified: projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/CoreLogger.java
===================================================================
--- projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/CoreLogger.java	2011-06-07 19:58:28 UTC (rev 111551)
+++ projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/CoreLogger.java	2011-06-08 09:04:21 UTC (rev 111552)
@@ -121,7 +121,7 @@
     * @param managedConnection The managedConnection instance
     */
    @LogMessage(level = INFO)
-   @Message(id = 303, value = "Registered a null handle for managed connection: %s")
+   @Message(id = 303, value = "Unregistered a null handle for managed connection: %s")
    public void unregisteredNullHandleManagedConnection(Object managedConnection);
 
    /**

Modified: projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/connectionmanager/AbstractConnectionManager.java
===================================================================
--- projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/connectionmanager/AbstractConnectionManager.java	2011-06-07 19:58:28 UTC (rev 111551)
+++ projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/connectionmanager/AbstractConnectionManager.java	2011-06-08 09:04:21 UTC (rev 111552)
@@ -384,7 +384,7 @@
                }
                catch (InterruptedException ie)
                {
-                  throw new ResourceException("getManagedConnection retry wait was interrupted " + jndiName, ie);
+                  throw new ResourceException(bundle.getManagedConnectionRetryWaitInterrupted(jndiName), ie);
                }
             }
          }
@@ -487,7 +487,7 @@
                log.trace("Get exception from managedConnectionDisconnected, maybe delist() have problem" + re);
             returnManagedConnection(cl, true);
          }
-         throw new ResourceException("Unchecked throwable in ManagedConnection.getConnection() cl=" + cl, t);
+         throw new ResourceException(bundle.uncheckedThrowableInManagedConnectionGetConnection(cl), t);
       }
 
       // Associate managed connection with the connection
@@ -604,7 +604,7 @@
       catch (Throwable t)
       {
          disconnectManagedConnection(cl);
-         throw new ResourceException("Unchecked throwable in managedConnectionReconnected() cl=" + cl, t);
+         throw new ResourceException(bundle.uncheckedThrowableInManagedConnectionReconnected(cl), t);
       }
    }
 

Modified: projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/connectionmanager/listener/TxConnectionListener.java
===================================================================
--- projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/connectionmanager/listener/TxConnectionListener.java	2011-06-07 19:58:28 UTC (rev 111551)
+++ projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/connectionmanager/listener/TxConnectionListener.java	2011-06-08 09:04:21 UTC (rev 111552)
@@ -310,7 +310,7 @@
       }
       catch (Throwable t)
       {
-         throw new ResourceException("Error in delist!", t);
+         throw new ResourceException(bundle.errorInDelist(), t);
       }
    }
 
@@ -415,8 +415,7 @@
          }
          catch (Throwable t)
          {
-            throw new ResourceException("Unfinished local transaction - " +
-                  "error getting local transaction from " + this, t);
+            throw new ResourceException(bundle.unfinishedLocalTransaction(this), t);
          }
          if (local == null)
             throw new ResourceException(bundle.unfinishedLocalTransactionNotProvideLocalTransaction(this));

Modified: projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/connectionmanager/pool/mcp/ArrayBlockingQueueManagedConnectionPool.java
===================================================================
--- projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/connectionmanager/pool/mcp/ArrayBlockingQueueManagedConnectionPool.java	2011-06-07 19:58:28 UTC (rev 111551)
+++ projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/connectionmanager/pool/mcp/ArrayBlockingQueueManagedConnectionPool.java	2011-06-08 09:04:21 UTC (rev 111552)
@@ -264,7 +264,7 @@
             {
                log.throwableWhileAttemptingGetNewGonnection(cl, t);
 
-               throw new ResourceException("Unexpected throwable while trying to create a connection: " + cl, t);
+               throw new ResourceException(bundle.unexpectedThrowableWhileTryingCreateConnection(cl), t);
             }
          }
       }
@@ -310,7 +310,7 @@
                {
                   log.throwableWhileAttemptingGetNewGonnection(cl, t);
 
-                  throw new ResourceException("Unexpected throwable while trying to create a connection: " + cl, t);
+                  throw new ResourceException(bundle.unexpectedThrowableWhileTryingCreateConnection(cl), t);
                }
             }
          }
@@ -372,7 +372,7 @@
             doDestroy(cl);
             cl = null;
 
-            throw new ResourceException("Unexpected throwable while trying to create a connection: " + cl, t);
+            throw new ResourceException(bundle.unexpectedThrowableWhileTryingCreateConnection(cl), t);
          }
       }
 

Modified: projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/connectionmanager/pool/mcp/SemaphoreArrayListManagedConnectionPool.java
===================================================================
--- projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/connectionmanager/pool/mcp/SemaphoreArrayListManagedConnectionPool.java	2011-06-07 19:58:28 UTC (rev 111551)
+++ projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/connectionmanager/pool/mcp/SemaphoreArrayListManagedConnectionPool.java	2011-06-08 09:04:21 UTC (rev 111552)
@@ -343,7 +343,7 @@
 
                permits.release();
 
-               throw new ResourceException("Unexpected throwable while trying to create a connection: " + cl, t);
+               throw new ResourceException(bundle.unexpectedThrowableWhileTryingCreateConnection(cl), t);
             }
          }
          else

Modified: projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/connectionmanager/tx/TxConnectionManagerImpl.java
===================================================================
--- projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/connectionmanager/tx/TxConnectionManagerImpl.java	2011-06-07 19:58:28 UTC (rev 111551)
+++ projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/core/connectionmanager/tx/TxConnectionManagerImpl.java	2011-06-08 09:04:21 UTC (rev 111552)
@@ -358,7 +358,7 @@
       }
       catch (Throwable t)
       {
-         throw new ResourceException("Error checking for a transaction.", t);
+         throw new ResourceException(bundle.errorCheckingForTransaction(), t);
       }
 
       if (trace)
@@ -463,7 +463,7 @@
       // Rethrow the error
       if (throwable != null)
       {
-         throw new ResourceException("Could not delist resource, probably a transaction rollback?", throwable);  
+         throw new ResourceException(bundle.couldNotDelistResourceThenTransactionRollback(), throwable);  
       }      
    }
 



More information about the jboss-cvs-commits mailing list