Configuring the WebLogic Domain


Installing the WebLogic server is very simple and intuitive. You can download the WebLogic Platform 7.0 http://commerce.bea.com/index.jsp. Detailed instructions for installing the WebLogic Server 7.0 are available at http://edocs.bea.com/wls/docs70/install/index.html. For quick installation steps, please read on. For detailed information on configuring and using BEA WebLogic Platform 7.0, please refer to documentation available at http://edocs.bea.com/platform/docs70/index.html.

The following are fast-track instructions for creating a development environment:

  1. During the product download, BEA Installer will be launched. After you accept the BEA license agreement, provide the BEA home directory.

  2. For Install Type, choose Custom Installation.

  3. When on the Choose Components screen, at the minimum, choose WebLogic Server. This will also install the WebLogic Workshop IDE that will be used for developing Web services. The installer is now configured to download the required archives to continue installation.

  4. Specify the download directory and continue with the download.

  5. After the download is completed, you will be prompted to provide a product installation directory. If your home directory was c:\bea, the default product directory will be c:\bea\ weblogic700. Provide a suitable directory name and continue with the product install.

  6. Completion of product install will launch a configuration wizard. Select Yes to run the Domain Configuration Wizard. The wizard is used to set up WebLogic domains. The WebLogic installation provides a preconfigured WLS Examples domain (for running the Examples Server). You may choose the Examples Server to deploy the GreaterCause application, or you can configure a separate domain.

    Note

    A domain is an interrelated set of WebLogic Server resources that are managed as a unit. A domain includes one or more WebLogic servers and may also include WebLogic Server clusters. Detail information on domains is available at http://edocs.bea.com/wls/docs70/admin_domain/index.html.

  7. Select WLS Domain from the template list to create a WebLogic Server domain, or select WebLogic Workshop for creating a Workshop domain that is used in Chapter 8 for creating Web services. Creating a WebLogic Workshop domain is recommended because it can be used for developing and testing the GreaterCause application, as well as the Web service. Name the domain appropriately. The discussions to follow will refer to the domain name as mydomain.

  8. When prompted to choose Server Type, select Single Server. This configuration is suitable and adequate for development and testing. In this case, the domain contains a single WebLogic Server instance that acts as both the Administration Server and application host server.

  9. When prompted for domain location, you can leave the default (for example, c:\bea\ user_projects\).

  10. On the Configure Standalone / Administrative Server screen, provide the server name (default is myserver). Leaving the Server Listen Address blank will assume localhost. You may choose to leave the port setting as is. Review the section Listen Address Considerations in the document Creating and Configuring WebLogic Server Domains at http://edocs.bea.com/wls/docs70/admin_domain/index.html for further information on Server Listen Address.

  11. On the Create Administrative User screen, provide the User Name and Password. This username and password will be required to start and manage the server. The default security realm myrealm will contain this user. Accidental removal of this user from the security realm will create an unusable domain.

  12. When prompted to Create Start Menu Entry, provide a suitable selection.

  13. Finally, review the Configuration Summary and create the new domain.

  14. If a single domain is sufficient for your needs, select End Configuration Wizard. If at a later time you choose to create more domains, run the Domain Configuration Wizard from the Start menu.

The downloaded GreaterCause package has a GC.properties file that is referenced by the Ant build script. You must update the WL_DOMAIN property in the GC.properties file to reflect the location of the domain directory. For example, you may specify this property, along with the WL_HOME property (WebLogic home directory), as shown here:

 WL_HOME=C:\bea\weblogic700 WL_DOMAIN=C:\bea\user_projects\mydomain 
Note

After WebLogic server is installed, you can start the server either from the Windows Start menu or using the startWeblogic.cmd script provided in the ${WL_DOMAIN} directory. For testing the Web Service, ensure that the domain name refers to a Workshop domain.

Configuring the JDBC Connection Pool

For development and testing, we used an Oracle database server. In this section, we discuss the procedure for setting up a JDBC connection pool for the Oracle database server. We must first start the WebLogic server according to the instructions provided in the preceding section. The rest of the instructions are as follows:

Start the console using http://localhost:7001/console.

  1. Select mydomain | Services | JDBC | Connection Pools in the left-hand frame.

  2. Select the Configure A New JDBC Connection Pool link in the right-hand frame.

  3. Provide the following information and select <Create> to complete:

    Form Field

    Value


    Name

    GCPool


    URL

    jdbc:oracle:thin:@myhostname:1521:mySID, where SID is the service identifier


    Driver Classname

    oracle.jdbc.driver.OracleDriver


    Properties

    user=username


    Password

    password

  1. We must now assign GCPool to a target server. Select the Targets tab on the same page that was used in the previous step. Select the Servers tab. Select myserver and move it to the Chosen window. Apply the changes before exiting.

  2. Once the connection pool is created, we proceed to creating a JDBC Tx Data Source. Select mydomain | Services | JDBC | Tx Data Sources.

  3. Select Configure A New JDBC Tx Data Source link in the right-hand frame.

  4. Provide the following information and select <Create> to complete. The JNDI name provided here is the JNDI name referred to in the deployment descriptor of the entity beans. The two names should match for successfully deploying the application.

    Form Field

    Value


    Name

    GCTxDataSource


    JNDI Name

    jdbc/gcOracleTxPool


    Pool Name

    GCPool

  5. We must now assign GCTxDataSource to a target server. Select the Targets tab on the same page that was used in the preceding step. Select the Servers tab. Select myserver and move it to the Chosen window. Apply the changes before exiting.




Practical J2ee Application Architecture
Practical J2EE Application Architecture
ISBN: 0072227117
EAN: 2147483647
Year: 2003
Pages: 111
Authors: Nadir Gulzar

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net