One option is to get hold of Toplink em. That is as follows
EntityManager toplinkEm = em.getDelegate();
((oracle.toplink.essentials.ejb.cmp3.EJBQuery)[b]toplinkEm[/b].createNamedQuery("name")).getDatabaseQuery();
dbQuery.prepareCall(((EntityManagerImpl)em.getDelegate ()).getServerSession(), new DatabaseRecord());
[Message sent by forum member 'mm110999' (mm110999)]
http://forums.java.net/jive/thread.jspa?messageID=274665