WebSphere Message Broker Version 8.0.0.5 Betriebssysteme: AIX, HP-Itanium, Linux, Solaris, Windows, z/OS

Sehen Sie sich die Informationen zur aktuellen Produktversion im IBM Integration Bus Version 9.0 an.

Mit Ressourcenstatistikdaten in einer Konfigurationsmanager-Proxy-Anwendung arbeiten

Sie können die Erfassung von Ressourcenstatistikdaten in Ihren Konfigurationsmanager-Proxy-Anwendungen starten und stoppen sowie den Status überprüfen.

Bevor Sie beginnen:
Sie können Konfigurationsmanager-Proxy-Anwendungen so erstellen, dass die Erfassung von Ressourcenstatistikdaten überprüft und gesteuert wird.
Überprüfen, welche Ressourcentypen Statistikdaten zurückgegeben können
///////////////////////////////////////////////////////	
// Sample CMP API code that connects to a local broker
// called 'testbrk' and writes out available
// resource types on the broker that have the 
// ability to emit resource-level statistics. 
BrokerProxy b = null;
try {
    b = BrokerProxy.getLocalInstance("testbrk");
		String[] resourceNames = b.getResourceTypeNames();
		for (String thisResource : resourceNames) {
				System.out.println(thisResource);
	}
} catch (ConfigManagerProxyLoggedException e) {
	e.printStackTrace();
} catch (ConfigManagerProxyPropertyNotInitializedException e) {
	e.printStackTrace();
}
Nach Ressourcennamen suchen, die einem bestimmten Ressourcentyp zugeordnet sind
///////////////////////////////////////////////////////	
// Sample CMP API code that connects to a local broker
// called 'testbrk' and writes out resource property
// names reported for a specific resource type.
BrokerProxy b = null;
try {
    b = BrokerProxy.getLocalInstance("testbrk");
		String[] resourcePropertyNames = 
								b.getResourceTypeStatisticsPropertyNames("JVM");
		for (String thisResourceProperty : resourcePropertyNames) {
				System.out.println(thisResourceProperty);
	}
} catch (ConfigManagerProxyLoggedException e) {
	e.printStackTrace();
} catch (ConfigManagerProxyPropertyNotInitializedException e) {
	e.printStackTrace();
}
Statistikerfassung starten
///////////////////////////////////////////////////////	
// Sample CMP API code that connects to a local broker
// called 'testbrk' and gets a reference to the execution
// group called 'default'. It then enables resource 
// statistics for all the execution group's resource types.
BrokerProxy b = null;
try {
    b = BrokerProxy.getLocalInstance("testbrk");
	ExecutionGroupProxy eg = b.getExecutionGroupByName("default");
	if (eg != null) {
				eg.setResourceStatisticsEnabled(null, true);
	}
} catch (ConfigManagerProxyLoggedException e) {
	e.printStackTrace();
} catch (ConfigManagerProxyPropertyNotInitializedException e) {
	e.printStackTrace();
}
Statistikerfassung stoppen
///////////////////////////////////////////////////////	
// Sample CMP API code that connects to a local broker
// called 'testbrk' and gets a reference to the execution
// group called 'default'. It then disables resource 
// statistics for all the execution group's resource types.
BrokerProxy b = null;
try {
    b = BrokerProxy.getLocalInstance("testbrk");
	ExecutionGroupProxy eg = b.getExecutionGroupByName("default");
	if (eg != null) {
				eg.setResourceStatisticsEnabled(null, false);
	}
} catch (ConfigManagerProxyLoggedException e) {
	e.printStackTrace();
} catch (ConfigManagerProxyPropertyNotInitializedException e) {
	e.printStackTrace();
}
Status der Statistikerfassung anzeigen
///////////////////////////////////////////////////////	
// Sample CMP API code that connects to a local broker
// called 'testbrk' and gets a reference to the execution
// group called 'default'. It then writes out if resource 
// statistics is enabled.
BrokerProxy b = null;
try {
    b = BrokerProxy.getLocalInstance("testbrk");
	ExecutionGroupProxy eg = b.getExecutionGroupByName("default");
	if (eg != null) {
				System.out.println(eg.getResourceStatisticsEnabled(null));
	}
} catch (ConfigManagerProxyLoggedException e) {
	e.printStackTrace();
} catch (ConfigManagerProxyPropertyNotInitializedException e) {
	e.printStackTrace();
}
Bemerkungen | Marken | Downloads | Bibliothek | Support | Feedback

Copyright IBM Corporation 1999, 2014Copyright IBM Corporation 1999, 2014.

        
        Letzte Aktualisierung:
        
        Letzte Aktualisierung: 2015-02-28 16:22:53


TaskthemaTaskthema | Version 8.0.0.5 | be43390_