This content has been marked as final.
Show 2 replies
-
1. Re: Determining Database Type.
pmuir Jan 2, 2008 7:35 AM (in response to breako)Use getDelegate to get the underlying JPA provider.
-
2. Re: Determining Database Type.
breako Jan 2, 2008 9:51 AM (in response to breako)"pete.muir@jboss.org" wrote:
Use getDelegate to get the underlying JPA provider.
Thanks for that Peter.
The complete solution just in case anyone is interested is:Object localEMObject = ((EntityManagerProxy)em).getDelegate(); HibernateSessionProxy hsb = (HibernateSessionProxy)localEMObject; connection = hsb.connection(); DatabaseMetaData dbMD = connection.getMetaData(); String database = dbMD.getDatabaseProductName();
This forum is very good btw.