My application uses queues+MDBs+session bean+2 data sources.
the same application works fine on oc4j, but i have migrated it to JBOSS 6 (jboss-6.1.0.Final).
Following observations or problems are identified.
For default server with JTA : In a transaction a MDB tries to save a blob data using a session bean method whose transaction attribute is
MDB's onMessage method is with transaction attribute-
Later the saved data is needed for the further processing in the same MDB (we have implemented logic for ther message retry ), but the data is not getting persisted.
Is it necessary to configure JTS instead of JTA for distributed transactions?
Sorry, I don't understand your issue clearly.
Does MDB and SLSB deployed in the same application or server?
And why there are two databases?
Does the SLSB is called during the onMessage() is running and the data (stored in the SLSB) are accessed from the onMessage() after returned? Or is it a different message delivery?
Is there an Exception thrown during processing?
Thank you for the reply, let me explain the problem in details.
The normal happy path ( the oc4j working path ) is like this
i) client request comes to MDB (with trans-attribute : Required), it is routed to module A.
ii) if A fails and return exception, in the above MDB's catch, the MDB access SLSB to store the failed message details. (SLSB method is with trans attribute as RequiresNew
iii)The message retry mechanism calls the MDB again with the failed message for the retry,
MDB checks if the message is tried by looking into table where the message was stored in step-ii.
iv) if it finds the message entry in step iii, the it replies to the cilent that the call is failed.
Now module A uses DBschema--2, while MDB+SLSB uses the DBschema--1.
With the JBOSS, the step ii does not persist the data, that's why it is failing.
As I understand there is no direct client request for i) but a incomming message.
In this case iii) and iv) sounds like overhead to me.
Why you do this by retry and not handle the message and client notice in one, you might even store the message if it is still needed.
Because the MDB ends with a transaction include no extra information.
Ok, that is not the answer to your initial question, but I have no idea ATM.
You should enable logging for persistence and transaction for this, maybe it will be clarify what happen.