db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mattba...@apache.org
Subject cvs commit: jakarta-ojb/src/java/org/apache/ojb/broker/accesslayer ConnectionManager.java
Date Fri, 20 Dec 2002 01:52:57 GMT
mattbaird    2002/12/19 17:52:57

  Modified:    src/java/org/apache/ojb/broker/accesslayer
                        ConnectionManager.java
  Log:
  if we get a lookupexception during connection acquisition, we have to throw to allow client
to do something!
  
  Revision  Changes    Path
  1.17      +6 -8      jakarta-ojb/src/java/org/apache/ojb/broker/accesslayer/ConnectionManager.java
  
  Index: ConnectionManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/src/java/org/apache/ojb/broker/accesslayer/ConnectionManager.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- ConnectionManager.java	9 Dec 2002 22:00:08 -0000	1.16
  +++ ConnectionManager.java	20 Dec 2002 01:52:57 -0000	1.17
  @@ -54,12 +54,7 @@
    * <http://www.apache.org/>.
    */
   
  -import org.apache.ojb.broker.PBKey;
  -import org.apache.ojb.broker.PersistenceBroker;
  -import org.apache.ojb.broker.PersistenceBrokerException;
  -import org.apache.ojb.broker.TransactionAbortedException;
  -import org.apache.ojb.broker.TransactionInProgressException;
  -import org.apache.ojb.broker.TransactionNotInProgressException;
  +import org.apache.ojb.broker.*;
   import org.apache.ojb.broker.metadata.JdbcConnectionDescriptor;
   import org.apache.ojb.broker.platforms.Platform;
   import org.apache.ojb.broker.platforms.PlatformConfiguration;
  @@ -163,7 +158,10 @@
           }
           catch (LookupException e)
           {
  -            log.error("Can't get connection", e);
  +            /**
  +			 * must throw to notify user that we couldn't start a connection
  +			 */
  +			throw new PersistenceBrokerSQLException(e.getMessage());
           }
           if (platform.useAutoCommit() == Platform.AUTO_COMMIT_SET_TRUE_AND_TEMPORARY_FALSE)
           {
  
  
  

Mime
View raw message