This section contains information on the following subjects:
WebLogic Event Server applications define an event processing network (EPN) that is made up of components such as processors, streams, and adapters. You deploy these applications to a WebLogic Event Server instance that has been started in a domain.
Note: | Components are also sometimes referred to as stages, in particular in the management Javadocs. However, for consistency with the rest of the WebLogic Event Server documentation, this section uses the term components. |
You can dynamically configure each componnent in the EPN using managed beans, or MBeans. You manipulate the MBeans either by using the standard
Java Management Extenstion (JMX) APIs or using wlevs.Admin
, the WebLogic Event Server administration command-line utility. It is assumed in this section you are going to use JMX; see wlevs.Admin Command-Line Reference for details about using wlevs.Admin
.
You can also perform some configuration and application lifecycle management of the server, domain, and deployed applications using MBeans, although this section predominantly describes configuring individual application components. However, because server, domain, and application configuration is also done using MBeans, much of the information in this section is applicable.
Each component in a deployed application (adapter, stream, or processor) has a configuration MBean that manages the underlying configuration of the component. Each type of component has its own set of manageable artifacts. For example, you can dynamically configure the maximum number of threads for a stream or the EPL rules associated with a processor. You can also dynamically enable or disable monitoring for a component.
WebLogic Event Server exposes the following types of MBeans:
EPLProcessorMBean
and StreamMBean
.See Configuration MBeans for additional information.
helloworldAdapter
adapter in the HelloWorld example has been extended, and its corresponding MBean would be HelloWorldAdapterConfigMBean
.See Configuration MBeans for additional information.
For full reference information about WebLogic Event Server MBeans, see the following Javadocs:
When you deploy a WebLogic Event Server application, the server automatically creates a configuration MBean for each component in the EPN whose manageability has been enabled, or in other words, for each component registered in the EPN assembly file whose manageable
attribute is set to true
. If you have extended the configuration of an adapter, then the server deploys a a custom configuration MBean for the adapter.
Using JMX, you can dynamically configure the component using its configuration MBean. For example, using the StreamMBean.setMaxSize()
method you can set the size of a stream component. A common configuration method for all components is to enable or disable monitoring; for example, to disable monitoring for an adapter, use the method AdapterMBean.disableMonitoring()
.
All MBeans must be registered in an MBean server under an object name of type javax.management.ObjectName
. WebLogic Event Server follows a convention in which object names for child MBeans contain part of its parent MBean object name.
WebLogic Event Server configuration MBeans are arranged in a hierarchy. The object name of each MBean reflects its position in the hierarchy. A typical object naming pattern is as follows:
com.bea.wlevs:Name=name,Type=type,[TypeOfParentMBean
=NameOfParentMBean]
The order of the key properties is not significant, but the object name must begin with com.bea:wlevs:
.
For example, the object name of the MBean corresponding to a processor called myprocessor
in the application myapplication
is as follows:
com.bea.wlevs:Name=myprocessor,Type=EPLProcessor,Application=myapplication
The following table describes the key properties that WebLogic Server encodes in its MBean object names.
The following table shows examples of configuration MBean objects names that correspond to the component declarations in the HelloWorld sample EPN assembly file. In each example, the application name is helloworld
It is assumed in this section that you are going to use the
Java Management Extensions (JMX) APIs to manipulate the configuration MBeans; if you want to use wlevs.Admin
, see wlevs.Admin Command-Line Reference. Be sure you have read the following sections that describe WebLogic Event Server configuration and runtime MBeans:
To dynamically configure a component of an EPN, follow these steps:
manageable
attribute of the component in the EPN assembly file has been set to true
. By default the attribute is false
. For example:<wlevs:processor id="helloworldProcessor" manageable="true" />
You cannot dynamically change the value of this attribute. In practice this means that, for example, if you have set manageable
to true
and deployed the application, but then you later want to disable manageability, you must undeploy the application, manually update the EPN assembly file and set manageable
to false
, then redeploy the application.
For example, assume you want to configure a processor called helloworldProcessor
that is part of the WebLogic Event Server application called myapplication
. The following Java code shows how to instantiate an instance of the appropriate MBean (EPLProcessorMBean
) and then get a list of all the EPL rules associated with the processor:
ObjectName eplName =
ObjectName.getInstance("com.bea.wlevs:Name=helloworldProcessor,Type=EPLProcessor,Application=myapplication");
EPLProcessorMBean eplMBean = (EPLProcessorMBean)
MBeanServerInvocationHandler.newProxyInstance(
mbsc,
ObjectName.getInstance(eplName),
EPLProcessorMBean.class,
true);
Map rules = eplMBean.getAllRules();