  (abridged) We present results of test-particle simulations on both the first
and the second order Fermi acceleration at relativistic parallel shock waves.
We consider two scenarios for particle injection: (i) particles injected at the
shock front, then accelerated at the shock by the first order mechanism and
subsequently by the stochastic process in the downstream region; and (ii)
particles injected uniformly throughout the downstream region to the stochastic
process. We show that regardless of the injection scenario, depending on the
magnetic field strength, plasma composition, and the employed turbulence model,
the stochastic mechanism can have considerable effects on the particle spectrum
on temporal and spatial scales too short to be resolved in extragalactic jets.
Stochastic acceleration is shown to be able to produce spectra that are
significantly flatter than the limiting case of particle energy spectral index
-1 of the first order mechanism. Our study also reveals a possibility of
re-acceleration of the stochastically accelerated spectrum at the shock, as
particles at high energies become more and more mobile as their mean free path
increases with energy. Our findings suggest that the role of the second order
mechanism in the turbulent downstream of a relativistic shock with respect to
the first order mechanism at the shock front has been underestimated in the
past, and that the second order mechanism may have significant effects on the
form of the particle spectra and its evolution.
