jms implementation

Hi;

I search :

1- a jms implementation (source code or a example) for realizing the following fonction :

When a message is posted by a client to the queue, my component extracts the trade details and sends them inside of a mail (via javamail).

- Which are the errors not to make whan one uses JMS (I use Jboss) ?

Regards

[357 byte] By [yanis97a] at [2007-10-3 3:56:56]
# 1

Almost every JMS example will show you how to consume messages from a queue. There a some at java.sun.com and you could find plenty more if only you weren't too lazy to use google.

Instead of using javamail use the apache commons simple mail package - it's much easier.

In your case I would worry about getting an repeating exception while sending the email which causes your JMS transaction to rollback. By default the message will be automatically redelivered so you'll be stuck in an infinitely loop of

1. read message

2. process message

3. send email < EXCEPTION

4. rollback

5. goto 1

SteveNaivea at 2007-7-14 21:55:14 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...