It seems that my webapp (located in a war file inside the ear file) is able to publish events to a HornetQ topic, but my EJB, also located in the ear, is not able to receive the messages. It fails during the deserialization process.
The important part is that the EJB jar will not have access to any classes in the .war. So if the object hierarchy that you are publishing as a ObjectMessage has any reference to such class(es) then it will fail. The right thing to do in such cases is package such classes in a .jar and place them in the .ear/lib so that they are accessible to both the .war and the EJB modules.