db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David W. Van Couvering" <David.Vancouver...@Sun.COM>
Subject How does an application get access to JDBC implementation classes
Date Sat, 19 Nov 2005 01:00:57 GMT
Hi, all.  I would like to know exactly what are the approved/documented 
ways to get a connection.

My reason for asking this is, I want to understand what all touch points 
there are in JDBC that allow you to get access to the first 
implementation class for a given driver.  If I have it right, everything 
hangs off of a Connection, so what are the ways in which you get a 
Connection?

I know one way is to load the driver class and then use 
DriverManager.getConnection().

Another way is, in a managed environment,  use JNDI or some other 
mechanism to load a registered DataSource and then use that to get a 
connection.

Are there other ways?  Can, for instance, a user directly create an 
driver specific DataSource instance (rather than going through JNDI) and 
then use that to create connections?  Or is that not a supported mechanism?

Thanks,

David

Mime
View raw message