Type-IIn supernovae (SNe IIn), which are characterized by strong interaction of their ejecta with the surrounding circumstellar matter (CSM), provide a unique opportunity to study the mass- loss history of massive stars shortly before their explosive death. We present the discovery and follow-up observations of an SN IIn, PTF 09uj, detected by the Palomar Transient Factory (PTF). Serendipitous observations by Galaxy Evolution Explorer (GALEX) at ultraviolet (UV) wavelengths detected the rise of the SN light curve prior to the PTF discovery. The UV light curve of the SN rose fast, with a timescale of a few days, to a UV absolute AB magnitude of about -19.5. Modeling our observations, we suggest that the fast rise of the UV light curve is due to the breakout of the SN shock through the dense CSM (n ≈ 10$^10$ cm$^-3$). Furthermore, we find that prior to the explosion the progenitor went through a phase of high mass-loss rate (åisebox-0.5ex 0.1 M $_sun$ yr$^-1$) that lasted for a few years. The decay rate of this SN was fast relative to that of other SNe IIn.