Author: tejones
Date: 2011-01-04 17:14:35 -0500 (Tue, 04 Jan 2011)
New Revision: 2816
Modified:
branches/7.1.x/console/src/main/java/org/teiid/rhq/admin/DQPManagementView.java
Log:
TEIID-1416: Changed the report generation of get session for VDB to use the Session object
returned instead of the CompositeMetaValue.
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-01-04
21:24:33 UTC (rev 2815)
+++
branches/7.1.x/console/src/main/java/org/teiid/rhq/admin/DQPManagementView.java 2011-01-04
22:14:35 UTC (rev 2816)
@@ -250,7 +250,7 @@
final Map<String, Object> valueMap) throws Exception {
Collection<ArrayList<String>> sqlResultsObject = new
ArrayList<ArrayList<String>>();
Collection<Request> resultObject = new ArrayList<Request>();
- Collection<MetaValue> activeSessionsCollection = new
ArrayList<MetaValue>();
+ Collection<Session> activeSessionsCollection = new ArrayList<Session>();
String vdbName = (String) valueMap.get(PluginConstants.ComponentType.VDB.NAME);
vdbName = formatVdbName(vdbName);
String vdbVersion = (String) valueMap.get(PluginConstants.ComponentType.VDB.VERSION);
@@ -308,7 +308,7 @@
private String formatVdbName(String vdbName) {
- return vdbName.substring(0, vdbName.indexOf(".")); //$NON-NLS-1$
+ return vdbName.substring(0, vdbName.lastIndexOf(".")); //$NON-NLS-1$
}
public MetaValue getProperties(ProfileServiceConnection connection, final String
component) {
@@ -754,13 +754,15 @@
}
}
- public static <T> void getSessionCollectionValueForVDB(MetaValue
pValue,Collection<MetaValue> list, String vdbName) throws Exception {
+ public static <T> void getSessionCollectionValueForVDB(MetaValue
pValue,Collection<Session> list, String vdbName) throws Exception {
MetaType metaType = pValue.getMetaType();
if (metaType.isCollection()) {
for (MetaValue value : ((CollectionValueSupport) pValue).getElements()) {
if (value.getMetaType().isComposite()) {
if
(ProfileServiceUtil.stringValue(((CompositeValueSupport)value).get("VDBName")).equals(vdbName))
{ //$NON-NLS-1$
- list.add(value);
+ SessionMetadataMapper rmm = new SessionMetadataMapper();
+ Session session = rmm.unwrapMetaValue(value);
+ list.add(session);
}
} else {
throw new IllegalStateException(pValue+ " is not a Composite type");
//$NON-NLS-1$
Show replies by date