Skip navigation.

Repository Guide

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

Creating Additional BEA Repositories

Your content management system can be made up of multiple BEA Systems repositories and/or multiple third-party repositories. You can create multiple content repositories to meet your unique business needs. For example, if you need a physical separation of your content data then you can create multiple BEA Repositories.

Note: You must be working within an XA domain to effectively use multiple repositories, if using Library Services.

Note: For large projects with several thousand content items, you may need to use separate database instances and minimize changes done in the production environment.

This process has five major steps:

 


Step 1: Create Database Objects for the New Repository

In this step you will create database objects for your additional content management database.

  1. For Oracle or DB2 databases, create a new database user for your additional content management database. For SQL Server or Sybase, create a new database for your additional content management database objects.
  2. BEA provides the following sample scripts which can be copied and used to define the database resources that must be configured proir to running any .sql scripts. For each repository, a separate database/database user must be predefined according to the appropriate sample script, see the WebLogic Portal Database Administration Guide for more details on creating databases.

Note: PointBase is not recommended for a production repository.

  1. Connect to the database as the database user created in step 1.
  2. Navigate to the appropriate database directory based on your environment. Depending on your database vendor, the path is:
  3. Oracle: WL_HOME/portal/db/oracle/817

    Note: This path is used for both Oracle 8.1.7 and 9i.

    SQL Server: WL_HOME/portal/db/ql_server/2000

    Sybase: WL_HOME/portal/db/sybase/125

    DB2: WL_HOME/portal/db/db2/8

  4. Run the following scripts to create content management database objects:
  5. Run the following scripts from the directory WL_HOME/portal/db/data/required:

This task is complete.

 


Step 2: Connect the New Repository to the Server

  1. Start WebLogic Server for your domain, and login to the console.
  2. Configure a new connection pool for your additional content management database.
    1. Go to Services -> JDBC -> Connection Pools.
    2. Right-click an existing XA Connection Pool and select Clone.

Note: For more information regarding XA connections, see

http://download.oracle.com/docs/cd/E13196_01/platform/docs81/confgwiz/examples.html#1074297

    1. Choose a name for the new Connection Pool (For example: contentPool2).
    2. In the General tab, edit the settings for the cloned pool to match those of the new database objects you will be using for the additional repository.
    3. Click Clone, and apply the changes.
  1. Update your data sources.
    1. From Services -> JDBC -> Data Sources, right-click a data source.
    2. Select "Clone..." from the drop-down menu.
    3. Change the name of the data source from "Clone of ..." to something meaningful (For example: newContentDataSource).
    4. Set the JNDI Name to match the new data source name.
    5. Using the Pool Name drop down menu, set the pool to the new connection pool name (For example, contentPool2).
    6. Click Clone, and apply the changes.

 


Step 3: Associate your Portal Application with the New Repository

The BEA Repository uses Entity Beans (EJBs) to associate a portal application with its data source(s). Because BEA's default configuration is configured for just one data source (or repository), you'll need to modify the XML files that maintain the EJB definitions for your data source(s). In short, you need to create new EJBs in these files that can be utilized by the additional repository you have created.

The easiest way to do this is to use the existing XML files as templates for creating the new EJB definitions and then add the new EJB definitions to the original file.

Redeploy Content EJBs to New Data Source (ejb-jar.xml,weblogic-ejb-jar.xml, and the weblogic-cmp-rdbms-jar.xml).

  1. Create the workspace in which you will do your editing.
    1. Create two temporary, working directories to use when completing your edits. For example, c:/temp/working and c:/temp/newfiles
    2. Locate the content_repo.jar in the portal application directory that you want to associate with the new repository. For example, WL_HOME /weblogic81/samples/portal/portalApp/content_repo.jar
    3. Place a copy of the content_repo.jar file in each of the working directories you have created.
    4. Using a compression utility such as WinZip or JavaJar, unzip each content_repo.jar in its respective directory. At this point, the content_repo.jar files and their contents are identical.
    5. You will now work with three files:
    • ejb-jar.xml
    • weblogic-ejb-jar.xml
    • weblogic-ejb-rdbms-jar.xml

You will make edits to the files contained in your C:/temp/working directory and copy those changes to the files contained in your C:/temp/newfiles directory.

  1. After creating the temp directories and files to work with, configure the ejb-jar.xml file.
    1. Open the C:/temp/working/ejb-jar.xml file and open the C:/temp/newfiles/ejb-jar.xml file. You will have two files open.
    2. In the C:/temp/working/ejb-jar.xml file, find and replace, EJB (EJB is case sensitive) with a new name. For example: EJBNew.
    3. Note: You will need to use this new name throughout all of the files.

    4. Copy the following from the C:/temp/working/ejb-jar.xml file to the C:/temp/newfiles/ejb-jar.xml file.
    5. Copy everything between . . . from your c:/temp/working/ejb-jar.xml file

      and paste before . . . in your c:/temp/newfiles/ejb-jar.xml file

      <enterprise-beans> </enterprise-beans>

      </enterprise-beans>

      <relationships> </relationships>

      </relationships>

      <assembly-descriptor> </assembly-descriptor>

      </assembly-descriptor>


       
    6. Save the C:/temp/newfiles/ejb-jar.xml.
  2. Using the temporary directories and files you created in step 1. configure the META-INF/weblogic-ejb-jar.xml file.
    1. Open the C:/temp/working/META-INF/weblogic-ejb-jar.xml file and the C:/temp/newfiles/ META-INF/weblogic-ejb-jar.xml file. You will have two files open.
    2. In the C:/temp/working/META-INF/weblogic-ejb-jar.xml file , find and replace, EJB (EJB is case sensitive) with a new name. For example: EJBNew.
    3. Note: Use the same name you used in Step 2b.

    4. In the C:/temp/working/META-INF/weblogic-ejb-jar.xml file , find and replace, (case sensitive) BEA_content with a new name (for example, BEA_content_new.)
    5. In the C:/temp/working/META-INF/weblogic-ejb-jar.xml file, find and replace <jndi-name>contentDataSource </jndi-name> (case sensitive), and replace with DataSource you defined in Step 2: Connect the New Repository to the Server. (For example, <jndi-name>newContentDataSource</jndi-name>).
    6. Copy the following from the C:/temp/working/META-INF/weblogic-ejb-jar.xml file to the C:/temp/newfiles/META-INF/weblogic-ejb-jar.xml:
    7. Copy everything between . . . from your C:/temp/working/META-INF/weblogic-ejb-jar.xml file

      and paste before . . . in your C:/temp/newfiles/META-INF/weblogic-ejb-jar.xml file

      <weblogic-ejb-jar> </weblogic-ejb-jar>

      </weblogic-ejb-jar>


       
    8. Save the C:/temp/newfiles/META-INF/weblogic-ejb-jar.xml file.
  3. Using the temporary directories and files you created in step 1., configure the META-INF/weblogic-cmp-rdbms-jar.xml file.
    1. Open the C:/temp/working/weblogic-cmp-rdbms-jar.xml file and the C:/temp/newfiles/META-INF/weblogic-cmp-rdbms-jar.xml file. You will have two files open.
    2. In the C:/temp/working/weblogic-cmp-rdbms-jar.xml file, find and replace EJB (EJB is case sensitive) with same name that you used in the //META-INF/weblogic-ejb-jar. For example: EJBNew.

Note: Use the same name you used in Step 2b.

    1. In the C:/temp/working/weblogic-cmp-rdbms-jar.xml temp file, find and replace, contentDataSource (case sensitive) with the DataSource you defined in Step 2: Connect the New Repository to the Server.. (For example: newContentDataSource)
    2. Copy the following from C:/temp/working/weblogic-cmp-rdbms-jar.xml file to the C:/temp/newfiles/META-INF/weblogic-cmp-rdbms-jar.xml file:
    3. Copy everything starting at the first . . . and ending at the last . . . from the C:/temp/working/META-INF/weblogic-cmp-rdbms-jar.xmlfile

      and paste after the last . . . in the C:/temp/newfiles/META-INF/weblogic-cmp-rdbms-jar.xml file

      <weblogic-rdbms-bean> </weblogic-rdbms-bean>

      </weblogic-rdbms-bean>

      <weblogic-rdbms-relation> </weblogic-rdbms-relation>

      </weblogic-rdbms-relation>


       
  1. In the C:/temp/newfiles directory, re-zip or re-compress the content_repo.jar file. Overwrite the existing content_repo.jar file with the new file of the same name that contains your edited XML files. Be sure to keep the files in their original directory structure, including the META-INF directory.
  2. Copy the new content_repo.jar file you just created back into the original install directory. For example WL_HOME/weblogic81/samples/portal/portalApp/

 


Step 4: Start the Server

Restart the WebLogic Server to redeploy content_repo.jar.

 


Step 5: Create the New BEA Repository

To add a new repository:

  1. Open the Administration Portal. (Start -> Programs -> BEA WebLogic Platform 8.1 -> Examples -> WebLogic Portal -> WebLogic Administration Portal)
  2. Select "Content" in the menu at the top of the screen.

  3.  
  4. In the Browse and Edit Content Resource tree to the left, select Repository from the View drop-down menu.

  5.  
  6. In the Manage Repositories tree to the left, right click on the Virtual Content Repository.

  7.  
  8. Select Add Repository from the pop-up menu (or click the Add Repository button in editor pane).
  9. In the Editor pane, provide the following information:
  10. Field

    Description

    Repository Name

    The name you give your new repository. For example: MyNewRepository

    Connection Class

    (com.bea.content.spi.internal.RepositoryImpl)


     

Note: When you create a new repository, if you cut and paste the properties from a text pad document, be sure to delete any trailing blanks.

  1. Click Add Property, and provide the following parameters:

  2.  

    Key

    Value

    NODE_OPS_HOME

    ${APPNAME}.BEA_content_<the name you chose, in our example, it was new>.RepoNodeOpsHome

    For example: ${APPNAME}.BEA_content_RepoNodeOpsHome

    OBJECT_CLASS_OPS_HOME

    ${APPNAME}.BEA_content_<the name you chose, in our example, it was new>.RepoObjectClassOpsHome

    SEARCH_OPS_HOME

    ${APPNAME}.BEA_content_<the name you chose, in our example, it was new>.RepoSearchOpsHome


     
  3. Click Create.

 

Skip navigation bar  Back to Top Previous Next