jms

unable create JMS resources in Glassfish v3.1.2 using glassfish-resources.xml

十年热恋 提交于 2020-01-03 04:59:08
问题 I am trying out the example on chapter4 of EJB3 in Action on Glassfish server. I have packaged the below glassfish-resources.xml (created with netbeans) under the META-INF directory of the ear package. However the ear fails to deploy with the error "JMS resource not created : ShippingRequestQueue". Please help me fix the issue. Update: I am able to deploy resources xml file from admin console. But it doesn't get deployed along with the ear file. <?xml version="1.0" encoding="UTF-8"?> <

Using Circuit Breaker with camel -ThrottlingExceptionRoutePolicy

≯℡__Kan透↙ 提交于 2020-01-03 03:28:11
问题 There is a route which is consuming messages from a jms queue and after doing some processing sending a request to unreliable web service(Which can be down at times). So in case of service is down then i need to stop consuming from queue for some time. I tried to use ThrottlingExceptionRoutePolicy . It will stop route as per configuration but issue is for the current message which gets the error as message is getting moved to dead letter queue. I've gone through the code of

Maximum number of messages sent to a Queue in OpenMQ?

徘徊边缘 提交于 2020-01-03 03:22:17
问题 I am currently using Glassfish v2.1 and I have set up a queue to send and receive messages from with Sesion beans and MDBs respectively. However, I have noticed that I can send only a maximum of 1000 messages to the queue. Is there any reason why I cannot send more than 1000 messages to the queue? I do have a "developer" profile setup for the glassfish domain. Could that be the reason? Or is there some resource configuration setting that I need to modify? I have setup the sun-resources.xml

JMS MessageConsumer Using MessageListener Terminates on ActiveMQ Shutdown

自作多情 提交于 2020-01-03 02:59:10
问题 Trying to have a JMS MessageConsumer survive ActiveMQ reboots, so it can reconnect using the Failover Transport protocol. However, it terminates upon shutdown of ActiveMQ. This looks like a bug that was reported and "resolved", but I'm still seeing this in the latest version of ActiveMQ 5.10.0 I used the following maven dependency <dependency> <groupId>org.apache.activemq</groupId> <artifactId>activemq-all</artifactId> <version>5.10.0</version> </dependency> Here is some sample code using

How to synchronize multiple clients with a shared database (JPA)?

徘徊边缘 提交于 2020-01-03 02:36:07
问题 I have a very essential question about a basic concept regarding synchronization of multiple clients that share a common database: I plan to design a distributed application using Java and JPA for persistence. Assumed that I have a central database that hosts all enterprise data and multiple clients connect to this database for querying data, what would be the best approach to keep the particular clients synchronized (in means of the data in the database) ? E.g. Client A updates the surname

Transaction handling while using message driven channel adapter & service activator

大城市里の小女人 提交于 2020-01-02 16:30:09
问题 I am working on a POC which does the following Uses a message driven channel adapter to recieve message in a transaction Calls the Service Activator which uses a handler to insert the message recieved from the adapter to DB and also post message to outbound channel. Now, if the DB insert of the message fails i want the JMS message returned back to the queue so that it can be re-tried later. With my below configuration it doesnt seems to work.(i.e. even if there is a failure while inserting

Get queues depth from java code

最后都变了- 提交于 2020-01-02 16:16:30
问题 Can anyone help in doing the code in java of getting the depth of the queues. We are having 4 queues in IBM WebSphere MQ and inside them there are messages. I want to write a jsp to read the queue names and their depth while running the report. How do I do that? Can anyone help in getting the full solution because I don't know what to do 回答1: I doens't think there is a way to retrieve the queue depth using JMS. You can however use MQ Series specific Java API to retrieve this information. Here

Spring annotation value from configuration

∥☆過路亽.° 提交于 2020-01-02 09:43:12
问题 In my Spring Boot application I have configured following JMS Listener: @Component public class Consumer { @JmsListener(destination = "image.index.queue") public void receiveQueue(IndexRequest indexRequest) { ... } } How to supply destination name "image.index.queue" from configuration(application.properties) instead of hard-coded value ? 回答1: import org.springframework.beans.factory.annotation.Value; @JmsListener(destination = @Value("${jmx.image.index.queue}") public void receiveQueue

Spring annotation value from configuration

▼魔方 西西 提交于 2020-01-02 09:43:06
问题 In my Spring Boot application I have configured following JMS Listener: @Component public class Consumer { @JmsListener(destination = "image.index.queue") public void receiveQueue(IndexRequest indexRequest) { ... } } How to supply destination name "image.index.queue" from configuration(application.properties) instead of hard-coded value ? 回答1: import org.springframework.beans.factory.annotation.Value; @JmsListener(destination = @Value("${jmx.image.index.queue}") public void receiveQueue

Load balancing issue while connecting to IBM MQ using JMS + CCDT file

亡梦爱人 提交于 2020-01-02 08:17:21
问题 We are trying to connect to IBMMQ using CCDT file and JMS configuration. We are able to connect to it but we have an issue here: since we are using spring to set connection factory with CCDT file, this is initialized once at the start of the application, but unfortunately it picks only one queue manager at a time,i.e it sends all the messages to same queue manager and it does not load balance. Though i observed, if i manually set the CCDT file before every request then its able to load