We are working on an IBM WebSphere MQ application, and we use JMS API to operate the message. But we have a problem that the connection takes too much time, and we want to pool the JMS connection, for it's a standalone application, we have no application container to provide JNDI or pooling service. So is there a solution to resolve this? For JDBC we can use DBCP or c3p0 to archive pooling datasource, in JMS, is there any similar project that can pool JMS connections?
How to pool the JMS connection in a standalone Java application?
8.7k Views Asked by phyerbarte At
2
There are 2 best solutions below
0
stefan.m
On
Spring's CachingConnectionFactory works well for this use case. This answer in https://stackoverflow.com/a/31119435/1765341 explains how to do this in Tomcat, but the code there can easily be adapted for Java standalone applications. This should be much easier (and less error prone) than writing an Apache Commons Pool implementation.
Related Questions in JMS
- Using selector with JMSMessageID always returns null
- Put JMS message properties in IBM MQ queue and access from other JMS client which run on Websphere liberty
- How to browse ActiveMQ queue using JMS selector when number of messages in queue is > 100K
- How to tell if a JMS Session is async
- ActiveMQ Artemis - Get current redelivery count for scheduled messages
- Valid value usage in JMeter's JMS Subscriber 'JMS Selector' property - in order to consume messages with a dynamically changing JMSCorrelationID
- Setting the Maximum Message Size for JMS Destinations in Payara
- ActiveMQ Artemis HA split-brain issue on OOME crash
- JMeter JMS Publisher: Getting the JMSMessageId (generated at runtime) in the header and using it as the value of another JMS Property before publish
- ActiveMQ Artemis: Muticast address deliver messages inconsistently
- ActiveMQ Artemis Consumer Connection Distribution
- ActiveMQ Artemis server produces lots of AMQ224016 error in logs after migration to Jakarta API client
- How to create a JMS queue with topic in Docker Compose?
- jakarta.jms.JMSException: Failed to build body from content. Serializable class not available to broker
- How do i stop @JmsListener from listening a queue using JmsListenerEndpointRegistry in spring boot?
Related Questions in IBM-MQ
- Problem with C# submitting file to IBM MQ Broker
- Put JMS message properties in IBM MQ queue and access from other JMS client which run on Websphere liberty
- pymqi connection calls fail in subprocesses on osx *and* the exception kills the python shell
- MQRC_Q_MGR_NAME_ERROR
- MQRC_KEY_REPOSITORY_ERROR appear when connect to remote queue server with SSL
- How to connect to multiple IBM queue connections having different QM, Host, Port from Java
- Exception while launching swagger for .net 6 API using IBM MQ
- ERROR: Process message with RFH2 header using python to IBM MQ
- Copy MQ segmentation enabled messages to multiple queues on IBM MQ 9.2.0.7
- Start an apache camel route from a different spring boot application
- How to get a IBM MQ message by Message ID using bash ? is there a tool available?
- How to set TLS Cipher TLS_RSA_WITH_AES_128_GCM_SHA256 on Windows 2016
- Spring boot upgarde issue come. Ibm. disthub2. Impl. Jms. TextMesaageImpl
- Exist some way to extract the correlation-Id property from of a MQ message using AMQP?
- IBM MQ not returning Correlation ID
Related Questions in MQ
- JMeter parallel mq publishing request messages with unique sequence ID which needs to be validated against external system before being sent
- LDAP authentication on MQ qmgr
- AMQ Message move from one server to another us failing with a-1.6.0-jar-with-dependencies.jar
- Saving Dead letter messages in file system/database
- Headers are not read in IBM MQ
- Java IBM MQ client MQ.Environment setting hostname to only ip adress not connecting, but setting to "localhost" works. Local docker deployment ibm-mq
- Linux Posix Message Queue
- How to change test message Format as null through IBM Websphere MQ Explorer
- IBM MQ call failed with compcode '2' ('MQCC_FAILED') reason '2009' ('MQRC_CONNECTION_BROKEN')
- Latest IBM NuGet package for .NET clients obsolete?
- How to set WMQConstants.USERID in springboot application to connect to IBM MQ?
- Jmeter MQ GUI is working properly but cli summary showing error. Aggregate report shows different result
- JMS producer to send message to specific queue manager using apache camel
- how to increase the number of threads/task inserting into MQ using JMS caching connection factory?
- JMSTemplate transacted session not working with MQ resource adapter in Jboss
Related Questions in POOLING
- Why spatial pyramid uses pooling while feature pyramid uses convolution?
- Can I forbid method to cache passed argument?
- Plotting interaction effects from "mira" or "mipo" objects in R (after multiple imputation using mice)
- Changing pooling method in pre-trained models
- How does average pooling function work in TensorFlow?
- Is there any faster/ less RAM using way to pool the data using Python?
- Data Factory does not reuse nor disconnects from ODBC connection (Progress DB)
- Pooling configuration sizing for the Mule 4 Database Connnector
- Implement pooling with rxjs - wait for correct response and do it with timeout and delay
- Convolution and pooling in discriminator vs image transformation for GANs (Advatages/Disadvantages)
- TypeError('Keyword argument not understood:', kwarg) TypeError: ('Keyword argument not understood:', 'inputs')
- Where to import pool.js file in my project file structure
- indices in MaxPool2d in pytorch
- node.js mssql UPDATE Statements take > 1 minute to execute
- Dropwizard default connection pooling does not expire connections properly
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
It used to be that the JMS MQConnectionFactory had pooling built in, but it seems that in version 7, it has been removed.
In the absence of anything else, you can use Apache Commons Pool. Same idea as DBCP (which uses Pool) but for non JDBC objects.