Skip to content

Commit 82d8e76

Browse files
committed
Merge pull request #58 from zhfeng/NTA-51
NTA-51 Can not handle the actionStatus of PREPARE_OK
2 parents 08be87c + 4695b53 commit 82d8e76

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

core/src/main/java/io/narayana/nta/logparsing/as8/handlers/JbossAS8AbstractHandler.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public abstract class JbossAS8AbstractHandler extends AbstractHandler {
107107
/*
108108
*
109109
*/
110-
private static final String PATTERN_THREAD_ID = "\\((?<" + THREAD_ID + ">[^\\)]+)\\)\\s";
110+
private static final String PATTERN_THREAD_ID = "\\((?<" + THREAD_ID + ">(.*?))\\)\\s";
111111
/*
112112
*
113113
*/

core/src/main/java/io/narayana/nta/persistence/HandlerService.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,10 @@ public void end(String txuid, String nodeid, String actionStatus, Timestamp time
218218
case "TIMEOUT":
219219
tx.setStatus(Status.TIMEOUT, timestamp);
220220
break;
221+
case "PREPARE_OK":
222+
tx.addEvent(new Event(EventType.PREPARE_OK, nodeid, timestamp));
223+
tx.setStatus(Status.COMMIT, timestamp);
224+
break;
221225
}
222226

223227
em.getTransaction().commit();
@@ -682,4 +686,4 @@ private Object intercept(InvocationContext ctx) throws Exception {
682686
}
683687
return o;
684688
}
685-
}
689+
}

0 commit comments

Comments
 (0)