if ( derbyDriver == null ) { try { ClassLoader cl = new DerbyClassLoader(); derbyDriver = (Driver) Class.forName( SampleDBConstants.DERBY_DRIVER_CLASS, true, cl).newInstance(); } catch ( Exception e) { logger.log( Level.WARNING, "Failed to load Derby embedded driver: " + SampleDBConstants.DERBY_DRIVER_CLASS, e ); throw new SQLException (e.getLocalizedMessage()); } }  return derbyDriver.connect( dbUrl, props);
initClassLoaders();  return getDerbyDriver().connect( dbUrl, props);
	public Connection getConnection( String driverClass, String url,			Properties connectionProperties ) throws SQLException	{		if ( ! driverClass.equals( SampleDBConstants.DRIVER_CLASS) )		{			// This is unexpected; we shouldn't be getting this call			logger.log( Level.SEVERE, "Unexpected driverClass: " + driverClass );			throw new SQLException("Unexpected driverClass " + driverClass);		}		if ( ! url.equals(SampleDBConstants.DRIVER_URL) )		{			// Wrong url			logger.log( Level.WARNING, "Unexpected url: " + url );			throw new SQLException("Classic Models Inc. Sample Database Driver does not recognize url: " + driverClass);		}		String dbUrl = SampledbPlugin.getDBUrl( );				// Copy connection properties and replace user and password with fixed value		Properties props;		if ( connectionProperties != null )			props = (Properties)connectionProperties.clone();		else 			props = new Properties(); 		props.put( "user", SampleDBConstants.SAMPLE_DB_SCHEMA);		props.put( "password", "" );				if ( logger.isLoggable( Level.FINE ))		{			logger.fine( "Getting Sample DB JDBC connection. DriverClass=" + 					SampleDBConstants.DERBY_DRIVER_CLASS + ", Url=" + dbUrl);		}		if ( derbyDriver == null )		{			try			{				ClassLoader cl = new DerbyClassLoader();				derbyDriver = (Driver) Class.forName(						SampleDBConstants.DERBY_DRIVER_CLASS, true, cl).newInstance();			}			catch ( Exception e)			{				logger.log( Level.WARNING, "Failed to load Derby embedded driver: " +						SampleDBConstants.DERBY_DRIVER_CLASS, e );				throw new SQLException (e.getLocalizedMessage());			}		}		return derbyDriver.connect( dbUrl, props);	}