BEA Logo BEA WebLogic Portal Release 4.0

  BEA Home  |  Events  |  Solutions  |  Partners  |  Products  |  Services  |  Download  |  Developer Center  |  WebSUPPORT

 

   WebLogic Portal Documentation   |   Deployment Guide   |   Previous Topic   |   Next Topic   |   Contents   |   Index

Deploying Domains and Server Configurations

 

A WebLogic Server domain is the administrative unit that you use to manage servers and enterprise applications. A server configuration is a set of properties that determines operating parameters for an active instance of an application server.

Each domain contains one or more active servers. For any given development project, you might create several different domain and server combinations, each configured to support the following types of environments:

WebLogic Portal includes sample (reference) domains, which are configured to support a single-server development environment.

The following sections in this topic describe creating and deploying domains:

 


How WebLogic Portal Domains Are Organized

WebLogic Portal domains conform to all requirements that WebLogic Server imposes for administrative domains. While they do not extend domain functionality or introduce additional requirements, they do represent one of many possible implementations. The files and directories in Table 3-1 are required for all WebLogic Portal domains.

Note: WebLogic Portal installs its reference domains in PORTAL_HOME/config.

Table 3-1 Files and Directories in a WebLogic Portal Domain

Component

Description

config/domain/config.xml

The persistent storage for the domain's configuration information. Among other things, config.xml stores the list of EJBs, web applications, and enterprise applications that are in the domain. The WebLogic Server Administration Console creates and maintains this file. Do not use any other tool to modify the config.xml file for an active domain.

config/
domain/fileRealm.properties

Describes ACLs and an encrypted version of the password needed to start the Administration Server for the domain. Even if you use some other security realm to authenticate users, WebLogic Portal uses fileRealm.properties to describe the administrator ACL and password. The SerializedSystemIni.dat file must accompany fileRealm.properties in any domain.

config/domain/logs

A directory that contains WebLogic Server log files.

For more information, refer to "Using Log Messages to Manage WebLogic Servers" in the BEA WebLogic Server Administration Guide.

config/domain/*.pem

Security certificates for mutual authentication. If your enterprise application uses mutual authentication, each domain in which you deploy the application must contain its own certificates.

For information on how WebLogic Server organizes domains and servers in general, refer to "Overview of WebLogic Server Management" in the WebLogic Server Administration Guide. For additional background information, refer to the "Application Assembly and Deployment" chapter of the JavaTM 2 Platform Enterprise Edition Specification, v1.3.

 


Creating Domains and Configuring Servers

We recommend that you use one of the reference domains and servers as a starting point for your development.

This section contains the following subsections:

Review the Reference Domains

Review the following domains that WebLogic Portal provides and choose the one that most closely resembles your business needs:

petflowDomain

petflowDomain contains the petflowApp application, which features a demonstration of the Webflow service. To activate the domain and server, do the following:

  1. Change to the PORTAL_HOME/config/petflowDomain directory.

  2. Run startPetflow.bat (startPetflow.sh on UNIX).

  3. Sync the new data.

Then, to view petflowApp, in a Web browser enter the following URL:
http://localhost:7501/petflow

p13nDomain

p13nDomain contains the p13nApp application, which demonstrates personalization services. To activate the domain and server, do the following:

  1. Change to the PORTAL_HOME/config/p13nDomain directory.

  2. Run startP13N.bat (startP13N.sh on UNIX).

Then, to view p13nApp from the p13nDomain, in a Web browser enter the following URL:
http://localhost:7501/

Note that this URL only specifies the server name and port number because the p13n Web application within p13nApp has been configured as the default Web application of the p13nDomain.

Any domain can specify a default Web application, which responds to HTTP requests that cannot be resolved to another deployed Web application. For information on how to specify a default Web application, refer to "Configuring WebLogic Server Web Components" in the WebLogic Server Administration Guide.

wlcsDomain

wlcsDomain contains both the p13nApp and wlcsApp applications. The p13nApp is the same application that you can access from p13nDomain. WebLogic Portal includes it in wlcsDomain to demonstrate that you can deploy multiple applications in a domain, and as a convenience to you: if you know that you want to use personalization and commerce services on your site, you can start wlcsDomain to access both p13nApp and wlcsApp.

wlcsApp features a demonstration of personalization, commerce, and campaign services.

To activate the domain and server, do the following:

  1. Change to the PORTAL_HOME/config/wlcsDomain directory.

  2. Run startWLCS.bat (startWLCS.sh on UNIX).

To view wlcsApp, in a Web browser enter the following URL:
http://localhost:7501/wlcs

Then, to view p13nApp, in a Web browser enter the following URL:
http://localhost:7501/p13n

Note that the p13n Web application is not the default Web application for wlcsDomain and therefore the URL must specify the context root of the p13n Web application. To view the default application for wlcsDomain, enter the following URL:
http://localhost:7501/

portalDomain

portalDomain includes p13nApp, wlcsApp, and portal. The portal application demonstrates the portal service.

Because portalDomain includes three applications, it provides the best demonstration of the scope of WebLogic Portal features. This document assumes that in your development environment, you use portalDomain as your reference, though you can use any domain that best reflects your business needs.

Each application that you add to a domain increases the amount of time to start the server.

To activate the portalDomain and server, do any of the following:

Then, to view p13nApp, in a Web browser enter the following URL:
http://localhost:7501/p13n

To view wlcsApp, in a Web browser enter the following URL:
http://localhost:7501/wlcs

To view the portal application, in a Web browser enter the following URL:
http://localhost:7501/stockportal

Create Your Domains

To create a domain, do the following:

  1. Install WebLogic Portal on a computer. Be sure to install the sample enterprise applications (which is the default installation configuration).

  2. Use the StartPortal.bat script (StartPortal.sh on UNIX) to activate the portalDomain reference domain. On Windows, you can also activate this domain from the Start menu. For more information, refer to Starting and Shutting Down a Server.

  3. Access the WebLogic Server Administration Console for portalDomain by doing one of the following:

  4. In the left pane of the WebLogic Server Administration Console, right click portalDomain. From the shortcut menu, click Create or Edit Other Domains. (See Figure 3-1.)

    Figure 3-1 Create a Domain


     

  5. In the All Domain Configurations window, in the Name box, enter a name for your domain. Use a name that indicates the purpose of the domain. For example, in an environment for developing applications for an online bank use bank_development. WebLogic Server creates a directory of the same name, so your domain name must satisfy naming requirements for the host file system.

  6. Click Create.

    Under the config directory that contains the currently active domain (portalDomain), the WebLogic Server Administration Console does the following:

    1. Creates a directory for your domain. By default, the pathname for the directory is as follows:

      PORTAL_HOME/config/name-of-your-domain

      For example, if you named your domain bank_development, the WebLogic Server Administration Console creates the following directory:

      PORTAL_HOME/config/bank_development

    2. Under the new domain directory, the WebLogic Server Administration Console creates a config.xml file.

Configure Servers

This section guides you through setting up a server instance that supports WebLogic Portal enterprise applications:

Create a Server

To create a server instance, do the following:

  1. In the WebLogic Server Administration Console, make sure you are editing your new domain by verifying that in the left pane, the top node of the tree states the name of your new domain. For example, in Figure 3-2, the console is editing the bank_development domain.

    Figure 3-2 Editing the bank_development Domain


     

    If the top pane does not state the name of your new domain, do the following:

    1. In the left pane, right click the name of the current domain.

    2. From the short cut menu, click Create or Edit Other Domains. (See Figure 3-1.)

    3. On the All Domain Configurations page, click the name of your domain.

      Note that at this point, while you are editing your new domain, the portalDomain is still the active domain.

  2. In the left pane, right click the Servers folder. From the shortcut menu, click Configure a new Server.

  3. In the Create a New Server window, in the Name box, enter a name for the server. Use a name that indicates the purpose of the server instance. For example, for your development team, you can create a server named bankServer.

  4. Click Create.

Configure Listen Ports

To change the default listen ports, do the following:

  1. In the Create a New Server window, in the Listen Port box, change the value. Then click Apply. This is the listen port that you use to access the WebLogic Server Administration Console for your new domain. For example, if you change the port number to 7501, then you use the following URL to access the WebLogic Server Administration Console for your new domain:

    http://localhost:7501/console

  2. Click the SSL tab.

  3. Click the Enabled check box.

  4. In the Listen Port box, change the value. (See Figure 3-3.)

    Figure 3-3 The SSL Listen Port to Support Sample Applications


     

  5. On the SSL tab, enter the names of your security certificate files.

    You need a private key and digital certificate for each deployment of WebLogic Server that will use the SSL protocol. To acquire a digital certificate from a certificate authority, you must submit your request in a particular format called a Certificate Signature Request (CSR). For more information, refer to "Managing Security" in the WebLogic Server Administration Guide.

    Each WebLogic Portal reference domain provides sample security files, which you can use for demonstration purposes in your domain. To use these files, copy all *.pem files from PORTAL_HOME/config/portalDomain to PORTAL_HOME/config/yourDomain. Then change the values on the SSL tab to specify the files that you copied.

  6. Click Apply.

Note: You can create multiple servers in each domain. For example, you might create one server to support the enterprise applications and another server with different listen ports to support other applications.

Configure the Message Output

You can use the WebLogic Server Administration Console to change the level of messages that the server generates and where the server locates log files.

To change the message output, do the following:

  1. On the server properties page, click the Logging tab.

  2. On the General subtab, select a value from the Stdout severity threshold list (see Figure 3-4). For more information about message and log options, refer to the WebLogic Server Administration Console Online Help.

    Figure 3-4 Stdout Severity Threshold List


     

  3. To change the location in which the server locates its log files, modify the path and file name in the File Name box. Then click Apply.

  4. To change the location in which the domain locates its log files, do the following:

    1. In the left pane of the WebLogic Server Administration Console, click your domain.

    2. In the right pane, click the Logging tab.

    3. In the File Name box, provide a new path and file name for the domain logs. Then click Apply.
       

Set Up a Security Realm

A security realm determines how a user is authenticated and retrieves access control lists for given names. The reference domain provides a custom security realm, wlcsRealm, that stores user IDs and passwords in the RDBMS repository. You can set up other types of security realms, as described in "Managing Security" in the WebLogic Server Administration Guide.

The reference domain also provides a caching realm, wlcsCachingRealm, which improves the performance of WebLogic Server by caching lookups, thereby reducing the number of calls into other security realms.

To set up wlcsRealm and wlcsCachingRealm, do the following:

  1. In the left pane, expand the Security folder.

  2. Right click the Realms folder, and click Configure a new RDBMSRealm.

  3. On the Configure a new RDBMSRealm page, click the Configuration tab and enter the following values:

  4. Click Create.

  5. To use the sample Cloudscape database as the RDBMSRealm host, click the Database tab and enter the following values

    For information on using other database types as the RDBMSRealm host, refer to Part II, Deploying Your Business Data.

  6. Click Apply.

  7. In the left pane, right click the Caching Realms folder and click Configure a new Caching Realm.

  8. On the Configure a new Caching Realm page, click the Configuration tab and enter the following values:

  9. Click Create.

Start Your Server

The remaining configuration tasks require that you deploy the WebLogic Server Administration Console to your new domain and then start your server:

  1. To stop the portalDomain, change to the PORTAL_HOME directory and run stopPortal.bat (stopPortal.sh on UNIX).

  2. Copy the following files and directories from PORTAL_HOME/config/portalDomain/ to PORTAL_HOME/config/myDomain/:

  3. To start your new domain and server, do the following:

    1. Copy PORTAL_HOME/config/portalDomain/startPortal.bat to PORTAL_HOME/config/myDomain/startMyDomain.bat.

    2. Open startMyDomain.bat in a text editor.

    3. Change the value for the DOMAIN_NAME to the name of your new domain. For example, SET DOMAIN_NAME=bank_development

    4. Change the value for the SERVER_NAME variable to the name of your new server. For example, SET SERVER_NAME=bankServer

    5. Run startMyDomain.bat.

      The shell in which you run the script displays WebLogic Server messages. The following is an example of the messages that indicate a successful startup:

      <Oct 15, 2001 9:20:13 AM MDT> <Notice> <Management> <Application Poller not started for production server.>

      <Oct 15, 2001 9:21:49 AM MDT> <Notice> <WebLogicServer> <ListenThread listening on port 7501>

      <Oct 15, 2001 9:21:49 AM MDT> <Notice> <WebLogicServer>

      <SSLListenThread listening on port 7502>

      <Oct 15, 2001 9:21:51 AM MDT> <Notice> <WebLogicServer> <Started WebLogic Admin Server "bankServer" for domain "bank_development" running in Production Mode>

  4. To access the WebLogic Server Administration Console for your new domain, do the following

    1. In the shell that is running the server that you started in step 3, note the port number in the following statement:
      <Oct 3, 2001 5:11:41 PM EDT> <Notice> <WebLogicServer> <ListenThread listening on port 7501>

    2. In a Web browser, enter the following URL:
      http://localhost:port-number/console

Configure an XML Registry

The XML registry configures XML parsers and XSLT transformers for your applications. For more information about the XML registry, refer to the "WebLogic Server Programming WebLogic XML" guide.

To configure an XML registry for your applications, do the following:

  1. In WebLogic Server Administration Console, in the left pane, click Services.

  2. Right click the XML folder. Then select Configure a New XML Registry.

  3. On the Configure a new XML Registry page click the Configuration tab and enter the following values:

  4. Click Create.

  5. On the portal XML registry page, click Configure XML Parser Select Registry Entries.

  6. On the XML Parser Select Registry Entries page, click Configure a new XML Parser Select Registry Entry.

  7. On the Create a new XMLParserSelectRegistryEntry page, in the SAXParser Factory box, enter the following value: weblogic.apache.xerces.jaxp.SAXParserFactoryImpl

  8. Click Create.

  9. To deploy the XML registry, in the left pane, click portal XML registry.

  10. On the portal XML registry page, click the Targets tab. Then move your server from the Available to the Chosen list. (See Figure 3-5).

    Figure 3-5 Deploy the XML Registry


     

Set Up JDBC Connection Pools and Data Sources

Connection pools provide ready-to-use pools of connections to your RDBMS. The application server creates the pools during server startup, thus eliminating the overhead of your enterprise application having to establish database connections for each transaction. For more information about connection pools, refer to "Overview of Connection Pools" in the WebLogic Server Programming WebLogic JDBC guide.

A DataSource is an interface between your enterprise application and a connection pool. For more information, refer to "Overview of DataSources" in the WebLogic Server Programming WebLogic JDBC guide.

This section contains the following subsections:

For information on setting up JDBC connection pools and data sources for your production RDBMS, refer to Part II, Deploying Your Business Data.

Configure commercePool for Cloudscape Databases

Create a JDBC connection pool named commercePool for Cloudscape by doing the following:

  1. In the left pane of the WebLogic Server Administration Console, click Services -> JDBC -> Connection Pools.

  2. Click the Connection Pools folder and click Configure a new JDBC Connection Pool. On the Configure a new JDBC Connection Pool page click the General tab. In the Name box, enter commercePool.

  3. To configure commercePool, do the following:

    1. On the General tab, enter the following values:

    2. Click Create.

    3. Click the Connections tab and enter the following values:

    4. Click Apply.

    5. Click the Testing tab and enter the following values:

    6. Click Apply.

  4. To deploy the commercePool, click the Targets tab. Then move your server from the Available to the Chosen list. (See Figure 3-6.)

    Figure 3-6 Deploy commercePool


     

Tip: Cloning Resources

If you are creating a new server, you can clone the commercePool properties to simplify the creation of dataSyncPool.

After you create commercePool, do the following:

  1. In the WebLogic Server Administration Console, in the left pane, right click commercePool and select Clone commercePool. (See Figure 3-7.)

    The WebLogic Server Administration Console creates a new connection pool with properties identical to commercePool.

    Figure 3-7 Clone CommercePool


     

  2. On the Clone page, change the value in the Name box to dataSyncPool.

  3. Click Clone.

Configure dataSyncPool for Cloudscape Databases

Create a JDBC connection pool named dataSyncPool for Cloudscape by doing the following:

  1. In the left pane of the WebLogic Server Administration Console, click Services -> JDBC -> Connection Pools.

  2. Right click the Connection Pools folder and click Configure a new JDBC Connection Pool. On the Configure a new JDBC Connection Pool page click the General tab. In the Name box, enter dataSyncPool.

  3. To configure dataSyncPool, do the following:

    1. On the General tab, enter the following values:

    2. Click Create.

    3. Click the Connections tab and enter the following values:

    4. Click Apply.

    5. Click the Testing tab and enter the following values:

    6. Click Apply.

  4. To deploy the dataSyncPool, click the Targets tab. Then move your server from the Available to the Chosen list.

Configure JDBC Data Sources

The reference servers already configure the JDBC data sources that you need to access any database type. If you are modifying a reference server to meet your specific business needs, you do not need to change the configuration for the JDBC data sources.

If you are creating a new server, you must set up JDBC data sources by doing the following:

  1. In the left pane of the WebLogic Server Administration Console, open the JDBC folder.

  2. Create a non-transactional commercePool data source by doing the following:

    1. Right click the Data Sources folder and click Configure a new JDBC Data Source.

    2. On the Configure a new JDBC Data Source page click the Configuration tab and enter the following values:

    3. Click Create.

  3. To deploy the data source, click the Targets tab. Then move your server from the Available to the Chosen list. Then click Apply.

  4. Create a transactional commercePool data source by doing the following:

    1. Right click the Tx Data Sources folder and click Configure a new JDBC Tx Data Source.

    2. On the Configure a new JDBC Tx Data Source page click the Configuration tab and enter the following values:

    3. Click Create.

  5. To deploy the data source, click the Targets tab. Then move your server from the Available to the Chosen list. Then click Apply.

  6. Create a transactional dataSyncPool data source by doing the following:

    1. Right click the Tx Data Sources folder and click Configure a new JDBC Tx Data Source.

    2. On the Configure a new JDBC Tx Data Source page click the Configuration tab and enter the following values:

    3. Click Create.

  7. To deploy the data source, click the Targets tab. Then move your server from the Available to the Chosen list. Then click Apply.

Viewing the JNDI Tree

From time to time you may find it useful to view the objects in the WebLogic Portal JNDI tree. To view the JNDI tree for a server:

  1. Right-click the server node in the left pane. This displays a pop-up menu.

  2. Select View JNDI Tree. The JNDI tree for this server displays in the right pane.

Add Extensions to the WebLogic Server Administration Console

WebLogic Portal includes extensions to the WebLogic Server Administration Console. You use these extensions to configure WebLogic Portal services.

To add the extensions to the WebLogic Server Administration Console, do the following:

  1. Make sure that the application p13nConsoleApp is on the computer that hosts the application server. By default, WebLogic Portal installs this application as PORTAL_HOME/applications/p13nConsoleApp.

  2. Launch the WebLogic Server Administration Console.

  3. In the left pane, open the Deployments folder.

  4. Right click the Applications folder and click Configure a New Application. (See Figure 3-8.)

    Figure 3-8 Configure a New Application


     
     

  5. On the Configure a New Application page, do the following:

    1. In the Name box, enter p13nConsoleApp. WebLogic Server uses this name only within the WebLogic Server Administration Console. The name does not affect the URIs of resources within the enterprise application.

    2. In the Path box, enter the pathname of the application's root directory. By default, WebLogic Portal installs this application as PORTAL_HOME/applications/p13nConsoleApp. To use the default configuration, enter ./applications/p13nConsoleApp

    3. Select the Deploy check box.

    4. Click Create.

  6. In the left pane, open the Servers folder and click the server on which you want to deploy the extensions.

  7. On the Server Page, click the Deployments tab. Then click the Web Applications subtab.

  8. On the Web Applications subtab, move the p13nConsole Web application from the Available to the Selected list. Then click Apply.

    When you deploy a WebLogic Portal application that uses MBeans to configure its services, the application will now include a Service Configuration folder. This folder contains the WebLogic Portal extensions to the WebLogic Server Administration Console. (See Figure 3-9.)

Note: If your enterprise application does not contain the WLS-specific configuration file, META-INF/application-config.xml, then you must create one by stopping your server and taking the following additional steps. For instructions about setting values for the new tag, see Configure the JDBC Helper Service.

  1. Create an application-config.xml file under: <portal40home>/applications/<YourEnterpriseApp>/META-INF/

    You can use the existing Portal enterprise applications as models by copying one of those files. Make sure the services that you want to be able to configure are present. For example, for the JDBC Helper Service:

      <ApplicationConfiguration>
    <JdbcHelper
    JdbcHelperDelegate=""
    MaxRetries="-1"
    MaxWaitTime="-1"
    Name="JdbcHelper"
    />
    </ApplicationConfiguration>

  2. To register your application-config.xml file with your enterprise application, edit config.xml for your domain by adding the <ApplicationConfiguration> tag to the body of the <Application> tag for your enterprise application:
        <Application Deployed="true" Name="petflowApp" Path=".\applications\petflowApp">
    <WebAppComponent IndexDirectoryEnabled="false" Name="petflow"
    Targets="petflowServer" URI="petflow"/>
    <ApplicationConfiguration
    Name="petflowApp"
    Targets="petflowServer"
    URI="META-INF/application-config.xml" />
    <EJBComponent Name="pipeline" Targets="petflowServer" URI="pipeline.jar"/>
    <EJBComponent Name="petflow" Targets="petflowServer" URI="petflow.jar"/>
    <EJBComponent Name="petStore_EJB" Targets="petflowServer"
    URI="petStore_EJB.jar"/>
    <WebAppComponent IndexDirectoryEnabled="false" Name="datasync"
    Targets="petflowServer" URI="datasync"/>
    </Application>

  3. Restart your server.

    Figure 3-9 Extensions to the WebLogic Server Administration Console


     

Make weblogiccommerce.properties Available to the Domain

The PORTAL_HOME/weblogiccommerce.properties is an additional file that configures WebLogic Portal services. It is deprecated along with the sections of Java code that it configures.

Specify a Default Web Application

Every server and virtual host in your domain can declare a default Web Application. The default Web application responds to any HTTP request that cannot be resolved to another deployed Web application. In contrast to all other Web applications, the default Web application does not use the Web application name as part of the URI. Any Web application targeted to a server or virtual host can be declared as the default Web application.

For information on how to specify a default Web application, refer to "Configuring WebLogic Server Web Components" in the WebLogic Server Administration Guide.

Relocate the Domain (Optional)

If you want to relocate the domain into a different directory tree, perhaps on a different disk partition or in a directory tree that is separate from portalDomain, do the following:

  1. Create a new domain repository by creating a directory named config.

  2. Copy your domain directory into the new config directory.

For example, on a partition named usr2, you create the following tree:

/usr2/config/bank_development
/usr2/config/bank_development/config.xml
/usr2/config/bank_development/SerializedSystemIni.dat

If you locate your config directory and your domain's startup script in different directories, add the following argument to the Java command that is near the end of the script:

-Dweblogic.RootDirectory=path-to-the-parent-directory-of-your-config-directory

For example, you want to locate the startup script in /usr/local/bin and the config directory in /usr2. Modify the startup script by adding the bold text in the following example:

REM ----- Start WebLogic with the above parameters ------

%JDK_HOME%\bin\java %JAVA_VM% -Xms128m -Xmx128m -classpath %CLASSPATH% -Dcloudscape.system.home=%PORTAL_HOME%/db/data -Dweblogic.Domain=%DOMAIN_NAME% -Dweblogic.Name=%SERVER_NAME% -Dbea.home=%BEA_HOME% -Djava.security.policy==%WEBLOGIC_HOME%/lib/weblogic.policy -Dcommerce.properties=%PORTAL_HOME%/weblogiccommerce.properties -Dpipeline.properties=%PORTAL_HOME%/pipeline.properties -Dwebflow.properties=%PORTAL_HOME%/webflow.properties
-Dweblogic.RootDirectory=/usr2
weblogic.Server

Add the -Dweblogic.RootDirectory argument in front of weblogic.Server.

 


Place the New Directory Tree Under Source Control

To safeguard your work, keep a history of changes, and provide the ability to distribute a known version of source files to your development team, place your new domain and server configuration under source control. Do not place the generated directories, such as /config/applications/.wlnotdelete, under source control.

For information on changing other properties in the WebLogic Server Administration Console, refer to the following documents:

 

back to top previous page next page