[jboss-user] [JBoss Messaging] - Re: JBM 1.4 and container transactions

FrankTheTank do-not-reply at jboss.com
Mon Aug 3 06:29:50 EDT 2009

Doing some tests.

I have two destinations:
Queue (configured as non-clustered):
Destination : "queue/TestQueue"
Factory : "java:/JmsXA"
Type : "javax.jms.Queue"
NeedsTransactions : true

Topic (configured as clustered):
Destination : "queue/TestTopic"
Factory : "/ClusteredConnectionFactory"
Type : "javax.jms.topic"
NeedsTransactions : false

(stored in a lookup map)

Datasource that persists the jms topics is a xa-datasource.

I have an MBean that provides a jmx-console interface and a stateless SessionBean that will send the message.
The SessionBean's send() method is annotated with @TransactionAttribute(TransactionAttributeType.REQUIRED)

I use the above destination info and get the required components, then send out the message. No problemo.
Problem is, the transactions do not seem to be 'working' if the send() method fails (due to an exception I can trigger within the call but after 'sending' the message).
Regardless where I send it, with or without exception, the message will still come out.

My actual system should work as following:
The Queue is used on a per-node basis to inform other components if one component changes something.
f.i. if I change the addess of a user in one component, I want a message to be sent over the queue to a dedicated listener on that node.
The process must be transactional because if something goes wrong, we do not want the message to be sent.
This dedicated listener recieves the message and then, among other things, will propagate a stripped version of this event to a 'public' topic.
The topic should be cluster wide, so that a listener on Node B knows that something changed.
On this public topic there are multiple listeners that hungrily await these messages.
The messages on the 'public' topic need not be handled via transaction.

What am I doing wrong?


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

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4247550

More information about the jboss-user mailing list