Why JDBC?

JDBC is a standard API that lets you access virtually any data source in tabular format from your J2EE applications. It provides cross-DBMS connectivity to a wide range of SQL databases, spreadsheets, and flat files. SQL is the lingua franca of the standard database language to separate application data from its logic.

JDBC enables developers to write enterprise applications that run on any J2EE-compliant application server that requires access to enterprise data. It provides separation of application logic from the underlying database operating environment. JDBC encapsulates the connecting method, database vendor, security, and multiuser access. With a JDBC technology–enabled driver, a developer can even connect all corporate data in a heterogeneous database environment.

JDBC is used by many components across all J2EE tiers. First, in the client tier, JDBC can be accessed by Java applets or Java applications. Second, in the Web tier, it can be accessed by JSP, servlet, or Taglib. Finally, all types of EJBs such as session, entity, and message-driven beans can use JDBC from the EJB tier.

Later in this book, on Day 11 “Developing Container-Managed Persistence Entity Beans,” you'll learn about entity beans in a container-managed persistence (CMP) mode, where application logic is separated from its persistence. JDBC is still being used behind the scenes in the deployment descriptor and in a declarative manner, but is not used directly by the code. However, this is different from the case of bean-managed persistence (BMP) where entity beans use JDBC to manage database access, which will be addressed on Day 10, “Developing Bean-Managed Persistence Entity Beans.”

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.105.215