Repository Guide
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
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
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.
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
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 -->
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"/>
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
)
;
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.
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.
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.
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
![]() |
![]() |
![]() |