Hi!
EJB 3.x entities are, as far as I understand, classes annotated with JPA annotations.
In a
Java EE environment, entities are usually manipulated by EJBs or other components, for which transaction management is specified.
Note that because you have managed to create an example program that runs on GlassFish does not mean anything - there are cases when GlassFish allows certain behaviour that does not adhere to EJB 3.1 specifications.
Reference: Section 13.3.6 EJB 3.1 specification.
Best wishes!