Guide for Creating Additional Repositories
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.
You must be working within an XA domain to effectively use multiple repositories.
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 new content management additional database.
- For Oracle, SQL Server, Sybase, or DB2 databases, create a database user for your additional content management database.
- For Oracle, grant that user connectivity and resource privileges, and assign a default tablespace for the additional content management database objects.
- For SQL Server and Sybase, create a database for the additional content management database objects and make that user the database owner (dbo) user for that database.
- For DB2, grant that user
createTAB BINDADD
connect privileges to create the additional content management database objects.
Note: PointBase is not recommended for a production repository.
- Set up your additional content management database in the
db_settings.properties
file.
- Navigate to the
<BEA_HOME>\user_projects\domains\<YOUR_DOMAIN>
directory, and open the db_settings.properties
file in a text editor.
OR
If you are using the sample domain, edit the db_settings.properties
file from the following directory: <BEA_HOME>\weblogic81\samples\domains\portal
.
- Uncomment the database settings for your new target database.
- Update the following settings for your additional content management database:
server=<SERVER_NAME>
dblogin=CONTENT_USER
password=CONTENT_USER_PASSWORD
- Within the
db_settings.properties
file, find the p13n_modules, portal_modules
and netuix_modules
lines at the top of the file.
- Copy these 3 lines and comment out the original settings by adding a # sign.
- Replace the original settings as follows:
p13n_modules=p13n au bt ds
with
p13n_modules=
portal_modules=cm wlcs wps collaboration sample_cm
with portal_modules=cm cmv sample_cm
netuix_modules=pf
with
netuix_modules=
When you are finished, the section should look like this:
#p13n_modules=p13n au bt ds
#portal_modules=cm wlcs wps collaboration sample_cm
#netuix_modules=pf
p13n_modules=
portal_modules=cm cmv sample_cm
netuix_modules=
- Save the changes to the
db_settings.properties
file.
- Create the additional content management database objects by running the
create_db.cmd
or create_db.sh
script.
- Navigate to the
<BEA_HOME>\user_projects\domains\<YOUR_DOMAIN>
directory, and double-click on the create_db.cmd
file.
OR
- If you are using the sample domain, run the
create_db.cmd
file from the following directory: <BEA_HOME>\weblogic81\samples\domains\portal
.
Step 2: Connect the New Repository to the Server
- Start WebLogic Server for your domain, and login to the console.
- Configure a new connection pool for your additional content management database.
- Go to Services -> JDBC -> Connection Pools.
- 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
- Choose a name for the new Connection Pool (For example:
contentPool2
).
- 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.
- Click Clone, and apply the changes.
- Update your data sources.
- From Services -> JDBC -> Data Sources, right-click a data source.
- Select "Clone..." from the drop-down menu.
- Change the name of the data source from "Clone of ..." to something meaningful (For example: newContentDataSource).
- Set the JNDI Name to match the new data source name.
- Using the Pool Name drop down menu, set the pool to the new connection pool name (For example, contentPool2).
- 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
).
- Create the workspace in which you will do your editing.
- Create two temporary, working directories to use when completing your edits. For example,
c:\temp\working
and c:\temp\newfiles
- Locate the
content_repo.jar
in the portal application directory that you want to associate with the new repository. For example, <BEA home>/weblogic81/samples/portal/portalApp/content_repo.jar
- Place a copy of the content_repo.jar file in each of the working directories you have created.
- 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.
- 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.
- After creating the temp directories and files to work with, configure the
ejb-jar.xml
file.
- 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.
- In the
C:\temp\working\ejb-jar.xml
file, find and replace, EJB
(EJB
is case sensitive) with a new name. For example: EJBNew
.
Note: You will need to use this new name throughout all of the files.
- Copy the following from the
C:\temp\working\ejb-jar.xml
file to the C:\temp\newfiles\ejb-jar.xml
file.
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>
|
- Save the
C:\temp\newfiles\ejb-jar.xml
.
- Using the temporary directories and files you created in Step 1. configure the
META-INF/weblogic-ejb-jar.xml
file.
- 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.
- 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.
Note: Use the same name you used in Step 2b.
- 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
.)
- 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>
).
- 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
:
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>
|
- Save the
C:\temp\newfiles\META-INF\weblogic-ejb-jar.xml
file.
- Using the temporary directories and files you created in Step 1., configure the
META-INF/weblogic-cmp-rdbms-jar.xml
file.
- 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.
- 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.
- 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:
Copy everything starting at the first . . . and ending at the last . . . from the C:\temp\working\META-INF\weblogic-cmp-rdbms-jar.xml file
|
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>
|
- 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.
- Copy the new content_repo.jar file you just created back into the original install directory. For example <
BEA 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:
- Open the Administration Portal. (Start -> Programs -> BEA WebLogic Platform 8.1 -> Examples -> WebLogic Portal -> WebLogic Administration Portal)
- Select "Content" in the menu at the top of the screen.
- In the Browse and Edit Content Resource tree to the left, select Repository from the View drop-down menu.
- In the Manage Repositories tree to the left, right click on the Virtual Content Repository.
- Select Add Repository from the pop-up menu (or click the Add Repository button in editor pane).
- In the Editor pane, provide the following information:
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.
- Click Add Property, and provide the following parameters:
Key
|
Value
|
NODE_OPS_HOME
|
${APPNAME}.BEA_content_ <the name you chose, in our example, it was new>.RepoNodeOpsHome
For example: ${APPNAME}.BEA_content_RepoNodeOpHome
|
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
|