  We study the steady state of a finite XX chain coupled at its boundaries to
quantum reservoirs made of free spins that interact one after the other with
the chain. The two-point correlations are calculated exactly and it is shown
that the steady state is completely characterized by the magnetization profile
and the associated current. Except at the boundary sites, the magnetization is
given by the average of the reservoirs' magnetizations. The steady state
current, proportional to the difference in the reservoirs' magnetizations,
shows a non-monotonous behavior with respect to the system-reservoir coupling
strength, with an optimal current state for a finite value of the coupling.
Moreover, we show that the steady state can be described by a generalized Gibbs
state.
