Configuring WebLogic for Asynchronous Communications

Chapter 1 Configuring WebLogic for Asynchronous Communication

The following sections provide instructions to Configure WebLogic Server 9.2 for Asynchronous Communication. If you have any questions or encounter problems, see the Java CAPS web site at http://goldstar.stc.com/support

This chapter covers the following topic Configuring WebLogic Server 9.2.

Downloading Files From Java Composite Application Platform Suite Uploader

Perform the following steps to download files from Java CAPS Uploader.


Note –

User's must use their own JAR files to establish Asynchronous Communication with WebLogic 8.1 and WebLogic 10.


ProcedureTo Start Java Composite Application Platform Suite Uploader

Before You Begin

Follow these steps to start Java CAPS Uploader.

  1. Start Repository

    Follow this path to start the repository root:\JavaCAPS6\start_repository

  2. Start Enterprise Manager

    Follow this path to start the eManager root:\JavaCAPS6\start_emanager

  3. Open a web browser and type the following URL,

    http://localhost:port

  4. Enter the username and password on the Java CAPS Login page.


    Note –

    The default username is Administrator and the default password is STC.


  5. Click Login.

    This displays the Java Composite Application Platform Suite Uploader page.

ProcedureTo Upload Files to Java CAPS Uploader

This procedure describes the method to upload WebLogiceWay.sar files to Java CAPS Uploader.

  1. Click the Administration tab.

  2. Click on Click to install additional products.

    This displays Welcome to the Java Composite Application Platform Suite Uploader page.

  3. Click Browse to update the product list.

    For Example, root:\directory name\WebLogiceWay.sar.

  4. Click Submit.


    Note –

    The page refreshes to display the updated product list with the new product names.


  5. Expand eWay and select WebLogiceWay. Click Next.

    This displays Selecting Files to Install page.

  6. Click Browse to select a WebLogiceWay.sar file.


    Note –

    Based on your previous selection, some dependent products may have been added to the list. Read Step 3 for the path.


  7. Click Next.

    A confirmation message is displayed indicating completion of the installation.


    Installation finished.

    Note –

    It takes a few seconds to install the .sar file.


ProcedureTo View the Downloads Available From the Repository

  1. Click Downloads tab.

    Find WebLogic eWay — Runtime Asynchronous Communication samples from the product list.

Downloading Files From Java CAPS Uploader

You can download all the .sar files from Java CAPS Uploader. This section briefly describes the various steps involved.

ProcedureTo Download Files From Java CAPS Uploader

This procedure describes the steps to download WebLogiceWay.sar files from Java CAPS Uploader.

  1. Follow procedure To Start Java Composite Application Platform Suite Uploader to login.

  2. Click Downloads tab.

    A list of components ready to be downloaded is displayed.

  3. Click on WebLogic eWay — Runtime Asynchronous Communication samples.

  4. Save the weblogic.ejb.jms.sample.jar executable file to a local directory.

Configuring WebLogic Server 9.2

WebLogic Server 9.2 installation creates a home or root directory named bea, by default.


Note –

This name may be changed during installation.


ProcedureTo Configure WebLogic Server 9.2

  1. Verify that the system classpath contains weblogic.jar and weblogic.ejb.example.jar.

  2. Copy the following files to the root:\BEA-HOME\weblogic92\server\lib directory,

    • com.stc.jms.stcjms.jar

    • weblogic.ejb.example.jar

    • weblogic.startup.jar

    • weblogic.startup.properties

    com.stc.jms.stcjms.jar can be found in the Java CAPS 6 Repository at:


    root:\JavaCAPS6\repository\repository\data\files\InstallManager\
    javamodules\JMSJCA\com.stc.jms.stcjms.jar

    Note –

    Disable Security in STCMS for the JMS samples to work properly .


  3. Modify startExamplesServer.cmd and setExamplesEnv.cmd located at BEA-HOMEuser_projectsdomain name, appending com.stc.jms.stcjms.jar and weblogic.startup.jar to the classpath for each. For example:

    For startExamplesServer.cmd


    CLASSPATH=%WL_HOME%\server\lib\webservices.jar;
    %POINTBASE_CLASSPATH%;%CLIENT_CLASSES%;%SERVER_CLASSES%;%COMMON_CLASSES%;
    %CLIENT_CLASSES%\utils_common.jar;
    %WL_HOME%\server\lib\com.stc.jms.stcjms.jar;
    %WL_HOME%\server\lib\weblogic.startup.jar

    For setExampleEnv.cmd


    CLASSPATH=%WL_HOME%\server\lib\webservices.jar
    ;%CLIENT_CLASSES%;%SERVER_CLASSES%;%POINTBASE_CLASSPATH%;
    %POINTBASE_TOOLS%;%COMMON_CLASSES%;%CLIENT_CLASSES%\utils_common.jar;
    %WEBLOGIC_CLASSPATH%;%WL_HOME%\server\lib\com.stc.jms.stcjms.jar;
    %WL_HOME%\server\lib\weblogic.startup.jar
  4. The sample EJBs have been configured to reference the T3 naming service that is running on the localhost at port 7001. Each WebLogic Server instance is preset to listen on port 7001. If your server instance is running on a different port. You must modify the deployment descriptors for the EJBs to match this port.

    Follow these steps to modify the deployment descriptors.

    1. Extract weblogic.ejb.example.jar to a temporary file and edit META-INF\weblogic-ejb-jar.xml.

    2. Find the Provider_URL tag of the deployment descriptor for each Bean that is executed. Change the port number from 7001 to 7003. Also, change localhost to the name of your specific computer, if necessary.

    3. Save, re-jar (zip), and replace weblogic.ejb.example.jar.

  5. Start an instance of the application server (in this case, the user defined domain/server).

    Start the Administration Console after the server boots up.

ProcedureTo Start the WebLogic Administration Console

  1. Start WebLogic Server Administration Console.

  2. Open a supported web browser and type the following URL,

    http://hostname:port/console

  3. Enter the UserName and the Password, when the login page appears.


    Note –

    The default UserName is weblogic and the default Password is weblogic.


  4. Click Log In to work with the WebLogic Server domain.

ProcedureTo Configure Startup Classes

  1. Locate the Change Center in the upper-left corner of the Administration Console.

  2. Click on Lock & Edit to lock the editable configuration hierarchy for the domain. This enables you to make changes using the Administration Console. This also allows you to modify, add or delete items in the domain.


    Note –

    The Release Configuration in the Change Center allows others to edit the domain and ensures no pending changes exist.


  3. Expand Environment from the Domain tree structure on the left panel of the console.

  4. Select Startup & Shutdown Classes from the tree structure to configure a new startup class.

  5. Click New from the Summary of Startup and Shutdown Classes page.


    Note –

    This page summarizes the startup and shutdown classes that are configured in the current domain. You must deploy each class on one or more specific servers.


    This displays Configure a New Startup or Shutdown Class page.

  6. Select Startup Class from the list and click Next.

  7. Enter a name for the Startup Class in Startup Class Properties page that you will use to identify the configuration of your Java class.


    Note –

    You can create multiple named configurations for any given class. After you have created a class configuration, you cannot change its name. Instead, delete the configuration and create a new one with a new name.


    The following properties will be used to identify the class you are configuring. Enter the following values,

    1. Name: SunMicrosystems_Startup

    2. Class Name: com.stc.eways.weblogic.startup.WeblogicStartup


      Note –

      The default Name is StartupClass-0.


  8. Click Next.


    Tip –

    Click the Next and Forward buttons to navigate forward and backwards during installation.


  9. Select the newly created target exampleServer from the Select Targets page. Then, click Finish.

    You can select one or more servers or deploy the class to all servers in a cluster.

    The following message appears on the right panel of the screen.


    Startup class created successfully.
  10. Click on Activate Changes in the Change Center.

    The following message appears on the right panel of the screen.


    All changes have been activated. No restarts are necessary.
  11. Click on Lock & Edit in the Change Center to modify the settings for the SunMicrosystems_Startup.

  12. On the Startup and Shutdown Classes page, click on the new startup class SunMicrosystems_Startup.

  13. On the Settings for SunMicrosystems_Startup page, the following default values are displayed and is as shown in Figure 1–1.

    1. Name: SunMicrosystems_Startup

    2. Class Name: com.stc.eways.weblogic.startup.WeblogicStartup

    3. Deployment Order: 1000


      Note –

      This is the default value.


    4. Arguments: sbyn.wlstartup.propsfile=BEA- HOME\weblogic92\server\lib\weblogic.startup.properties (where BEA-HOME is the home directory of the WebLogic Server.)

      Figure 1–1 WebLogic Server Console - Create a New StartupClass

      WebLogic Server Console - Create a New StartupClass

  14. Click Save.

    The following message appears on the right panel of the screen.


    Settings updated successfully.
  15. Click on Activate Changes in the Change Center to activate these changes.

    The following message appears on the right panel of the screen.


    All changes have been activated. No restarts are necessary.

    Note –

    Not all changes take effect immediately, some require a restart.


ProcedureTo Stop and Restart the Startup and Shutdown Classes

  1. Click on Lock & Edit in the Change Center to modify the settings for the SunMicrosystems_Startup.

  2. Stop and Restart the server by completing the following steps,

    1. Click Servers from the left navigation panel.

    2. Click on exampleServer(admin) (or the new server instance) from the right panel of the screen.

      This displays the Settings for the exampleServer page.

    3. Click Control tab.

      • The Start/Stop tab is the default selection on this screen.


        Note –

        Use this page to change the state of the current server. You can specify particular shutdown settings or view the current status of this server.


        Click Save if you have modified any settings.

      • Select When work completes (under the Server Status) from the Shutdown drop-down menu.

        This action shuts down the server.

    4. To restart the server from the Windows Programs menu, select BEA Products, point to Examples, choose WebLogic Server, and then select Start Examples Server.


      Note –

      For Example, WebLogic Server Examples and Launch WebLogic Server Examples.


    5. Enter User Name and Password, when prompted.

      If the startup class is successfully invoked, you should see the following text in the Start Server command window:


      weblogicstartup - Sun Microsystems startup class invoked - SunMicrosystems_Startup
      weblogicstartup - Topic name: Topic.Sample3
      weblogicstartup - Topic name: Topic.Sample2
      weblogicstartup - Topic name: Topic.Sample1
      weblogicstartup - Queue name: Queue.Sample3
      weblogicstartup - Queue name: Queue.Sample2
      weblogicstartup - Queue name: Queue.Sample1
      weblogicstartup - Successfully invoked Sun Microsystems startup.
  3. Start the Administration Console.

ProcedureTo View the JNDI Tree Structure

  1. Expand Environment from the Domain tree structure on the left panel of the console.

  2. Select Servers from the tree structure.

    This displays the Summary of Servers page.

  3. Click on exampleServer(admin).

    This displays the Settings for exampleServer page.

  4. Click on View JNDI Tree to open the JNDI Tree window. Expand the SunMicrosystems node to verify that all Sun Microsystems JMS objects are available. The JNDI Tree Structure is as shown in Figure 1–2.

    Figure 1–2 View the WebLogic Server Components

    View the WebLogic Server Components

  5. Click on Examples, select Deployments, and click on EJB. Click on Configure a new EJB from the left navigation panel.


    Note –

    Before deploying the EJB, make sure that the JMS IQ Manager is running in Enterprise Manager.


ProcedureTo Deploy the EJB

  1. Click open the Deployments node, in the left pane of the WebLogic Server Home.

  2. Right-click the EJB Deployments node and select Deploy a new EJB Module from the menu.

  3. Select BEA-Home\weblogic92\server\lib.

  4. Click on upload your file(s) link, then click Browse and select BEA-Home\weblogic92\server\lib\weblogic.ejb.example.jar.

    With the file selected, click Upload.

  5. Select the uploaded weblogic.ejb.example.jar and click Target Module.

  6. Select the server instance under Available Servers. Click the right-arrow to move the new server instance to Target Servers.

  7. Enter weblogic.ejb.example as the name for this application (EJB).

  8. Click on Deploy. This installs the EJB on the WebLogic Administration Server.

ProcedureTo Clone a Startup and a Shutdown Class

  1. Expand Environment from the Domain tree structure on the left panel of the console and select Startup and Shutdown Classes.

  2. On the Startup and Shutdown Classes page, check the class you want to clone. Click Clone.

  3. On the Clone a Startup or Shutdown Class page, identify the class by entering another name (to create duplicate).

  4. Click OK to save changes.

    The following message appears on the right panel of the screen.


    Startup Class created successfully.
  5. Click on Activate Changes in the Change Center.

    The following message appears on the right panel of the screen.


    All changes have been activated. No restarts are necessary.

Deleting Startup and Shutdown Classes

Deleting a startup or shutdown class configuration permanently removes it from the domain's configuration and prevents it from running on all servers to which it has been deployed. If you only want to temporarily stop a startup or shutdown class from running, undeploy it from a server. For more details, see To Stop and Restart the Startup and Shutdown Classes.

ProcedureTo Delete a Startup and Shutdown Class Configuration

  1. Click on Lock & Edit in the Change Center to modify the settings for the SunMicrosystems_Startup.

  2. Expand Environment from the Domain tree structure on the left panel of the console and select Startup and Shutdown Classes.

  3. On the Startup and Shutdown Classes page, check the class you want to delete.

  4. Click Delete and confirm the deletion.

  5. Click on Activate Changes in the Change Center of the Administration Console, to activate these changes.

    The following message appears on the right panel of the screen.


    All changes have been activated. No restarts are necessary.

    Note –

    Not all changes take effect immediately. Some require a restart .


    WebLogic Server undeploys the class from the targeted servers and removes the class from the domain's configuration file.

Next Steps