-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Description
Dmitry V. Zemnitskiy opened SPR-2740 and commented
In our application we use well adopted architecture with business manager implementing business interface.
Transaction proxy interceptor is wrapped around manager implementation to add declarative support of
hibernate transactions.
In the same business manager which is application level singleton we wished to use init-method to check
database and populate it with default bootstrap data (default system account, lookup data, etc).
What we noticed, is the transacton interceptor didn't wrap init-method even if it is included in proxy interface.
We solved this problem by creating another application level bean with init method which calls manager's method
when initialized.
I think it is relatively common usecase and spring aop should either intercept init-methods as well, or if it's impossible
for some architectural reason, just state this explicitly in spring documentation (lifecycle section or aop section).
Thanks, Dima
Affects: 2.0 RC4