You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Dmitry Drozdov (JIRA)" <ji...@apache.org> on 2010/09/19 15:18:40 UTC

[jira] Created: (CAMEL-3136) cxfbean creates another instance of the class instead of directly using the referenced bean

cxfbean creates another instance of the class instead of directly using the referenced bean
-------------------------------------------------------------------------------------------

                 Key: CAMEL-3136
                 URL: https://issues.apache.org/activemq/browse/CAMEL-3136
             Project: Apache Camel
          Issue Type: Bug
          Components: camel-cxf
    Affects Versions: 2.4.0
            Reporter: Dmitry Drozdov


... this makes it impossible to inject properties to the @WebService class 

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


[jira] Commented: (CAMEL-3136) cxfbean creates another instance of the class instead of directly using the referenced bean

Posted by "Dmitry Drozdov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-3136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61923#action_61923 ] 

Dmitry Drozdov commented on CAMEL-3136:
---------------------------------------

I use Spring 3.0.3

As far as I could understand, for some reason CXF uses SingletonFactory to get (create) the bean, but should use SpringBeanFactory.

> cxfbean creates another instance of the class instead of directly using the referenced bean
> -------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-3136
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-3136
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-cxf
>    Affects Versions: 2.4.0
>            Reporter: Dmitry Drozdov
>
> ... this makes it impossible to inject properties to the @WebService class
> <camelContext>
>         <route>
>             <from uri="...." />
>             <to uri="cxfbean:handler" />
>         </route>
> </camelContext>
> <bean id="handler" class="a.b.c.Handler">
>         <property name="prop1" value="5" />
> </bean>
> when "handler" is created by Spring, its 'prop1' is set to '5'
> when the cxfbean:handler is triggered, the 'prop1' is null, because CXF created another instance of Handler instead of using the one created by Spring

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


[jira] Commented: (CAMEL-3136) cxfbean creates another instance of the class instead of directly using the referenced bean

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-3136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61924#action_61924 ] 

Claus Ibsen commented on CAMEL-3136:
------------------------------------

I have re-produced the issue in an unit test in camel-cxf.

I think I have it fixed, but running tests to ensure it wont break stuff.

> cxfbean creates another instance of the class instead of directly using the referenced bean
> -------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-3136
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-3136
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-cxf
>    Affects Versions: 2.4.0
>            Reporter: Dmitry Drozdov
>            Assignee: Claus Ibsen
>
> ... this makes it impossible to inject properties to the @WebService class
> <camelContext>
>         <route>
>             <from uri="...." />
>             <to uri="cxfbean:handler" />
>         </route>
> </camelContext>
> <bean id="handler" class="a.b.c.Handler">
>         <property name="prop1" value="5" />
> </bean>
> when "handler" is created by Spring, its 'prop1' is set to '5'
> when the cxfbean:handler is triggered, the 'prop1' is null, because CXF created another instance of Handler instead of using the one created by Spring

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


[jira] Assigned: (CAMEL-3136) cxfbean creates another instance of the class instead of directly using the referenced bean

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-3136?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen reassigned CAMEL-3136:
----------------------------------

    Assignee: Claus Ibsen

> cxfbean creates another instance of the class instead of directly using the referenced bean
> -------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-3136
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-3136
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-cxf
>    Affects Versions: 2.4.0
>            Reporter: Dmitry Drozdov
>            Assignee: Claus Ibsen
>
> ... this makes it impossible to inject properties to the @WebService class
> <camelContext>
>         <route>
>             <from uri="...." />
>             <to uri="cxfbean:handler" />
>         </route>
> </camelContext>
> <bean id="handler" class="a.b.c.Handler">
>         <property name="prop1" value="5" />
> </bean>
> when "handler" is created by Spring, its 'prop1' is set to '5'
> when the cxfbean:handler is triggered, the 'prop1' is null, because CXF created another instance of Handler instead of using the one created by Spring

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


[jira] Commented: (CAMEL-3136) cxfbean creates another instance of the class instead of directly using the referenced bean

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-3136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61919#action_61919 ] 

Claus Ibsen commented on CAMEL-3136:
------------------------------------

Please take more time to write down details when creating tickets.

Just providing a title is not sufficient to go after.
More details and source code helps us to go track down what you mean.



> cxfbean creates another instance of the class instead of directly using the referenced bean
> -------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-3136
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-3136
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-cxf
>    Affects Versions: 2.4.0
>            Reporter: Dmitry Drozdov
>
> ... this makes it impossible to inject properties to the @WebService class 

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


[jira] Resolved: (CAMEL-3136) cxfbean creates another instance of the class instead of directly using the referenced bean

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-3136?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-3136.
--------------------------------

    Fix Version/s: 2.5.0
       Resolution: Fixed

trunk: 998687.

Feel free to test the fix in your system as well.

> cxfbean creates another instance of the class instead of directly using the referenced bean
> -------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-3136
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-3136
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-cxf
>    Affects Versions: 2.4.0
>            Reporter: Dmitry Drozdov
>            Assignee: Claus Ibsen
>             Fix For: 2.5.0
>
>
> ... this makes it impossible to inject properties to the @WebService class
> <camelContext>
>         <route>
>             <from uri="...." />
>             <to uri="cxfbean:handler" />
>         </route>
> </camelContext>
> <bean id="handler" class="a.b.c.Handler">
>         <property name="prop1" value="5" />
> </bean>
> when "handler" is created by Spring, its 'prop1' is set to '5'
> when the cxfbean:handler is triggered, the 'prop1' is null, because CXF created another instance of Handler instead of using the one created by Spring

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


[jira] Commented: (CAMEL-3136) cxfbean creates another instance of the class instead of directly using the referenced bean

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-3136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61921#action_61921 ] 

Claus Ibsen commented on CAMEL-3136:
------------------------------------

What version of Spring are you using as Spring 2.5 and 3.0 is different how Spring does IoC internally which somehow could cause an issue, so its great to know which version of Spring you use.

> cxfbean creates another instance of the class instead of directly using the referenced bean
> -------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-3136
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-3136
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-cxf
>    Affects Versions: 2.4.0
>            Reporter: Dmitry Drozdov
>
> ... this makes it impossible to inject properties to the @WebService class
> <camelContext>
>         <route>
>             <from uri="...." />
>             <to uri="cxfbean:handler" />
>         </route>
> </camelContext>
> <bean id="handler" class="a.b.c.Handler">
>         <property name="prop1" value="5" />
> </bean>
> when "handler" is created by Spring, its 'prop1' is set to '5'
> when the cxfbean:handler is triggered, the 'prop1' is null, because CXF created another instance of Handler instead of using the one created by Spring

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


[jira] Updated: (CAMEL-3136) cxfbean creates another instance of the class instead of directly using the referenced bean

Posted by "Dmitry Drozdov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-3136?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dmitry Drozdov updated CAMEL-3136:
----------------------------------

    Description: 
... this makes it impossible to inject properties to the @WebService class

<camelContext>
        <route>
            <from uri="...." />
            <to uri="cxfbean:handler" />
        </route>
</camelContext>

<bean id="handler" class="a.b.c.Handler">
        <property name="prop1" value="5" />
</bean>

when "handler" is created by Spring, its 'prop1' is set to '5'

when the cxfbean:handler is triggered, the 'prop1' is null, because CXF created another instance of Handler instead of using the one created by Spring

  was:... this makes it impossible to inject properties to the @WebService class 


Done

> cxfbean creates another instance of the class instead of directly using the referenced bean
> -------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-3136
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-3136
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-cxf
>    Affects Versions: 2.4.0
>            Reporter: Dmitry Drozdov
>
> ... this makes it impossible to inject properties to the @WebService class
> <camelContext>
>         <route>
>             <from uri="...." />
>             <to uri="cxfbean:handler" />
>         </route>
> </camelContext>
> <bean id="handler" class="a.b.c.Handler">
>         <property name="prop1" value="5" />
> </bean>
> when "handler" is created by Spring, its 'prop1' is set to '5'
> when the cxfbean:handler is triggered, the 'prop1' is null, because CXF created another instance of Handler instead of using the one created by Spring

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


[jira] Commented: (CAMEL-3136) cxfbean creates another instance of the class instead of directly using the referenced bean

Posted by "Dmitry Drozdov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-3136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61926#action_61926 ] 

Dmitry Drozdov commented on CAMEL-3136:
---------------------------------------

Great! Tested and it works now, thanks!

> cxfbean creates another instance of the class instead of directly using the referenced bean
> -------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-3136
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-3136
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-cxf
>    Affects Versions: 2.4.0
>            Reporter: Dmitry Drozdov
>            Assignee: Claus Ibsen
>             Fix For: 2.5.0
>
>
> ... this makes it impossible to inject properties to the @WebService class
> <camelContext>
>         <route>
>             <from uri="...." />
>             <to uri="cxfbean:handler" />
>         </route>
> </camelContext>
> <bean id="handler" class="a.b.c.Handler">
>         <property name="prop1" value="5" />
> </bean>
> when "handler" is created by Spring, its 'prop1' is set to '5'
> when the cxfbean:handler is triggered, the 'prop1' is null, because CXF created another instance of Handler instead of using the one created by Spring

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