So you want to use javax.persistence. Here is how you can configure it and run with GlassFish.
javax.persistence