Skip navigation.

Repository Guide

  Previous Next vertical dots separating previous/next from contents/index/pdf Contents View as PDF   Get Adobe Reader

Using 7.x Repositories with 8.x Portals

WebLogic Portal 7.0, BEA provided the capability to bulkload content from third-party repositories into the BEA content database. Various changes in WebLogic 8.1, including database schema changes and API changes, prevent automatically bulkloading 7.0 repositories into the new 8.1 repository architecture.

If you need to continue to use 7.0-compatible repositories, BEA provides a content repository adapter with 8.1 that allows you to bulkload 7.0 content to the newer 8.1 repository architecture.

It is important to note that you must use WebLogic 8.1 tag libraries to work with content within an 8.1 portal. The 7.0 tags are not supported with 8.1

In addition, if you are using a 7.0-compatible repository, 8.1 repository management features are not available and cannot view your 7.0 repository via the Portal Administration tools.

For an graphic overview of how integration works with the adapter, see Figure A-1.


 

Figure A-1 Architectural Overview of Integrating 7.0 Repositories with a 8.1 Virtual Content Repository

Architectural Overview of Integrating 7.0 Repositories with a 8.1 Virtual Content Repository


 


 

 


Configuring a 7.0 repository for use with an 8.1 Portal

Configuring a 7.0 repository to use the content adapter requires the following steps:

Note: These tasks assume you are NOT working with an EAR file. If you are working in an EAR file, you will need to explode the EAR file in order to make the necessary configuration changes.

 


Step 1: Edit Deployment Descriptor

The <WL_HOME_8.1><portalAPP_name>/META-INF/application-config.xml file is the deployment descriptor that contains repository configuration. Locate this file within your installation and use an XML editor or text editor to do the following

Register the DocumentManager

You need to register the DocumentManager with the respective 8.1 application. To do this, add the configuration information for the 7.0 CMS Repository immediately before the <ContentManagement/> element (within the <WL_HOME_8.1><portalAPP_name>/META-INF/application-config.xml file).

Note: This sample text assumes the default settings. Refer to your existing 7.0 configuration files for any information specific for your deployment. For example, you'll need to change this text if you have customized or renamed the default manager and connection pool names.

<!-- Portal 7.0 CMS Repository -->	
	<DocumentManager
	      Name="default"
	      DocumentConnectionPoolName="default"
	      PropertyCase="none"
	      MetadataCaching="true"
	      MetadataCacheName="documentMetadataCache"
	      UserIdInCacheKey="false"
	      ContentCaching="true"
	      ContentCacheName="documentContentCache"
	      MaxCachedContentSize="32768"
	    >
	    </DocumentManager>
	    <DocumentConnectionPool
	      Name="default"
	      DriverName="com.bea.p13n.content.document.jdbc.Driver"
      URL="jdbc:beasys:docmgmt:com.bea.p13n.content.document.ref.RefDocumentProvider"
Properties="jdbc.dataSource=weblogic.jdbc.jts.commercePool;schemaXML=.\dmsBase/doc-schemas;docBase=.\dmsBase"
	      InitialCapacity="20"
	      MaxCapacity="20"
	      CapacityIncrement="0"
	    />
<!-- /Portal 7.0 CMS Repository -->	

Register the Content Repository Adapter

You need to register the Content Repository adapter for the respective portal application.

To do this, you'll need to add the content store name and class to the end of the existing <ContentManagement/> element within the <WL_HOME_8.1><portalAPP_name>/META-INF/application-config.xml file.

Here is an example content store name and class:

Note: This sample text assumes the default settings. Refer to your existing 7.0 configuration files for any information specific for your deployment. For example, you'll need to change this text if you have customized or renamed the default manager and connection pool names.


 
<ContentStore Name="adapter"
ClassName="com.bea.p13n.content.adapter.RepositoryImpl"
Properties="CONTENT_MANAGER_HOME=${APPNAME}.BEA_personalization.DocumentManager"/>

 


Step 2: Create 7.0 Content Tables within the 8.1 Database

In this step, you will create the necessary database tables to support storing 7.0 content within your 8.1 database. It is recommended that a DBA perform this step, for more information about how to run database scripts, see the respective vendor database sections in the Database Administration Guide.

Specifically, you'll need to create the Portal 7.0 content schema tables (DOCUMENT and DOCUMENT_METADATA) for the DocumentManager(s) you are using.

To do this, create an SQL script containing the 7.0 content schema information and run that script against the 8.1 database. The SQL extract below shows the table and key creation, as well as the index creation:

CREATE TABLE DOCUMENT (
    ID VARCHAR2(254) NOT NULL,
    DOCUMENT_SIZE NUMBER(15) NOT NULL,
    VERSION NUMBER(15) NULL,
    AUTHOR VARCHAR2(50) NULL,
    CREATION_DATE DATE NULL,
    LOCKED_BY VARCHAR2(50) NULL,
    MODIFIED_DATE DATE NULL,
    MODIFIED_BY VARCHAR2(50) NULL,
    DESCRIPTION VARCHAR2(2000) NULL,
    COMMENTS VARCHAR2(2000) NULL,
    MIME_TYPE VARCHAR2(100) NOT NULL)
;
CREATE TABLE DOCUMENT_METADATA (
    ID VARCHAR2(254) NOT NULL,
    NAME VARCHAR2(240) NOT NULL,
    STATE VARCHAR2(50) NULL,
    VALUE VARCHAR2(2000) NULL)
;
ALTER TABLE DOCUMENT
   ADD CONSTRAINT PK_DOCUMENT
   PRIMARY KEY (
      ID
   )
;D
ALTER TABLE DOCUMENT_METADATA
   ADD CONSTRAINT PK_DOCUMENT_MD
   PRIMARY KEY (
      ID,
   NAME
   )
;
ALTER TABLE DOCUMENT_METADATA
   ADD CONSTRAINT FK1_DOCUMENT_MD
   FOREIGN KEY ( ID)
   REFERENCES DOCUMENT (ID)
   ON DELETE CASCADE
;
CREATE  INDEX IX1_DOCUMENT ON DOCUMENT
(
  DOCUMENT_SIZE  ASC
)
;
CREATE  INDEX IX2_DOCUMENT ON DOCUMENT
(
  MIME_TYPE  ASC

)

;

CREATE  INDEX IX3_DOCUMENT ON DOCUMENT
(
  MODIFIED_DATE  ASC
)
;
CREATE  INDEX IX1_DOCUMENT_MD ON DOCUMENT_METADATA
(
  NAME  ASC
)
;
CREATE  INDEX IX2_DOCUMENT_MD ON DOCUMENT_METADATA
(
  STATE  ASC
)
;

 


Step 3: Create Filesystem Document Directory

Copy or create the content directory (e.g. dmsBase) for each DocumentManager to the Portal 8.1 domain, as for Portal 7.0. You will use this directory when you bulkload 7.0 content to the 8.1 repository.

 


Step 4: Loading Content with Bulkloader

After you have configured the content adapter, you can now bulkload content from a 7.0 repository into the 8.1 Virtual Content Repository. For more information about using the Bulkloader, see the Bulkloader Guide.

  1. Copy the loaddocs.properties file from a Portal 7.0 domain directory and update the database details and connection pool names as required. The following example is for the default DocumentManager using Oracle 9i:
weblogic.jdbc.connectionPool.commercePool=\
        url=jdbc:weblogic:rmi,\
        driver=weblogic.jdbc.rmi.Driver,\
        props=weblogic.user=weblogic;weblogic.credential=weblogic;\
              weblogic.server.url=t3://localhost:7001;\
              weblogic.jdbc.datasource=weblogic.jdbc.jts.commercePool,\
        verbose=true
weblogic.jdbc.connectionPool.directToDB=\
        url=jdbc:oracle:thin:@dbserver6:1521:DBS6OR9U,\
        driver=oracle.jdbc.OracleDriver,\
props=user=user1;password=user1;server=jdbc:oracle:thin:@dbserver1:1521:DBS1OR9U;password=user1

Note: When loading data into the repository all metadata is stored as properties and types. In addition to the user-defined types and properties there are explicit (system) content properties. These are documented in the WebLogic Workshop help system on edocs (http://download.oracle.com/docs/cd/E13226_01/workshop/docs81/doc/en/core/index.html). Most of these properties will return information about data loaded via the content adapter, however some will not. Below is a table showing which properties can and cannot be used.


 

Table A-1 Content Adapter Supported System Properties

Property

API

Description

Use with Content adapter

cm_uid
Node.id.uid

The unique ID for a content item. You can view a content item's unique ID by selecting the content item in the WebLogic Administration Portal and viewing the description in the Edit Content window.

Yes

cm_createdDate
Node.createDate

The date on which a content item was created. You can view Creation Date information for content items by selecting their content folder in the WebLogic Administration Portal and selecting the Browse Children page.

Yes

cm_createdBy
Node.createdBy

The user who created the content item. You can view Created By information for content items by selecting their content folder in the WebLogic Administration Portal and selecting the Browse Children page.

Yes

cm_modifiedDate
Node.ModifiedDate

The date the content item was last modified. You can view Modified Date information for content items by selecting their content folder in the WebLogic Administration Portal and selecting the Browse Children page.

Yes

cm_nodeName
Node.name

The name of the content item, as shown the WebLogic Administration Portal.

Yes

cm_path
Node.path

The Virtual Content Repository path to the content item. For example,

'/BEA Repository/juvenilebooks/TheCrazyAdventure'.

Yes

cm_isHierarchy
Node.type ==Node.HIERARCHY

Identifies a content folder rather than a content item. Content folders can contain content items and child content folders. When using this property in queries, compare it using a Boolean value of true or false.

No

cm_isContent
Node.type == Node.CONTENT

Identifies a content item rather than a content folder. Content items contain properties from the type with which they are associated. When using this property in queries, compare it using a Boolean value of true or false.

No

cm_objectClass
Node.objectClass.name

The content type associated with a content item. You can view Type information for content items by selecting their content folder in the WebLogic Administration Portal and selecting the Browse Children page, or by selecting a content item and viewing its header row on the Edit Content page.

No

cm_contentType
BinaryValue.contentType

The mime type for content item binary properties. For example, 'image/jpeg'. You can view the mime type of a content item by selecting it in the WebLogic Administration Portal and looking at the binary property information.

Yes

cm_binarySize

BinaryValue.size

(For Node Properties) The size of the binary value of content items. You can view the size of a content item's binary value by selecting the content item in the WebLogic Administration Portal, clicking Download File on the binary property, and right-clicking the displayed binary file to view the file properties.

When using this property in a query, specify binary size in bytes.

Yes

cm_binaryName

BinaryValue.name

(For Node Properties) The file name of the binary value of a content item. You can view the name of a content item's binary value by selecting the content item in the WebLogic Administration Portal and viewing the File Name value.

Yes


 
  1. Start the Server:
  2. Run the Bulkloader.
  3. Run the Portal 7.0 Bulkloader against the document base (dmsBase) in the Portal 8.1 domain. The following script illustrates an example Bulkloader script (loaddocs.bat) for the default DocumentManager:

call .\setDomainEnv.cmd
set CLASSPATH=%CLASSPATH%; C:\wl8sp4\weblogic81\portal\lib\wps\ejb\wps.jar
java -classpath %CLASSPATH% com.bea.p13n.content.document.ref.loader.BulkLoader -verbose -ignore "doc-schemas" -ignore "Ads" -properties loaddocs.properties -conPool commercePool -schema .\dmsBase\doc-schemas\doc-schema.xml -d .\dmsBase
java -classpath %CLASSPATH% com.bea.p13n.content.document.ref.loader.BulkLoader -verbose -ignore "doc-schemas" -properties loaddocs.properties -conPool commercePool -schema .\dmsBase\doc-schemas\ad-schema.xml -schemaName Ads -d .\dmsBase Ads

 

Back to Top Previous Next