minor cleanup.
This commit is contained in:
parent
db822559dd
commit
8bf00c253c
|
@ -72,10 +72,10 @@ public class ConfigPostgreSQL extends Config
|
||||||
{
|
{
|
||||||
// Database Server
|
// Database Server
|
||||||
String server = p_data.getDatabaseServer();
|
String server = p_data.getDatabaseServer();
|
||||||
boolean pass = server != null && server.length() > 0
|
boolean pass = server != null && server.length() > 0;
|
||||||
// vpj-cd e-evolution && server.toLowerCase().indexOf("localhost") == -1
|
// vpj-cd e-evolution && server.toLowerCase().indexOf("localhost") == -1
|
||||||
// vpj-cd e-evolution && !server.equals("127.0.0.1");
|
// vpj-cd e-evolution && !server.equals("127.0.0.1");
|
||||||
;
|
|
||||||
String error = "Not correct: DB Server = " + server;
|
String error = "Not correct: DB Server = " + server;
|
||||||
InetAddress databaseServer = null;
|
InetAddress databaseServer = null;
|
||||||
try
|
try
|
||||||
|
@ -156,28 +156,6 @@ public class ConfigPostgreSQL extends Config
|
||||||
setProperty(ConfigurationData.ADEMPIERE_DB_USER, databaseUser);
|
setProperty(ConfigurationData.ADEMPIERE_DB_USER, databaseUser);
|
||||||
setProperty(ConfigurationData.ADEMPIERE_DB_PASSWORD, databasePassword);
|
setProperty(ConfigurationData.ADEMPIERE_DB_PASSWORD, databasePassword);
|
||||||
|
|
||||||
/**
|
|
||||||
// TNS Name Info
|
|
||||||
String sqlplus = "sqlplus system/" + systemPassword + "@" + databaseName
|
|
||||||
+ " @utils/oracle/Test.sql";
|
|
||||||
log.config(sqlplus);
|
|
||||||
pass = testSQL(sqlplus);
|
|
||||||
error = "Error connecting via: " + sqlplus;
|
|
||||||
signalOK(getPanel().okDatabaseSQL, "ErrorTNS",
|
|
||||||
pass, true, error);
|
|
||||||
if (pass)
|
|
||||||
log.info("OK: Database SQL Connection");
|
|
||||||
|
|
||||||
// OCI Test
|
|
||||||
url = "jdbc:oracle:oci8:@" + databaseName;
|
|
||||||
pass = testJDBC(url, "system", systemPassword);
|
|
||||||
if (pass)
|
|
||||||
log.info("OK: Connection = " + url);
|
|
||||||
else
|
|
||||||
log.warning("Cannot connect via Net8: " + url);
|
|
||||||
setProperty(ConfigurationData.COMPIERE_DB_TNS, databaseName);
|
|
||||||
|
|
||||||
**/
|
|
||||||
return null;
|
return null;
|
||||||
} // test
|
} // test
|
||||||
|
|
||||||
|
@ -192,6 +170,7 @@ public class ConfigPostgreSQL extends Config
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@SuppressWarnings("unused")
|
||||||
Connection conn = p_db.getDriverConnection(url, uid, pwd);
|
Connection conn = p_db.getDriverConnection(url, uid, pwd);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
|
Loading…
Reference in New Issue