http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/jdbc_111060.html
I used ojdbc6.jar. Copied the file to <glassfish>/lib directory and restart the the server:
asadmin stop-domain domain1
asadmin start-domain domain1
After this a connection pool must be created.
Login to the admin console of glassfish. Open the resources - JDBC - Connection Pools and select new.
Fill in the connection pool name, select javax.sql.ConnectionPoolDataSource and Oracle and click next..
Fill in the properties user, password en url (jdbc:oracle:thin:@<hostname>:<port>:<sid>
Click ping to test the connection.
When OK create a JDBC resource with JNDIName in the form of jdbc/<sid> and select the just created resource.
Now the connection can be used in your JPA classes.