12.11.2014 Views

web server - Borland Technical Publications

web server - Borland Technical Publications

web server - Borland Technical Publications

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Error Recovery<br />

Redelivered messages<br />

Should the MDB fail to consume a message for any reason, the message will be redelivered<br />

by the JMS service. The message will only be re-delivered five times. After<br />

five attempts, the message will be delivered to a dead queue (if one is configured).<br />

There is one bean-level property that controls the re-deliver attempt count:<br />

■<br />

ejb.mdb.maxRedeliverAttemptCount: the max number of times a message will be redelivered<br />

by the JMS service provider if an MDB is unable to consume it. The<br />

default value is 5.<br />

There are two bean-level properties for delivering a message to a dead queue:<br />

■<br />

ejb.mdb.unDeliverableQueueConnectionFactory: looks up JNDI name for the<br />

connection factory to create connection to the JMS service.<br />

■<br />

ejb.mdb.unDeliverableQueue: looks up the JNDI name of the queue.<br />

The XML example for unDeliverableQueueConnectionFactory and unDeliverableQueue<br />

is shown here:<br />

<br />

<br />

<br />

MyMDB<br />

serial://jms/q<br />

serial://jms/xaqcf<br />

<br />

20<br />

0<br />

<br />

<br />

jms/QueueConnectionFactory<br />

jms/xaqcf<br />

<br />

<br />

ejb.mdb.maxRedeliverAttemptCount<br />

String<br />

3<br />

<br />

<br />

ejb.mdb.unDeliverableQueueConnectionFactory<br />

String<br />

serial://jms/qcf<br />

<br />

<br />

ejb.mdb.unDeliverableQueue<br />

String<br />

serial://jms/q2<br />

<br />

<br />

ejb-designer-id<br />

String<br />

MyMDB<br />

<br />

<br />

<br />

<br />

<br />

188 BES Developer’s Guide

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!