Project

General

Profile

Bug #2208

Locking in BeanResource may lead to dead lock

Added by Henning Blohm 1 day ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
z2-addon-spring
Target version:
Start date:
26.11.2026
Due date:
% Done:

0%

Estimated time:
origin:

Description

If Spring beans use a direct component lookup on initialization, we may end up in a dead lock situation as BeanResource locks and Spring locks the application context.

So might end up:

a: Somewhere -> lookup C => lock(BeanResource) => lock(AppContext 2) -> Bean of C
b: lock(AppContext 2) -> Init Bean2 of AppContext 2 -> lookup C => lock(BeanResource)

So, because Spring acquires that BIG lock, we need to reduce ours, possibly doing a double lookup, which should not matter.

No data to display

Also available in: Atom PDF