KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I need help in understanding the custom scope in spring I went through the reference manual and do have some understanding about it but the question which is bugging me is when actually the call to the get method of my implementation of scope interface is made Though my understanding is if a bean with scope=myscope is defined then Spring calls the get method on my scope implementation to retrieve the object . But when I came across an example I noticed something strange. The call to get method is not made at the execution of following statement Object targetBean = getApplicationContext().getBean(task.getBeanName()); but on the execution of following statement . ReflectionUtils.invokeMethod(targetMethod, targetBean, arguments); Can any one help me by explaining more about custom scope implementation and call of get method. PS : In the concerned example the Custom scope is used with Threadlocal .. If any one can provide me a working example link of customscope with thread local ,it will be a great help
Tags (comma-separated)
Save Edits
Cancel