IEP Administration services provides a way to access the IEP service engine at runtime. It enables user to access information about, debug and modify a deployed process.
It is a part of Systemic qualities efforts. A collection of MBeans that interacts with IEP service engine and an IEP Management Services that exposes calls to these beans through a simple Java API.
The following actions can be performed using IEP Management Services.
There are two main components.
.
Command line client is a reference application that uses APIs from IEP management services.
java com.sun.esb.management.client.tester.IEPManagementSample
To get the list of available commands and the required parameters, type h or help on the console, or see the IEP Management Services Client
section.
IEP Management API is a wrapper around MBean calls to Administration bean in IEP Service Engine. If you plan to create your own client application using the APIs, then add this jar file and jbi-admin-common.jar from
can be used as reference implementation.
For detailed description about the APIs, see the IEP Administration Services
section.
The sample command line client uses the management services to execute methods on administration beans. By default, it connects to localhost 8686 using admin as the userID and adminadmin as the password. To change, use the connect command.
To run the client, call:
java com.sun.esb.management.client.tester.IEPManagementSample
Entering h or help will print the available commands and their parameters:
q, quit: Quit
connect host port userID password: Connect to management bean server. Default values are localhost 8686 admin adminadmin
li, listIEP service_unit_name : List IEP process deployed in a service unit. service_unit_name is the name of IEP unit that is deployed in jbi. Look for screen capture below to locate it in NetBeans server configuration. If no service unit name is provided, the command will list all deployed IEP plans.
d, debug plan_name : Debug an IEP process. The plan_name can be found using listIEP command. For more information, see the IEP Debugging section
.
lo, listOperators plan_name : List operators in an IEP process. The plan_name can be found by using the listIEP command.
la, listAttributes plan_name operator_name : List visible properties of an operator. The operator_name can be found by using the listOperators command.
scs, startChangeSet : informs the IEP engine that a new change set request has been initiated. Refer Changing the Properties of an IEP Operator at Runtime.
acs, applyChangeSet : informs the IEP engine to schedule all the changes done by using changePropValue,cpv to be applied and persisted. After this for any further changes startChangeSet,scs must be called first. Refer Changing the Properties of an IEP Operator at Runtime.
ics, ignoreChangeSet : informs the IEP engine to ignore the change set. After this for any further changes startChangeSet,scs must be called first. Refer Changing the Properties of an IEP Operator at Runtime.
cpv, changePropValue plan_name operator_name attribute_key attribute_value : Set the value of a property. Refer Changing the Properties of an IEP Operator at Runtime.
eda, enableDA plan_name operator_name table_name : Enable Data Access for an operator into a table. For more information, refer Data Access wiki entry.
addss, addSaveStream plan_name operator_name jndi_name tableName : Add a save stream to an input stream operator. For more information, refer Save Stream. Returns the name of the Save Stream operator that is added.
rss, removeSaveStream plan_name save_operator_name : Remove the save stream operator. The save_operator_name is the name that gets returned by the addSaveStream operator.
You can find the service unit name for the listIEP command in the Services window of the IDE. Expand the Servers node, the GlassFish V2 node, the JBI node, the Service Assemblies node, and the individual service assembly node. See the following screen capture.
API listing describes all the methods that are available with the latest IEP Service Engine.
To get a handle to IEPManagementService, use:
IEPManagementServiceFactory.createNewServiceInstance(_MBeanServerConnection_object);
MBeanServerConnection can be obtained in many ways. One way is shown below.
public static MBeanServerConnection getMBeanServerConnection(
String urlString, String userName, String password)
throws MalformedURLException, IOException {
final JMXServiceURL url = new JMXServiceURL(urlString);
String[] credentials = new String[] { userName, password };
Map<String, String[]> environment = new HashMap<String, String[]>();
environment.put("jmx.remote.credentials", credentials);
final JMXConnector connector = JMXConnectorFactory.connect(url, environment);
return connector.getMBeanServerConnection();
The URL String can be created using hostName and portNumber as
String urlString = "service:jmx:rmi:///jndi/rmi://" + hostName + ":" + portNumber + "/jmxrmi";
There is a step by step IEP processor to facilitate some debugging for the IEP engine. The idea is to execute process in a per operator basis and let user control the flow. At every point of execution, user can get information related to any operator and its current state of data(events).
The steps are:
1. Call IEP Management services and set an IEP process for debugging by
a. calling setIEPForDebugging(mPlanName);. This will let the IEP engine know to attach a step by step processor to the process(plan).
b. or start the debug console using command line IEP Management Services Client use the command d, debug {plan_name}
2. Once an IEP process is attached to the step by step processor, user can execute debug commands by sending those commands through management services.
The list of debug commands that can be executed are:
help,h : Help on available commands.
quit,q : Quit the debug session and detach step by step processor.
next,n : execute next available operator.
completeCycle,cc : complete one cycle of IEP process.
nextCompleteCycles,ncc noOfTime(int) : complete cycles of IEP process noOfTime times.
nextCompleteCyclesForTimePeriod,nct milliseconds (long) : complete cycles of IEP process for milliseconds time.
addPauseBefore,apb operatorName : add a pause (breakpoint) before an IEP process.
nextTillPause,ntp : execute IEP process till a pause is found or cycle is complete.
nextOperator,no : display the name of the operator that is to be executed next.
removePauseBefore,rpb operatorName : remove the pause before the operator if there is one available.
listOperators,lo : List operator names in sequence of execution.It appends a '**' in front of operator names that are yet to be executed.
listOperatorProperties,lop operatorName : List all the properties associated with an operator.If operatorName is not provided the default will be used which is the last executed operator.
info,i : show the relevant information about the last executed operator.
info,i operatorName : show the debug information about the operatorName operator.