Level: Intermediate Lei Zhao, Software Engineer, IBM Corporation
06 Dec 2004 Integrate IBM Workplace Web Content Management and DB2 Content Manager for an enterprise Web content management solution. This article highlights the task required to integrate the two systems and provides an example of how to use the two together.
Content management is increasingly important in the business world. For companies competing in an on-demand environment, the ability to manage and deliver content quickly and efficiently is a requirement to succeed. With more and more information delivered via the Internet and corporate intranets, Web content plays a more important role for enterprises. The life cycle management of Web content covers creation, publication, storage, search/retrieval, access control, and content integration. The integrated solution of IBM content management products described in this article -- IBM Workplace Web Content Management and DB2 Content Manager -- fulfills the requirements of enterprise Web content management.
IBM Workplace Web Content Management is one of the key components of the IBM Workplace product family, which helps you manage your corporate content from initial creation to final Web presentation. It provides a sophisticated content management system for Web sites that can be used by both non-technical and technical users. In this article, we demonstrate how to integrate Workplace Web Content Management and DB2 Content Manager to provide a uniform enterprise Web content management system. The integration is composed of two main parts: storing Workplace Web Content Management data within DB2 Content Manager and publishing native content and metadata from the Content Manager in Workplace Web Content Management. This article assumes that you are familiar with Workplace Web Content Management and with DB2 Content Manager.
By default, a Web content management environment stores data files on the file system. Unlike file systems, DB2 Content Manager uses a powerful relational database to provide indexed search, security, and granular access control at the individual content item level. Thus, Workplace Web Content Management's functionality can be extended to include DB2 Content Manager's out-of-the-box functions, such as:
- Single repository for enterprise content
- A scalable enterprise content repository
- Failover using Resource Manager replication
- Rich data mode
- Powerful and open API
By publishing native content and metadata from the DB2 Content Manager in Workplace Web Content Management, we can provide a single window for users to retrieve all kinds of enterprise Web content, thereby increasing the return on investment for both products.
This article provides an introduction to IBM Workplace Web Content Management and DB2 Content Manager integration. It highlights certain aspects of configuration of the two systems and provides a sample of how to use Workplace Web Content Management and DB2 Content Manager together. For more in-depth information about the integration of these two systems, refer to the IBM Redbook, "Lotus Workplace Web Content Management and Content Manager Working Together for LWWCM Java Edition V2 and CM V8 Only."
IBM content management products
IBM Workplace Web Content Management is a Web-based, multi-user authoring environment tool that helps customers quickly and efficiently build dynamic Web sites from initial creation to final Web presentation. Workplace Web Content Management provides a sophisticated content management system for Web sites for all users.
DB2 Content Manager is a production-strength content management system designed to capture, process, and store vast amounts of converted paper-based information. It is also used for rich media management. In recent versions, Content Manager has become a highly scalable repository for virtually any type of digital content, including HTML- and XML-based Web content, document images, electronic office documents, and rich media, such as digital video and audio.
When stored in DB2 Content Manager, Workplace Web Content Management content has two kinds of objects. One kind is non-binary objects (such as site, content, component, and so on), which have only an AJPEData item, and the other kind is binary objects (including file components and image components), which also have an AJPEResources item and an RM object. An in-depth discussion of these item types is beyond the scope of this article, but you should know how data is stored.
For more about the concepts and features of Workplace Web Content Management and DB2 Content Manager, see the developerWorks article, "IBM LWWCM concepts and features with IBM DB2 CM as a repository."
Configuration
Assuming that you have already installed Workplace Web Content Management and DB2 Content Manager, the first step in configuring the environment is to install the DB2 Information Integrator for Content (formerly DB2 Enterprise Information Portal) on the WebSphere Application Server on which Workplace Web Content Management is installed. The DB2 Information Integrator for Content provides the connectors needed to integrate Workplace Web Content Management and DB2 Content Manager. These connectors allow the two servers to communicate with one another. For more information about DB2 Information Integrator for Content, see its product page.
If you have not installed Workplace Web Content Management or DB2 Content Manager, refer to the respective InfoCenters for each product.
During the installation of DB2 Information Integrator for Content, there are some steps that should be noted as follows. In the Select Machine Type panel, select the EIP development workstation option.
Figure 1. Select Machine Type panel
In the Component Selection panel, select the Local connectors and the Connector toolkit and samples options. Then select the Content Manager V8 connector subcomponent.
Figure 2. Component Select panel
In the Configure Content Manager v8 Server Connection panel, you define the information required to connect to the DB2 Content Manager server. When the administrator defines and connects to a DB2 Content Manager server, DB2 Information Integrator for Content uses the values you define in this window to connect to the server. By default, DB2 Information Integrator for Content copies the information from this window to the configuration files, cmbicmsrvs.ini and cmbicmenv.ini, in the C:\Program Files\IBM\Cmgmt directory.
Enter the following values for this installation panel:
- Database name: Enter the DB2 Content Manager Version 8 database name. If you have cataloged the database, enter the alias name in this field.
- Schema name: Enter the schema name that was assigned to the DB2 Content Manager Version 8 database when the database was installed.
- Authentication type: If you leave the default setting of Server, then the DB2 Content Manager Version 8 database user ID and password is sent to the DB2 Content Manager server for validation. If you select Client, no validation is performed by DB2, and the user ID that you enter logs into your system and allows connection to the DB2 Content Manager Library Server, which manages DB2 Content Manager data. When you log into the client workstation, you must enter a user ID that has DB2 connect privileges.
- Database connection ID: Enter the user ID and password that was defined as the Database connection ID when the Content Manager Library Server database was installed.
Figure 3. Configure Content Manager v8 Server Connection panel
The next step is to update the WebSphere Application Server classpath settings for the Java Virtual Machine.
- Log into the WebSphere Application Server Administrative Console as administrator.
- Select Servers - Application Servers - server1 - Process Definition - Java Virtual Machine.
- Add the following entries to the Classpaths section. The following items assume that the installation directory CMBROOT is located on the root of your system. Modify the classpaths to reflect your installation directory path.
C:\Program Files\IBM\Cmgmt
C:\CMBROOT\lib\cmbview81.jar
C:\CMBROOT\lib\cmb81.jar
C:\CMBROOT\lib\cmbcm81.jar
C:\CMBROOT\lib\cmbjdbc81.jar
C:\CMBROOT\lib\cmbfed81.jar
C:\CMBROOT\lib\cmbdb281.jar
C:\CMBROOT\lib\cmbdj81.jar
C:\CMBROOT\lib\cmbicm81.jar
C:\CMBROOT\lib\cmbutil81.jar
C:\CMBROOT\lib\cmbutiljdbc81.jar
C:\CMBROOT\lib\cmbutilicm81.jar
C:\CMBROOT\lib\cmbutilfed81.jar
C:\CMBROOT\lib\xerces.jar
C:\CMBROOT\lib\essrv.jar
C:\CMBROOT\lib\esclisrv.jar
C:\CMBROOT\lib\cmblog4j81.jar
C:\CMBROOT\lib\log4j.jar
C:\CMBROOT\lib\cmbsdk81.jar
C:\CMBROOT\lib\cmbwas81.jar
C:\Progra~1\SQLLIB\JAVA\DB2JAVA.ZIP
|
- Click the Apply button, and then save to the Master Configuration.
Next, make changes in the Workplace Web Content Management configuration (connect.cfg) and properties (aptrixjpe.properties) files. They are located in the config directory on your Workplace Web Content Management server. The system directory and its subdirectories (indexes, cache, and holding) are located in the iLotus Workplace Web Content Management directory.
For the aptrixjpe.properties file, amend the following values:
#persistencies supported are FileSystem, JDBC, and CM
manager.persistence=CM
resource.persistence=CM
# CM persistency settings
# CM Server information
cm.server=[CM_SERVER_NAME]
cm.username=[CM_USER_NAME]
cm.password=[CM_PASSWORD]
cm.versionControl=true/false
cm.jpeserverIdentifier=[CM_ILotus Workplace Web Content Management_SERVER_ID] |
where:
- [CM_SERVER_NAME] = Your DB2 Content Manager server name, for example, our server name is ICMNLSDB.
- [CM_USER_NAME] = Default DB2 Content Manager administration user, for instance, icmadmin.
- [CM_PASSWORD] = Administration user password.
- [CM_ILotus Workplace Web Content Management_SERVER_ID] = The name of the Workplace Web Content Management application server (WebSphere Application Server).
- Parameter cm.versionControl is optional. If it is set True, the Version Control features of DB2 Content Manager can be used.
There are additional Workplace Web Content Management attributes that you can set if required. To obtain the full list of these attributes, see the IBM Workplace Web Content Management InfoCenter.
In the connect.cfg file, add the following to the <DataProviders> module:
<CM value="com.presence.connect.business.template.provider.CM8DataProvider"/>
Delete any existing indexes from the Workplace Web Content Management server. Index files are located under the iLotus Workplace Web Content Management\system\indexes directory. Start the WebSphere Application Server and Workplace Web Content Management, and then run the AJPEGUI module to create the Workplace Web Content Management user interface and to store it in DB2 Content Manager. In your Web browser, go to:
http://<HOST>:<PORT>/<CONTEXT_ROOT>/connect/?MOD=AJPEGUI
If necessary, configure Workplace Web Content Management Syndication to replicate any Workplace Web Content Management data from an existing Web content management server to the new Web content management server (DB2 Content Manager).
Publishing DB2 Content Manager content in Workplace Web Content Management
In this section, we briefly illustrate how a content object stored on the DB2 Content Manager server can be dynamically retrieved and displayed in Workplace Web Content Management. In our sample scenario, we build a simple police Web site to publish crime-related information. There are different kinds of crime-related files, such as mugshots, crime scene photos, video, and so on. These files are stored on the DB2 Content Manager server. In our sample, Workplace Web Content Management can dynamically extract related files for display.
To retrieve content for display, we will search for it in DB2 Content Manager. A powerful XML-based query language is available in DB2 Content Manager 8.2. To illustrate the main feature of CM Searching function, we have two examples.
Using a static query expression
Our first example uses a static query expression. Although the content extracted from DB2 Content Manager is dynamically generated, the query expression is determined when the developer creates the Connect tag. Figure 4 shows a Connect tag in Workplace Web Content Management.
Figure 4. Connect tag
In this example, we search for all criminals whose IDNumber starts with 650012 and whose age is between 10 and 18.
SEARCH='/Criminal[@IDNumber like "650012%" AND (@age between 10 and 18)]'
This search expression is determined when the HTML component is built. The process connector selection of corresponding page design must be checked.
We use a file called CriminalTemplate.html to display DB2 data; the file is placed in the following directory:
C:\IBM\WebSphere\AppServer\installedApps\Lotus Workplace Web Content Management\iLotus Workplace Web Content Management111_war.ear\iLotus Workplace Web Content Management.war
Here is a snippet of code from the CriminalTemplate.html file that builds a table to display DB2 data:
<TABLE width=600 border="1">
<RESULTSET>
<TR>
<th width="15%">Name </td>
<th width="15%">Gender </td>
<th width="15%">age </td>
<th width="15%">case type </td>
<th width="30%">Characteristic</td>
<th width="10%">photo</td>
</TR>
<LOOP>
<TR>
<TD><FIELD NAME="Name"></td>
<TD><FIELD NAME="Gender "> </td>
<TD><FIELD NAME="age"> </td>
<TD><FIELD NAME="CaseType"> </td>
<TD><FIELD NAME="Characteristic"> </td>
<TD><A HREF="<FIELD NAME=Part>" TARGET="_blank">view</A> </TD>
</TR>
</LOOP>
</RESULTSET>
</TABLE >
|
The <FIELD NAME=Part> tag refers to the document imported to this criminal. The result page is as follows.
Figure 5. Static query results page
When you click the view link in the photo column of the table, the document is either opened or downloaded.
Using a dynamic query expression
A more powerful function is the dynamic query expression. When the developer builds the Connect tag, he passes an Aptrix component tag to this query expression.
SEARCH='/Case[@CaseID="<AptrixCmpnt context="current" key="caseID" type="content"/>
When this query is performed at runtime, the real query expression is generated depending on the parameter passed, such as component values of current content, current site area, and so on.
Figure 6. Connect tag
In this sample, the searching expression changes with different content. This page displays all the photos that are related to the current case component. Both the attribute name and item type name are case-sensitive. The common operators (such as like, between, AND, or) are all supported. For more information about the Content Manager query expressions, please refer to Content Manager Application Programming Guide.
Conclusion
We hope that this article gave you an overview of the integration solution between Workplace Web Content Management and DB2 Content Manager. It can assist you in configuring the integration and in publishing native DB2 Content Manager content to a Workplace Web Content Management Web page. For more information about integrating Workplace Web Content Management and DB2 Content Manager, see the Resources section.
Resources
About the author  | |  | Lei Zhao is a software engineer in the Shanghai Globalization Laboratory (SGL), CSDL, IBM China. He joined IBM in February 2004 and participated in globalization and integration solution projects as both tester and developer. He has deep interests in Web services, Lotus products, and globalization solutions. |
Rate this page
|