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.