You add a solution to vCenter Server Extensions by setting the shownInSolutionManager property in the implementation of the Extension data object that manages the solution.
The EAM Sample Solution sets the
shownInSolutionManager property in the
Manager.java class.
Prerequisites
-
Download the vSphere ESX Agent Manager SDK.
-
Verify that you have set up and started the EAM Sample Solution in an application server.
-
Verify that you have opened eam_work_folder\src\com\vmware\eam\sample\solution\Manager.java in an editor.
Procedure
- Call the ExtSolutionManagerInfo() constructor to create an instance of ExtSolutionManagerInfo in the class that implements Extension.
The following lines in the
Manager.java class show how the EAM Sample Solution creates an instance of
ExtSolutionManagerInfo.
private Extension createExtensionObject() {
Extension extension = new Extension();
[...]
ExtSolutionManagerInfo extSolutionManagerInfo =
new ExtSolutionManagerInfo();
[...]
}
- Call the setSolutionManagerInfo() method to set the ExtSolutionManagerInfo instance in the solution implementation.
The following lines in the
Manager.java class show how the EAM Sample Solution calls the
setSolutionManagerInfo() method.
private Extension createExtensionObject() {
Extension extension = new Extension();
[...]
ExtSolutionManagerInfo extSolutionManagerInfo =
new ExtSolutionManagerInfo();
[...]
extension.setSolutionManagerInfo(extSolutionManagerInfo);
}
- Set the value of the shownInSolutionManager property to true by calling the setShownInSolutionManager() method on the implementation of the Extension object.
The following lines in the
Manager.java class show how the EAM Sample Solution sets the
shownInSolutionManager property.
private Extension createExtensionObject() {
Extension extension = new Extension();
[...]
ExtSolutionManagerInfo extSolutionManagerInfo =
new ExtSolutionManagerInfo();
[...]
extension.setSolutionManagerInfo(extSolutionManagerInfo);
extension.setShownInSolutionManager(true);
[...]
}
Results
You set the shownInSolutionManager property in the implementation of the Extension data object that defines the solution. By setting the shownInSolutionManager property to true
, a solution appears in vCenter Server Extensions when it registers with vCenter Server.