The admin shell contains commands for creating and managing instances of the FUSE ESB runtime. Each runtime created using the admin shell is a child instance of the runtime that created it. The children are easily managed using names instead of network addresses.
You create a new runtime instance using the admin shell's create
command. As shown in Example 2.5, the
create command causes the runtime to create a new runtime installation in
the active runtime's instances/.
The newly create instance is a direct copy of its parent. The only difference between parent
and child is the port number they listen on. The child instance is assigned a port number
based on an incremental count starting at 8101.instanceName
Example 2.5. Create a Runtime Instance
servicemix>admin create finnCreating new instance on port 8106 at: /home/fuse/esb4/instances/finn Creating dir: /home/fuse/esb4/instances/finn/bin Creating dir: /home/fuse/esb4/instances/finn/etc Creating dir: /home/fuse/esb4/instances/finn/system Creating dir: /home/fuse/esb4/instances/finn/deploy Creating dir: /home/fuse/esb4/instances/finn/data Creating file: /home/fuse/esb4/instances/finn/etc/config.properties Creating file: /home/fuse/esb4/instances/finn/etc/org.apache.servicemix.features.cfg Creating file: /home/fuse/esb4/instances/finn/etc/org.ops4j.pax.logging.cfg Creating file: /home/fuse/esb4/instances/finn/etc/org.ops4j.pax.url.mvn.cfg Creating file: /home/fuse/esb4/instances/finn/etc/startup.properties Creating file: /home/fuse/esb4/instances/finn/etc/system.properties Creating file: /home/fuse/esb4/instances/finn/etc/org.apache.servicemix.shell.cfg Creating file: /home/fuse/esb4/instances/finn/bin/servicemixservicemix>
If you do not like the port number assigned to a child instance you can change it using the admin shell's change-port command. The syntax for the command is:
admin change-portinstanceNameportNumber
![]() | Important |
|---|---|
You can only use the change-port command on stopped runtime instances. |
New instances are created in the stopped state. To start a child instance and make it
ready to host applications, you use the admin shell's start command. The
start command takes a single argument,
instanceName, that identifies the child you want started.
You can connect to a started child instance's remote console using the admin shell's connect command.As shown in Example 2.6, the connect takes three arguments:
instanceName
This argument specifies the name of the child to which you want to connect.
-u
username
This argument specifies the username used to connect to the child's remote console.
The default value is smx.
By default, this value is not authenticated. It is recommended that you configure the console to use better authentication. See Securing a remote console
-p
password
This argument specifies the password used to connect to the child's remote console.
The default value is smx.
By default, this value is not authenticated. It is recommended that you configure the console to use better authentication. See Securing a remote console