2 Replies Latest reply on Jan 2, 2008 9:51 AM by Breako Beats

    Determining Database Type.

    Breako Beats Newbie

      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