Fixed null pointer in ServerContexts

This commit is contained in:
Alex Huang 2013-07-03 15:26:39 -07:00
parent 8d21f49ec9
commit 78fa5e14ee
1 changed files with 5 additions and 3 deletions

View File

@ -40,9 +40,11 @@ public class ServerContexts {
public static void unregisterUserContext() {
CallContext context = CallContext.unregister();
AsyncJobExecutionContext.unregister();
Transaction txn = (Transaction)context.getContextParameter("Transaction");
txn.close(Thread.currentThread().getName());
if (context != null) {
AsyncJobExecutionContext.unregister();
Transaction txn = (Transaction)context.getContextParameter("Transaction");
txn.close(Thread.currentThread().getName());
}
}
/**