About Question enthuware.ocpjp.ii.v11.2.1199 :

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
liugengyu
Posts: 8
Joined: Thu Jul 09, 2020 4:09 pm
Contact:

About Question enthuware.ocpjp.ii.v11.2.1199 :

Post by liugengyu »

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. :x What does it mean by JDBC driver implementation? Can soneone explain it for me?

Thanks a lot. :)
Last edited by liugengyu on Fri Jul 10, 2020 11:44 am, edited 1 time in total.

admin
Site Admin
Posts: 10058
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.ocpjp.ii.v11.2.1199 :

Post by admin »

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
If you like our products and services, please help us by posting your review here.

liugengyu
Posts: 8
Joined: Thu Jul 09, 2020 4:09 pm
Contact:

Re: About Question enthuware.ocpjp.ii.v11.2.1199 :

Post by liugengyu »

Understood. Already added your comments into my note. Thanks!

liugengyu
Posts: 8
Joined: Thu Jul 09, 2020 4:09 pm
Contact:

Re: About Question enthuware.ocpjp.ii.v11.2.1199 :

Post by liugengyu »

admin wrote:
Fri Jul 10, 2020 11:30 am
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
Understood. Already added your comments into my note. Thanks!

noeloo
Posts: 61
Joined: Sat Feb 15, 2020 8:56 am
Contact:

Re: About Question enthuware.ocpjp.ii.v11.2.1199 :

Post by noeloo »

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).
Doesn't it?
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.

admin
Site Admin
Posts: 10058
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.ocpjp.ii.v11.2.1199 :

Post by admin »

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 119 guests