public void run() {
try {
connecting = true;
boolean connect = true;
OracleDataSource ods = getOracleDataSource();
if (!getSavePassword()) {
PasswordJPanel pjp = new PasswordJPanel();
pjp.ShowDialog(getUserName());
connect =
pjp.getisOK();
if (connect) {
ods.setPassword(pjp.getPassword());
}
}
if (connect) {
String localmsg = NbBundle.getMessage(Utils.getCommonClass(), "LBL_ConnectingToAs", Parent.toString(), UserName);
startProgress(localmsg);
ods.setConnectionCachingEnabled(true);
java.util.Properties props = ods.getConnectionProperties() == null ? new java.util.Properties() : ods.getConnectionProperties();
props.put(OracleConnection.CONNECTION_PROPERTY_THIN_VSESSION_PROGRAM, "PL/SQL Editor for NetBeans");
ods.setConnectionProperties(props);
java.util.Properties props_cache = new java.util.Properties();
props_cache.setProperty("MaxLimit", "2");
ods.setConnectionCacheProperties(props_cache);
OutputMsg(localmsg, null, false);
conn =
(OracleConnection) ods.getConnection();
if (conn != null && !conn.isClosed()) {
setIsConnected(true);
OutputMsg(NbBundle.getMessage(Utils.getCommonClass(), "LBL_ConnectedAs", UserName), null, false);
EnableHints();
notifyChange();