Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[WFTC-25] update with one recovery call after WFTC is started #24

Merged
merged 1 commit into from
Jun 14, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ public interface Log extends BasicLogger {
@Message(value = "Got exception on outbound message")
void outboundException(@Cause Throwable e);

@LogMessage(level = Logger.Level.TRACE)
@Message(value = "Failure on running doRecover during initialization")
void doRecoverFailureOnIntialization(@Cause Throwable e);

// Regular messages

@Message(id = 0, value = "No transaction associated with the current thread")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,14 @@ public abstract class JBossLocalTransactionProvider implements LocalTransactionP
this.staleTransactionTime = staleTransactionTime;
this.ext = Assert.checkNotNullParam("ext", ext);
this.tm = Assert.checkNotNullParam("tm", tm);

try {
ext.doRecover(null, null);
} catch (Exception e) {
// the recover method is called to load transactions from Narayana object store at startup
// if it fails we ignore, troubles will be adjusted during runtime
Log.log.doRecoverFailureOnIntialization(e);
}
}

/**
Expand Down Expand Up @@ -511,11 +519,6 @@ public ImportResult<Transaction> findOrImportTransaction(final Xid xid, final in
imported = false;
transaction = ext.getTransaction(xid);

if(transaction == null) {
ext.doRecover(null, null);
transaction = ext.getTransaction(xid);
}

if (transaction == null) {
return null;
}
Expand Down