DB2 Connect as a Java application server

 

Many of the shortcomings associated with scripting languages can be overcome by using Java™ instead. IBM® provides both applets and applications that allow you to use Java at every stage of a web transaction. The solutions IBM provides allow for a mix of techniques, which means you can use scripting solutions such as Perl DBI or Microsoft® Active Server Pages with DB2®, or move towards a more robust implementation provided by a Java application server such as IBM WebSphere®.

There are two Application Programming Interfaces (APIs) for Java programmers. The first, JDBC, is supported for using Java to develop data-aware Java Applets, Java Applications as well as Java servlets, Java server pages (JSP) and Enterprise Java Beans (EJB). JDBC is a call-level or method invocation API. The other Java API is SQLJ. SQLJ provides the ability to specify SQL inline within a Java program. DB2 can use both APIs, on either the client or server side of a web transaction.

On the client side, applets, data-aware applets, and applications are supported. On the database side Java enablement consists of database objects, such as user-defined functions and stored procedures.

For DB2 for OS/390® and z/OS®, DB2 for VSE and VM, DB2 Universal Database™ (UDB) for iSeries®, and DB2 for i5/OS, there are two different ways to deploy a Java application. You can use the direct connectivity provided by DB2 Connect™ Personal Edition with TCP/IP, or you can choose to go through a DB2 Connect server product that will provide connectivity to the host or the System i™ data server.

In both cases, the user on the Web does not require any special software to access the database, only a standard web browser. The only thing that needs to be installed is a DB2 Connect server product and any industry standard Web server. If the web server and DB2 Connect are not on the same physical machines, a IBM data server client needs to be installed on the web server.

For DB2 for OS/390 and z/OS, the key component is a DB2 Connect server product running on a mid-tier server. This component provides JDBC server enablement, in addition to connecting to the DB2 for OS/390 and z/OS, DB2 for VSE and VM, DB2 Universal Database (UDB) for iSeries, and DB2 for i5/OS server. Again, there is no need for any special software for the client's web browser.

IBM provides extensive support and tooling for developing Java applications and applets. For database application development, DB2 Database Enterprise Developer Edition provides Rational® Web Developer, IBM Data Studio, DB2 Embedded Application Server, Cloudscape™ Version 10.2, as well as DB2 and DB2 Connect for testing. Third-party tools such as NetBeans, Borland JBuilder or Symantec Visual Cafe will also work with IBM's database solutions.

Parent topic: DB2 Connect scenarios