JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Configuring WebLogic for Asynchronous Communications     Java CAPS Documentation
search filter icon
search icon

Document Information

Configuring WebLogic for Asynchronous Communication

Installing the WebLogic Adapter and Asynchronous Samples

To Install the WebLogic Adapter

To Download the Asynchronous Samples

Configuring WebLogic Server 9.2

To Configure WebLogic Server 9.2

To Start the WebLogic Administration Console

To Configure Startup Classes

To Stop and Restart the Startup and Shutdown Classes

To View the JNDI Tree Structure

To Deploy the EJB

To Clone a Startup and a Shutdown Class

Deleting Startup and Shutdown Classes

To Delete a Startup and Shutdown Class Configuration

Configuring WebLogic Server 9.2

The following procedures describe how to incorporate the sample files downloaded for the WebLogic Adapter into a WebLogic Server.


Note - These files are only for WebLogic Server 9.2. You need to use your own JAR files to establish Asynchronous Communication with WebLogic 8.1 and WebLogic 10.


To Configure WebLogic Server 9.2

  1. Verify that the system classpath contains the weblogic.jar and weblogic.ejb.example.jar files.
  2. Copy the following files from the directory where you extracted JAR file earlier to the WebLogic_Home\weblogic92\server\lib directory:
    • weblogic.ejb.example.jar

    • weblogic.startup.jar

    • weblogic.startup.properties

  3. Copy com.stc.jms.stcjms.jar from JavaCAPS_Home\repository\repository\data\files\InstallManager\javamodules\JMSJCA to WebLogic_Home\weblogic92\server\lib.

    Note - Disable security in STCMS for the JMS samples to work properly .


  4. Modify the startExamplesServer.cmd and setExamplesEnv.cmd files, located in WebLogic_Home\user_projects\domain name, appending com.stc.jms.stcjms.jar and weblogic.startup.jar to the classpath for each.

    For example, in 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 example, in 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
  5. Do the following to modify the deployment descriptors:

    Note - The sample EJBs are 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, modify the deployment descriptors for the EJBs to match this port.


    1. Extract weblogic.ejb.example.jar to a temporary file and open weblogic-ejb-jar.xml in an editor.
    2. Find the Provider_URL tag of the deployment descriptor for each Bean that is executed. Change the port number from 7001 to the correct value. Also, change localhost to the name of your server, if necessary.
    3. Save the file, re-jar (zip) the file, and replace weblogic.ejb.example.jar.
  6. Start an instance of the application server (in this case, the user defined domain/server).

To Start the WebLogic Administration Console

  1. Start the WebLogic Server Administration Console in a browser by entering the following URL:

    The URL for the WebLogic Server is http://hostname:port, where hostname is the name of the server where WebLogic is installed and port is the WebLogic port number (by default, 7001).

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

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


  3. Click Log In.

To 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.
  3. From the Domain tree structure on the left panel of the console, expand Environment.
  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.

    The Configure a New Startup or Shutdown Class page appears.

  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 identify the class you are configuring. Enter the following values:

    • Name: SunMicrosystems_Startup

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

  8. Click Next.
  9. Select the newly created target exampleServer from the Select Targets page, and 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 shown.
    • Name: SunMicrosystems_Startup

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

    • Deployment Order: 1000


      Note - This is the default value.


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

  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.


To 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.

      The Settings for the exampleServer page appear.

    3. Click the 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.

To 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.
  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.


To 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, click Browse, and then select BEA-Home\weblogic92\server\lib\weblogic.ejb.example.jar. 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 Deploy.

    This installs the EJB on the WebLogic Administration Server.

To 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.