Hi there! I have a solution implemented in our system that flows like this:
A JMS message is sent to create an email account for the user.
The MDB receives that message and then on its onMessage() method, it calls a session bean
process() method.
The session beans, creates the account through a pojo command class (connecting on our mail system through rExec)
and then the session beans, acquires a handle for an local entity bean and updates a flag on
the entity.
Now here's the problem. It's not updating the entity value.
the code that tries to do this:
if (!emailUsuarioDTO.getAcao().equalsIgnoreCase("remover")) {
System.out.print("atualizando status");
Usuario usuario = usuarioHome.findByPrimaryKey(emailUsuarioDTO.getIdUsuario());
usuario.setFlgEmail(new Boolean(true));
System.out.print("status atualizado");
}
What's even stranger, the first system.out is printed on the screen while the other isn't.
I have postgreSQL configured to hold my message queues on jboss.
A warning is beeing displayed for me:
13:48:37,316 WARN [TxConnectionManager] Prepare called on a local tx.
Use of local transactions on a jta transaction with more than one branch may result in
inconsistent data in some cases of failure.
Well, now the part I really don't understand. If I debug the project, it does updates the value
seems like that if it stops on a break-point it has "time" to process.
I really don't undersand xa/local-tx connnections. But our datasource is configured as local-tx
Can someone please help me?
Moderated: FAQ