So would non-persistent messages still preserve the transactional integrity of 
the JMS transaction?

onMsg(...) {
  |    //performSomeDBOperation( ) // or any XA transactional operation
  |    ...biz throws an uncaught exception  which is propagated to the JMS 
container
  | }
  | 
Can I assume the DB updates would be automatically rolled back - regardless of 
whether the message was persisted is a XA resource like a DB? So is JMS itself 
is an XA transactional resource irrespective of how persistence is handled? If 
so, that's something I guess I've missed all of these years using JMS.
I assumed that JMS being a 'potential' XA resource was only because of it's 
persistence implementation - I assumed if no persistence is used (or a 
non-transactional persistence impl like a filesystem) then consistent JMS<->DB 
transactions couldn't be guaranteed.  

For so value added here's a good description:
http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JMS6.html#wp81843

...from Sun's tutorial...
anonymous wrote : # You can use the setDeliveryMode method of the 
MessageProducer interface to set the delivery mode for all messages sent by 
that producer. For example, the following call sets the delivery mode to 
NON_PERSISTENT for a producer:
  | 
  | producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
  | 
  | # You can use the long form of the send or the publish method to set the 
delivery mode for a specific message. The second argument sets the delivery 
mode. For example, the following send call sets the delivery mode for message 
to NON_PERSISTENT:
  | 
  | producer.send(message, DeliveryMode.NON_PERSISTENT, 3,  10000);
  | 
  | The third and fourth arguments set the priority level and expiration time, 
which are described in the next two subsections. 


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4047968#4047968

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4047968
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to