[
http://www.stripesframework.org/jira/browse/STS-642?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=11614#action_11614
]
Jarek Robakiewicz commented on STS-642:
---------------------------------------
Everything what you wrote is true but bug is not reported for @SpringBean which
works as a expected but for SpringInterceptorSupport component
Documentation:
Base class for developing Interceptors with dependencies on Spring managed
beans. Not to be confused with SpringInterceptor which injects Spring managed
beans into ActionBeans. For example, you may wish to subclass this class in
order to write an interceptor with access to Spring managed DAOs or security
information.
So I have Spring manage DAOs and need access to them from Interceptor. I found
SpringInterceptorSupport but it works much more like
SpringBeanInterceptorSupport ...
And as a I mentiond before SpringBean seems to duplicate
java.annotation.Resource annotation which allows me retrive bean by its name
and inject into private field.
@"This is not a bug "
yes,It's not a bug; it's an undocumented feature!" :-)
http://en.wikipedia.org/wiki/Undocumented_feature
thanks for quick response.
> SpringInterceptorSupport doesn't wire JPA @ PersistenceContext annotation
> --------------------------------------------------------------------------
>
> Key: STS-642
> URL: http://www.stripesframework.org/jira/browse/STS-642
> Project: Stripes
> Issue Type: Bug
> Reporter: Jarek Robakiewicz
> Priority: Minor
>
> Spring interceptor uses SpringHelper#injectBeans method which has custom
> implementation of bean injection. This implementation ignores standard JPA
> annoation supported by Spring.
> Using only Spring, this annotation works fine:
> AutowireCapableBeanFactory beanFactory =
> springContext.getAutowireCapableBeanFactory();
> beanFactory.autowireBeanProperties(bean,
> AutowireCapableBeanFactory.AUTOWIRE_NO, false);
> and is implemented by Spring Post processor
> PersistenceAnnotationBeanPostProcessor#private InjectionMetadata
> findPersistenceMetadata(final Class clazz)
> @SpringBean seems to be duplicate responsibility of @java.annotation.Resource
> supported also by Spring. It provides capabiltiy of bean injection for
> private fields (BTW not very useful during unit tests)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://www.stripesframework.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development