jms

Why ClassCastException on JMS ConnectionFactory lookup in JNDI?

What might be the cause of the following ClassCastException in a standalone JMS client application when it attempts to retrieve a connection factory from the JNDI provider? Exception in thread "main" java.lang.ClassCastException: javax.naming.Reference cannot be cast to javax.jms.ConnectionFactory Here is an abbreviated version of the...

JMS - How do message selectors work with multiple queue and topic consumers?

Say you have a JMS queue, and multiple consumers are watching the queue for messages. You want one of the consumers to get all of a particular type of message, so you decide to employ message selectors. For example, you define a property to go in your JMS message header named, "targetConsumer." Your message selector, which you apply to ...

help on ejb stateless datagram and message driven beans

i have a client thats sending a message to the ejbserver using UDP, i want the server(stateless bean) to echo back this message to the client but i cant seem to do this. or can i implement the same logic by using JMS? please help and enlighten. this is just a test, in the end i want a midp to be sending the message to the ejb using dat...

message queue : selection and sizing

Hi, I have 20 messages/s, each 1 - 1.5 Mbytes. I need High Availability (2 to 4 servers min). I need low latencey (high daily volume -> full RAM prefered). I need persistent poisoned messages queue. Only few clients (about 16), locally. I can have 12-16G bytes RAM per server (brooker). Which JMS message queue / messaging would you re...

Configuration of tibco jms with Spring

Hi. Now I have java code which starts tibco jms subscription with several steps: Properties props = new Properties(); props.put("java.naming.provider.url", namingProvider); props.put("java.naming.factory.initial", namingFactory); props.put("java.naming.referral", namingReferral); props.put("java.naming.se...

ActiveMQ, timestamp for broker receiving the message to send

Ok, as per ActiveMQ docs, it appears that Message.getJMSTimestamp() returns time that client claims it sent the message (with its local clock). And that there is supposedly property "JMSActiveMQBrokerInTime" that is added to Message (see http://activemq.apache.org/activemq-message-properties.html). However, trying to access it on an Acti...

JMS On demand Support Active MQ with Spring

I am involving in SMS Gate way project. The Very Base function is our system have couple of Customers They will send their request to our gateway in a form of XML. Those request is Process first and send it to a common out bound JMS(ActiveMQ 5.3 ) There is an listener running on which should be capable of doing the following Retr...

Embedded ActiveMQ broker in Spring/OSGi problems.

Hello fellows, I ran into a very disturbing issue that's been puzzling me for a while and I was wondering if anyone could give me some insight on this. Basically, what I'm trying to do is set up an embedded ActiveMQ broker in the Spring context of one of my OSGi bundles (in Felix). I have downloaded the bundle and all dependencies list...

Unit testing with JMS (ActiveMQ)

How to do unit testing with JMS ? Is it some de-facto for this ? I googled something - Unit testing for JMS: http://activemq.apache.org/how-to-unit-test-jms-code.html - jmsTemplate: activemq.apache.org/jmstemplate-gotchas.html - mockRunner : mockrunner.sourceforge.net/ Do you have any good experience on those and suggestion for me ? ...

How to design service that can provide interface as JAX-WS web service, or via JMS, or as local method calls within JEE framework?

Using a typical JEE framework, how do I develop and deploy a service that can be called as a web service (with a WSDL interface), be invoked via JMS messages, or called directly from another service in the same container? Here's some more context: Currently I am responsible for a service (let's call it Service X) with the following pr...

JMS error: can not send into foreign destinations

Hi, I use Spring-configured jms template with tibco jms library. I get jms connection factory and topic with JNDI and these objects are not null. But when I try to send message or add listener I get this exception: For listener: Exception in thread "main" org.springframework.jms.InvalidDestinationException: Can not send into foreign de...

JMS MessageCreator.createMessage() in Grails

Hi there, I am trying to implement jms to my grails application. I have several JMS consumer in a spring based enviroment listining on an ActiveMQ broker. I wrote a simple test commandline client which creates messages and receives them in an request response manner. Here is the snippet that sends a MapMessage in Spring JMS way. This...

ActiveMq integration with Spring 2.5

I am using ActiveMq 5.32 with Spring 2.5.5. I use pretty generic configuration, as long as I include the jmsTransactionManager in DefaultMessageListenerContainer, Spring throw an error on start up: "Error creating bean with name 'org.springframework.jms.listener.DefaultMessageListenerContainer#0'" Without the transactionManager attrib...

jms message not moving of the queue in websphere

I have a message driven bean that throws exception under certain conditions. When it throws an exception the message is not processed and put back on the queue. From what I understand with MQ and WAS (Websphere Application Server) the message should be marked as bad after x number of tries and removed from the queue. This is not happenin...

XMPP and Android interaction

I am currently finding about how to build a XMPP client application on android 2.1.I came across this link which somewhat talks about the same problem.I am a newbie to android dev and thus found the solution given there to be difficult to digest. The system currently has Active MQ as a JMS provider.My job is to fed the messages coming f...

Why does Eclipse skip lines when I debug JBoss?

Hi, I am trying to debug web service call which uses JMS in the background.I have JBoss running in debug mode. What happens is that when I press F6 in Eclipse (to execute current line) it skips certain lines. I have this method: @Override public void log(MsgPayload payload) { 1 Date startTime = new Date(); logger.inf...

Encoding a JMS TextMessage

Hello I'm receiving messages from a jms mq queue which are supposedly utf-8 encoded. However on reading the out using msgText = ((TextMessage)msg).getText(); I get questionmarks where non standard characters were present. It seems possible to specify the encoding when using a bytemessage, but I cant find a way to specify encoding while r...

Have an external java application by notified of changes to Entity EJBs in JBoss AS

I'm trying to connect an external application to a JBoss AS container. The external application is a Java application that is currently being notified of changes to database entities through a JMS topic. I've added an EntityLifecycleListener class to all my entities that publishes a serialized (and unwrapped) copy of the entity to the JM...

JMS Priority set by a custom header

Hi, Is there a way to prioritize the messages in the JMS broker according to a custom header value? For Example: "purchase date". get oldest first etc. Please advise. ...

Is ActiveMQ unreliable?

Hello, We have been using ActiveMQ 5.2 in our distributed enterprise application for about 3 months. During that time, we have experienced debilitating failures at least twice weekly. In particular, we see: 1) Topic publisher has its connection arbitrarily closed and experiences EOF on attempt to publish. Note well that this issue is n...