Skip to content
Merged
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
9 changes: 8 additions & 1 deletion api/src/org/labkey/api/data/TransactionFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,14 @@ public void moduleStartupComplete(ServletContext servletContext)
{
RequestTracker tracker = entry.getValue();
Thread thread = entry.getKey();
Object readOnly = tracker.request.getAttribute(READ_ONLY_ATTRIBUTE_NAME);

Object readOnly = Boolean.FALSE;
try
{
readOnly = tracker.request.getAttribute(READ_ONLY_ATTRIBUTE_NAME);
}
catch (IllegalStateException ignored) {} // Ignore when the request has already been recycled

if (Boolean.TRUE.equals(readOnly) && tracker.startTime < cutoff)
{
try (DbScope.ConnectionSharingCloseable ignored = DbScope.shareConnections(thread, Thread.currentThread()))
Expand Down