Call the ComponentInstanceManager.createComponentInstance()
method to create a component instance of the given type (a RecordStore
) with the given id (a Record Store instance name).
The syntax of the method is:
ComponentInstanceManager.createComponentInstance(ComponentTypeId componentTypeId, ComponentInstanceId componentInstanceId)
The componentTypeId
parameter
is a ComponentTypeId
that should be set to "RecordStore"
.
The componentInstanceId
parameter
is a ComponentInstanceId
that
is the Record Store instance name.
To create 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. For example:ComponentInstanceManager cim = locator.getService();
Create a Record Store instance by calling
createComponentInstance()
and specifyingRecordStore
and a Record Store instance name. For example:cim.createComponentInstance(new ComponentTypeId("RecordStore"), new ComponentInstanceId("rs1"));