Deploying JMSJCA on WebLogic

Chapter 1 Deploying JMSJCA on WebLogic

The following sections provide instructions on how to Deploy JMSJCA on WebLogic in Java CAPS. If you have any questions or problems, see the Java CAPS web site at http://goldstar.stc.com/support

This chapter covers the following topics,

Overview on Deploying JMSJCA on WebLogic

JMSJCA is a feature-rich library that abstracts differences between JMS servers and provides a single interface to these JMS servers, and adds a number of additional features on top of this. It consists of three parts.

Supported Platform

Supports WebLogic Application Server 10

Using JMSJCA Adapter

There are two ways to use a JMSJCA adapter with an EAR.

JMSJCA Task Overview

The task included in this section allows you to perform the following,

Deploying JMSJCA on WebLogic

Includes the steps to deploy JMSJCA on WebLogic.

ProcedureTo Install the WebLogic Server 10

  1. Download and Install WebLogic Server 10.

  2. Create a non-caps application, which can send or receive a message to any of the JMS provider and can be deployed in WebLogic.

ProcedureTo Start the WebLogic Server Administration Console

  1. Start WebLogic Server Administration Console.

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

    http://hostname:port/console

  3. When the login page appears, enter the UserName and the Password.


    Note –

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


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

ProcedureTo Install a New Application or Module for Deployment Using the Console

  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. Choose Deployments from the Domain tree structure on the left panel of the console. Here, all the standalone application modules and Java EE applications are listed.

  4. Click Install to install a new Enterprise Application or module for deployment to targets in the domain.

  5. On the Locate deployment to install and prepare for deployment page, select the file path that represents the application root directory. Follow this path to deploy sun-jms-adapter.rar on WebLogic 10.

    root\JavaCAPS6\appserver\addons\caps\common\jmsjca

  6. Select sun-jms-adapter.rar and click Next.


    Tip –

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


  7. Choose the targeting style. The targets can be a server, clusters of servers and virtual hosts on which this deployment will function. Choose any one from the following targets,

    • Install this deployment as an application

    • Install this deployment as a library

      Choose Install this deployment as an application. This is the default deployment method. Click Next.

  8. Provide Optional Settings on this screen. You can modify these settings or accept the default settings,

    1. Under General, type the Name of the deployment

      In the current example, it is sun-jms-adapter. By default, the name of the deployment is specified.

    2. Under Source accessibility, choose any one of the following locations from where all targets can access the application's files,

      • Use the defaults defined by the deployment's targets

      • Copy this application onto every target for me

      • I will make the deployment accessible from the following location

        Location: root\JavaCAPS6\appserver\addons\caps\common\jmsjca\sun-jms-adapter.rar

        Choose Use the defaults defined by the deployment's targets and click Next. This is the default selection.

  9. Review your choices and click Finish to complete the deployment.


    Note –

    Make the required changes to the Console and click Save.


  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
See Also

Some changes you make in the Administration Console take place immediately when you activate them. Other changes require you to restart the server or module affected by the change. Such changes are called non-dynamic changes. Non-dynamic changes are indicated in the Administration Console.


Note –

If you edit a non-dynamic configuration setting, no edits to dynamic configuration settings will take effect until the server is restarted.


ProcedureTo Create a JNDI Name for the Respective JMS Provider

  1. Click on Lock & Edit in the Change Center to modify the settings for the sun-jms-adapter.

  2. Click Deployments from the Domain tree structure and navigate to the sun-jms-adapter.


    Note –

    The state of the deployed application changes from Active state to Prepared state.


  3. Click on sun-jms-adapter.

  4. On the Settings for sun-jms-adapter page, click the Configuration- Tab. This selection defaults to the Outbound Connection Pools tab.

  5. Click New from the Outbound Connection Pool Configuration Table. You can create an instance for the resource adapter to display the Outbound Connection Groups.

  6. Choose any one of the following Outbound Connection Groups to create an instance.

    • javax.jms.ConnectionFactory

    • javax.jms.QueueConnectionFactory

    • javax.jms.TopicConnectionFactory

      Select javax.jms.QueueConnectionFactory from the group and click Next.

  7. On the Create a New Outbound Connection page, enter the JNDI name that is needed to obtain the new connection instance.

    For example, the JNDI Name can be either SunMQConnectionPool or SunSTCMSConnectionPool or SunJMSGridConnection Pool.

    In the current example, enter the JNDI Name as SunMQConnectionPool. Click Finish.


    Note –

    This field is mandatory.


    This displays the Save Deployment Plan page. You can save the new deployment plan on this page, if the configuration has changed. Select a directory to receive these files (for example, select jmsjca) and click Finish.

    A confirmation message appears on the right panel of the screen.


    A new deployment plan has been successfully created in root\JavaCAPs6\appserver\addons\
    caps\common\jmsjca\Plan.xml
  8. 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
  9. Click on Lock & Edit in the Change Center to modify the settings for the sun-jms-adapter.

  10. Click Deployments from the Domain tree structure and navigate to the sun-jms-adapter.

  11. Click on sun-jms-adapter.

  12. On the Settings for sun-jms-adapter page, click on the Configuration- Tab. The selection defaults to the Outbound Connection Pools tab.

  13. Expand the javax.jms.QueueConnectionFactory in the Outbound Connection Pool Configuration Table to see the newly created JNDI.

    In the current example, it is SunMQConnectionPool

  14. Click on SunMQConnectionPool.

  15. On the Settings for SunMQConnectionPool page, set the following list of parameters with specified values in Outbound Connection Properties table (that is, fill values according to the message provider),

    1. Set the Property Value for the JMQ ConnectionURL property as mq://host:port|7676/jms

      Provide the Password and UserName to connect to JMQ.


      Note –

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


    2. Set the Property Value for the STCMS ConnectionURL property as stcms://host:port|18007

      Provide the Password and UserName to connect to JMQ.


      Note –

      The default Password is adminadmin and the default UserName is admin.


    3. Set the Property Value for the ConnectionURL property as tcp://host:port|50607

      Provide the Password and UserName to connect to JMQ.


      Note –

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


      The following message appears on the right panel of the screen after completing the above steps.


      Deployment plan has been successfully updated

      Note –

      Provide the same UserName and Password as defined in the Optional Settings screen.

      Click Save after every entry.

      This completes setting the properties for the Connector Outbound Connection Configuration Properties table.


  16. Follow the Deployments link and update the properties for the sun-jms-adapter. Activate the changes on the WebLogic Server Administration Console.

  17. Place the following .jar files in the weblogic lib directory based on the selected message provider

    1. imq.jar (for SunJMQ)


      Note –

      For example, place the .jar file from the following class path root:\JavaCAPS6\appserver\imq\lib\imq.jar to root:\bea\wlserver_10.0\server\lib which is now available for WebLogic. This establishes communication with the SunJMQ provider


    2. wave.jar (for SunJMSGrid)

    3. com.stc.jms.stcjms.jar (JMS IQ Manager)

  18. Restart the Weblogic Appserver.

  19. Execute the non-caps Application. Send a message to a particular configured message provider.

On WebLogic

As Weblogic 9.2 doesn't support editing an URL (that is, In Outbound Connection Properties), the XML file has to be edited accordingly.

Updating an Application

When you update an application, you can specify that WebLogic Server redeploy the original archive file or exploded directory, or you can specify that WebLogic Server deploy a new archive file in place of the original one. You can also change the directory that contains the deployment plan that is associated with the application. Update an application if you have made changes to the application and you want to make the changes available to WebLogic Server clients, or if you want to redeploy an entirely new archive file in a new location.

ProcedureTo Update an Application

  1. Click on Lock & Edit in the Change Center to modify the settings for the sun-jms-adapter.

  2. Click Deployments from the Domain tree structure and navigate to the sun-jms-adapter.

  3. Click Update.

  4. On the Locate new deployment files page, choose any one of the following to update the chosen application according to new deployment plan.

    1. Update this application in place with new deployment plan changes


      Note –

      In this case, the Deployment plan path must be specified.


    2. Redeploy this application using the following deployment files

      In this case, both the Source path and the Deployment plan path are specified. This is the default selection.


      Note –

      In neither case, you can choose the path of your choice.


  5. Review your choices and click Finish to complete the update.

Deleting an Application

When you delete (uninstall) an application, WebLogic Server can no longer be started. If you need to deploy and start the application again, you must reinstall it.

Before you can delete an application, you must stop it to ensure that it is not still running and servicing client applications.

ProcedureTo Delete an Application

  1. Click on Lock & Edit in the Change Center to modify the settings for the sun-jms-adapter.

  2. Click Deployments from the Domain tree structure and navigate to the sun-jms-adapter.

  3. Click Delete.

  4. On the Delete Deployments page, click Yes to Continue or No to Cancel

    The following message appears on the right panel of the screen after completing the above steps.


    Selected Deployments were deleted. Remember to click Activate Changes after 
    you are finished
  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.

Required Artifacts and Files

Includes the necessary package artifacts like,