Hello, I have a slight problem involving message driven beans here : "ReaderMDB" listens on topic "Magazine" for messages containing "Reader" in the message-property "Receiver-Classes". It is a messagedriven bean able to handle state information in a database. onMessage() does the following : - reads message-property "Reader-ID" to know which customer the ReaderMDB represents. - reads from table "readers-desk" : if the appropriate record is showing "instance activated", then it must die and the message must remain in the topic for consumption ! (the purpose is not to have 2 ReaderMDBs representing the same "Reader" updating their state at the same time !!) - updates table "readers-desk" with "instance activated" - does some message postings to the topic. - does some other database reads and updates - updates appropriate record in table "readers-desk" with "no instance activated". Well, from what I understood from the specification of MDBs and JMS, it is possible to do all this atomically. Imagine an exception is thrown in the onMessage method : 1) updates to databases will BE rolled back if an exception occurs within this - is this true for JBoss/JBossMQ ? 2) consumption of the message will be "rolled back", so that another instance may consume this message later from the topic "Magazine". 3) message postings done within onMessage will also be rolled back. Am I right here ? The problem is : we cant afford commercial products to support this. I hoped this was supported by JBoss and JBossMQ. 4) what happens if the MDB issues a message to the topic it had consumed from ? will this be rolled back ? will this be possible at all ? 5) what happens if the MDB issues a message to the topic it had consumed from, and this message may be a message to itself. Does this open up any conflicts ? Best regards, Jubin
When you have ejb-ref's you will also need a
jboss-web.xml (for the war file) and possibly jboss.xml if you have ejb-ref's in
your bean jars.
Al
|