[jboss-user] [JBoss Seam] - Re: Determining Database Type.

breako do-not-reply at jboss.com
Wed Jan 2 09:51:11 EST 2008


"pete.muir at 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.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4116409#4116409

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4116409



More information about the jboss-user mailing list