So, the final creep coverage area has appeared the other day: since we use Hibernate, can we make our webapp work with both Oracle and MySQL, interchangably?
I thought it would be a simple case of changing hibernate.cfg.xml, so that instead of explaining the parameters specific to MySQL, it would refer to the JNDI data source, allowing the application to create regardless of the database that we plan to deploy, Then switch to another database would simply mean changing the individual data source configuration in JBoss, Jetty, WebLogic, etc. Is it realistic?
Well, I got to the Jetty installation, but what is turning me off right now is an error due to the fact that hibernate.dialect was not installed in the hibernate.cfg.xml file. But if I installed a dialect there, then my application will still be built in MySQL or Oracle, but this is not quite what I want.
Either I'm trying to do the impossible, or I missed something fundamentally obvious ... did anyone have a similar problem (and subsequent solution / workaround)?
source
share