Nov 4, 2012, 2:19 AM
64 Posts

Create DB2 Database/Retrieve Data (JavaAgent - Part 1)

  • Category: Managed Beans in NSF
  • Platform: Windows
  • Release: 8.5.3
  • Role: Developer
  • Tags: JavaAgent,DB2
  • Replies: 0
Knowledge Sharing:

DB2, JavaAgent

Create DB2 Database/Retrieve Data (Part 1)


System Requirements:

Download DB2 Express-C

Download Domino Designer 8.5.3 Environment (DDE)


Create a DB2 database, configure a DataSource, connect to the back-end, add records and retrieve DB2 data using a JavaAgent. Information that can be used to load records into Lotus Notes Domino Database located on your C Drive as documents; data that can also be accessed via Xpages Application...


Information contained in the following is presented as is. This tutorial assumes you have basic programming knowledge. All tutorials are based on an Eclipse/Eclipse-based software. Should you need to familiarize yourself with a certain Eclipse environment, prior to continuing this tutorial, please stop now and see our Tutorials page...

Download/Create DB2 Database (Configure DataSource)

At this point we suspect you have downloaded and installed DB2 Express-C and Domino Designer 8.5.3. Let's create a database, configure a DataSource, put some records, and access the back-end using a simple Java Program, run it as a JavaAgent, view data/documents via Console Window. Migate code to Package Explorer and access via Xpages. Copy and paste below code samples, where necessary, to your environement... areas of interest have been highlighted for your convenience, screenshots included.

You should visit: for addtional information about install procedures and tips.



Use System User with DB2

Once you have created a DB2 database, it creates a system user on your Operating System (OS); this tutorial is based on Windows 7 OS. The DB2 user, namely DB2ADMIN is important to note because this the user your DB2 software will use to allow connection to the back-end sample databases, and those you will create from scratch (See Figure 1). In this case, we created a DOMINODB database to compliment part one of this tutorial (See Figure 2, 3, 4).