Announcement Announcement Module
Collapse
No announcement yet.
spring injection is thread-safe? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • spring injection is thread-safe?

    Code:
    public class Test{ 
    private First first; 
    private Second second;  
    public void setFirst(First first){ this.first = first; } 
    public First getFirst(){  return first; } 
    // same approach for second 
    }
    .
    If I inject the instance through spring injection, is it thread-safe?
    If not, how to make it thread-safe?
    I googled and found contradict responses, not able to come to any conclusion.

    This class will be used by concurrrent request (ie, multi thread).

    Please suggest

    -RW
Working...
X