* @exception SQLException if a SQL error is encountered.
*/
public void startUp() throws ClassNotFoundException, SQLException {
if (this.initialized == true) return;
this.busyList = new DoubleLinkedList();
this.xactConnections = new Hashtable();
this.expandedDriverName = this.expandAttribute(this.driverName);
if (this.expandedDriverName == null) {
SQLException se = new SQLException
(
StringScanner.createParamString
(
I18NHelper.getMessage(messages,
"connection.connectionmanager.nulldriver") // NOI18N
),
SQL_INVALID_VALUE // 21000
);
throw se;
}
this.expandedUrl = this.expandAttribute(this.url);
if (this.expandedUrl == null) {
SQLException se = new SQLException
(
StringScanner.createParamString
(
I18NHelper.getMessage(messages,
"connection.connectionmanager.nullurl") // NOI18N
),
SQL_INVALID_VALUE // 21000
);
throw se;
}
this.expandedUserName = this.expandAttribute(this.userName);
if (this.expandedUserName == null) {
this.expandedUserName = ""; // Allow null username. // NOI18N
}
this.expandedPassword = this.expandAttribute(this.password);
if (this.expandedPassword == null) {
this.expandedPassword = ""; // Allow null password. // NOI18N
}
try {
Class.forName(this.expandedDriverName);
// Check if connection pooling is requested.
if ((this.minPool > 0) && (this.maxPool >= this.minPool)) {
// Yes, create a connection of minPool size.
this.pooling = true;
this.freeList = new DoubleLinkedList();
expandPool(this.minPool);
} else if ((this.minPool == 0) && (this.maxPool == 0)) {
// No, pooling is to be disabled.
this.pooling = false;
}