  We calculate the current-phase relation of a long Josephson junction
consisting of two ferromagnetic domains with equal, but opposite magnetization
$h$, sandwiched between two superconductors. In the clean limit, the
current-phase relation is obtained with the help of Eilenberger equation. In
general, the supercurrent oscillations are non-sinusoidal and their amplitude
decays algebraically when the exchange field is increased. If the two domains
have the same size, the amplitude is independent of $h$, due to an exact
cancellation of the phases acquired in each ferromagnetic domain. These results
change drastically in the presence of disorder. We explicitly study two cases:
Fluctuations of the domain size (in the framework of the Eilenberger equation)
and impurity scattering (using the Usadel equation). In both cases, the
current-phase relation becomes sinusoidal and the amplitude of the supercurrent
oscillations is exponentially suppressed with $h$, even if the domains are
identical on average.
