Announcement Announcement Module
Collapse
No announcement yet.
Can a Autowired bean can be explicitly destroyed Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Can a Autowired bean can be explicitly destroyed

    Hi

    I have a class SurrogateKeyGenerator in which i have autowired DBCP's BasicDataSource object. There may be a scenario in which BasicDataSource object holding database connections may become stale, if the connections are stale.

    1) How can we destroy explicitly and remove the auto wiring reference from the SurrogateKeyGenerator class ?

    2) Also can a new bean BasicDataSource be autowired maintaining the same state of SurrogateKeyGenerator object.

    Please help on the above two quest.

    Thanks in Advance
    Sanjay
Working...
X