try {
slashOrNull = urlTokenizer.nextToken(":/");
} catch (java.util.NoSuchElementException e) {
// A null log writer is passed, because jdbc 1 sqlexceptions are automatically traced
throw new SqlException(null,
new ClientMessageId(SQLState.MALFORMED_URL),
url, e);
}
}
String server = tokenizeServerName(urlTokenizer, url); // "/server"
int port = tokenizeOptionalPortNumber(urlTokenizer, url); // "[:port]/"
if (port == 0) {
port = ClientDataSource.propertyDefault_portNumber;
}
// database is the database name and attributes. This will be
// sent to network server as the databaseName
String database = tokenizeDatabase(urlTokenizer, url); // "database"
java.util.Properties augmentedProperties = tokenizeURLProperties(url, properties);
database = appendDatabaseAttributes(database,augmentedProperties);
int traceLevel;
try {
traceLevel = ClientDataSource.getTraceLevel(augmentedProperties);
} catch (java.lang.NumberFormatException e) {
// A null log writer is passed, because jdbc 1 sqlexceptions are automatically traced
throw new SqlException(null,
new ClientMessageId(SQLState.TRACELEVEL_FORMAT_INVALID), e);
}
// Jdbc 1 connections will write driver trace info on a
// driver-wide basis using the jdbc 1 driver manager log writer.
// This log writer may be narrowed to the connection-level