modified to run on GlassFish/EclipseLink