  In [13] the authors show that if $\mu$ is a strongly compact cardinal, $K$ is
an Abstract Elementary Class (AEC) with $LS(K)<\mu$, and $K$ satisfies joint
embedding (amalgamation) cofinally below $\mu$, then $K$ satisfies joint
embedding (amalgamation) in all cardinals $\ge \mu$. The question was raised if
the strongly compact upper bound was optimal.
  In this paper we prove the existence of an AEC $K$ that can be axiomatized by
an $\mathcal{L}_{\omega_1,\omega}$-sentence in a countable vocabulary, so that
if $\mu$ is the first measurable cardinal, then
  (1) $K$ satisfies joint embedding cofinally below $\mu$ ;
  (2) $K$ fails joint embedding cofinally below $\mu$; and
  (3) $K$ satisfies joint embedding above $\mu$.
  Moreover, the example can be generalized to an AEC $K^\chi$ axiomatized in
$\mathcal{L}_{\chi^+, \omega}$, in a vocabulary of size $\chi$, such that
(1)-(3) hold with $\mu$ being the first measurable above $\chi$.
  This proves that the Hanf number for joint embedding is contained in the
interval between the first measurable and the first strongly compact. Since
these two cardinals can consistently coincide, the upper bound from [13] is
consistently optimal.
  This is also the first example of a sentence whose joint embedding spectrum
is (consistently) neither an initial nor an eventual interval of cardinals. By
Theorem 3.26, it is consistent that for any club $C$ on the first measurable
$\mu$, JEP holds exactly on $\lim C$ and everywhere above $\mu$.
