This section of the tutorial, talks about the Shopping Cart application which we are trying to make it JMX manageable. The Shopping Cart application bundled along with the toolkit is present in <Agent Toolkit Home>/reference/jmx directory.
About Shopping Cart
Shopping Cart is basically an application used for ordering items in a shop. The items as per this reference implementation are "Pets". Four pets namely : Parrot, Dog, Cat and fish are available in the shop and to place orders for these pets the Shopping Cart application can be used.
Treat yourself as a customer and the Shop Keeper has allowed you to place orders through this application. The Shopping Cart application gets started via the Agent. To know more about starting the Agent/application please go through "Running and Testing the Application".
The first step toward Building the Agent is to define the resources required for the Agent. Based on the requirements the resources are identified as follows : -
Pet Name.
Unit Price of the Pet.
Quantity of the Pets.
Total Amount of the Pet based on the Quantity.
Total Stock available for a Particular Pet.
Total Pets ordered.
Total Price for the Pets ordered.
Table
The following details can be presented in the form of a Table as they have details related to a particular variable : The Pet. Hence the Pet Name can be made as the index column.
|
Pet Name. |
Unit Price of the Pet. |
Quantity of the Pets. |
Total Amount of the Pet based on the Quantity. |
Total Stock available for a Particular Pet. |
|---|---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
Scalar Group
The total amount of the pet based on the quantity ordered and total pets ordered can be represented as two scalar variables.
Using these details the MIB Module is defined.