O'Reilly logo

Java EE 7 with GlassFish 4 Application Server by David R. Heffelfinger

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Setting up Database Connectivity

Any nontrivial Java EE application will connect to a Relational Database Management System (RDBMS). Supported RDBMS systems include Java DB, Oracle, Derby, Sybase, DB2, PointBase, MySQL, PostgreSQL, Informix, Cloudscape, and SQL Server. In this section, we will demonstrate how to set up GlassFish to communicate with a MySQL database. The procedure is similar for other RDBMS systems.

Note

GlassFish comes bundled with an RDBMS called JavaDB. This RDBMS is based on Apache Derby. To limit the download and configuration needed to follow this book's code, all examples needing an RDBMS will use the bundled JavaDB RDBMS. The instructions in this section are to illustrate how to connect GlassFish to a third-party RDBMS.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required