jms

How to send messages to multiple jms (active mq) brokers from the same application?

前提是你 提交于 2019-12-24 19:02:41
问题 I've up 2 applications(servers) with embedded active mq instances locally. Now I need to create a client for this servers. I've read the asnswer: https://stackoverflow.com/a/43401330/2674303 and try to repeat this: I registered 2 connection factories: @Bean @Primary public ConnectionFactory bitFinexExchangeJmsConnectionFactory() { return new ActiveMQConnectionFactory("tcp://localhost:61616"); } @Bean public ConnectionFactory hitbtcExchangeJmsConnectionFactory() { return new

Correct approach to initialize an asynchronous JMS Listener and let it run infinitely

与世无争的帅哥 提交于 2019-12-24 18:49:19
问题 I use the following application to connect to my oracle database, register a queue listener and wait for enqueued messages: package sample; import javax.jms.JMSException; import javax.jms.MessageConsumer; import javax.jms.Queue; import javax.jms.QueueConnection; import javax.jms.QueueConnectionFactory; import javax.jms.QueueSession; import javax.jms.Session; import oracle.jms.AQjmsFactory; import oracle.jms.AQjmsSession; public class MyThread extends Thread { private static final String QUEUE

Spring 4 upgrade now junit tests fails on “GenericApplicationContext has not been refreshed yet”?

点点圈 提交于 2019-12-24 16:50:53
问题 I have a spring web app that connects to some jms message brokers and am now finding test errors and failures after migrating from Spring 3.2.16 to Spring 4.2.4.RELEASE. The error below is what I am now getting after simply changing the spring version on unit tests that use JmsTemplate. org.springframework.context.support.GenericApplicationContext@12eec522 has not been refreshed yet The test classes are configured like so: @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration

Using the Log4J JMSAppender with ActiveMQ

放肆的年华 提交于 2019-12-24 15:28:59
问题 I am trying to produce a proof of concept shipping logging from Log4J through JMS using the log4J JMSAppender. I have tried ActiveMQ and the example supplied with it. I have torn this example apart, and made it more generic and compatible with multiple platforms. It looks like I have it all plumbed up OK as I can see a connection to the ActiveMQ happening, but the code hangs when I get the InitialContext ( with -Dlog4j.debug set the ActiveMQ client classes seem to invoke log4J and load the

finalize method in MessageDrivenBean

安稳与你 提交于 2019-12-24 14:12:32
问题 Message-Driven Bean Class the requirements of a message-driven bean class: It must not define the finalize method. What is the reason for above requirement ? 回答1: If you look in the EJB spec, you will see that it is a requirement for all types of EJB. http://download.oracle.com/otndocs/jcp/ejb-3.1-pfd-oth-JSpec/ I can't find a definitive answer but looking on various Java forums over the last 13 years, you can see answers consistently saying that, because the container will decide the life

How can I update my weblogic JMS queue's target and subdeployment to default and AdminServer?

烈酒焚心 提交于 2019-12-24 13:05:12
问题 I have a problem identical to this question: JNDI lookup failing when looking up JMS queue in WebLogic 10.3.5 However, I can't figure out how to actually implement the solution. It seems simple enough to match the subdeployment and target to the same for both, but it isn't for me: If I change the connectionfactory's subs and target, I get the same error as i used to get on the queue, on the connectionfactory also Default targetting is not an option for queues, only connectionfactories. So how

How to setup JMS bridge to ActiveMQ on Weblogic 11g

▼魔方 西西 提交于 2019-12-24 11:53:32
问题 I'm novice guy in JCA and JMS parts of Java EE stack, and now I'm struggling with JMS bridge configuration between two JMS providers (ActiveMQ 5.9.1 -> Weblogic 11g 10.3.5), and I need some help to understand all the moving parts and required configuration elements. What I've done already: JMS server configured on Weblogic 11g node Configured Foreign Server - AMQ connection factory, and source queue objects bound to the local JNDI (OK: conn. factory and queue objects visible in server jndi

JBoss7 remote MDB connection to JMS queue -Connection failure has been detected

旧时模样 提交于 2019-12-24 11:27:46
问题 I am trying to develop an MDB for listening to remote queue in JBoss7, I Didn't receive messages from the queue. I got warnings in the server log: 11:32:41,882 WARN [org.hornetq.core.protocol.core.impl.RemotingConnectionImpl] (hornetq-failure-check-thread) Connection failure has been detected: Did not receive data from /137.72.223.212:50835. It is likely the client has exited or crashed without closing its connection, or the network between the server and client has failed. You also might

JMeter - Store/update a hashmap object in a variable/property

对着背影说爱祢 提交于 2019-12-24 11:14:35
问题 I need to create a hash-map inside of a JSR233 sampler that will contain certain headers and properties elements for an external java utility that I will call using a Java Request Sampler . I am going to need to create many hashmaps as the key-value pairs will vary based on the systems I am testing. For example, I am going to have to change the JMSReplyTo , the JMSCorrelationID , $TextBody: fields for every hash-map. All of this is done inside one thread group, but I may also want to

How to set message Id for IBM MQ using java program

怎甘沉沦 提交于 2019-12-24 10:55:53
问题 I am able to set correlation id for IBM mq but unable to set message id for the message the message id I am setting is being overridden by the MQ how to set this message id below one is the code I am trying please help me on this task. Is there any thing I need do in the code??? public static void main(String args[]) { try{ MQQueueConnectionFactory cf = new MQQueueConnectionFactory(); cf.setHostName("xxx"); cf.setPort(4444); cf.setTransportType(1); cf.setQueueManager("xxxx"); cf.setChannel(