[teiid-commits] teiid SVN: r2908 - in branches/7.1.x/console/src/main: java/org/teiid/rhq/plugin and 1 other directories.

teiid-commits at lists.jboss.org teiid-commits at lists.jboss.org
Tue Feb 15 12:57:45 EST 2011


Author: tejones
Date: 2011-02-15 12:57:45 -0500 (Tue, 15 Feb 2011)
New Revision: 2908

Modified:
   branches/7.1.x/console/src/main/java/org/teiid/rhq/admin/DQPManagementView.java
   branches/7.1.x/console/src/main/java/org/teiid/rhq/plugin/PlatformComponent.java
   branches/7.1.x/console/src/main/resources/META-INF/rhq-plugin.xml
Log:
TEIID-1469: Changed session id (and transaction id) from Long to String

Modified: branches/7.1.x/console/src/main/java/org/teiid/rhq/admin/DQPManagementView.java
===================================================================
--- branches/7.1.x/console/src/main/java/org/teiid/rhq/admin/DQPManagementView.java	2011-02-15 03:12:21 UTC (rev 2907)
+++ branches/7.1.x/console/src/main/java/org/teiid/rhq/admin/DQPManagementView.java	2011-02-15 17:57:45 UTC (rev 2908)
@@ -212,7 +212,7 @@
 			getTransactionCollectionValue(transactionMetaValue,transactionsCollection);
 			operationResult.setContent(createReportResultList(fieldNameList,	resultObject.iterator()));
 		} else if (operationName.equals(Platform.Operations.KILL_TRANSACTION)) {
-			Long sessionID = (Long) valueMap.get(Operation.Value.TRANSACTION_ID);
+			String sessionID = (String) valueMap.get(Operation.Value.TRANSACTION_ID);
 			MetaValue[] args = new MetaValue[] { SimpleValueSupport.wrap(sessionID) };
 			try {
 				executeManagedOperation(connection, getRuntimeEngineDeployer(connection, mc), Platform.Operations.KILL_TRANSACTION, args);
@@ -221,7 +221,7 @@
 				LOG.error(msg, e);
 			}
 		} else if (operationName.equals(Platform.Operations.KILL_SESSION)) {
-			Long sessionID = (Long) valueMap.get(Operation.Value.SESSION_ID);
+			String sessionID = (String) valueMap.get(Operation.Value.SESSION_ID);
 			MetaValue[] args = new MetaValue[] { SimpleValueSupport.wrap(sessionID) };
 			try {
 				executeManagedOperation(connection, getRuntimeEngineDeployer(connection, mc), Platform.Operations.KILL_SESSION, args);
@@ -231,7 +231,7 @@
 			}
 		} else if (operationName.equals(Platform.Operations.KILL_REQUEST)) {
 			Long requestID = (Long) valueMap.get(Operation.Value.REQUEST_ID);
-			Long sessionID = (Long) valueMap.get(Operation.Value.SESSION_ID);
+			String sessionID = (String) valueMap.get(Operation.Value.SESSION_ID);
 			MetaValue[] args = new MetaValue[] {
 					SimpleValueSupport.wrap(requestID),
 					SimpleValueSupport.wrap(sessionID) };
@@ -886,8 +886,8 @@
 			TransactionMetadata transaction = new TransactionMetadata();
 			transaction.setAssociatedSession((String) ProfileServiceUtil.stringValue(compositeValue.get(ASSOCIATED_SESSION)));
 			transaction.setCreatedTime((Long) ProfileServiceUtil.longValue(compositeValue.get(CREATED_TIME)));
-			transaction.setScope((String) (String) ProfileServiceUtil.stringValue(compositeValue.get(SCOPE)));
-			transaction.setId((String) (String) ProfileServiceUtil.stringValue(compositeValue.get("id"))); //$NON-NLS-1$
+			transaction.setScope((String) ProfileServiceUtil.stringValue(compositeValue.get(SCOPE)));
+			transaction.setId((String) ProfileServiceUtil.stringValue(compositeValue.get("id"))); //$NON-NLS-1$
 			return transaction;
 		}
 		throw new IllegalStateException("Unable to unwrap TransactionMetadata " + metaValue); //$NON-NLS-1$

Modified: branches/7.1.x/console/src/main/java/org/teiid/rhq/plugin/PlatformComponent.java
===================================================================
--- branches/7.1.x/console/src/main/java/org/teiid/rhq/plugin/PlatformComponent.java	2011-02-15 03:12:21 UTC (rev 2907)
+++ branches/7.1.x/console/src/main/java/org/teiid/rhq/plugin/PlatformComponent.java	2011-02-15 17:57:45 UTC (rev 2908)
@@ -96,11 +96,11 @@
 		// Parameter logic for System Operations
 		if (name.equals(Platform.Operations.KILL_REQUEST)) {
 			valueMap.put(Operation.Value.REQUEST_ID, configuration.getSimple(Operation.Value.REQUEST_ID).getLongValue());
-			valueMap.put(Operation.Value.SESSION_ID, configuration.getSimple(Operation.Value.SESSION_ID).getLongValue());
+			valueMap.put(Operation.Value.SESSION_ID, configuration.getSimple(Operation.Value.SESSION_ID).getStringValue());
 		} else if (name.equals(Platform.Operations.KILL_REQUEST)) {
-			valueMap.put(Operation.Value.TRANSACTION_ID, configuration.getSimple(Operation.Value.TRANSACTION_ID).getLongValue());
+			valueMap.put(Operation.Value.TRANSACTION_ID, configuration.getSimple(Operation.Value.TRANSACTION_ID).getStringValue());
 		} else if (name.equals(Platform.Operations.KILL_SESSION)) {
-			valueMap.put(Operation.Value.SESSION_ID, configuration.getSimple(Operation.Value.SESSION_ID).getLongValue());
+			valueMap.put(Operation.Value.SESSION_ID, configuration.getSimple(Operation.Value.SESSION_ID).getStringValue());
 		} else if (name.equals(Platform.Operations.DEPLOY_VDB_BY_URL)) {
 			valueMap.put(Operation.Value.VDB_URL, configuration.getSimple(Operation.Value.VDB_URL).getStringValue());
 			valueMap.put(Operation.Value.VDB_DEPLOY_NAME, configuration.getSimple(Operation.Value.VDB_DEPLOY_NAME).getStringValue());

Modified: branches/7.1.x/console/src/main/resources/META-INF/rhq-plugin.xml
===================================================================
--- branches/7.1.x/console/src/main/resources/META-INF/rhq-plugin.xml	2011-02-15 03:12:21 UTC (rev 2907)
+++ branches/7.1.x/console/src/main/resources/META-INF/rhq-plugin.xml	2011-02-15 17:57:45 UTC (rev 2908)
@@ -171,7 +171,7 @@
 			description="Terminate a specified session">
 			<parameters>
 				<c:simple-property displayName="SessionID" name="sessionID"
-					type="long" required="true" description="The ID of the session to terminate" />
+					type="string" required="true" description="The ID of the session to terminate" />
 			</parameters>
 		</operation>
 
@@ -213,7 +213,7 @@
 			description="Terminate the processing of a query and its source queries">
 			<parameters>
 				<c:simple-property displayName="Session ID" name="sessionID"
-					type="long" required="true"
+					type="string" required="true"
 					description="The ID of the session that the request to cancel is associated with" />
 				<c:simple-property displayName="Request ID" name="requestID"
 					type="long" required="true" description="The ID of the request to cancel" />
@@ -247,7 +247,7 @@
 			description="Terminate a specified transaction">
 			<parameters>
 				<c:simple-property displayName="Transaction ID"
-					name="transactionID" type="long" required="true"
+					name="transactionID" type="string" required="true"
 					description="The ID of the transaction to terminate" />
 			</parameters>
 		</operation>



More information about the teiid-commits mailing list