I presented a 3 Day Introduction to XPages Course this week for one of my clients, and they challenged me to have XPages connect to a DB2 environment they had set up. I must be honest I was a touch nervous as this would be my first time attempting this period.
I told the client that we would spend the last day (T0day) focusing on this particular challenge, and then also show them how the Application Layout Custom Control works.
We started around 7:00am this morning, and by 8:15am, we had a View Panel with 1 column displaying data from a DB2 table. Here’s the best part…..we got it right on our FIRST TRY.
Now, I have to make mention and take my hat off to my client for providing me with all the DB2 resources I needed to make the JDBC Data Source work, which included:
1. JDBC Jar Files which were placed in the Domino Directory under the folder “jvmlibext”
2. The URL to the DB2 Database that we planned on using
3. The Class name of the JDBC DB2 Driver
Using this Video from Niklas Heidloff as a reference, as well as perusing the JDBC NSF that ships with the 853 XPages Extension Library, we were able to configure a .jdbc file in our Database’s Package Explorer, create a View Panel in our XPage, map it to a JDBCQuery Data Source, and BOOEM!!!
This was just too easy. I’ll submit a video tutorial on how to achieve this as soon as I’m done with my other tutorials. My backlog is starting to build up. However, for those who are anxious, use the video link I added in this post, and reference the notes below:
NOTES FOR DB2 INTEGRATION:
Using Niklas’s Video as a reference, do the following:
1. in your .jdbc file that you need to create in the Database’s Package Explorer under the “WEB-INF/jdbc” folder, have your XML look something along the lines of:
2. You will need to copy the 2 JDBC Jar Files that come with the DB2 Install into the “jvmlibext” folder in the Domino Program Directory.
3. Restart the HTTP Server (Restart Task HTTP)
You should be able to come right by following the rest of the video.
Enjoy, and please feel free to provide feedback.