teiid SVN: r1420 - trunk/test-integration/db.
by teiid-commits@lists.jboss.org
Author: vhalbert(a)redhat.com
Date: 2009-09-18 22:37:21 -0400 (Fri, 18 Sep 2009)
New Revision: 1420
Modified:
trunk/test-integration/db/howto
trunk/test-integration/db/pom.xml
Log:
Teiid 773 - organize integration test
Modified: trunk/test-integration/db/howto
===================================================================
--- trunk/test-integration/db/howto 2009-09-18 23:59:02 UTC (rev 1419)
+++ trunk/test-integration/db/howto 2009-09-19 02:37:21 UTC (rev 1420)
@@ -39,7 +39,7 @@
2. CREATE TABLES
To create the tables on the defined datasource, run the maven profile to execute the process to create the required tables:
a. to setup all sources at one time, run: mvn pre-integration-test -P setupdatasources -Dmaven.test.skip=true
- b. to setup a specific source, run: mvn pre-integration-test -Ddatasource=<datasourcedir> -Psingleschema -Dmaven.test.skip=true
+ b. to setup a specific source, run: mvn pre-integration-test -Ddatasource=<datasourcedir> -Psingledatasource -Dmaven.test.skip=true
where <datasourcedir> is the name of the directory for the datasource
Modified: trunk/test-integration/db/pom.xml
===================================================================
--- trunk/test-integration/db/pom.xml 2009-09-18 23:59:02 UTC (rev 1419)
+++ trunk/test-integration/db/pom.xml 2009-09-19 02:37:21 UTC (rev 1420)
@@ -95,8 +95,16 @@
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
+ <additionalClasspathElements>
+ <additionalClasspathElement>${basedir}/lib/classes12_g.jar</additionalClasspathElement>
+ <additionalClasspathElement>${basedir}/lib/sqljdbc4.jar</additionalClasspathElement>
+ <additionalClasspathElement>${basedir}/lib/db2jcc4.jar</additionalClasspathElement>
+
+ </additionalClasspathElements>
+<!--
<forkMode>always</forkMode>
<forkedProcessTimeoutInSeconds>600</forkedProcessTimeoutInSeconds>
+ -->
<includes>
<!-- <include>**/*TestCase.java</include> -->
<include>**/*Test.java</include>
14 years, 8 months
teiid SVN: r1419 - trunk/build/kit-runtime/deploy.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2009-09-18 19:59:02 -0400 (Fri, 18 Sep 2009)
New Revision: 1419
Modified:
trunk/build/kit-runtime/deploy/admin-roles.properties
Log:
TEIID-840: Making instructions to remind the user to use the the domain name with the group name to fully qualify when mentioning them for roles
Modified: trunk/build/kit-runtime/deploy/admin-roles.properties
===================================================================
--- trunk/build/kit-runtime/deploy/admin-roles.properties 2009-09-18 23:58:47 UTC (rev 1418)
+++ trunk/build/kit-runtime/deploy/admin-roles.properties 2009-09-18 23:59:02 UTC (rev 1419)
@@ -1,10 +1,11 @@
# This file defines admin role grants for each user "group" in the system.
# based on the this permission the user will be able to call the admin
# function calls into the system. The following format needs to be used
-# define the permissions
+# define the permissions. Make sure the group names are fully qualified
+# with their membership domain names like "group@file"
-# role1 = groupA,groupB
-# role2 = groupB,groupC
+# role1 = groupA@domainA,groupB@domainB
+# role2 = groupB@domainB
# for group names check your membership provider configuration.
14 years, 8 months
teiid SVN: r1418 - branches/6.2.x/build/kit-runtime/deploy.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2009-09-18 19:58:47 -0400 (Fri, 18 Sep 2009)
New Revision: 1418
Modified:
branches/6.2.x/build/kit-runtime/deploy/admin-roles.properties
Log:
TEIID-840: Making instructions to remind the user to use the the domain name with the group name to fully qualify when mentioning them for roles
Modified: branches/6.2.x/build/kit-runtime/deploy/admin-roles.properties
===================================================================
--- branches/6.2.x/build/kit-runtime/deploy/admin-roles.properties 2009-09-18 23:20:08 UTC (rev 1417)
+++ branches/6.2.x/build/kit-runtime/deploy/admin-roles.properties 2009-09-18 23:58:47 UTC (rev 1418)
@@ -1,10 +1,11 @@
# This file defines admin role grants for each user "group" in the system.
# based on the this permission the user will be able to call the admin
# function calls into the system. The following format needs to be used
-# define the permissions
+# define the permissions. Make sure the group names are fully qualified
+# with their membership domain names like "group@file"
-# role1 = groupA,groupB
-# role2 = groupB,groupC
+# role1 = groupA@domainA,groupB@domainB
+# role2 = groupB@domainB
# for group names check your membership provider configuration.
14 years, 8 months
teiid SVN: r1417 - in trunk: runtime/src/main/java/com/metamatrix/dqp/embedded/admin and 1 other directory.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2009-09-18 19:20:08 -0400 (Fri, 18 Sep 2009)
New Revision: 1417
Modified:
trunk/build/kit-runtime/deploy.properties
trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/admin/DQPConfigAdminImpl.java
Log:
TEIID-842: Adding "dqp.config" property back. Fixed minor issue with connector type updating, as it was being updated when it is not required to.
Modified: trunk/build/kit-runtime/deploy.properties
===================================================================
--- trunk/build/kit-runtime/deploy.properties 2009-09-18 23:19:43 UTC (rev 1416)
+++ trunk/build/kit-runtime/deploy.properties 2009-09-18 23:20:08 UTC (rev 1417)
@@ -15,6 +15,9 @@
#Path to instance specific temporary information for caching, buffering, and transactions
dqp.workdir=./work
+#Path to the Teiid Configuration file (manages connector types and shared connector bindings)
+dqp.configFile=./deploy/configuration.xml
+
#Jars to load, which will be available to all services: UDFs, command logging, etc.
#dqp.extension.CommonClasspath=extensionjar:x.jar,extensionjar:y.jar
Modified: trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/admin/DQPConfigAdminImpl.java
===================================================================
--- trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/admin/DQPConfigAdminImpl.java 2009-09-18 23:19:43 UTC (rev 1416)
+++ trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/admin/DQPConfigAdminImpl.java 2009-09-18 23:20:08 UTC (rev 1417)
@@ -208,7 +208,7 @@
}
// now that all of the input parameters validated, add the connector binding
- binding = addConnectorBinding(deployName, binding, ctype, true);
+ binding = addConnectorBinding(deployName, binding, ctype, false);
} catch (MetaMatrixComponentException e) {
throw new AdminComponentException(e);
@@ -266,10 +266,14 @@
ConnectorBindingType type = ConnectorConfigurationReader.loadConnectorType(xmlFile);
// Check if the binding type exists already, if does take action based on user
- // preferences in the admin options, same rules apply as binding.
+ // preferences in the admin options, same rules apply as binding.
+ boolean addType = true;
if (bindingTypeExists(type.getName())) {
if (options.containsOption(AdminOptions.OnConflict.EXCEPTION)) {
throw new AdminProcessingException(DQPEmbeddedPlugin.Util.getString("Admin.addBinding_type_exists", deployName, type.getName())); //$NON-NLS-1$
+ }
+ else if (options.containsOption(AdminOptions.OnConflict.IGNORE)) {
+ addType = false;
}
}
@@ -285,7 +289,7 @@
}
// now that all of the input parameters validated, add the connector binding
- binding = addConnectorBinding(deployName, binding, type, true);
+ binding = addConnectorBinding(deployName, binding, type, addType);
} catch (MetaMatrixComponentException e) {
throw new AdminComponentException(e);
@@ -302,7 +306,7 @@
* @param options
* @throws AdminException
*/
- ConnectorBinding addConnectorBinding(String deployName, ConnectorBinding binding, ConnectorBindingType type, boolean replace)
+ ConnectorBinding addConnectorBinding(String deployName, ConnectorBinding binding, ConnectorBindingType type, boolean addType)
throws AdminException {
// Make sure we have both correctly configured
if (type != null && binding != null) {
@@ -310,11 +314,11 @@
try {
// First add the connector type if one is not already in here.
- if (getConfigurationService().getConnectorType(type.getName()) == null || replace) {
+ if (getConfigurationService().getConnectorType(type.getName()) == null || addType) {
saveConnectorType(type);
}
// Now add the connector binding.
- binding = getConfigurationService().addConnectorBinding(deployName, binding, replace);
+ binding = getConfigurationService().addConnectorBinding(deployName, binding, true);
return binding;
} catch (MetaMatrixComponentException e) {
throw new AdminComponentException(e);
14 years, 8 months
teiid SVN: r1416 - in branches/6.2.x: runtime/src/main/java/com/metamatrix/dqp/embedded/admin and 1 other directory.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2009-09-18 19:19:43 -0400 (Fri, 18 Sep 2009)
New Revision: 1416
Modified:
branches/6.2.x/build/kit-runtime/deploy.properties
branches/6.2.x/runtime/src/main/java/com/metamatrix/dqp/embedded/admin/DQPConfigAdminImpl.java
Log:
TEIID-842: Adding "dqp.config" property back. Fixed minor issue with connector type updating, as it was being updated when it is not required to.
Modified: branches/6.2.x/build/kit-runtime/deploy.properties
===================================================================
--- branches/6.2.x/build/kit-runtime/deploy.properties 2009-09-18 22:50:39 UTC (rev 1415)
+++ branches/6.2.x/build/kit-runtime/deploy.properties 2009-09-18 23:19:43 UTC (rev 1416)
@@ -15,6 +15,9 @@
#Path to instance specific temporary information for caching, buffering, and transactions
dqp.workdir=./work
+#Path to the Teiid Configuration file (manages connector types and shared connector bindings)
+dqp.configFile=./deploy/configuration.xml
+
#Jars to load, which will be available to all services: UDFs, command logging, etc.
#dqp.extension.CommonClasspath=extensionjar:x.jar,extensionjar:y.jar
Modified: branches/6.2.x/runtime/src/main/java/com/metamatrix/dqp/embedded/admin/DQPConfigAdminImpl.java
===================================================================
--- branches/6.2.x/runtime/src/main/java/com/metamatrix/dqp/embedded/admin/DQPConfigAdminImpl.java 2009-09-18 22:50:39 UTC (rev 1415)
+++ branches/6.2.x/runtime/src/main/java/com/metamatrix/dqp/embedded/admin/DQPConfigAdminImpl.java 2009-09-18 23:19:43 UTC (rev 1416)
@@ -208,7 +208,7 @@
}
// now that all of the input parameters validated, add the connector binding
- binding = addConnectorBinding(deployName, binding, ctype, true);
+ binding = addConnectorBinding(deployName, binding, ctype, false);
} catch (MetaMatrixComponentException e) {
throw new AdminComponentException(e);
@@ -266,10 +266,14 @@
ConnectorBindingType type = ConnectorConfigurationReader.loadConnectorType(xmlFile);
// Check if the binding type exists already, if does take action based on user
- // preferences in the admin options, same rules apply as binding.
+ // preferences in the admin options, same rules apply as binding.
+ boolean addType = true;
if (bindingTypeExists(type.getName())) {
if (options.containsOption(AdminOptions.OnConflict.EXCEPTION)) {
throw new AdminProcessingException(DQPEmbeddedPlugin.Util.getString("Admin.addBinding_type_exists", deployName, type.getName())); //$NON-NLS-1$
+ }
+ else if (options.containsOption(AdminOptions.OnConflict.IGNORE)) {
+ addType = false;
}
}
@@ -285,7 +289,7 @@
}
// now that all of the input parameters validated, add the connector binding
- binding = addConnectorBinding(deployName, binding, type, true);
+ binding = addConnectorBinding(deployName, binding, type, addType);
} catch (MetaMatrixComponentException e) {
throw new AdminComponentException(e);
@@ -302,7 +306,7 @@
* @param options
* @throws AdminException
*/
- ConnectorBinding addConnectorBinding(String deployName, ConnectorBinding binding, ConnectorBindingType type, boolean replace)
+ ConnectorBinding addConnectorBinding(String deployName, ConnectorBinding binding, ConnectorBindingType type, boolean addType)
throws AdminException {
// Make sure we have both correctly configured
if (type != null && binding != null) {
@@ -310,11 +314,11 @@
try {
// First add the connector type if one is not already in here.
- if (getConfigurationService().getConnectorType(type.getName()) == null || replace) {
+ if (getConfigurationService().getConnectorType(type.getName()) == null || addType) {
saveConnectorType(type);
}
// Now add the connector binding.
- binding = getConfigurationService().addConnectorBinding(deployName, binding, replace);
+ binding = getConfigurationService().addConnectorBinding(deployName, binding, true);
return binding;
} catch (MetaMatrixComponentException e) {
throw new AdminComponentException(e);
14 years, 8 months
teiid SVN: r1415 - trunk/adminshell/src/main/resources/scripts.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2009-09-18 18:50:39 -0400 (Fri, 18 Sep 2009)
New Revision: 1415
Modified:
trunk/adminshell/src/main/resources/scripts/adminapi.bsh
Log:
TEIID-841: contents is not boolean, it needs to be checked for null
Modified: trunk/adminshell/src/main/resources/scripts/adminapi.bsh
===================================================================
--- trunk/adminshell/src/main/resources/scripts/adminapi.bsh 2009-09-18 22:50:12 UTC (rev 1414)
+++ trunk/adminshell/src/main/resources/scripts/adminapi.bsh 2009-09-18 22:50:39 UTC (rev 1415)
@@ -382,7 +382,7 @@
contents = currentContext().internalAdmin.exportExtensionModule(sourceName);
- if (contents) {
+ if (contents != null) {
ObjectConverterUtil.write(contents, fileName);
}
else {
14 years, 8 months
teiid SVN: r1414 - branches/6.2.x/adminshell/src/main/resources/scripts.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2009-09-18 18:50:12 -0400 (Fri, 18 Sep 2009)
New Revision: 1414
Modified:
branches/6.2.x/adminshell/src/main/resources/scripts/adminapi.bsh
Log:
TEIID-841: contents is not boolean, it needs to be checked for null
Modified: branches/6.2.x/adminshell/src/main/resources/scripts/adminapi.bsh
===================================================================
--- branches/6.2.x/adminshell/src/main/resources/scripts/adminapi.bsh 2009-09-18 22:09:54 UTC (rev 1413)
+++ branches/6.2.x/adminshell/src/main/resources/scripts/adminapi.bsh 2009-09-18 22:50:12 UTC (rev 1414)
@@ -382,7 +382,7 @@
contents = currentContext().internalAdmin.exportExtensionModule(sourceName);
- if (contents) {
+ if (contents != null) {
ObjectConverterUtil.write(contents, fileName);
}
else {
14 years, 8 months
teiid SVN: r1413 - in trunk/test-integration/db: lib and 1 other directory.
by teiid-commits@lists.jboss.org
Author: vhalbert(a)redhat.com
Date: 2009-09-18 18:09:54 -0400 (Fri, 18 Sep 2009)
New Revision: 1413
Added:
trunk/test-integration/db/lib/
trunk/test-integration/db/lib/readme.txt
Log:
Teiid 773 - organize integration test - the lib directory will be the location that 3rd party jdbc drivers should be placed.
Added: trunk/test-integration/db/lib/readme.txt
===================================================================
--- trunk/test-integration/db/lib/readme.txt (rev 0)
+++ trunk/test-integration/db/lib/readme.txt 2009-09-18 22:09:54 UTC (rev 1413)
@@ -0,0 +1 @@
+# This directory is where 3rd party jdbc drivers should be placed.
\ No newline at end of file
Property changes on: trunk/test-integration/db/lib/readme.txt
___________________________________________________________________
Name: svn:mime-type
+ text/plain
14 years, 8 months
teiid SVN: r1412 - trunk/test-integration/db/src/main/resources/datasources.
by teiid-commits@lists.jboss.org
Author: vhalbert(a)redhat.com
Date: 2009-09-18 17:52:56 -0400 (Fri, 18 Sep 2009)
New Revision: 1412
Modified:
trunk/test-integration/db/src/main/resources/datasources/datasource_mapping.xml
Log:
Teiid 773 - organize integration test - setting up the product resources needed to execute the teiid-test-integration db tests
Modified: trunk/test-integration/db/src/main/resources/datasources/datasource_mapping.xml
===================================================================
--- trunk/test-integration/db/src/main/resources/datasources/datasource_mapping.xml 2009-09-18 20:07:15 UTC (rev 1411)
+++ trunk/test-integration/db/src/main/resources/datasources/datasource_mapping.xml 2009-09-18 21:52:56 UTC (rev 1412)
@@ -31,36 +31,24 @@
<datasourceconfig>
<datasourcetype name="nonxa">
- <datasource name="ds_mysql_5">
- <property name="dir">mysql_5</property>
+ <datasource name="ds_mysql">
+ <property name="dir">mysql</property>
<property name="connectortype">MySQL JDBC Connector</property>
</datasource>
- <datasource name="ds_oracle_9">
- <property name="dir">oracle_9</property>
+ <datasource name="ds_oracle">
+ <property name="dir">oracle</property>
<property name="connectortype">Oracle Connector</property>
</datasource>
- <datasource name="ds_oracle_10">
- <property name="dir">oracle_10</property>
- <property name="connectortype">Oracle Connector</property>
- </datasource>
- <datasource name="ds_oracle_11">
- <property name="dir">oracle_11</property>
- <property name="connectortype">Oracle Connector</property>
- </datasource>
- <datasource name="ds_sqlserver_2005">
- <property name="dir">sqlserver_2005</property>
+ <datasource name="ds_sqlserver">
+ <property name="dir">sqlserver</property>
<property name="connectortype">SQL Server Connector</property>
</datasource>
- <datasource name="ds_sqlserver_2008">
- <property name="dir">sqlserver_2008</property>
- <property name="connectortype">SQL Server Connector</property>
- </datasource>
- <datasource name="ds_db2_9">
- <property name="dir">db2_9</property>
+ <datasource name="ds_db2">
+ <property name="dir">db2</property>
<property name="connectortype">DB2 Connector</property>
</datasource>
- <datasource name="ds_postgres_81">
- <property name="dir">postgres_81</property>
+ <datasource name="ds_postgres">
+ <property name="dir">postgres</property>
<property name="connectortype">PostgreSQL JDBC Connector</property>
</datasource>
@@ -72,36 +60,24 @@
</datasourcetype>
<datasourcetype name="xa">
- <datasource name="ds_mysql_5_xa">
- <property name="dir">mysql_5</property>
+ <datasource name="ds_mysql_xa">
+ <property name="dir">mysql</property>
<property name="connectortype">MySQL JDBC XA Connector</property>
</datasource>
- <datasource name="ds_oracle_11_xa">
- <property name="dir">oracle_11</property>
+ <datasource name="ds_oracle_xa">
+ <property name="dir">oracle</property>
<property name="connectortype">Oracle XA Connector</property>
- </datasource>
- <datasource name="ds_oracle_10_xa">
- <property name="dir">oracle_10</property>
- <property name="connectortype">Oracle XA Connector</property>
- </datasource>
- <datasource name="ds_oracle_9_xa">
- <property name="dir">oracle_9</property>
- <property name="connectortype">Oracle XA Connector</property>
</datasource>
- <datasource name="ds_sqlserver_2005">
- <property name="dir">sqlserver_2005</property>
+ <datasource name="ds_sqlserver">
+ <property name="dir">sqlserver</property>
<property name="connectortype">SQL Server XA Connector</property>
</datasource>
- <datasource name="ds_sqlserver_2008">
- <property name="dir">sqlserver_2008</property>
- <property name="connectortype">SQL Server XA Connector</property>
- </datasource>
- <datasource name="ds_db2_9_xa">
- <property name="dir">db2_9</property>
+ <datasource name="ds_db2_xa">
+ <property name="dir">db2</property>
<property name="connectortype">DB2 XA Connector</property>
</datasource>
- <datasource name="ds_postgres_81_xa">
- <property name="dir">postgres_81</property>
+ <datasource name="ds_postgres_xa">
+ <property name="dir">postgres</property>
<property name="connectortype">PostgreSQL XA JDBC Connector</property>
</datasource>
14 years, 8 months
teiid SVN: r1411 - in trunk: 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:07:15 -0400 (Fri, 18 Sep 2009)
New Revision: 1411
Modified:
trunk/adminshell/src/main/resources/scripts/util.bsh
trunk/client/src/main/java/com/metamatrix/common/comm/platform/client/ServerAdminFactory.java
trunk/client/src/main/java/com/metamatrix/common/comm/platform/socket/client/SocketServerConnection.java
trunk/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: trunk/adminshell/src/main/resources/scripts/util.bsh
===================================================================
--- trunk/adminshell/src/main/resources/scripts/util.bsh 2009-09-18 20:05:14 UTC (rev 1410)
+++ trunk/adminshell/src/main/resources/scripts/util.bsh 2009-09-18 20:07:15 UTC (rev 1411)
@@ -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: trunk/client/src/main/java/com/metamatrix/common/comm/platform/client/ServerAdminFactory.java
===================================================================
--- trunk/client/src/main/java/com/metamatrix/common/comm/platform/client/ServerAdminFactory.java 2009-09-18 20:05:14 UTC (rev 1410)
+++ trunk/client/src/main/java/com/metamatrix/common/comm/platform/client/ServerAdminFactory.java 2009-09-18 20:07:15 UTC (rev 1411)
@@ -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: trunk/client/src/main/java/com/metamatrix/common/comm/platform/socket/client/SocketServerConnection.java
===================================================================
--- trunk/client/src/main/java/com/metamatrix/common/comm/platform/socket/client/SocketServerConnection.java 2009-09-18 20:05:14 UTC (rev 1410)
+++ trunk/client/src/main/java/com/metamatrix/common/comm/platform/socket/client/SocketServerConnection.java 2009-09-18 20:07:15 UTC (rev 1411)
@@ -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: trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedConfigurationService.java
===================================================================
--- trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedConfigurationService.java 2009-09-18 20:05:14 UTC (rev 1410)
+++ trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedConfigurationService.java 2009-09-18 20:07:15 UTC (rev 1411)
@@ -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);
+ }
}
}
};
14 years, 8 months