You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Jan Hornbøll Hansen (JIRA)" <ji...@apache.org> on 2012/06/30 11:37:42 UTC

[jira] [Created] (CAMEL-5413) Context instantiated using Guice behaves differently than if instantiated "manually"

Jan Hornbøll Hansen created CAMEL-5413:
------------------------------------------

             Summary: Context instantiated using Guice behaves differently than if instantiated "manually"
                 Key: CAMEL-5413
                 URL: https://issues.apache.org/jira/browse/CAMEL-5413
             Project: Camel
          Issue Type: Bug
          Components: camel-guice
    Affects Versions: 2.9.2
            Reporter: Jan Hornbøll Hansen


Creating injector for mule context causes mule context to be started.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Comment Edited] (CAMEL-5413) Context instantiated using Guice behaves differently than if instantiated "manually"

Posted by "Jan Hornbøll Hansen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-5413?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13404638#comment-13404638 ] 

Jan Hornbøll Hansen edited comment on CAMEL-5413 at 6/30/12 9:50 PM:
---------------------------------------------------------------------

Ups that was a bit of a "typo". Sorry about the camel mule mixup. Anyway when I instantiate a context with "new DefaultCamelContext();" (ie. not using Guice) I have to start context explicitly after I have added routes. If context is created while creating injector as an eager singleton it gets started automatically deep within Guice. That is wrong. Creating context using dependency injection should not change its behavior. Also creating and starting should not be tied together, since you may want to create service objects in a different order than they are started (or rather you may not care what order objects are created as long as everyone gets their dependencies, but most likely will care what order things are started).
I am unsure whether this is an unintended bug or a design flaw, but it appears start is invoked somewhere inside guicyfruit.
                
      was (Author: jhhdk):
    Ups that was a bit of a "typo". Sorry about the camel mule mixup. Anyway when I instantiate a context with new DefaultCamelContext() (ie. not using Guice) I have to start context explicitly after I have added routes. If context is created while creating injector as an eager singleton deep within Guice, it gets started automatically. That is wrong. Creating context using dependency injection should not change its behavior. Also creating and starting should not be tied together, since you may want to create service objects in a different order than they are started (or rather you may not care what order objects are created as long as everyone gets their dependencies, but most likely will care what order things are started).
I am unsure whether this is an unintended bug or a design flaw, but it appears start is invoked somewhere inside guicyfruit.
                  
> Context instantiated using Guice behaves differently than if instantiated "manually"
> ------------------------------------------------------------------------------------
>
>                 Key: CAMEL-5413
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5413
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-guice
>    Affects Versions: 2.9.2
>            Reporter: Jan Hornbøll Hansen
>         Attachments: issues.zip
>
>
> Creating injector for mule context causes mule context to be started.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Resolved] (CAMEL-5413) Context instantiated using Guice behaves differently than if instantiated "manually"

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

Claus Ibsen resolved CAMEL-5413.
--------------------------------

       Resolution: Later
    Fix Version/s: Future
         Assignee: Claus Ibsen

This requires guice 3.0 upgrade etc. There is JIRA tickets about this.
                
> Context instantiated using Guice behaves differently than if instantiated "manually"
> ------------------------------------------------------------------------------------
>
>                 Key: CAMEL-5413
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5413
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-guice
>    Affects Versions: 2.9.2
>            Reporter: Jan Hornbøll Hansen
>            Assignee: Claus Ibsen
>             Fix For: Future
>
>         Attachments: issues.zip
>
>
> Creating injector for mule context causes mule context to be started.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (CAMEL-5413) Context instantiated using Guice behaves differently than if instantiated "manually"

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

Claus Ibsen commented on CAMEL-5413:
------------------------------------

Can you please provide better description what is the problem. One text line is not much to go after.
And you mention Mule, this is *Apache Camel*.
                
> Context instantiated using Guice behaves differently than if instantiated "manually"
> ------------------------------------------------------------------------------------
>
>                 Key: CAMEL-5413
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5413
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-guice
>    Affects Versions: 2.9.2
>            Reporter: Jan Hornbøll Hansen
>         Attachments: issues.zip
>
>
> Creating injector for mule context causes mule context to be started.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (CAMEL-5413) Context instantiated using Guice behaves differently than if instantiated "manually"

Posted by "Jan Hornbøll Hansen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-5413?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13404638#comment-13404638 ] 

Jan Hornbøll Hansen commented on CAMEL-5413:
--------------------------------------------

Ups that was a bit of a "typo". Sorry about the camel mule mixup. Anyway when I instantiate a context with new DefaultCamelContext() (ie. not using Guice) I have to start context explicitly after I have added routes. If context is created while creating injector as an eager singleton deep within Guice, it gets started automatically. That is wrong. Creating context using dependency injection should not change its behavior. Also creating and starting should not be tied together, since you may want to create service objects in a different order than they are started (or rather you may not care what order objects are created as long as everyone gets their dependencies, but most likely will care what order things are started).
I am unsure whether this is an unintended bug or a design flaw, but it appears start is invoked somewhere inside guicyfruit.
                
> Context instantiated using Guice behaves differently than if instantiated "manually"
> ------------------------------------------------------------------------------------
>
>                 Key: CAMEL-5413
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5413
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-guice
>    Affects Versions: 2.9.2
>            Reporter: Jan Hornbøll Hansen
>         Attachments: issues.zip
>
>
> Creating injector for mule context causes mule context to be started.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (CAMEL-5413) Context instantiated using Guice behaves differently than if instantiated "manually"

Posted by "Jan Hornbøll Hansen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-5413?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jan Hornbøll Hansen updated CAMEL-5413:
---------------------------------------

    Attachment: issues.zip

Small example that illustrates issue
                
> Context instantiated using Guice behaves differently than if instantiated "manually"
> ------------------------------------------------------------------------------------
>
>                 Key: CAMEL-5413
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5413
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-guice
>    Affects Versions: 2.9.2
>            Reporter: Jan Hornbøll Hansen
>         Attachments: issues.zip
>
>
> Creating injector for mule context causes mule context to be started.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (CAMEL-5413) Context instantiated using Guice behaves differently than if instantiated "manually"

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

Claus Ibsen commented on CAMEL-5413:
------------------------------------

There is tickets to upgrade camel-guice to use guice 3.0 and no longer guicyfruit.
Until then we wont prioritize this or fix guicyfruit.
                
> Context instantiated using Guice behaves differently than if instantiated "manually"
> ------------------------------------------------------------------------------------
>
>                 Key: CAMEL-5413
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5413
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-guice
>    Affects Versions: 2.9.2
>            Reporter: Jan Hornbøll Hansen
>             Fix For: Future
>
>         Attachments: issues.zip
>
>
> Creating injector for mule context causes mule context to be started.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira