Ok first off, you never need to hardcode anything, you can always lookup which drivers/connection to use in a properties file often consisting of 4 items: driver class, URL, username, password.
Second, what exactly are you worried about locking into?
JDBC is an interface, with the implementation handled by the driver. In other words, all
JDBC code should run on all databases, granted that doesn't mean all
queries within JDBC statements will run on all databases, but it would be a wonderful world were that the case.
Lastly, I wouldn't call DriverManager antiquated really, one of the things you might be missing is that a lot of servers actually setup "connection pools" in JNDI instead of a single connection. There may be a dozen reusable connections in the pool that the server manages for you. This is a huge gain in multi-threading environments.