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

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

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.


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

Posted by "Ricky Hazelwood (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12707552#action_12707552 ] 

Ricky Hazelwood commented on CXF-2210:
--------------------------------------

You can check if beanFactory.getBeanNamesForType(CommonAnnotationBeanPostProcessor.class, true, false) returns none empty array.

> 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.


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

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-2210?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp resolved CXF-2210.
------------------------------

       Resolution: Fixed
    Fix Version/s: 2.2.3
                   2.1.6
                   2.0.12
         Assignee: Daniel Kulp

> 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
>            Assignee: Daniel Kulp
>            Priority: Trivial
>             Fix For: 2.0.12, 2.1.6, 2.2.3
>
>
> 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.


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

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
    [ 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.