[ 
http://www.stripesframework.org/jira/browse/STS-642?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=11615#action_11615
 ] 

Chris Herron commented on STS-642:
----------------------------------

SpringInterceptorSupport is documented at the bottom of the following page:
http://stripesframework.org/display/stripes/Spring+with+Stripes

If @SpringBean, SpringInterceptor or SpringBeanInterceptor do not work as 
documented, then that may be a bug. 

Regarding @PersistenceContext, or @java.annotation.Resource, as I mentioned 
above, the @SpringBean annotation implementation does not promise anything more 
than fetching a named bean from a Spring context. There are no undocumented 
capabilities in SpringHelper that do anything beyond this.

Yes, by definition the @SpringBean feature is doing dependency injection, but 
that fact does not obligate it to provide all of the bells and whistles that 
the popular dependency injection frameworks provide. Any similarity to other 
frameworks living or dead is purely coincidental.

You should note that in Stripes 1.6, SpringInterceptor and 
SpringInterceptorSupport will be deprecated. @SpringBean will still be 
supported, but it will be implemented using the new ObjectFactory interface 
(see SpringInjectionFactory on the trunk in subversion).

> 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

Reply via email to