bea.com | products | dev2dev | support | askBEA

Download Docs | Site Map | Glossary
Search

Development Guide

Adding Portal to an Existing Domain

This section explains how to add portal functionality to an existing domain. These procedures and tasks are highly technical and require a good deal of familiarity with WebLogic Server and J2EE architecture.

About Your Domain

The overall procedure outlined in this section is based on the following assumptions about your existing domain:

- The existing domain has been backed up.

- The existing domain is installed in <BEA_HOME>\user_projects\ directory.

- The existing domain contains a J2EE application and at least one Web application, but does not include Portal functionality.

- The existing domain, referred to in this section as yourDomain, must be preserved. That is, it is not being replaced with portalDomain.

- Those responsible for performing these tasks are familiar with the WebLogic Server platform, and with J2EE architecture in general.

Before You Begin

Arrive at the following decisions before moving on:

- Preserve or Replace the Existing Domain

- Use or Replace Existing Database

- Locate or Install Enterprise Application

After these decisions are made, select which procedures to perform and get started.

Preserve or Replace the Existing Domain

The first decision to be made is illustrated in Figure 3-1, and concerns the domain containing your existing Web application.

- If the existing domain can be replaced with a new portal domain, follow Procedure A to move your Web application components into a new portal domain.

- If the existing domain must be preserved, follow Procedure B to install portal functionality within your existing domain.

Figure 3-1 Decision 1

Procedure A

1. Use the Domain Configuration Wizard to create a new portalDomain, as described in Step 1: Create the New Domain.

2. Import the objects that constitute the existing Web application into the new portal domain.

3. Use the Portal Wizard to create a new portal and portal Web application, as described in Step 2: Create the New Portal.

Once these steps have been completed, you will have a single domain containing your existing portal Web application and a complete portal Web application.

Procedure B

1. Use the Domain Configuration Wizard to create a new WLP domain named partsDomain, as described in Step 1: Create the New Domain.

Note: This partsDomain will be used as a template, but will never be started. Therefore, do not add a link to it on the Start menu.

1. Continue with the remainder of the steps in this section, using the partsDomain to copy resources into the existing domain, as directed within the procedure.

Use or Replace Existing Database

Another decision, illustrated in Figure 3-2, concerns what database to use.

- If you don't need to keep the existing database, follow Procedure C to move your Web application components into a new portal domain.

- If the existing domain must be preserved, follow Procedure D to install portal functionality within your existing domain.

Figure 3-2 Decision 2

Procedure C

If the existing Web application can be supported by a new database, load the database objects that support the existing Web application inside the database inside the new domain.

Procedure D

To retain the database associated with the existing Web application, the following entries must be put in place:

JDBC Entries

The following JDBC entries must be added to the config.xml file from the existing domain:

- CommercePool: A portal web application requires two connection pools and two data sources for each pool, as shown in Listing 3-1.

Listing 3-1 Commerce Pool Datasource entry

>     <JDBCDataSource

>       JNDIName="weblogic.jdbc.pool.commercePool"

>       Name="commercePool"

>       PoolName="commercePool"

>       Targets="portalServer"

>     />

- CommercePool Datasource: Commerce functionality requires CommercePool datasource entries like those shown in Listing 3-2.

Listing 3-2 CommercePool DataSource entries

>     <JDBCTxDataSource

>       EnableTwoPhaseCommit="false"

>       JNDIName="weblogic.jdbc.jts.commercePool"

>       Name="commercePool"

>       PoolName="commercePool"

>       Targets="portalServer"

>     />

>     <JDBCDataSource

>       JNDIName="weblogic.jdbc.pool.commercePool"

>       Name="commercePool"

>       PoolName="commercePool"

>       Targets="portalServer"

>     />

- DataSync Pool: add a DataSync Pool entry, such as the one shown in Listing 3-3.

Listing 3-3 DataSync Pool entry

>     <JDBCTxDataSource

>       EnableTwoPhaseCommit="false"

>       JNDIName="weblogic.jdbc.jts.dataSyncPool"

>       Name="dataSyncPool"

>       PoolName="dataSyncPool"

>       Targets="portalServer"

>     />

- DataSync Data: add a DataSync Data entry, such as the one shown in Listing 3-4.

Listing 3-4 DataSync DataSource entry

>     <JDBCTxDataSource

>       EnableTwoPhaseCommit="false"

>       JNDIName="weblogic.jdbc.jts.dataSyncPool"

>       Name="dataSyncPool"

>       PoolName="dataSyncPool"

>       Targets="portalServer"

>     />

>     <WebAppComponent

>       Name="datasync"

>       ServletReloadCheckSecs="300"

>       Targets="portalServer"

>       URI="datasync"

>     />

Select a Realm (Optional)

- To use the existing database realm, no special configuration is required.

- To use a new RDBMS realm, one must be configured, and then referenced in config.xml.

Key Bootstrap (if using commerce):

Using commerce credit card functionality with the portal application requires a reference to the KeyBootstrap class, as shown in (shown in Listing 3-5):

Listing 3-5 Reference to the KeyBootstrap class

>     <StartupClass

>       ClassName="com.beasys.commerce.ebusiness.security.KeyBootstrap"

>       FailureIsFatal="false"

>       Name="KeyBootstrap"

>       Targets="portalServer"

>     />

P13N Console

1. Deploy the Personalization Console by adding an entry to the Config.xml file, as shown in Listing 3-6:

Listing 3-6 Personalization Console Deployment Entry

>     <Application

>        Deployed="true"

>        TwoPhase="true"

>        StagedTargets="portalServer"

>        Name="p13nConsoleApp"

>        Path="<BEA_HOME>/weblogic700/portal/lib"

>     >

>     <WebAppComponent

>        Name="p13nConsole"

>        ServletReloadCheckSecs="300"

>        Targets="portalServer"

>        URI="p13nConsole.war"

>     />

>     </Application>

WLPDocs Services

- WLPSDocs services are required to link WebLogic Portal Administration Tools to the online help.

Listing 3-7 WLPSDocs Services entries

>     <Application

>        TwoPhase="true"

>        StagedTargets="portalServer"

>        Deployed="true"

>        Name="wlpDocsApp"

>        Notes=""

>        Path="<BEA_HOME>/weblogic700/portal/lib"

>     >

>        <WebAppComponent

>          IndexDirectoryEnabled="false"

>          Name="wlpDocs"

>          Targets="portalServer"

>          URI="wlpDocs.war"

>          ServletReloadCheckSecs="300"

>        />

>     </Application>

Tax and Payment Services (optional)

To add sample payment and tax services to the existing domain requires the entries shown in Listing 3-8. For information on adding these services to your portal application, consult "Setting Up Commerce Services" in the Administration Guide at http://edocs.bea.com/wlp/docs70/admin/commerce.htm.

Listing 3-8 Tax and Payment Services entry

>     <Application

>       Deployed="true"

>       TwoPhase="true"

>       StagedTargets="portalServer"

>       Name="paymentWSApp"

>       Path="<BEA_HOME>/user_projects /myPARTSdomain/beaApps/paymentWSApp"

>     >

>      <EJBComponent

>       Name="payment"

>       URI="payment.jar"

>       Targets="portalServer"

>      />

>      <WebAppComponent

>       Name="payment-webservice"

>       URI="pay-ws"

>       Targets="portalServer"

>     />

>     </Application>

>     <Application

>       TwoPhase="true"

>       StagedTargets="portalServer"

>       Deployed="true"

>       Name="taxWSApp"

>       Path="<BEA_HOME>/user_projects/myPARTSdomain/beaApps/taxWSApp"

>     >

>       <EJBComponent

>         Name="tax"

>         URI="tax.jar"

>         Targets="portalServer"

>       />

>       <WebAppComponent

>         Name="tax-webservice"

>         URI="tax-ws"

>         Targets="portalServer"

>       />

>     </Application>

Verify Server References

Examine the config.xml file after these edits. Search and replace any reference to portalServer with the name of the server targeted by the existing domain.

The config.xml file in your existing domain now has the entries required so that the WebLogic Portal server can connect to all the components that make up your J2EE enterprise Portal application. The next step is to identify the enterprise application in which these components can run on the server.

Locate or Install Enterprise Application

Within a BEA WebLogic Platform 7.0 domain, portal requires a complete J2EE application. At Decision 3, illustrated in Figure 3-3, an enterprise application is designated: Either

it is added to the existing domain by following Procedure E, or portal functionality is merged with an enterprise application already present in the existing domain, Procedure F.

Figure 3-3 Decision 3

Procedure E

1. Copy the entire contents of the <BEA_HOME>\user_projects\portalDomain\beaApps\portalApp directory into the existing domain.

2. Move in the objects that make up the existing Web application into this enterprise application.

Procedure F

1. Begin with the complete enterprise application from the existing domain.

2. Copy the following directories, including all contents and subfolders, into this application directory structure:

   > tools/

   > DataSync/

   > toolSupport/

3. Copy the portalApp-project.eaprj file from within the following directory:

bea\user_projects\portalDomain\beaApps\portalApp-project

1. Using the BEA XML Editor, merge the META-INF/weblogic-application.xml files from the existing domain and the partsDomain. Merge these files by copying the entries in Listing 3-9 with the following changes: replace the <portalApp> string with the name of the J2EE application in the existing domain. For example, if your existing enterprise application were named existingApp, the entries would read existingAppTools, existingAppDataSync and existingAppTool.

Listing 3-9 Listings for

weblogic-application.xml

>     <module>

>       <web>

>         <web-uri>tools</web-uri>

>         <context-root>portalAppTools</context-root>

>       </web>

>     </module>

>     <module>

>       <web>

>         <web-uri>datasync</web-uri>

>         <context-root>portalAppDataSync</context-root>

>       </web>

>     </module>

>     <module>

>       <web>

>         <web-uri>toolSupport</web-uri>

>         <context-root>portalAppTool</context-root>

>       </web>

>     </module>

1. Copy application-config.xml into the existing enterprise application.

2. Insert references to the portal enterprise application into config.xml, or deploy these modules using the WebLogic Server console.

3. Use the Portal Wizard to create a new portal and portal Web application, as described in Step 2: Create the New Portal.

   After following these procedures, you should have a single domain capable of running both your existing Web application and a complete instance of WebLogic Portal.