Threads and JMS

D

Dennis

Hello,

1. Does anybody know if a Java Application running in an explicitly
kicked-off Thread will accept a JMS Client string?

2. If so, are there any limitations on the message received by the
client or the subsequent acknowledgements?

3. Does it make any difference to the Java Application running in a
thread, if the JMS Client, Connection and Session are declared in the
Threaded code or should the Connection be declared outside of the Thread
with only the Session declared in the Thread?

4. Is the receipt of the JMS message considered an "atomic" operation in
a Java Threaded environment?

Thank You :)
 
M

Mark Space

I don't have any experience with JMS but a quick web search leads me to
believe they're just Java objects, nothing special. Thus, you should
assume that all the normal rules for using objects with multiple threads
apply.

1. Does anybody know if a Java Application running in an explicitly
kicked-off Thread will accept a JMS Client string?

Sure. Why not?
2. If so, are there any limitations on the message received by the
client or the subsequent acknowledgements?

Shouldn't be.
3. Does it make any difference to the Java Application running in a
thread, if the JMS Client, Connection and Session are declared in the
Threaded code or should the Connection be declared outside of the Thread
with only the Session declared in the Thread?

Do you know about the Java memory model? See section 17.4 of the JLS.

4. Is the receipt of the JMS message considered an "atomic" operation in
a Java Threaded environment?


Short answer: "no" and shouldn't be needed either. You'll have to
provide your own synchronization (obviously). Try also the threads
section of the Java tutorial if you're really unclear.
 

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,769
Messages
2,569,582
Members
45,059
Latest member
cryptoseoagencies

Latest Threads

Top