A JDBC driver implementation must provide implementation classes for which of the following interfaces?
I don't understand the question and the answer at all. What does it mean by JDBC driver implementation? Can soneone explain it for me?
Thanks a lot.
About Question enthuware.ocpjp.ii.v11.2.1199 :
Moderator: admin
-
- Posts: 8
- Joined: Thu Jul 09, 2020 4:09 pm
- Contact:
About Question enthuware.ocpjp.ii.v11.2.1199 :
Last edited by liugengyu on Fri Jul 10, 2020 11:44 am, edited 1 time in total.
-
- Site Admin
- Posts: 10058
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.ii.v11.2.1199 :
The Java JDBC package is just a set of interfaces and helper classes. They don't really contain any code to actually connect to any database and fetch data/execute queries etc. Every database vendor (such as Oracle, MSSQL, MySQL etc.) provides the implementation classes for these interfaces, which do the real work of connecting to their database.
See this for details: https://www.marcobehler.com/guides/jdbc
See this for details: https://www.marcobehler.com/guides/jdbc
If you like our products and services, please help us by posting your review here.
-
- Posts: 8
- Joined: Thu Jul 09, 2020 4:09 pm
- Contact:
Re: About Question enthuware.ocpjp.ii.v11.2.1199 :
Understood. Already added your comments into my note. Thanks!
-
- Posts: 8
- Joined: Thu Jul 09, 2020 4:09 pm
- Contact:
Re: About Question enthuware.ocpjp.ii.v11.2.1199 :
Understood. Already added your comments into my note. Thanks!admin wrote: ↑Fri Jul 10, 2020 11:30 amThe Java JDBC package is just a set of interfaces and helper classes. They don't really contain any code to actually connect to any database and fetch data/execute queries etc. Every database vendor (such as Oracle, MSSQL, MySQL etc.) provides the implementation classes for these interfaces, which do the real work of connecting to their database.
See this for details: https://www.marcobehler.com/guides/jdbc
-
- Posts: 61
- Joined: Sat Feb 15, 2020 8:56 am
- Contact:
Re: About Question enthuware.ocpjp.ii.v11.2.1199 :
Doesn't it?The most important benefit is that the application code does not need to have access to database connection details (i.e. userid, pwd, and dburl).
I'm going through Oracle tutorial (I know it's written for Java 8, but did it really change later?) at https://docs.oracle.com/javase/tutorial ... urces.html and from what I see, you still need to pass user and password when getting a connection.
-
- Site Admin
- Posts: 10058
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.ii.v11.2.1199 :
Yes, a DataSource is configured in the application contaciner. Application code simply looks the data source up using JNDI and call dataSource.getConnection(). No connection parameters are required because application code does not "create" a data source. The deployer creates (actually, "configures") datasource in the application container. While configuration, the deployer specifies the url, userid, password, and other connection parameters.
If you like our products and services, please help us by posting your review here.
Who is online
Users browsing this forum: No registered users and 119 guests