Should not need to provide JDBC driver name.


Andy
 
Edited


Andy
 

Since JPA and JDO specs were written for earlier JDKs then I guess they have never been updated to reflect what more recent JDBC specs mandate. Since DataNucleus (v5+) supports JRE 1.8+ ONLY then there is no issue with including JDBC4+ semantics. What other JPA providers do or not you'd have to ask them


Mark Thornton
 

True, but before putting in the effort I prefer to discover if the project maintainers are in favour of such a change. I also don't know if a similar problem afflicts other JPA implementations.

I have been a little surprised recently, to discover that many people remain unaware that specifying the driver class is unnecessary in JDBC 4.

Mark


Andy
 

Any "behaviour" can be changed because the code is open source. People can contribute GitHub Pull Requests


Mark Thornton
 

Since Java 6 / JDBC 4 it has been possible (and normal practice) to open a Connection without specifying the driver or attempting to load its class. Unfortunately if I omit the driver name in DataNucleus (JPA api), it attempts to load a driver class with the name "" (i.e. an empty string), and then fails.

Could this behaviour be changed?

Mark Thornton