Figure 1. Relationship between connection factories and the message listener service
http://www.ibm.com/developerworks/websphere/library/techarticles/0602_kesavan/0602_kesavan.html
Answer
Q: WebSphere MQ Queue Connection Factories in WebSphere Application Server releases contain both a connection pool and a session pool for configuration. When configuring the session pool, is this configuration per each connection? For example, if my connection pool has a maximum size of 10, and my session pool also has a maximum size of 10, does that mean that I have a total of 10 sessions available per connection (which would make this 100 sessions for 10 connections) or does this mean that there are only 10 sessions available to be used among 10 connections?
A: The session pool setting applies to each JMS connection as this is the factory for sessions, so you can have a maximum of 10 sessions for each connection and a maximum of 10 connections. So, in total, this mean you might have 100 channels (connections) open to the MQ Server.
Q: What happens if my session pool has a maximum of 10 session and connections and I attempt to create a new session from a connection that exceeds this maximum session and connection? Does the pool grow? Is an exception thrown? If so, what kind of exception?
A: When the maximum number of connections and sessions is reached, and a request for a new connection or session is received, the pool manager waits for a period of time defined in the Connection timeout property for an available physical connection. If a connection is not available in the time period defined by the Connection timeout property, the Pool manager throws a ConnectionWaitTimeoutException. This is documented in more detail in the Connection timeout section on the Session pool settings page of the WebSphere Application Server Information Center.
Q: When closing a QueueConnection JMS in WebSphere Application Server with Connection Pooling configured, what exactly happens?
A: When a connection is closed, it is returned to the connection pool, and the session to its session pool. Any QueueSender and QueueReceiver objects associated with the session are destroyed.
Q: From a design perspective, is there a formula regarding the sizing of the WebSphere MQ JMS connection pool and JMS session pool with respect to the number of concurrent requests?
A: No formula exists. However, we recommend that you set the Max Connections property for your connection pool to a value about 50% higher than your typical JMS connection concurrency, and the Max Connections property for your session pool to approximately 50% more than the average number of concurrent sessions requested on a JMS Connection. The requirements really depend on the design of your application; in particular, how it uses JMS connections and sessions. You should also remember that the Max Connections property for your session pool is the maximum number of sessions that can be made from a single JMS Connection, because a JMS connection is a factory for sessions.
Q: How can I utilize a WebSphere MQ JMS session pool without having to manage the JMS connections in the application? It appears that if I have a JMS connection pool and a JMS session pool, I need to keep track of my connections in some collector object to use the number of sessions I have configured for use with each connection. How do you make use of those sessions in the session pool without having to maintain your own programmatic list of connections that are configured in the connection pool? For example, having retrieved a connection from the connection pool, what is the approach for creating sessions for multiple users without having to maintain that connection reference and a collector object in my application?
A: JMS connections are non-shareable. Therefore, unless your application does something like caching a connection in a static class variable (which is definitely not recommended in practice), an Enterprise JavaBeans™ method has only a single JMS connection/JMS session pair per EJB method thread. Currently, the JCA Connection Manager does not support sharing of non-transactional resources such as a JMS connection and so that must be handled in your application code. Note that, from a WebSphere MQ perspective, a JMS connection is very lightweight. It is the JMS session that is the heavyweight object. Also be aware that in the Sun J2EE™ 1.4 specification, an Application Server must enforce an application so that it can only create a single JMS session from a JMS connection. A possible reason behind the Sun decision to do this is because of Connection Management considerations, and the fact that in J2EE 1.4, JMS providers are advised to be defined as JCA Resource Adapters.
ConnectionPool | SessionPool | Poolsize |
19 | 1 | 3 |
20 | 1 | 3 |
19 | 30 | 41 |
10 | 1 | 3 |
20 | 5 | 11 |
10 | 20 | 41 |
1 | 20 | 20 |
5 | 20 | 41 |
20 | 20 | 41 |
相关推荐
Chapter 38 - Deploying Web Services on WebSphere Part VIII - Internationalization and Localization Chapter 39 - Java Support Features for Internationalization Chapter 40 - Building Multilingual...
Utilities for terminal services: qwinsta and rwinsta
An important property of such botnets is that the originator of the botnet can remotely control and issue commands to all the nodes in the botnet. Hence, it becomes possible for the attacker to issue...
在Java编程语言中,`Listener`接口是一种常见的事件处理机制,它主要用于实现对象之间的通信。在Java Swing和Java AWT库中,`Listener`接口被广泛应用于用户界面(UI)组件,以响应用户的操作,例如按钮点击、窗口...
Ruby on Rails is the revolutionary online programming tool that makes creating functional e-commerce web sites faster and easier than ever. With the intuitive, straightforward nature of Ruby and the ...
Instructions on how to download and install the JavaMail API are contained in the course. In addition, you will need a development environment such as the JDK 1.1.6+ or the Java 2 Platform, Standard...
You will also learn practical, real-world tips on how to best utilize Vim alongside the terminal multiplexer tmux; helping you to manage files across multiple servers and terminal sessions. Avoid ...
This book will show you how monitoring containers and keeping a keen eye on the working of applications helps improve the overall performance of the applications that run on Docker. With the increased...
This is a book about building the network you need. We’ll dip into the topics of fire- walls and related functions, starting from a little theory. You’ll see plenty of examples of filtering and ...
The session startup dialog controls how sessions are initialized. Key aspects include: - Choosing the profiling mode. - Configuring basic settings like sampling rate. - Launching the application with ...
Find the tools that make the code editor pleasant to work with, even in long coding sessions. Discover the right way to find and fix bugs when you have lots of code that’s not always playing nicely ...
Non-technical users who may want to know why TPMs are on their computers and how to make use of them. Table of Contents Chapter 1: History of the TPM Chapter 2: Basic Security Concepts Chapter 3: ...
The example shows how to define/implement methods on the server and how to access them from the client. The data consists of name information and four simple methods are provided by the service: ...
How to compare the modified file against the source file on disk. Column Based Find and Replace Need to restrict your search/replace to a specific column range? The column based search does just that....
If you enter an IP into the ADDRESS property, the HOST property will be completed, and the OnHostLookup event will occur. If you enter an IP or a HOST name into the HOST property, the ADDRESS ...
How to build and run the console samples on Windows, Linux and iOS This section describes how to run the NetCoreConsoleClient, NetCoreConsolePublisher and NetCoreConsoleServer sample applications. ...
ftp:ssl-force is set and server does not support or allow SSL
This book covers how to use the Managed DirectX objects, how they differ from the core DirectX libraries, and how to create these rich multimedia applications in C#. It also covers in depth graphics ...
- Sessions can expire based on a fixed duration (e.g., 30 minutes) or when the user logs out explicitly. Automatic expiration helps mitigate the risk of unauthorized access if the user forgets to log...