db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mka...@apache.org
Subject cvs commit: db-ojb/src/test/org/apache/ojb OJB-logging.properties
Date Thu, 17 Mar 2005 09:40:08 GMT
mkalen      2005/03/17 01:40:08

  Modified:    src/java/org/apache/ojb/broker/platforms Tag:
                        OJB_1_0_RELEASE PlatformOracle9iImpl.java
               src/test/org/apache/ojb Tag: OJB_1_0_RELEASE
                        OJB-logging.properties
  Log:
  As reported by Don Lyon: Oracle10g-connections under JBoss managed environments have externally
controlled statement caching. Don't throw exceptions if platform fails to set statement caching.
Add logging setting for easier user feedback on different managed environments.
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.13.2.6  +26 -10    db-ojb/src/java/org/apache/ojb/broker/platforms/PlatformOracle9iImpl.java
  
  Index: PlatformOracle9iImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/platforms/PlatformOracle9iImpl.java,v
  retrieving revision 1.13.2.5
  retrieving revision 1.13.2.6
  diff -u -r1.13.2.5 -r1.13.2.6
  --- PlatformOracle9iImpl.java	16 Mar 2005 11:38:16 -0000	1.13.2.5
  +++ PlatformOracle9iImpl.java	17 Mar 2005 09:40:07 -0000	1.13.2.6
  @@ -55,8 +55,8 @@
    * see http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:127412348064
    *
    * @author <a href="mailto:mattbaird@yahoo.com">Matthew Baird</a>
  - * @author <a href="mailto:erik@cj.com">Erik Forkalsrud</a>
    * @author <a href="mailto:mkalen@apache.org">Martin Kal&eacute;n</a>
  + * @author Contributions from: Erik Forkalsrud, Danilo Tommasina, Thierry Hanot, Don Lyon
    * @version CVS $Id$
    * @see Platform
    * @see PlatformDefaultImpl
  @@ -204,7 +204,12 @@
               }
               catch (Exception e)
               {
  -                throw new PlatformException(e);
  +                if (logger.isDebugEnabled())
  +                {
  +                    logger.debug("PlatformOracle9iImpl could not enable Oracle statement
caching."
  +                                 + " Original/unwrapped connection classes="
  +                                 + conn.getClass().getName() + "/" + oraConn.getClass().getName());
  +                }
               }
           }
   
  @@ -217,7 +222,12 @@
               }
               catch (Exception e)
               {
  -                throw new PlatformException(e);
  +                if (logger.isDebugEnabled())
  +                {
  +                    logger.debug("PlatformOracle9iImpl could not enable Oracle row pre-fetching."
  +                                 + "Original/unwrapped connection classes="
  +                                 + conn.getClass().getName() + "/" + oraConn.getClass().getName());
  +                }
               }
           }
       }
  @@ -428,12 +438,15 @@
       {
           final Object unwrapped;
           unwrapped = genericUnwrap(ORA_CONN_CLASS, conn, UNWRAP_CONN_METHOD_NAMES, UNWRAP_CONN_PARAM_TYPES);
  -        if (unwrapped == null && logger.isDebugEnabled())
  +        if (unwrapped == null)
           {
               // mkalen:  only log this as debug since it will be logged for every connection
               //          (ie only useful during development).
  -            logger.debug("PlatformOracle9iImpl could not unwrap " + conn.getClass().getName()
+
  -                         ", Oracle-extensions disabled.");
  +            if (logger.isDebugEnabled())
  +            {
  +                logger.debug("PlatformOracle9iImpl could not unwrap " + conn.getClass().getName()
+
  +                             ", Oracle-extensions disabled.");
  +            }
           }
           return (Connection) unwrapped;
       }
  @@ -447,12 +460,15 @@
       {
           final Object unwrapped;
           unwrapped = genericUnwrap(ORA_PS_CLASS, ps, UNWRAP_PS_METHOD_NAMES, UNWRAP_PS_PARAM_TYPES);
  -        if (unwrapped == null && logger.isDebugEnabled())
  +        if (unwrapped == null)
           {
               // mkalen:  only log this as debug since it will be logged for every connection
               //          (ie only useful during development).
  -            logger.debug("PlatformOracle9iImpl could not unwrap " + ps.getClass().getName()
+
  -                         ", large CLOB/BLOB support disabled.");
  +            if (logger.isDebugEnabled())
  +            {
  +                logger.debug("PlatformOracle9iImpl could not unwrap " + ps.getClass().getName()
+
  +                             ", large CLOB/BLOB support disabled.");
  +            }
           }
           return (Statement) unwrapped;
       }
  
  
  
  No                   revision
  No                   revision
  1.1.2.2   +3 -1      db-ojb/src/test/org/apache/ojb/OJB-logging.properties
  
  Index: OJB-logging.properties
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/OJB-logging.properties,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- OJB-logging.properties	23 Jan 2005 03:03:20 -0000	1.1.2.1
  +++ OJB-logging.properties	17 Mar 2005 09:40:08 -0000	1.1.2.2
  @@ -80,6 +80,8 @@
   org.apache.ojb.broker.cache.ObjectCacheDefaultImpl.LogLevel=WARN
   # Logger for ObjectCacheTwoLevelImpl
   org.apache.ojb.broker.cache.ObjectCacheTwoLevelImpl.LogLevel=WARN
  +# Logger for Oracle9i platform, useful for tracing failing Oracle-extensions or large LOB-support
  +org.apache.ojb.broker.platforms.PlatformOracle9iImpl.LogLevel=WARN
   #
   # Special Logger categories used in test suite and tutorials
   #
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message