msgToInvoke = storageManager.retrieveMessageContext(messageContextKey, configurationContext);
RMMsgContext rmMsg = MsgInitializer.initializeMessage(msgToInvoke);
// ending the transaction before invocation.
if(transaction != null) {
transaction.commit();
transaction = null;
}
//starting a transaction for the invocation work.
transaction = storageManager.getTransaction();