Transferring files in a Liberty collective
A Liberty controller enables
special file transfer capabilities within a Liberty collective. The most advanced such
functionality is file transfer for multiple hosts within a single REST call. You can use the
FileTransfer
and FileService
MBeans in a Liberty collective to perform file actions on any
Liberty server in the collective. This
includes both Liberty servers configured as
collective controllers and as collective members.
About this task
When you establish a remote JMX connection to a collective controller, you can use the
RoutingContext
MBean to direct your FileTransfer
and
FileService
MBean calls to execute on any Liberty server in the collective. The collective
controller takes care of routing the request and creating authorized connections between the
collective controller and the target collective member.
By routing file operations to specific collective members, you can perform configuration-file updates and install applications on any Liberty server in the collective.
The FileTransfer
MBean additionally can perform operations on a host computer in
a collective whether or not there is a collective member on that host. By registering the host
computer with the Liberty collective and
specifying a RoutingContext
that specifies that host, the
FileTransfer
command can be used to upload or download files to or from that host
system. For example, you can upload and expand a Liberty archive to push out Liberty to new hosts.
The FileTransfer
MBean uses authorization information stored in the collective
controller for either the target host computer or collective member. This information was stored
when the host computer or collective member was registered. See Registering host computers with a Liberty
collective for more information on setting up this information for the host computer.
File-transfer operations directed at the host computer use the authorization information stored for the host computer. File-transfer operations directed at a collective member use the authorization overridden by the collective member, if any, or use the information stored for the host computer by default. See Overriding Liberty server host information for more information on overriding host information.
The FileService
MBean operates on Liberty (not only on host computers) and uses the
authorization configurations from Liberty. It
does not use host-computer authorization information.