c3p0.properties .vs. c3p0-config.xml

时间:2023-02-09 22:05:45

 

摘自c3p0.jar,方便查看

//c3p0.properties

#
# This file is detritus from various testing attempts
# the values below may change
,  and often do not represent
# reasonable values for the parameters.
#

#c3p0.testConnectionOnCheckout
= true
#c3p0.testConnectionOnCheckin
= true
#c3p0.minPoolSize
= 3
#c3p0.maxPoolSize
= 20
#c3p0.checkoutTimeout
= 2000
#c3p0.idleConnectionTestPeriod
= 5
#c3p0.maxConnectionAge
= 10
#c3p0.maxIdleTime
= 2
#c3p0.maxIdleTimeExcessConnections
= 1
#c3p0.propertyCycle
= 1
#c3p0.numHelperThreads
= 10
#c3p0.unreturnedConnectionTimeout
= 15
#c3p0.debugUnreturnedConnectionStackTraces
= true
#c3p0.maxStatements
= 30
#c3p0.maxStatementsPerConnection
= 5
#c3p0.maxAdministrativeTaskTime
= 3
#c3p0.preferredTestQuery
= SELECT  1
#c3p0.preferredTestQuery
= SELECT a FROM emptyyukyuk WHERE a  =   5
#c3p0.preferredTestQuery
= SELECT a FROM testpbds WHERE a  =   5
#c3p0.usesTraditionalReflectiveProxies
= true
#c3p0.automaticTestTable
= PoopyTestTable
#c3p0.acquireIncrement
= 4
#c3p0.acquireRetryDelay
= 1000
#c3p0.acquireRetryAttempts
= 60
#c3p0.connectionTesterClassName
= com.mchange.v2.c3p0.test.AlwaysFailConnectionTester
#c3p0.initialPoolSize
= 10

c3p0.jdbcUrl
= jdbc:postgresql://localhost/c3p0-test
c3p0.driverClass
= org.postgresql.Driver
c3p0.user
= swaldman
c3p0.password
= test
#c3p0.user
= poop
#c3p0.password
= scoop

#com.mchange.v2.log.MLog
= com.mchange.v2.log.log4j.Log4jMLog
#com.mchange.v2.log.MLog
= com.mchange.v2.log.jdk14logging.Jdk14MLog
#com.mchange.v2.log.MLog
= com.mchange.v2.log.FallbackMLog
#com.mchange.v2.log.NameTransformer
= com.mchange.v2.log.PackageNames
#com.mchange.v2.log.FallbackMLog.DEFAULT_CUTOFF_LEVEL
= ALL


#com.mchange.v2.c3p0.VMID
= poop

 

 

//c3p0-config.xml 

< c3p0-config >
  
< default-config >
    
<!--  <property name="automaticTestTable">con_test</property>  -->
    
<!--  <property name="checkoutTimeout">30000</property>  -->
    
<!--  <property name="idleConnectionTestPeriod">30</property>  -->
    
<!--  <property name="initialPoolSize">10</property>  -->
    
<!--  <property name="maxIdleTime">30</property>  -->
    
<!--  <property name="maxIdleTimeExcessConnections">10</property>  -->
    
<!--  <property name="maxConnectionAge">60</property>  -->
    
<!--  <property name="propertyCycle">1</property>  -->
    
<!--  <property name="maxPoolSize">25</property>  -->
    
<!--  <property name="minPoolSize">5</property>  -->
    
<!--  <property name="maxStatements">0</property>  -->
    
<!--  <property name="maxStatementsPerConnection">5</property>  -->
    
<!--  <property name="maxAdministrativeTaskTime">4</property>  -->
    
<!--  <property name="connectionCustomizerClassName">com.mchange.v2.c3p0.test.TestConnectionCustomizer</property>  -->
    
<!--  <property name="unreturnedConnectionTimeout">15</property>  -->
    
<!--  <property name="debugUnreturnedConnectionStackTraces">true</property>  -->

    
<!--
    <user-overrides user="swaldman">
      <property name="debugUnreturnedConnectionStackTraces">true</property>
    </user-overrides>
    
-->

  
</ default-config >

<!--
  <named-config name="dumbTestConfig">
    <property name="maxStatements">200</property>
    <property name="jdbcUrl">jdbc:test</property>
    <user-overrides user="poop">
      <property name="maxStatements">300</property>
    </user-overrides>
   </named-config>
-->

</ c3p0-config >


 

 

//解析properties

 

c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml /*
c3p0.properties .vs. c3p0-config.xml * Distributed as part of c3p0 v.0.9.1.2
c3p0.properties .vs. c3p0-config.xml *
c3p0.properties .vs. c3p0-config.xml * Copyright (C) 2005 Machinery For Change, Inc.
c3p0.properties .vs. c3p0-config.xml *
c3p0.properties .vs. c3p0-config.xml * Author: Steve Waldman <swaldman@mchange.com>
c3p0.properties .vs. c3p0-config.xml *
c3p0.properties .vs. c3p0-config.xml * This library is free software; you can redistribute it and/or modify
c3p0.properties .vs. c3p0-config.xml * it under the terms of the GNU Lesser General Public License version 2.1, as 
c3p0.properties .vs. c3p0-config.xml * published by the Free Software Foundation.
c3p0.properties .vs. c3p0-config.xml *
c3p0.properties .vs. c3p0-config.xml * This software is distributed in the hope that it will be useful,
c3p0.properties .vs. c3p0-config.xml * but WITHOUT ANY WARRANTY; without even the implied warranty of
c3p0.properties .vs. c3p0-config.xml * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
c3p0.properties .vs. c3p0-config.xml * GNU Lesser General Public License for more details.
c3p0.properties .vs. c3p0-config.xml *
c3p0.properties .vs. c3p0-config.xml * You should have received a copy of the GNU Lesser General Public License
c3p0.properties .vs. c3p0-config.xml * along with this software; see the file LICENSE.  If not, write to the
c3p0.properties .vs. c3p0-config.xml * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
c3p0.properties .vs. c3p0-config.xml * Boston, MA 02111-1307, USA.
c3p0.properties .vs. c3p0-config.xml 
*/

c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml
package  com.mchange.v2.c3p0.cfg;
c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml
import  java.io. * ;
c3p0.properties .vs. c3p0-config.xml
import  java.lang.reflect. * ;
c3p0.properties .vs. c3p0-config.xml
import  java.util. * ;
c3p0.properties .vs. c3p0-config.xml
import  com.mchange.v2.cfg. * ;
c3p0.properties .vs. c3p0-config.xml
import  com.mchange.v2.log. * ;
c3p0.properties .vs. c3p0-config.xml
import  com.mchange.v2.c3p0.impl. * ;
c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml
public   final   class  C3P0ConfigUtils
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml
{
c3p0.properties .vs. c3p0-config.xml    
public final static String PROPS_FILE_RSRC_PATH     = "/c3p0.properties";
c3p0.properties .vs. c3p0-config.xml    
public final static String PROPS_FILE_PROP_PFX      = "c3p0.";
c3p0.properties .vs. c3p0-config.xml    
public final static int    PROPS_FILE_PROP_PFX_LEN  = 5;
c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml    
private final static String[] MISSPELL_PFXS = {"/c3pO""/c3po""/C3P0""/C3PO"}
c3p0.properties .vs. c3p0-config.xml    
c3p0.properties .vs. c3p0-config.xml    
final static MLogger logger = MLog.getLogger( C3P0ConfigUtils.class );
c3p0.properties .vs. c3p0-config.xml    
c3p0.properties .vs. c3p0-config.xml    
static
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml    
{
c3p0.properties .vs. c3p0-config.xml        
if ( logger.isLoggable(MLevel.WARNING) && C3P0ConfigUtils.class.getResource( PROPS_FILE_RSRC_PATH ) == null )
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml        
{
c3p0.properties .vs. c3p0-config.xml            
// warn on a misspelling... its an ugly way to do this, but since resources are not listable...
c3p0.properties .vs. c3p0-config.xml
            for (int i = 0; i < MISSPELL_PFXS.length; ++i)
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml            
{
c3p0.properties .vs. c3p0-config.xml                String test 
= MISSPELL_PFXS[i] + ".properties";
c3p0.properties .vs. c3p0-config.xml                
if (C3P0ConfigUtils.class.getResource( MISSPELL_PFXS[i] + ".properties" ) != null)
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml                
{
c3p0.properties .vs. c3p0-config.xml                    logger.warning(
"POSSIBLY MISSPELLED c3p0.properties CONFIG RESOURCE FOUND. " +
c3p0.properties .vs. c3p0-config.xml                                   
"Please ensure the file name is c3p0.properties, all lower case, " +
c3p0.properties .vs. c3p0-config.xml                                   
"with the digit 0 (NOT the letter O) in c3p0. It should be placed " +
c3p0.properties .vs. c3p0-config.xml                                   
" in the top level of c3p0's effective classpath.");
c3p0.properties .vs. c3p0-config.xml                    
break;
c3p0.properties .vs. c3p0-config.xml                }

c3p0.properties .vs. c3p0-config.xml            }

c3p0.properties .vs. c3p0-config.xml        }

c3p0.properties .vs. c3p0-config.xml    }

c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml    
public static HashMap extractHardcodedC3P0Defaults(boolean stringify)
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml    
{
c3p0.properties .vs. c3p0-config.xml HashMap out 
= new HashMap();
c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml 
try
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml     
{
c3p0.properties .vs. c3p0-config.xml  Method[] methods 
= C3P0Defaults.class.getMethods();
c3p0.properties .vs. c3p0-config.xml  
for (int i = 0, len = methods.length; i < len; ++i)
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml      
{
c3p0.properties .vs. c3p0-config.xml   Method m 
= methods[i];
c3p0.properties .vs. c3p0-config.xml   
int mods = m.getModifiers();
c3p0.properties .vs. c3p0-config.xml   
if ((mods & Modifier.PUBLIC) != 0 && (mods & Modifier.STATIC) != 0 && m.getParameterTypes().length == 0)
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml       
{
c3p0.properties .vs. c3p0-config.xml    
if (stringify)
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml        
{
c3p0.properties .vs. c3p0-config.xml     Object val 
= m.invoke( nullnull );
c3p0.properties .vs. c3p0-config.xml     
if ( val != null )
c3p0.properties .vs. c3p0-config.xml         out.put( m.getName(), String.valueOf( val ) );
c3p0.properties .vs. c3p0-config.xml        }

c3p0.properties .vs. c3p0-config.xml    
else
c3p0.properties .vs. c3p0-config.xml        out.put( m.getName(), m.invoke( 
nullnull ) );
c3p0.properties .vs. c3p0-config.xml       }

c3p0.properties .vs. c3p0-config.xml      }

c3p0.properties .vs. c3p0-config.xml     }

c3p0.properties .vs. c3p0-config.xml 
catch (Exception e)
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml     
{
c3p0.properties .vs. c3p0-config.xml  logger.log( MLevel.WARNING, 
"Failed to extract hardcoded default config!?", e );
c3p0.properties .vs. c3p0-config.xml     }

c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml 
return out;
c3p0.properties .vs. c3p0-config.xml    }

c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml    
public static HashMap extractHardcodedC3P0Defaults()
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml    
return extractHardcodedC3P0Defaults( true ); }
c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml    
public static HashMap extractC3P0PropertiesResources()
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml    
{
c3p0.properties .vs. c3p0-config.xml HashMap out 
= new HashMap();
c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml
//  Properties props = findResourceProperties();
c3p0.properties .vs. c3p0-config.xml
//  props.putAll( findAllC3P0Properties() );
c3p0.properties .vs. c3p0-config.xml

c3p0.properties .vs. c3p0-config.xml  Properties props 
= findAllC3P0Properties();
c3p0.properties .vs. c3p0-config.xml 
for (Iterator ii = props.keySet().iterator(); ii.hasNext(); )
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml     
{
c3p0.properties .vs. c3p0-config.xml  String key 
= (String) ii.next();
c3p0.properties .vs. c3p0-config.xml  String val 
= (String) props.get(key);
c3p0.properties .vs. c3p0-config.xml  
if ( key.startsWith(PROPS_FILE_PROP_PFX) )
c3p0.properties .vs. c3p0-config.xml      out.put( key.substring(PROPS_FILE_PROP_PFX_LEN).trim(), val.trim() );
c3p0.properties .vs. c3p0-config.xml     }

c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml 
return out;
c3p0.properties .vs. c3p0-config.xml    }

c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml    
public static C3P0Config configFromFlatDefaults(HashMap flatDefaults)
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml    
{
c3p0.properties .vs. c3p0-config.xml NamedScope defaults 
= new NamedScope();
c3p0.properties .vs. c3p0-config.xml defaults.props.putAll( flatDefaults );
c3p0.properties .vs. c3p0-config.xml 
c3p0.properties .vs. c3p0-config.xml HashMap configNamesToNamedScopes 
= new HashMap();
c3p0.properties .vs. c3p0-config.xml 
c3p0.properties .vs. c3p0-config.xml 
return new C3P0Config( defaults, configNamesToNamedScopes ); 
c3p0.properties .vs. c3p0-config.xml    }

c3p0.properties .vs. c3p0-config.xml    
c3p0.properties .vs. c3p0-config.xml    
public static String getPropFileConfigProperty( String prop )
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml    
return MultiPropertiesConfig.readVmConfig().getProperty( prop ); }
c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml    
private static Properties findResourceProperties()
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml    
return MultiPropertiesConfig.readVmConfig().getPropertiesByResourcePath(PROPS_FILE_RSRC_PATH); }
c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml    
private static Properties findAllC3P0Properties()
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml    
return MultiPropertiesConfig.readVmConfig().getPropertiesByPrefix("c3p0"); }
c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml    
static Properties findAllC3P0SystemProperties()
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml    
{
c3p0.properties .vs. c3p0-config.xml Properties out 
= new Properties();
c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml SecurityException sampleExc 
= null;
c3p0.properties .vs. c3p0-config.xml 
try
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml     
{
c3p0.properties .vs. c3p0-config.xml  
for (Iterator ii = C3P0Defaults.getKnownProperties().iterator(); ii.hasNext(); )
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml      
{
c3p0.properties .vs. c3p0-config.xml   String key 
= (String) ii.next();
c3p0.properties .vs. c3p0-config.xml   String prefixedKey 
= "c3p0." + key;
c3p0.properties .vs. c3p0-config.xml   String value 
= System.getProperty( prefixedKey );
c3p0.properties .vs. c3p0-config.xml   
if (value != null && value.trim().length() > 0)
c3p0.properties .vs. c3p0-config.xml       out.put( key, value );
c3p0.properties .vs. c3p0-config.xml      }

c3p0.properties .vs. c3p0-config.xml     }

c3p0.properties .vs. c3p0-config.xml 
catch (SecurityException e)
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml     
{ sampleExc = e; }
c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml 
return out;
c3p0.properties .vs. c3p0-config.xml    }

c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml    
private C3P0ConfigUtils()
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml    
{}
c3p0.properties .vs. c3p0-config.xml}

c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml

 

 

//解析xml

 

c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml /*
c3p0.properties .vs. c3p0-config.xml * Distributed as part of c3p0 v.0.9.1.2
c3p0.properties .vs. c3p0-config.xml *
c3p0.properties .vs. c3p0-config.xml * Copyright (C) 2005 Machinery For Change, Inc.
c3p0.properties .vs. c3p0-config.xml *
c3p0.properties .vs. c3p0-config.xml * Author: Steve Waldman <swaldman@mchange.com>
c3p0.properties .vs. c3p0-config.xml *
c3p0.properties .vs. c3p0-config.xml * This library is free software; you can redistribute it and/or modify
c3p0.properties .vs. c3p0-config.xml * it under the terms of the GNU Lesser General Public License version 2.1, as 
c3p0.properties .vs. c3p0-config.xml * published by the Free Software Foundation.
c3p0.properties .vs. c3p0-config.xml *
c3p0.properties .vs. c3p0-config.xml * This software is distributed in the hope that it will be useful,
c3p0.properties .vs. c3p0-config.xml * but WITHOUT ANY WARRANTY; without even the implied warranty of
c3p0.properties .vs. c3p0-config.xml * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
c3p0.properties .vs. c3p0-config.xml * GNU Lesser General Public License for more details.
c3p0.properties .vs. c3p0-config.xml *
c3p0.properties .vs. c3p0-config.xml * You should have received a copy of the GNU Lesser General Public License
c3p0.properties .vs. c3p0-config.xml * along with this software; see the file LICENSE.  If not, write to the
c3p0.properties .vs. c3p0-config.xml * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
c3p0.properties .vs. c3p0-config.xml * Boston, MA 02111-1307, USA.
c3p0.properties .vs. c3p0-config.xml 
*/

c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml
package  com.mchange.v2.c3p0.cfg;
c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml
import  java.io. * ;
c3p0.properties .vs. c3p0-config.xml
import  java.util. * ;
c3p0.properties .vs. c3p0-config.xml
import  javax.xml.parsers. * ;
c3p0.properties .vs. c3p0-config.xml
import  org.w3c.dom. * ;
c3p0.properties .vs. c3p0-config.xml
import  com.mchange.v2.log. * ;
c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml
import  com.mchange.v1.xml.DomParseUtils;
c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml
public   final   class  C3P0ConfigXmlUtils
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml
{
c3p0.properties .vs. c3p0-config.xml    
public final static String XML_CONFIG_RSRC_PATH     = "/c3p0-config.xml";
c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml    
final static MLogger logger = MLog.getLogger( C3P0ConfigXmlUtils.class );
c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml    
public final static String LINESEP;
c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml    
private final static String[] MISSPELL_PFXS = {"/c3p0""/c3pO""/c3po""/C3P0""/C3PO"}
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml    
private final static char[]   MISSPELL_LINES = {'-''_'};
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml    
private final static String[] MISSPELL_CONFIG = {"config""CONFIG"};
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml    
private final static String[] MISSPELL_XML = {"xml""XML"};
c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml    
// its an ugly way to do this, but since resources are not listable...
c3p0.properties .vs. c3p0-config.xml    
//
c3p0.properties .vs. c3p0-config.xml    
// this is only executed once, and does about 40 tests (for now)
c3p0.properties .vs. c3p0-config.xml    
// should I care about the cost in initialization time?
c3p0.properties .vs. c3p0-config.xml    
//
c3p0.properties .vs. c3p0-config.xml    
// should only be run if we've checked for the correct file, but
c3p0.properties .vs. c3p0-config.xml    
// not found it
c3p0.properties .vs. c3p0-config.xml
    private final static void warnCommonXmlConfigResourceMisspellings()
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml    
{
c3p0.properties .vs. c3p0-config.xml        
if (logger.isLoggable( MLevel.WARNING) )
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml        
{
c3p0.properties .vs. c3p0-config.xml            
for (int a = 0, lena = MISSPELL_PFXS.length; a < lena; ++a)
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml            
{
c3p0.properties .vs. c3p0-config.xml                StringBuffer sb 
= new StringBuffer(16);
c3p0.properties .vs. c3p0-config.xml                sb.append( MISSPELL_PFXS[a] );
c3p0.properties .vs. c3p0-config.xml                
for (int b = 0, lenb = MISSPELL_LINES.length; b < lenb; ++b)
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml                
{
c3p0.properties .vs. c3p0-config.xml                    sb.append(MISSPELL_LINES[b]);
c3p0.properties .vs. c3p0-config.xml                    
for (int c = 0, lenc = MISSPELL_CONFIG.length; c < lenc; ++c)
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml                    
{
c3p0.properties .vs. c3p0-config.xml                        sb.append(MISSPELL_CONFIG[c]);
c3p0.properties .vs. c3p0-config.xml                        sb.append(
'.');
c3p0.properties .vs. c3p0-config.xml                        
for (int d = 0, lend = MISSPELL_XML.length; d < lend; ++d)
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml                        
{
c3p0.properties .vs. c3p0-config.xml                            sb.append(MISSPELL_XML[d]);
c3p0.properties .vs. c3p0-config.xml                            String test 
= sb.toString();
c3p0.properties .vs. c3p0-config.xml                            
if (!test.equals(XML_CONFIG_RSRC_PATH))
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml                            
{
c3p0.properties .vs. c3p0-config.xml                                Object hopefullyNull 
= C3P0ConfigXmlUtils.class.getResource( test );
c3p0.properties .vs. c3p0-config.xml                                
if (hopefullyNull != null)
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml                                
{
c3p0.properties .vs. c3p0-config.xml                                    logger.warning(
"POSSIBLY MISSPELLED c3p0-conf.xml RESOURCE FOUND. " +
c3p0.properties .vs. c3p0-config.xml                                                   
"Please ensure the file name is c3p0-config.xml, all lower case, " +
c3p0.properties .vs. c3p0-config.xml                                                   
"with the digit 0 (NOT the letter O) in c3p0. It should be placed " +
c3p0.properties .vs. c3p0-config.xml                                                   
" in the top level of c3p0's effective classpath.");
c3p0.properties .vs. c3p0-config.xml                                    
return;
c3p0.properties .vs. c3p0-config.xml                                }

c3p0.properties .vs. c3p0-config.xml                            }

c3p0.properties .vs. c3p0-config.xml                        }

c3p0.properties .vs. c3p0-config.xml                    }

c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml                }

c3p0.properties .vs. c3p0-config.xml            }

c3p0.properties .vs. c3p0-config.xml        }

c3p0.properties .vs. c3p0-config.xml    }

c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml    
static
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml    
{
c3p0.properties .vs. c3p0-config.xml        String ls;
c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml        
try
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml        
{ ls = System.getProperty("line.separator"" "); }
c3p0.properties .vs. c3p0-config.xml        
catch (Exception e)
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml        
{ ls = " "; }
c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml        LINESEP 
= ls;
c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml    }

c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml    
public static C3P0Config extractXmlConfigFromDefaultResource() throws Exception
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml    
{
c3p0.properties .vs. c3p0-config.xml        InputStream is 
= null;
c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml        
try
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml        
{
c3p0.properties .vs. c3p0-config.xml            is 
= C3P0ConfigUtils.class.getResourceAsStream(XML_CONFIG_RSRC_PATH);
c3p0.properties .vs. c3p0-config.xml            
if ( is == null )
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml            
{
c3p0.properties .vs. c3p0-config.xml                warnCommonXmlConfigResourceMisspellings();
c3p0.properties .vs. c3p0-config.xml                
return null;
c3p0.properties .vs. c3p0-config.xml            }

c3p0.properties .vs. c3p0-config.xml            
else
c3p0.properties .vs. c3p0-config.xml                
return extractXmlConfigFromInputStream( is );
c3p0.properties .vs. c3p0-config.xml        }

c3p0.properties .vs. c3p0-config.xml        
finally
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml        
{
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml            
try if (is != null) is.close(); }
c3p0.properties .vs. c3p0-config.xml            
catch (Exception e)
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml            
{
c3p0.properties .vs. c3p0-config.xml                
if ( logger.isLoggable( MLevel.FINE ) )
c3p0.properties .vs. c3p0-config.xml                    logger.log(MLevel.FINE,
"Exception on resource InputStream close.", e);
c3p0.properties .vs. c3p0-config.xml            }

c3p0.properties .vs. c3p0-config.xml        }

c3p0.properties .vs. c3p0-config.xml    }

c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml    
public static C3P0Config extractXmlConfigFromInputStream(InputStream is) throws Exception
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml    
{
c3p0.properties .vs. c3p0-config.xml        DocumentBuilderFactory fact 
= DocumentBuilderFactory.newInstance();
c3p0.properties .vs. c3p0-config.xml        DocumentBuilder db 
= fact.newDocumentBuilder();
c3p0.properties .vs. c3p0-config.xml        Document doc 
= db.parse( is );
c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml        
return extractConfigFromXmlDoc(doc);
c3p0.properties .vs. c3p0-config.xml    }

c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml    
public static C3P0Config extractConfigFromXmlDoc(Document doc) throws Exception
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml    
{
c3p0.properties .vs. c3p0-config.xml        Element docElem 
= doc.getDocumentElement();
c3p0.properties .vs. c3p0-config.xml        
if (docElem.getTagName().equals("c3p0-config"))
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml        
{
c3p0.properties .vs. c3p0-config.xml            NamedScope defaults;
c3p0.properties .vs. c3p0-config.xml            HashMap configNamesToNamedScopes 
= new HashMap();
c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml            Element defaultConfigElem 
= DomParseUtils.uniqueChild( docElem, "default-config" );
c3p0.properties .vs. c3p0-config.xml            
if (defaultConfigElem != null)
c3p0.properties .vs. c3p0-config.xml                defaults 
= extractNamedScopeFromLevel( defaultConfigElem );
c3p0.properties .vs. c3p0-config.xml            
else
c3p0.properties .vs. c3p0-config.xml                defaults 
= new NamedScope();
c3p0.properties .vs. c3p0-config.xml            NodeList nl 
= DomParseUtils.immediateChildElementsByTagName(docElem, "named-config");
c3p0.properties .vs. c3p0-config.xml            
for (int i = 0, len = nl.getLength(); i < len; ++i)
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml            
{
c3p0.properties .vs. c3p0-config.xml                Element namedConfigElem 
= (Element) nl.item(i);
c3p0.properties .vs. c3p0-config.xml                String configName 
= namedConfigElem.getAttribute("name");
c3p0.properties .vs. c3p0-config.xml                
if (configName != null && configName.length() > 0)
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml                
{
c3p0.properties .vs. c3p0-config.xml                    NamedScope namedConfig 
= extractNamedScopeFromLevel( namedConfigElem );
c3p0.properties .vs. c3p0-config.xml                    configNamesToNamedScopes.put( configName, namedConfig);
c3p0.properties .vs. c3p0-config.xml                }

c3p0.properties .vs. c3p0-config.xml                
else
c3p0.properties .vs. c3p0-config.xml                    logger.warning(
"Configuration XML contained named-config element without name attribute: " + namedConfigElem);
c3p0.properties .vs. c3p0-config.xml            }

c3p0.properties .vs. c3p0-config.xml            
return new C3P0Config( defaults, configNamesToNamedScopes );
c3p0.properties .vs. c3p0-config.xml        }

c3p0.properties .vs. c3p0-config.xml        
else
c3p0.properties .vs. c3p0-config.xml            
throw new Exception("Root element of c3p0 config xml should be 'c3p0-config', not '" + docElem.getTagName() + "'.");
c3p0.properties .vs. c3p0-config.xml    }

c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml    
private static NamedScope extractNamedScopeFromLevel(Element elem)
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml    
{
c3p0.properties .vs. c3p0-config.xml        HashMap props 
= extractPropertiesFromLevel( elem );
c3p0.properties .vs. c3p0-config.xml        HashMap userNamesToOverrides 
= new HashMap();
c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml        NodeList nl 
= DomParseUtils.immediateChildElementsByTagName(elem, "user-overrides");
c3p0.properties .vs. c3p0-config.xml        
for (int i = 0, len = nl.getLength(); i < len; ++i)
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml        
{
c3p0.properties .vs. c3p0-config.xml            Element perUserConfigElem 
= (Element) nl.item(i);
c3p0.properties .vs. c3p0-config.xml            String userName 
= perUserConfigElem.getAttribute("user");
c3p0.properties .vs. c3p0-config.xml            
if (userName != null && userName.length() > 0)
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml            
{
c3p0.properties .vs. c3p0-config.xml                HashMap userProps 
= extractPropertiesFromLevel( perUserConfigElem );
c3p0.properties .vs. c3p0-config.xml                userNamesToOverrides.put( userName, userProps );
c3p0.properties .vs. c3p0-config.xml            }

c3p0.properties .vs. c3p0-config.xml            
else
c3p0.properties .vs. c3p0-config.xml                logger.warning(
"Configuration XML contained user-overrides element without user attribute: " + LINESEP + perUserConfigElem);
c3p0.properties .vs. c3p0-config.xml        }

c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml        
return new NamedScope(props, userNamesToOverrides);
c3p0.properties .vs. c3p0-config.xml    }

c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml    
private static HashMap extractPropertiesFromLevel(Element elem)
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml    
{
c3p0.properties .vs. c3p0-config.xml        
// System.err.println( "extractPropertiesFromLevel()" );
c3p0.properties .vs. c3p0-config.xml

c3p0.properties .vs. c3p0-config.xml        HashMap out 
= new HashMap();
c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml        
try
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml        
{
c3p0.properties .vs. c3p0-config.xml            NodeList nl 
= DomParseUtils.immediateChildElementsByTagName(elem, "property");
c3p0.properties .vs. c3p0-config.xml            
int len = nl.getLength();
c3p0.properties .vs. c3p0-config.xml            
for (int i = 0; i < len; ++i)
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml            
{
c3p0.properties .vs. c3p0-config.xml                Element propertyElem 
= (Element) nl.item(i);
c3p0.properties .vs. c3p0-config.xml                String propName 
= propertyElem.getAttribute("name");
c3p0.properties .vs. c3p0-config.xml                
if (propName != null && propName.length() > 0)
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml                
{
c3p0.properties .vs. c3p0-config.xml                    String propVal 
= DomParseUtils.allTextFromElement(propertyElem, true);
c3p0.properties .vs. c3p0-config.xml                    out.put( propName, propVal );
c3p0.properties .vs. c3p0-config.xml                    
//System.err.println( propName + " -> " + propVal );
c3p0.properties .vs. c3p0-config.xml
                }

c3p0.properties .vs. c3p0-config.xml                
else
c3p0.properties .vs. c3p0-config.xml                    logger.warning(
"Configuration XML contained property element without name attribute: " + LINESEP + propertyElem);
c3p0.properties .vs. c3p0-config.xml            }

c3p0.properties .vs. c3p0-config.xml        }

c3p0.properties .vs. c3p0-config.xml        
catch (Exception e)
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml        
{
c3p0.properties .vs. c3p0-config.xml            logger.log( MLevel.WARNING, 
c3p0.properties .vs. c3p0-config.xml                            
"An exception occurred while reading config XML. " +
c3p0.properties .vs. c3p0-config.xml                            
"Some configuration information has probably been ignored."
c3p0.properties .vs. c3p0-config.xml                            e );
c3p0.properties .vs. c3p0-config.xml        }

c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml        
return out;
c3p0.properties .vs. c3p0-config.xml    }

c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml    
private C3P0ConfigXmlUtils()
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml    
{}
c3p0.properties .vs. c3p0-config.xml}

c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml

 

 

c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml /*
c3p0.properties .vs. c3p0-config.xml * Distributed as part of c3p0 v.0.9.1.2
c3p0.properties .vs. c3p0-config.xml *
c3p0.properties .vs. c3p0-config.xml * Copyright (C) 2005 Machinery For Change, Inc.
c3p0.properties .vs. c3p0-config.xml *
c3p0.properties .vs. c3p0-config.xml * Author: Steve Waldman <swaldman@mchange.com>
c3p0.properties .vs. c3p0-config.xml *
c3p0.properties .vs. c3p0-config.xml * This library is free software; you can redistribute it and/or modify
c3p0.properties .vs. c3p0-config.xml * it under the terms of the GNU Lesser General Public License version 2.1, as 
c3p0.properties .vs. c3p0-config.xml * published by the Free Software Foundation.
c3p0.properties .vs. c3p0-config.xml *
c3p0.properties .vs. c3p0-config.xml * This software is distributed in the hope that it will be useful,
c3p0.properties .vs. c3p0-config.xml * but WITHOUT ANY WARRANTY; without even the implied warranty of
c3p0.properties .vs. c3p0-config.xml * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
c3p0.properties .vs. c3p0-config.xml * GNU Lesser General Public License for more details.
c3p0.properties .vs. c3p0-config.xml *
c3p0.properties .vs. c3p0-config.xml * You should have received a copy of the GNU Lesser General Public License
c3p0.properties .vs. c3p0-config.xml * along with this software; see the file LICENSE.  If not, write to the
c3p0.properties .vs. c3p0-config.xml * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
c3p0.properties .vs. c3p0-config.xml * Boston, MA 02111-1307, USA.
c3p0.properties .vs. c3p0-config.xml 
*/

c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml
package  com.mchange.v1.xml;
c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml
import  java.util. * ;
c3p0.properties .vs. c3p0-config.xml
import  org.xml.sax. * ;
c3p0.properties .vs. c3p0-config.xml
import  org.w3c.dom. * ;
c3p0.properties .vs. c3p0-config.xml
import  com.mchange.v1.util.DebugUtils;
c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml
public   final   class  DomParseUtils
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml
{
c3p0.properties .vs. c3p0-config.xml    
final static boolean DEBUG = true;
c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml    
/**
c3p0.properties .vs. c3p0-config.xml     * 
@return null if child doesn't exist.
c3p0.properties .vs. c3p0-config.xml     
*/

c3p0.properties .vs. c3p0-config.xml    
public static String allTextFromUniqueChild(Element elem, String childTagName)
c3p0.properties .vs. c3p0-config.xml 
throws DOMException
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml    
return allTextFromUniqueChild( elem, childTagName, false ); }
c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml    
/**
c3p0.properties .vs. c3p0-config.xml     * 
@return null if child doesn't exist.
c3p0.properties .vs. c3p0-config.xml     
*/

c3p0.properties .vs. c3p0-config.xml        
public static String allTextFromUniqueChild(Element elem, String childTagName, boolean trim)
c3p0.properties .vs. c3p0-config.xml 
throws DOMException
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml    
{
c3p0.properties .vs. c3p0-config.xml Element uniqueChild 
= uniqueChildByTagName( elem, childTagName );
c3p0.properties .vs. c3p0-config.xml 
if (uniqueChild == null)
c3p0.properties .vs. c3p0-config.xml     
return null;
c3p0.properties .vs. c3p0-config.xml 
else
c3p0.properties .vs. c3p0-config.xml     
return DomParseUtils.allTextFromElement( uniqueChild, trim );
c3p0.properties .vs. c3p0-config.xml    }

c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml    
public static Element uniqueChild(Element elem, String childTagName) throws DOMException
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml    
return uniqueChildByTagName( elem, childTagName); }
c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml    
/**
c3p0.properties .vs. c3p0-config.xml     * 
@deprecated use uniqueChild(Element elem, String childTagName)
c3p0.properties .vs. c3p0-config.xml     
*/

c3p0.properties .vs. c3p0-config.xml    
public static Element uniqueChildByTagName(Element elem, String childTagName) throws DOMException
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml    
{
c3p0.properties .vs. c3p0-config.xml NodeList nl 
= elem.getElementsByTagName(childTagName);
c3p0.properties .vs. c3p0-config.xml 
int len = nl.getLength();
c3p0.properties .vs. c3p0-config.xml 
if (DEBUG)
c3p0.properties .vs. c3p0-config.xml     DebugUtils.myAssert( len 
<= 1 ,
c3p0.properties .vs. c3p0-config.xml     
"There is more than one (" + len + ") child with tag name: " + 
c3p0.properties .vs. c3p0-config.xml     childTagName 
+ "!!!" );
c3p0.properties .vs. c3p0-config.xml 
return (len == 1 ? (Element) nl.item( 0 ) : null);
c3p0.properties .vs. c3p0-config.xml    }

c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml    
public static String allText(Element elem) throws DOMException
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml    
return allTextFromElement( elem ); }
c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml    
public static String allText(Element elem, boolean trim) throws DOMException
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml    
return allTextFromElement( elem, trim ); }
c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml    
/** @deprecated use allText(Element elem) */
c3p0.properties .vs. c3p0-config.xml    
public static String allTextFromElement(Element elem) throws DOMException
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml    
return allTextFromElement( elem, false); }
c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml    
/** @deprecated use allText(Element elem, boolean trim) */
c3p0.properties .vs. c3p0-config.xml    
public static String allTextFromElement(Element elem, boolean trim) throws DOMException
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml    
{
c3p0.properties .vs. c3p0-config.xml StringBuffer textBuf 
= new StringBuffer();
c3p0.properties .vs. c3p0-config.xml NodeList nl 
= elem.getChildNodes();
c3p0.properties .vs. c3p0-config.xml 
for (int j = 0, len = nl.getLength(); j < len; ++j)
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml     
{
c3p0.properties .vs. c3p0-config.xml  Node node 
= nl.item(j);
c3p0.properties .vs. c3p0-config.xml  
if (node instanceof Text) //includes Text and CDATA!
c3p0.properties .vs. c3p0-config.xml
      textBuf.append(node.getNodeValue());
c3p0.properties .vs. c3p0-config.xml     }

c3p0.properties .vs. c3p0-config.xml String out 
= textBuf.toString();
c3p0.properties .vs. c3p0-config.xml 
return ( trim ? out.trim() : out );
c3p0.properties .vs. c3p0-config.xml    }

c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml    
public static String[] allTextFromImmediateChildElements( Element parent, String tagName ) 
c3p0.properties .vs. c3p0-config.xml 
throws DOMException
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml    
return allTextFromImmediateChildElements( parent, tagName, false ); }
c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml    
public static String[] allTextFromImmediateChildElements( Element parent, String tagName, boolean trim ) 
c3p0.properties .vs. c3p0-config.xml 
throws DOMException
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml    
{
c3p0.properties .vs. c3p0-config.xml NodeList nl 
= immediateChildElementsByTagName( parent, tagName );
c3p0.properties .vs. c3p0-config.xml 
int len = nl.getLength();
c3p0.properties .vs. c3p0-config.xml String[] out 
= new String[ len ];
c3p0.properties .vs. c3p0-config.xml 
for (int i = 0; i < len; ++i)
c3p0.properties .vs. c3p0-config.xml     out[i] 
= allText( (Element) nl.item(i), trim );
c3p0.properties .vs. c3p0-config.xml 
return out;
c3p0.properties .vs. c3p0-config.xml    }

c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml    
public static NodeList immediateChildElementsByTagName( Element parent, String tagName )
c3p0.properties .vs. c3p0-config.xml 
throws DOMException
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml    
return getImmediateChildElementsByTagName( parent, tagName ); }
c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml    
/**
c3p0.properties .vs. c3p0-config.xml     * 
@deprecated use immediateChildrenByTagName( Element parent, String tagName )
c3p0.properties .vs. c3p0-config.xml     
*/

c3p0.properties .vs. c3p0-config.xml    
public static NodeList getImmediateChildElementsByTagName( Element parent, String tagName )
c3p0.properties .vs. c3p0-config.xml 
throws DOMException
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml    
{
c3p0.properties .vs. c3p0-config.xml 
final List nodes = new ArrayList();
c3p0.properties .vs. c3p0-config.xml 
for (Node child = parent.getFirstChild(); child != null; child = child.getNextSibling())
c3p0.properties .vs. c3p0-config.xml     
if (child instanceof Element && ((Element) child).getTagName().equals(tagName))
c3p0.properties .vs. c3p0-config.xml  nodes.add(child);
c3p0.properties .vs. c3p0-config.xml 
return new NodeList()
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml     
{
c3p0.properties .vs. c3p0-config.xml  
public int getLength()
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml  
return nodes.size(); }
c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml  
public Node item( int i )
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml  
return (Node) nodes.get( i ); }
c3p0.properties .vs. c3p0-config.xml     }
;
c3p0.properties .vs. c3p0-config.xml    }

c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml    
public static String allTextFromUniqueImmediateChild(Element elem, String childTagName)
c3p0.properties .vs. c3p0-config.xml 
throws DOMException
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml    
{
c3p0.properties .vs. c3p0-config.xml Element uniqueChild 
= uniqueImmediateChildByTagName( elem, childTagName );
c3p0.properties .vs. c3p0-config.xml 
if (uniqueChild == null)
c3p0.properties .vs. c3p0-config.xml     
return null;
c3p0.properties .vs. c3p0-config.xml 
return DomParseUtils.allTextFromElement( uniqueChild );
c3p0.properties .vs. c3p0-config.xml    }

c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml    
public static Element uniqueImmediateChild(Element elem, String childTagName) 
c3p0.properties .vs. c3p0-config.xml 
throws DOMException
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml    
return uniqueImmediateChildByTagName( elem, childTagName); }
c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml    
/**
c3p0.properties .vs. c3p0-config.xml     * 
@deprecated use uniqueImmediateChild(Element elem, String childTagName) 
c3p0.properties .vs. c3p0-config.xml     
*/

c3p0.properties .vs. c3p0-config.xml    
public static Element uniqueImmediateChildByTagName(Element elem, String childTagName) 
c3p0.properties .vs. c3p0-config.xml 
throws DOMException
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml    
{
c3p0.properties .vs. c3p0-config.xml NodeList nl 
= getImmediateChildElementsByTagName(elem, childTagName);
c3p0.properties .vs. c3p0-config.xml 
int len = nl.getLength();
c3p0.properties .vs. c3p0-config.xml 
if (DEBUG)
c3p0.properties .vs. c3p0-config.xml     DebugUtils.myAssert( len 
<= 1 ,
c3p0.properties .vs. c3p0-config.xml     
"There is more than one (" + len + ") child with tag name: " + 
c3p0.properties .vs. c3p0-config.xml     childTagName 
+ "!!!" );
c3p0.properties .vs. c3p0-config.xml 
return (len == 1 ? (Element) nl.item( 0 ) : null);
c3p0.properties .vs. c3p0-config.xml    }

c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml    
/**
c3p0.properties .vs. c3p0-config.xml     * 
@deprecated use Element.getAttribute(String val)
c3p0.properties .vs. c3p0-config.xml     
*/

c3p0.properties .vs. c3p0-config.xml    
public static String attrValFromElement(Element element, String attrName)
c3p0.properties .vs. c3p0-config.xml 
throws DOMException
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml    
{
c3p0.properties .vs. c3p0-config.xml Attr attr 
= element.getAttributeNode( attrName );
c3p0.properties .vs. c3p0-config.xml 
return (attr == null ? null : attr.getValue());
c3p0.properties .vs. c3p0-config.xml    }

c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml    
private DomParseUtils()
c3p0.properties .vs. c3p0-config.xmlc3p0.properties .vs. c3p0-config.xml    
{}
c3p0.properties .vs. c3p0-config.xml}

c3p0.properties .vs. c3p0-config.xml
c3p0.properties .vs. c3p0-config.xml