Questions tagged [jmstemplate]

Spring helper class that simplifies synchronous JMS access code

Spring provides a JMS integration framework that simplifies the use of the JMS API much like Spring's integration does for the JDBC API.

JMS can be roughly divided into two areas of functionality, namely the production and consumption of messages. The JmsTemplate class is used for message production and synchronous message reception.

The JmsTemplate class is the central class in the JMS core package. It simplifies the use of JMS since it handles the creation and release of resources when sending or synchronously receiving messages.

Code that uses the JmsTemplate only needs to implement callback interfaces giving them a clearly defined high level contract. The MessageCreator callback interface creates a message given a Session provided by the calling code in JmsTemplate. In order to allow for more complex usage of the JMS API, the callback SessionCallback provides the user with the JMS session and the callback ProducerCallback exposes a Session and MessageProducer pair.

206 questions
0
votes
1 answer

JMS - Cannot retrieve message from queue. Happens intermittently

We have a Java class that listens to a database (Oracle) queue table and process it if there are records placed in that queue. It worked normally in UAT and development environments. Upon deployment in production, there are times when it cannot read…
0
votes
1 answer

How do i stop JtaTransactionManager log messages in console?

I have integrated JmsTemplate with Jboss 6.2 and HornetQ everything works fine. I have added
Joe
  • 4,460
  • 19
  • 60
  • 106
0
votes
1 answer

Can message we are pushing to a Queue be moved to Active MQ Dead Letter Queue (DLQ) if any exception/connection error occur?

i am using Spring JmsTemplate for sending/pushing message to ActiveMQ queue. i know after listener start processing that message and any exception occur,that message will be considered as a poison pill and moved to default DLQ of acive mq. is that…
Somnath Goswami
  • 112
  • 1
  • 12
0
votes
1 answer

WebLogic 10.3.6 throws JMSClientExceptions:055142 when configured with lookupOnStartup false

I have simple Java Spring application which looks up JMS objects using JNDI and publishes a message to a JMS Topic. JNDI and JMS configured on WebLogic 10.3.6. All this works fine as long as the WebLogic server is up and running. I need to get the…
0
votes
1 answer

ActiveMQ with Spring Boot. Messages persistance is not working

I want to use ActiveMQ within Spring Boot app as embedded server. To setup ActiveMQ I used following tutorial: Spring Boot. Messaging with JMS. My app will be the broker and the consumer. There are multiple threads creating messages like…
PaintedRed
  • 1,398
  • 5
  • 19
  • 30
0
votes
0 answers

Clarification regarding Spring Batch Chunk Behaviour

We are using Spring Batch Chunk to read messages from JMS destination and write to a flat file. In this regard, we have below observations, If the message broker goes down while the reader reads the messages and commit count is not reached, what…
anand206
  • 21
  • 5
0
votes
0 answers

JmsTemplate - broker name issue (ObjectName)

We are using on our junit tests some activemq manipulations (via jmx). we have 2 main environments: 1) local 2) QA as part of our code for the JMS manipulation we use the activemq objectName. Problem is - in one environment the Objectname =…
Urbanleg
  • 6,252
  • 16
  • 76
  • 139
0
votes
1 answer

Spring jmstemplate property configuration

I am using the Spring JmsTemplate with JBOSS MQ. Do I need to use the "sessionTransacted" property in my jmsTemplate configuration file? What is the default value for this, if I do not configure it exclusively?
0
votes
1 answer

How to check that we have read all messages from MQ

need your help with updating the following code,currently this code fetches the first msg from IBM MQ ,but my requirement is to fetch until MQ is empty private JmsTemplate jmsTemplate; public JmsTemplate getJmsTemplate() { return…
Tanuja Gupta
  • 89
  • 1
  • 3
  • 12
0
votes
0 answers

Spring JmsTemplate connection pooling

we have scenario where the queue name is dynamically changed based on certain transaction,we will be using IBM mq for queueing.My question is that if I define the JmsTemplate as request scope bean which will allow modification of queue name…
sriramdev
  • 759
  • 1
  • 5
  • 11
0
votes
0 answers

JmsTemplate open and close connection with Java

Can anyone give me an example of how to open and close a connection to a queue using JmsTemplate? At the moment I am reading a lot of messages from a queue using the receiveSelected() method. However, every time I read a message the…
max
  • 53
  • 8
0
votes
0 answers

Websphere settings on JmsTemplate closing connections

I have done some reading on JmsTemplate and by default open and closes each connection after sending and receiving a message. The sequence is: open connection send/receive a message close connection I have a scenario where the application reads many…
max
  • 53
  • 8
0
votes
1 answer

JMSTemplate and recipient list

I've read the documentation and I've seen a similiar question (from late 2005) but it seems no one got an answer. ( http://forum.spring.io/forum/spring-projects/integration/jms/9152-jmstemplate-oracle-jms ) I'm trying to send a message to a Topic…
Massimo
  • 692
  • 2
  • 11
  • 29
0
votes
1 answer

Unable to send JMS message to activemq Queue using Spring's JmsTemplate

I am a Developer returning to Java after about 5 years of .NET experience. Although I have knowledge of the MVC framework, I am entirely new to Spring MVC and the spring framework. I have an assignment where I intended saving entities on an activemq…
sage
  • 587
  • 1
  • 8
  • 28
0
votes
1 answer

JmsTemplate ad hoc consumer is starving

I'm trying to create an ad hoc consumer for my JMS messages (I use ActiveMQ) it looks like this: jmsTemplate.browse( q.getName(), new BrowserCallback() { …
Urbanleg
  • 6,252
  • 16
  • 76
  • 139
1 2 3
13
14