You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Daniel Kulp (JIRA)" <ji...@apache.org> on 2009/05/08 19:51:45 UTC

[jira] Commented: (CXF-2210) Change Jsr250BeanPostProcessor bean defination in cxf.xml

    [ https://issues.apache.org/jira/browse/CXF-2210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12707448#action_12707448 ] 

Daniel Kulp commented on CXF-2210:
----------------------------------


Doing that kind of defeats the purpose of why it's using an @Resource to inject it.   Basically, the Jsr250BeanPostProcessor doesn't need the bus at all.   It just has it injected into itself to see if Spring is handling the JSR250 injection or if we need to.   If the bus is injected, the Jsr250BeanPostProcessor doesn't do anything as it knows Spring will handle it.   If it ISN'T injected, then it know Spring isn't handling it and we need to do it.    If we don't do this check, then both spring and the Jsr250BeanPostProcessor can end up processing them and resources get injected twice, @PostContruct stuff is called twice, etc....

Thus, what is needed is a way to detect if spring will do the processing.   If you have a way to detect that, then the Bus can be eliminated and your issue will go away.    Is there a way from the ApplicationContextAware to know if spring's handlers are registered?





> Change Jsr250BeanPostProcessor bean defination in cxf.xml
> ---------------------------------------------------------
>
>                 Key: CXF-2210
>                 URL: https://issues.apache.org/jira/browse/CXF-2210
>             Project: CXF
>          Issue Type: Bug
>          Components: Configuration
>    Affects Versions: 2.2.1
>            Reporter: Ricky Hazelwood
>            Priority: Trivial
>
> Can the Jsr250BeanPostProcessor def please be changed to :
> <bean id="org.apache.cxf.bus.spring.Jsr250BeanPostProcessor" class="org.apache.cxf.bus.spring.Jsr250BeanPostProcessor">
>      <property name="bus" ref="cxf"/>
> </bean>
> Using @Resource with a PostBeanProcessor causes FactoryBeans to create their bean before all PostProcessorBeans are created.
> E.g. JndiObjectFactoryBean, a lookup is forced because spring wants to find all the beans that match the Bus interface. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.