Oracle WebLogic ? WebLogic Server Configuring and Managing WebLogic JMS 10g Release 3 (10.3) July 2008…

Download Oracle WebLogic ? WebLogic Server Configuring and Managing WebLogic JMS 10g Release 3 (10.3) July 2008…

Post on 16-Jun-2018

212 views

Category:

Documents

0 download

Embed Size (px)

TRANSCRIPT

  • Oracle WebLogic ServerConfiguring and Managing WebLogic JMS

    10g Release 3 (10.3)

    July 2008

  • Oracle WebLogic Server Configuring and Managing WebLogic JMS, 10g Release 3 (10.3)

    Copyright 2007, 2008, Oracle and/or its affiliates. All rights reserved.

    This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.

    The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.

    If this software or related documentation is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable:

    U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data delivered to U.S. Government customers are "commercial computer software" or "commercial technical data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, the use, duplication, disclosure, modification, and adaptation shall be subject to the restrictions and license terms set forth in the applicable Government contract, and, to the extent applicable by the terms of the Government contract, the additional rights set forth in FAR 52.227-19, Commercial Computer Software License (December 2007). Oracle USA, Inc., 500 Oracle Parkway, Redwood City, CA 94065.

    This software is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications which may create a risk of personal injury. If you use this software in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure the safe use of this software. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software in dangerous applications.

    Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

    This software and documentation may provide access to or information on content, products and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services.

  • Configuring and Managing WebLogic JMS iii

    Contents

    1. Introduction and RoadmapDocument Scope and Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1

    Guide to This Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2

    Related Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2

    JMS Samples and Tutorials for the JMS Administrator . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3

    Avitek Medical Records Application (MedRec) and Tutorials . . . . . . . . . . . . . . . . . 1-3

    JMS Examples in the WebLogic Server Distribution . . . . . . . . . . . . . . . . . . . . . . . . . 1-4

    New and Changed JMS Features In This Release . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-4

    WebLogic Server Value-Added JMS Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-4

    Enterprise-grade Reliability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-4

    Enterprise-level Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-5

    Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-7

    Tight Integration with WebLogic Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-8

    Interoperability With Other Messaging Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-9

    2. Understanding JMS Resource ConfigurationOverview of JMS and WebLogic Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1

    What Is the Java Message Service? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1

    WebLogic JMS Architecture and Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2

    Domain Configuration: Environment-Related Resources versus Application-Related Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4

    What Are JMS Configuration Resources? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5

    Overview of JMS Servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5

  • iv Programming WebLogic JMS

    JMS Server Behavior in WebLogic Server 9.0 and Later . . . . . . . . . . . . . . . . . . . . . 2-6

    Overview of JMS Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7

    JMS System Modules. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7

    JMS Application Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-9

    Comparing JMS System Modules and Application Modules . . . . . . . . . . . . . . . . . . 2-9

    Configurable JMS Resources in Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-10

    JMS Schema. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11

    JMS Interop Modules. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11

    Other Environment-Related System Resources for WebLogic JMS . . . . . . . . . . . . . . . 2-12

    Persistent Stores . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-12

    JMS Store-and-Forward (SAF) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-12

    Path Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-13

    Messaging Bridges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-13

    3. Configuring Basic JMS System ResourcesMethods for Configuring JMS System Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2

    Main Steps for Configuring Basic JMS System Resources . . . . . . . . . . . . . . . . . . . . . . . 3-2

    Advanced Resources in JMS System Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4

    JMS Configuration Naming Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4

    JMS Server Configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5

    JMS Server Configuration Parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5

    JMS Server Targeting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-6

    JMS Server Monitoring Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-6

    Session Pools and Connection Consumers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-7

    JMS System Module Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-7

    JMS System Module and Resource Subdeployment Targeting . . . . . . . . . . . . . . . . . 3-8

    Default Targeting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-8

    Subdeployment Targeting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-9

  • Programming WebLogic JMS v

    Connection Factory Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-11

    Using a Default Connection Factory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-11

    Connection Factory Configuration Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-12

    Connection Factory Targeting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-13

    Queue and Topic Destination Configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-13

    Queue and Topic Configuration Parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-14

    Creating Error Destinations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-15

    Creating Distributed Destinations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-15

    Queue and Topic Targeting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-15

    Destination Monitoring and Management Parameters . . . . . . . . . . . . . . . . . . . . . . . 3-16

    JMS Template Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-16

    JMS Template Configuration Parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-16

    Destination Key Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-17

    Quota Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-18

    Foreign Server Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-18

    Distributed Destination Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-18

    JMS Store-and-Forward (SAF) Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-18

    4. Configuring Advanced JMS System ResourcesConfiguring WebLogic JMS Clustering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1

    Advantages of JMS Clustering. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1

    How JMS Clustering Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3

    JMS Clustering Naming Requirements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-4

    Distributed Destination Within a Cluster . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-4

    JMS Services As a Migratable Service Within a Cluster . . . . . . . . . . . . . . . . . . 4-4

    Configuration Guidelines for JMS Clustering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-5

    What About Failover? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-5

    Migration of JMS-related Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-6

  • vi Programming WebLogic JMS

    Automatic Migration of JMS Services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-7

    Manual Migration JMS Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-7

    Persistent Store High Availability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-7

    Using the WebLogic Path Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-8

    Path Service High Availability. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-8

    Implementing Message UOO With a Path Service . . . . . . . . . . . . . . . . . . . . . . . . . . 4-8

    Configuring Foreign Server Resources to Access Third-Party JMS Providers . . . . . . . 4-10

    How WebLogic JMS Accesses Foreign JMS Providers . . . . . . . . . . . . . . . . . . . . . 4-10

    Creating Foreign Server Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-11

    Creating Foreign Connection Factory Resources . . . . . . . . . . . . . . . . . . . . . . . 4-11

    Creating a Foreign Destination Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-11

    Sample Configuration for MQSeries JNDI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-12

    Configuring Distributed Destination Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-13

    Uniform Distributed Destinations vs. Weighted Distributed Destinations . . . . . . . 4-13

    Creating Uniform Distributed Destinations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-14

    Targeting Uniform Distributed Queues and Topics . . . . . . . . . . . . . . . . . . . . . 4-14

    Pausing and Resuming Message Operations on UDD Members . . . . . . . . . . . 4-16

    Monitoring UDD Members . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-16

    Creating Weighted Distributed Destinations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-16

    Load Balancing Messages Across a Distributed Destination . . . . . . . . . . . . . . . . . 4-17

    Load Balancing Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-17

    Consumer Load Balancing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-18

    Producer Load Balancing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-18

    Load Balancing Heuristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-18

    Defeating Load Balancing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-20

    How Distributed Destination Load Balancing Is Affected When Server Affinity Is Enabled . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-21

    Distributed Destination Migration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-23

  • Programming WebLogic JMS vii

    Distributed Destination Failover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-24

    5. Configuring JMS Application Modules for DeploymentMethods for Configuring JMS Application Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2

    JMS Schema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2

    Packaging JMS Application Modules In an Enterprise Applicati...

Recommended

View more >