Magnetic fluctuations and the superconducting transition in the heavy-fermion material UPd2Al3