|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
This MBean represents an application instance that is deployed in the Weblogic Event Server.
Each application that is deployed may consist of a number of Stages. Each stage would be of type
Adapter, Stream or Processor.
MBeans are deployed for the Application as well as the named stages that has been configured
for the application.
The naming of the ApplicationMBean is as follows:
AnName=<application name>, Type=Application
ApplicationMBean could be looked up directly from the MBeanServer by the naming as given above
or
ApplicationMBean could be looked up from the DomainMBean by providing the name
of the specific application.
//get the DomainMBean
DomainMBean domainBean = <get the DomainMBean by looking up in the MBean Server>
//iterate through the ApplicationMBeans that may have been bootstrapped
for(ObjectName appBeanName : domainBean.getApplicationMBeans()) {
ApplicationMBean appBean =
(ApplicationMBean)
MBeanServerInvocationHandler.newProxyInstance(
mbsc,
appBeanName,
ApplicationMBean.class,
false
);
//get the stage MBeans
for(ObjectName stageBeanName : appBean.getStageMBeans()) {
String beanType = stageBeanName.getKeyProperty("Type");
if ( beanType.equalsIgnoreCase("EPLProcessor")) {
EPLProcessorMBean processorBean =(EPLProcessorMBean)
MBeanServerInvocationHandler.newProxyInstance(
mbsc,
stageBeanName,
EPLProcessorMBean.class,false
) ;
Map rules = processorBean.getAllRules();
//print the rule
for( Map.Entry ruleEntry : rules.entrySet()){
System.out.println("\n\t Rule -> " + ruleEntry.getValue());
}
//enable monitoring
processorBean.enableMonitoring();
System.out.println("\n Stage " + processorBean.getName() + " has been enable for monitoring.");
}//end of if loop
}//end of for
}//end of for loop
| Method Summary | |
ObjectName[] |
getStageMBeans()
Returns an array of ObjectName which is the naming of the various
StageMBean |
ObjectName |
lookupStageMBean(String name)
Returns the ObjectName of the StageMBean |
| Methods inherited from interface com.bea.wlevs.management.WebLogicMBean |
getMBeanInfo,
getName,
getObjectName,
getType,
isRegistered |
| Method Detail |
public ObjectName[] getStageMBeans()
ObjectName which is the naming of the various
StageMBean
public ObjectName lookupStageMBean(String name)
ObjectName of the StageMBean
name - - Name of the StageMBean
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||