Call the ComponentInstanceManager.deleteComponentInstance()
method to delete a specified component instance (a Record Store).
The syntax of the method is:
ComponentInstanceManager.deleteComponentInstance(ComponentInstanceId componentInstanceId)
The componentInstanceId
parameter
is a ComponentInstanceId
that
is the Record Store instance name that you want to delete.
To delete a component:
Create a
ComponentInstanceManagerLocator
by callingcreate()
and specifying the host and port of the server running the Component Instance Manager. For example:ComponentInstanceManagerLocator locator = ComponentInstanceManagerLocator.create("localhost", 8500);
Create a
ComponentInstanceManager
object and callgetService()
to establish a connection to the server and the Component Instance Manager service itself. For example:ComponentInstanceManager cim = locator.getService();
Delete a Record Store instance by calling
deleteComponentInstance()
and specifying a Record Store instance name. For example:cim.deleteComponentInstance(new ComponentInstanceId("rs1");
If the ComponentInstanceManager.deleteComponentInstance()
method
fails, it will throw an exception:
To catch these exceptions, use a try
block when you call the method.