how to use servlet to receive message (not soap message)

J

John

Hello Dear

I'm wondering, is it possible (or how) to use a servlet to receive a
message, like a servlet which extends JAXMServlet and implements
ReqRespListener can receive SOAPMessage.
 
B

Bryce

Hello Dear

I'm wondering, is it possible (or how) to use a servlet to receive a
message, like a servlet which extends JAXMServlet and implements
ReqRespListener can receive SOAPMessage.

What kind of message? You can generally use a servlet to receive
anything that can be transmitted vi http.
 
J

John

just the regular one, like

javax.jms.Queue,,,

I've tried let a servlet implements MessageListener, similar as the one
used to receive SOAPMessage which implements ReqRespListener,
unfortunately it didn't react when a javax.jms.Message sent.

u know any example?
 
B

Bryce

just the regular one, like

javax.jms.Queue,,,

I've tried let a servlet implements MessageListener, similar as the one
used to receive SOAPMessage which implements ReqRespListener,
unfortunately it didn't react when a javax.jms.Message sent.

Well that's different. You are trying to use JMS. Look at OpenJMS
http://openjms.sourceforge.net/
 
J

John

Yes, that's JMS message.

what you recommand "openjms" doen't show using servlet to receive jms
message. I'm still wondering whether it's possible to do it that way.
 
B

Bryce

Yes, that's JMS message.

what you recommand "openjms" doen't show using servlet to receive jms
message. I'm still wondering whether it's possible to do it that way.

I don't believe its possible, unless the message is arriving in a text
format. I know openjms can be embedded inside a servlet, but the
initial request that the servlet gets must be in a text format.
 
J

John

Thanks for that idea, but how to let onMessage() invoke, I meant the
main servlet class (the listener) doesn't even trigger the onMessage.
 
I

iksrazal

John said:
Thanks for that idea, but how to let onMessage() invoke, I meant the
main servlet class (the listener) doesn't even trigger the onMessage.

What I now think you are trying to do - have a servlet be a JMS
listener - I think can indeed be done using openjms via the http
connector as explained here:

http://openjms.sourceforge.net/config/reference.html#HttpConfiguration

Take a look at serverServlet.

I typically use servlets to send jms messages - not recieve them - and
I use the RMI connector. Sounds interesting, good luck!

HTH,
iksrazal
http://www.braziloutsource.com/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top