We report on a parallel implementation of the Jacobi-Davidson algorithm to compute a few eigenvalues and corresponding eigenvectors of a large real symmetric generalized matrix eigenvalue problemThe eigenvalue problem stems from the design of cavities of particle accelerators. It is obtained by the finite element discretization of the time-harmonic Maxwell equation in weak form by a combination of Nédélec (edge) and Lagrange (node) elements.We found the Jacobi-Davidson (JD) method to be a very effective solver provided that a good preconditioner is available for the correction equations that have to be solved in each step of the JD iteration. The preconditioner of our choice is a combination of a hierarchical basis preconditioner and the ML smoothed aggregation AMG preconditioner. It is close to optimal regarding iteration count.The parallel code makes extensive use of the Trilinos software framework. In our examples from accelerator physics we observe satisfactory speedups and efficiencies.