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

breako do-not-reply at jboss.com
Wed Jan 2 05:56:27 EST 2008


Hi,
I have an EntityManager and I want to determine database type. This not part of the JPA spec, however some JPA vendors e.g. hibernate have a getConnection() API in their EntityManager implementation.
If you cast to this implementation and get a connection you can determine database type.

If using Seam Managed EntityManager, Seam injects a org.jboss.seam.persistence.EntityManagerProxy instance. So this API is not available. 
Is there any other way I can determine database type?

Reason I ask is because, we have to support a number of different database types and have to be able to determine dynamically and at runtime the database type to handle some custom stuff.

Regards


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

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



More information about the jboss-user mailing list