* system.
*/
public void run() {
ctx = new Context(message);
IParticipant iParticipant;
IResponseMaker iResponseMaker = null;
IMessage iMessage;
try {
if (ti == null) {
logger.error(transName+"|No se inicializó el Transaction Information|");
return;
}
if (logger.isDebugEnabled())
logger.debug(transName+"|Se inicia transacción:|" + ctx.getOriginalMessage());
// Cargo la clase de respuesta
iResponseMaker = (IResponseMaker) Class.forName(ti.getResponseClass().getClassName()).newInstance();
iResponseMaker.setProperties(ti.getResponseClass().getProperties());
// Cargo los participantes
for (ParticipantResponseMakerInformation piPart : ti.getParticipants()) {
try {
iParticipant = (IParticipant)Class.forName(piPart.getClassName()).newInstance();
iParticipant.setProperties(piPart.getProperties());
partInit.add(iParticipant);
} catch (Exception e) {
logger.error(transName+"| No se encontró la clase de un participante: "+e.getMessage()+"|");
return;
}
}
ctx.put("TRANSACTION_NAME", transName);
// Ejecuto la transacci�n
boolean commited = false;
if (tmState==ConfiguratorMBean.TMState.ACTIVE) {
boolean prep = prepare();
if (prep) {
commit();
commited = true;
} else
rollback();
}
// Envio la respuesta.
iMessage = iResponseMaker.makeResponse(ctx, commited);
if (logger.isDebugEnabled() && iMessage != null){
logger.debug(transName+"|Mensaje de respuesta: |" + iMessage);
}
// enviar el mensaje a la cola de Response
if (iMessage != null) {