teiid SVN: r1410 - in branches/6.2.x: client/src/main/java/com/metamatrix/common/comm/platform/client and 2 other directories.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2009-09-18 16:05:14 -0400 (Fri, 18 Sep 2009)
New Revision: 1410
Modified:
branches/6.2.x/adminshell/src/main/resources/scripts/util.bsh
branches/6.2.x/client/src/main/java/com/metamatrix/common/comm/platform/client/ServerAdminFactory.java
branches/6.2.x/client/src/main/java/com/metamatrix/common/comm/platform/socket/client/SocketServerConnection.java
branches/6.2.x/runtime/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedConfigurationService.java
Log:
TEIID-839 - admin connection does not use VDB, so there will not be any VDB in the connection properties. Also, reconnecting proxy in ServeradminFacory does not recycle the connection when CommunicationException occurs.
Modified: branches/6.2.x/adminshell/src/main/resources/scripts/util.bsh
===================================================================
--- branches/6.2.x/adminshell/src/main/resources/scripts/util.bsh 2009-09-18 20:00:24 UTC (rev 1409)
+++ branches/6.2.x/adminshell/src/main/resources/scripts/util.bsh 2009-09-18 20:05:14 UTC (rev 1410)
@@ -2,6 +2,7 @@
import org.teiid.adminapi.*;
import com.metamatrix.core.util.*;
import java.lang.reflect.*;
+import com.metamatrix.common.comm.exception.*;
debug=false;
@@ -194,10 +195,23 @@
throw ex;
}
} catch(Throwable t) {
- msg = t.getMessage();
- if (msg != null) {
- print(msg);
+ if (interactive()) {
+ msg = t.getMessage();
+ if (msg != null) {
+ print(msg);
+ }
+ t = t.getCause();
+ if (t instanceof SingleInstanceCommunicationException) {
+ print("Lost Connection; disconnecting..");
+ disconnect();
+ }
+ debug(t);
}
+ else {
+ print("Lost Connection; disconnecting..");
+ disconnect();
+ throw t;
+ }
}
return null;
}
Modified: branches/6.2.x/client/src/main/java/com/metamatrix/common/comm/platform/client/ServerAdminFactory.java
===================================================================
--- branches/6.2.x/client/src/main/java/com/metamatrix/common/comm/platform/client/ServerAdminFactory.java 2009-09-18 20:00:24 UTC (rev 1409)
+++ branches/6.2.x/client/src/main/java/com/metamatrix/common/comm/platform/client/ServerAdminFactory.java 2009-09-18 20:05:14 UTC (rev 1410)
@@ -96,9 +96,14 @@
try {
return method.invoke(getTarget(), args);
} catch (InvocationTargetException e) {
- if (method.getName().endsWith("restart") && ExceptionUtil.getExceptionOfType(e, CommunicationException.class) != null) { //$NON-NLS-1$
- bounceSystem(true);
- return null;
+ if (ExceptionUtil.getExceptionOfType(e, CommunicationException.class) != null) {
+ // communication exception occurred, lose the old connection and try again.
+ this.target = null;
+ if (method.getName().endsWith("restart")) { //$NON-NLS-1$
+ bounceSystem(true);
+ return null;
+ }
+ continue;
}
throw e.getTargetException();
} catch (CommunicationException e) {
@@ -128,6 +133,7 @@
} catch (InterruptedException e) {
throw new MetaMatrixRuntimeException(e);
}
+
//we'll wait 30 seconds for the server to come back up
for (int i = 0; i < 15; i++) {
try {
Modified: branches/6.2.x/client/src/main/java/com/metamatrix/common/comm/platform/socket/client/SocketServerConnection.java
===================================================================
--- branches/6.2.x/client/src/main/java/com/metamatrix/common/comm/platform/socket/client/SocketServerConnection.java 2009-09-18 20:00:24 UTC (rev 1409)
+++ branches/6.2.x/client/src/main/java/com/metamatrix/common/comm/platform/socket/client/SocketServerConnection.java 2009-09-18 20:05:14 UTC (rev 1410)
@@ -108,7 +108,7 @@
return;
}
} catch (InvalidSessionException e) {
- shutdown();
+ shutdown(false);
} catch (MetaMatrixComponentException e) {
shutdown();
}
@@ -143,17 +143,17 @@
Exception ex = null;
try {
SocketServerInstance instance = connectionFactory.getServerInstance(hostInfo, secure);
+ this.serverInstance = instance;
if (this.logonResult != null) {
ILogon newLogon = instance.getService(ILogon.class);
newLogon.assertIdentity(logonResult.getSessionToken());
}
this.serverDiscovery.connectionSuccessful(hostInfo);
- this.serverInstance = instance;
return this.serverInstance;
} catch (IOException e) {
ex = e;
} catch (InvalidSessionException e) {
- shutdown();
+ shutdown(false);
throw new CommunicationException(e,CommPlatformPlugin.Util.getString("SocketServerInstance.Connection_Error.Connect_Failed", hostInfo.getHostName(), String.valueOf(hostInfo.getPortNumber()), e.getMessage())); //$NON-NLS-1$
} catch (SingleInstanceCommunicationException e) {
ex = e;
@@ -244,23 +244,28 @@
public <T> T getService(Class<T> iface) {
return (T)Proxy.newProxyInstance(this.getClass().getClassLoader(), new Class[] {iface}, new ServerConnectionInvocationHandler(iface));
}
-
public synchronized void shutdown() {
+ shutdown(true);
+ }
+ private synchronized void shutdown(boolean logoff) {
if (this.closed) {
return;
}
- try {
- //make a best effort to send the logoff
- Future<?> writeFuture = this.logon.logoff();
- writeFuture.get(5000, TimeUnit.MILLISECONDS);
- } catch (InvalidSessionException e) {
- //ignore
- } catch (InterruptedException e) {
- //ignore
- } catch (ExecutionException e) {
- //ignore
- } catch (TimeoutException e) {
- //ignore
+
+ if (logoff) {
+ try {
+ //make a best effort to send the logoff
+ Future<?> writeFuture = this.logon.logoff();
+ writeFuture.get(5000, TimeUnit.MILLISECONDS);
+ } catch (InvalidSessionException e) {
+ //ignore
+ } catch (InterruptedException e) {
+ //ignore
+ } catch (ExecutionException e) {
+ //ignore
+ } catch (TimeoutException e) {
+ //ignore
+ }
}
closeServerInstance();
Modified: branches/6.2.x/runtime/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedConfigurationService.java
===================================================================
--- branches/6.2.x/runtime/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedConfigurationService.java 2009-09-18 20:00:24 UTC (rev 1409)
+++ branches/6.2.x/runtime/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedConfigurationService.java 2009-09-18 20:05:14 UTC (rev 1410)
@@ -1214,11 +1214,12 @@
* A Client Connection to DQP has been removed
*/
public void sessionClosed(MetaMatrixSessionInfo session) {
-
String vdbName = session.getProductInfo(ProductInfoConstants.VIRTUAL_DB);
String vdbVersion = session.getProductInfo(ProductInfoConstants.VDB_VERSION);
- if (canDeleteVDB(vdbName, vdbVersion)) {
- runVDBCleanUp(vdbName, vdbVersion);
+ if (vdbName != null && vdbVersion != null) {
+ if (canDeleteVDB(vdbName, vdbVersion)) {
+ runVDBCleanUp(vdbName, vdbVersion);
+ }
}
}
};
15 years, 4 months
teiid SVN: r1409 - in trunk/test-integration/db/src/main/resources/datasources: postgres and 1 other directory.
by teiid-commits@lists.jboss.org
Author: vhalbert(a)redhat.com
Date: 2009-09-18 16:00:24 -0400 (Fri, 18 Sep 2009)
New Revision: 1409
Added:
trunk/test-integration/db/src/main/resources/datasources/postgres/
trunk/test-integration/db/src/main/resources/datasources/postgres/example_connection.properties
Log:
Teiid 773 - organize integration test - setting up the product resources needed to execute the teiid-test-integration db tests
Added: trunk/test-integration/db/src/main/resources/datasources/postgres/example_connection.properties
===================================================================
--- trunk/test-integration/db/src/main/resources/datasources/postgres/example_connection.properties (rev 0)
+++ trunk/test-integration/db/src/main/resources/datasources/postgres/example_connection.properties 2009-09-18 20:00:24 UTC (rev 1409)
@@ -0,0 +1,16 @@
+# db.type must match a ddl folder
+db.type=postgres
+driver=org.postgresql.Driver
+URL=jdbc:postgresql://(servername):5432/(databasename)
+User=
+Password=
+
+servername=(servername)
+databasename=(databasename)
+portnumber=5432
+ds-jndiname=(servername)_5432
+
+Immutable=true
+
+
+
Property changes on: trunk/test-integration/db/src/main/resources/datasources/postgres/example_connection.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 4 months
teiid SVN: r1408 - trunk/test-integration/db/src/main/resources/datasources/derby.
by teiid-commits@lists.jboss.org
Author: vhalbert(a)redhat.com
Date: 2009-09-18 15:58:02 -0400 (Fri, 18 Sep 2009)
New Revision: 1408
Added:
trunk/test-integration/db/src/main/resources/datasources/derby/example_connection.properties
Removed:
trunk/test-integration/db/src/main/resources/datasources/derby/connection.properties
trunk/test-integration/db/src/main/resources/datasources/derby/xconnection.properties
Log:
Teiid 773 - organize integration test - setting up the product resources needed to execute the teiid-test-integration db tests
Deleted: trunk/test-integration/db/src/main/resources/datasources/derby/connection.properties
===================================================================
--- trunk/test-integration/db/src/main/resources/datasources/derby/connection.properties 2009-09-18 19:56:29 UTC (rev 1407)
+++ trunk/test-integration/db/src/main/resources/datasources/derby/connection.properties 2009-09-18 19:58:02 UTC (rev 1408)
@@ -1,22 +0,0 @@
-db.type=derby
-driver=org.apache.derby.jdbc.ClientDriver
-URL=jdbc:derby://localhost:1527//Users/vanhalbert/svn/projects/teiid/trunk/test-integration-keep/derby/teiid
-User=rep_unit_test
-#rep_unit_test
-Password=mm
-
-servername=localhost
-databasename=rep_unit_test
-portnumber=1527
-ds-jndiname=localhost_1527
-
-Immutable=true
-
-#adminuser=root
-#adminpassword=mmroot
-#adminurl=jdbc:mysql://slntds03.mm.atl2.redhat.com:3306
-
-
-
-
-
Copied: trunk/test-integration/db/src/main/resources/datasources/derby/example_connection.properties (from rev 1403, trunk/test-integration/db/src/main/resources/datasources/derby/connection.properties)
===================================================================
--- trunk/test-integration/db/src/main/resources/datasources/derby/example_connection.properties (rev 0)
+++ trunk/test-integration/db/src/main/resources/datasources/derby/example_connection.properties 2009-09-18 19:58:02 UTC (rev 1408)
@@ -0,0 +1,13 @@
+db.type=derby
+driver=org.apache.derby.jdbc.ClientDriver
+URL=jdbc:derby://localhost:1527//(derbyinstallloc)
+User=
+Password=
+
+servername=localhost
+databasename=(databasename)
+portnumber=1527
+ds-jndiname=localhost_1527
+
+Immutable=true
+
Property changes on: trunk/test-integration/db/src/main/resources/datasources/derby/example_connection.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: trunk/test-integration/db/src/main/resources/datasources/derby/xconnection.properties
===================================================================
--- trunk/test-integration/db/src/main/resources/datasources/derby/xconnection.properties 2009-09-18 19:56:29 UTC (rev 1407)
+++ trunk/test-integration/db/src/main/resources/datasources/derby/xconnection.properties 2009-09-18 19:58:02 UTC (rev 1408)
@@ -1,22 +0,0 @@
-db.type=derby
-driver=org.apache.derby.jdbc.ClientDriver
-URL=jdbc:derby://localhost:1527//Users/vanhalbert/svn/projects/teiid/trunk/test-integration-keep/derby/teiid
-User=rep_unit_test
-#rep_unit_test
-Password=mm
-
-servername=localhost
-databasename=rep_unit_test
-portnumber=1527
-ds-jndiname=localhost_1527
-
-Immutable=true
-
-#adminuser=root
-#adminpassword=mmroot
-#adminurl=jdbc:mysql://slntds03.mm.atl2.redhat.com:3306
-
-
-
-
-
15 years, 4 months
teiid SVN: r1407 - trunk/test-integration/db/src/main/resources/datasources/sqlserver.
by teiid-commits@lists.jboss.org
Author: vhalbert(a)redhat.com
Date: 2009-09-18 15:56:29 -0400 (Fri, 18 Sep 2009)
New Revision: 1407
Added:
trunk/test-integration/db/src/main/resources/datasources/sqlserver/example_connection.properties
Log:
Teiid 773 - organize integration test - setting up the product resources needed to execute the teiid-test-integration db tests
Added: trunk/test-integration/db/src/main/resources/datasources/sqlserver/example_connection.properties
===================================================================
--- trunk/test-integration/db/src/main/resources/datasources/sqlserver/example_connection.properties (rev 0)
+++ trunk/test-integration/db/src/main/resources/datasources/sqlserver/example_connection.properties 2009-09-18 19:56:29 UTC (rev 1407)
@@ -0,0 +1,18 @@
+# db.type must match a ddl folder
+db.type=sqlserver
+driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
+URL=jdbc:sqlserver://(servername):1433;databaseName=(databasename)
+User=
+Password=
+
+servername=(servername)
+databasename=(databasename)
+portnumber=1433
+ds-jndiname=microsoft_1433
+
+Immutable=true
+
+
+
+
+
Property changes on: trunk/test-integration/db/src/main/resources/datasources/sqlserver/example_connection.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 4 months
teiid SVN: r1406 - trunk/test-integration/db/src/main/resources/datasources/oracle.
by teiid-commits@lists.jboss.org
Author: vhalbert(a)redhat.com
Date: 2009-09-18 15:56:15 -0400 (Fri, 18 Sep 2009)
New Revision: 1406
Added:
trunk/test-integration/db/src/main/resources/datasources/oracle/example_connection.properties
Log:
Teiid 773 - organize integration test - setting up the product resources needed to execute the teiid-test-integration db tests
Added: trunk/test-integration/db/src/main/resources/datasources/oracle/example_connection.properties
===================================================================
--- trunk/test-integration/db/src/main/resources/datasources/oracle/example_connection.properties (rev 0)
+++ trunk/test-integration/db/src/main/resources/datasources/oracle/example_connection.properties 2009-09-18 19:56:15 UTC (rev 1406)
@@ -0,0 +1,18 @@
+# db.type must match a ddl folder
+db.type=oracle
+driver=oracle.jdbc.OracleDriver
+URL=jdbc:oracle:thin:@(servername):1521:(sid)
+User=
+Password=
+
+servername=(servername)
+databasename=(databasename)
+portnumber=1527
+ds-jndiname=(servername)_1527
+
+Immutable=true
+
+
+
+
+
Property changes on: trunk/test-integration/db/src/main/resources/datasources/oracle/example_connection.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 4 months
teiid SVN: r1405 - trunk/test-integration/db/src/main/resources/datasources/mysql.
by teiid-commits@lists.jboss.org
Author: vhalbert(a)redhat.com
Date: 2009-09-18 15:54:41 -0400 (Fri, 18 Sep 2009)
New Revision: 1405
Added:
trunk/test-integration/db/src/main/resources/datasources/mysql/example_connection.properties
Removed:
trunk/test-integration/db/src/main/resources/datasources/mysql/xconnection.properties
Log:
Teiid 773 - organize integration test - setting up the product resources needed to execute the teiid-test-integration db tests
Added: trunk/test-integration/db/src/main/resources/datasources/mysql/example_connection.properties
===================================================================
--- trunk/test-integration/db/src/main/resources/datasources/mysql/example_connection.properties (rev 0)
+++ trunk/test-integration/db/src/main/resources/datasources/mysql/example_connection.properties 2009-09-18 19:54:41 UTC (rev 1405)
@@ -0,0 +1,18 @@
+# db.type must match a ddl folder and it also represents the ANT sql datatype used during execution
+db.type=mysql
+driver=com.mysql.jdbc.Driver
+URL=jdbc:mysql://(servername):3306/(databasename)
+User=
+Password=
+
+servername=(servername)
+databasename=(databasename)
+portnumber=3306
+ds-jndiname=mysql_3306
+
+Immutable=true
+
+
+
+
+
Deleted: trunk/test-integration/db/src/main/resources/datasources/mysql/xconnection.properties
===================================================================
--- trunk/test-integration/db/src/main/resources/datasources/mysql/xconnection.properties 2009-09-18 19:53:54 UTC (rev 1404)
+++ trunk/test-integration/db/src/main/resources/datasources/mysql/xconnection.properties 2009-09-18 19:54:41 UTC (rev 1405)
@@ -1,22 +0,0 @@
-db.type=mysql
-driver=com.mysql.jdbc.Driver
-URL=jdbc:mysql://slntds03.mm.atl2.redhat.com:3306/rep_unit_test
-User=rep_unit_test
-#rep_unit_test
-Password=mm
-
-servername=slntds03.mm.atl2.redhat.com
-databasename=rep_unit_test
-portnumber=3306
-ds-jndiname=slntds03_mysql
-
-Immutable=true
-
-#adminuser=root
-#adminpassword=mmroot
-#adminurl=jdbc:mysql://slntds03.mm.atl2.redhat.com:3306
-
-
-
-
-
15 years, 4 months
teiid SVN: r1404 - in trunk/test-integration/db/src/main/resources/datasources: derby and 1 other directories.
by teiid-commits@lists.jboss.org
Author: vhalbert(a)redhat.com
Date: 2009-09-18 15:53:54 -0400 (Fri, 18 Sep 2009)
New Revision: 1404
Added:
trunk/test-integration/db/src/main/resources/datasources/derby/xconnection.properties
trunk/test-integration/db/src/main/resources/datasources/mysql/
trunk/test-integration/db/src/main/resources/datasources/mysql/xconnection.properties
trunk/test-integration/db/src/main/resources/datasources/oracle/
trunk/test-integration/db/src/main/resources/datasources/sqlserver/
Log:
Teiid 773 - organize integration test - setting up the product resources needed to execute the teiid-test-integration db tests
Added: trunk/test-integration/db/src/main/resources/datasources/derby/xconnection.properties
===================================================================
--- trunk/test-integration/db/src/main/resources/datasources/derby/xconnection.properties (rev 0)
+++ trunk/test-integration/db/src/main/resources/datasources/derby/xconnection.properties 2009-09-18 19:53:54 UTC (rev 1404)
@@ -0,0 +1,22 @@
+db.type=derby
+driver=org.apache.derby.jdbc.ClientDriver
+URL=jdbc:derby://localhost:1527//Users/vanhalbert/svn/projects/teiid/trunk/test-integration-keep/derby/teiid
+User=rep_unit_test
+#rep_unit_test
+Password=mm
+
+servername=localhost
+databasename=rep_unit_test
+portnumber=1527
+ds-jndiname=localhost_1527
+
+Immutable=true
+
+#adminuser=root
+#adminpassword=mmroot
+#adminurl=jdbc:mysql://slntds03.mm.atl2.redhat.com:3306
+
+
+
+
+
Property changes on: trunk/test-integration/db/src/main/resources/datasources/derby/xconnection.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/test-integration/db/src/main/resources/datasources/mysql/xconnection.properties
===================================================================
--- trunk/test-integration/db/src/main/resources/datasources/mysql/xconnection.properties (rev 0)
+++ trunk/test-integration/db/src/main/resources/datasources/mysql/xconnection.properties 2009-09-18 19:53:54 UTC (rev 1404)
@@ -0,0 +1,22 @@
+db.type=mysql
+driver=com.mysql.jdbc.Driver
+URL=jdbc:mysql://slntds03.mm.atl2.redhat.com:3306/rep_unit_test
+User=rep_unit_test
+#rep_unit_test
+Password=mm
+
+servername=slntds03.mm.atl2.redhat.com
+databasename=rep_unit_test
+portnumber=3306
+ds-jndiname=slntds03_mysql
+
+Immutable=true
+
+#adminuser=root
+#adminpassword=mmroot
+#adminurl=jdbc:mysql://slntds03.mm.atl2.redhat.com:3306
+
+
+
+
+
Property changes on: trunk/test-integration/db/src/main/resources/datasources/mysql/xconnection.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 4 months