You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Chris Narburgh <ch...@gmail.com> on 2012/02/28 17:30:27 UTC

Camel :: Guice integration is inconsistent with Spring integration

Hi all,

I came across an annoying problem today regarding Camel + Guiceyfruit.
Camel 2.9.0, Guiceyfruit 2.0.

The way that Guiceyfruit creates a GuiceCamelContext does not automatically
use the Injector in the registry, as the SpringCamelContext does with its
ApplicationContextRegistry.

Could this inconsistency be fixed?

Thanks,
- Chris

Re: Camel :: Guice integration is inconsistent with Spring integration

Posted by Chris Narburgh <ch...@gmail.com>.
Hi surya,

JSR-250 is indeed very helpful, and a proper port of camel would likely
have to implement some handling for this as Guice has not yet done so. See:
http://code.google.com/p/google-guice/issues/detail?id=62 There is probably
an existing version that is compatible with Guice 3.0 as well, since it's a
popular feature request. @JndiBind would also likely have to be ported, but
it is a simple annotation.

However, having a dependency on guicey-fruit has kept camel from upgrading
versions of Guice for quite a while which contains lots of good
improvements.

My use case involves injecting constants via the Guice injector, but also
having them available through camel's registry. This works transparently
with Spring, because the SpringCamelContext forwards requests to the
ApplicationContext. The GuiceCamelContext decides to only use a regular
JndiRegistry instead of forwarding requests to the Injector.

- Chris

On Tue, Feb 28, 2012 at 11:11 AM, surya aditya <su...@gmail.com> wrote:

> @Claus
>
> It is disheartening to hear guiceyfruit is dead..I remember James/team
> saying somewhere that he will pick up when possible and make it Guice 3.0
> compatible, so is it not going to happen? I really like @JndiBind and
> Jsr250 support offered by guiceyfruit with camel.
>
> May I suggest not dropping guicefruit dependency from camel just yet?
> GuiceCamelContext is working for us ok now.
>
> @Chris
>
> I am able to use guice+guiceyfruit with camel succesfully, will try to help
> if you can elaborate a bit on issue you are facing.
>
> peace,
> surya
>
>
> On Tue, Feb 28, 2012 at 11:44 AM, Tim <ch...@gmail.com> wrote:
>
> > https://issues.apache.org/jira/browse/CAMEL-4466
> > https://issues.apache.org/jira/browse/CAMEL-4209
> >
> >
> > On Tue, Feb 28, 2012 at 10:36 AM, Claus Ibsen <cl...@gmail.com>
> > wrote:
> >
> > > On Tue, Feb 28, 2012 at 5:35 PM, Chris Narburgh
> > > <ch...@gmail.com> wrote:
> > > > I would wholeheartedly agree. Guice 3.0 is the latest release with
> lots
> > > of
> > > > new useful features.
> > > >
> > > > Is there already a ticket for doing this?
> > > >
> > >
> > > No feel free to create a ticket, and if possible work on contributions.
> > >
> > >
> > > > Thanks,
> > > > - Chris
> > > >
> > > > On Tue, Feb 28, 2012 at 10:33 AM, Claus Ibsen <claus.ibsen@gmail.com
> >
> > > wrote:
> > > >
> > > >> On Tue, Feb 28, 2012 at 5:30 PM, Chris Narburgh
> > > >> <ch...@gmail.com> wrote:
> > > >> > Hi all,
> > > >> >
> > > >> > I came across an annoying problem today regarding Camel +
> > Guiceyfruit.
> > > >> > Camel 2.9.0, Guiceyfruit 2.0.
> > > >> >
> > > >> > The way that Guiceyfruit creates a GuiceCamelContext does not
> > > >> automatically
> > > >> > use the Injector in the registry, as the SpringCamelContext does
> > with
> > > its
> > > >> > ApplicationContextRegistry.
> > > >> >
> > > >> > Could this inconsistency be fixed?
> > > >> >
> > > >>
> > > >> Patches is welcome but I think guicyfruit is a dead project.
> > > >> Would be better to remove the guicyfruit and use plain guice 3.0 or
> > > >> whats the latest release.
> > > >>
> > > >>
> > > >>
> > > >> > Thanks,
> > > >> > - Chris
> > > >>
> > > >>
> > > >>
> > > >> --
> > > >> Claus Ibsen
> > > >> -----------------
> > > >> FuseSource
> > > >> Email: cibsen@fusesource.com
> > > >> Web: http://fusesource.com
> > > >> Twitter: davsclaus, fusenews
> > > >> Blog: http://davsclaus.blogspot.com/
> > > >> Author of Camel in Action: http://www.manning.com/ibsen/
> > > >>
> > >
> > >
> > >
> > > --
> > > Claus Ibsen
> > > -----------------
> > > FuseSource
> > > Email: cibsen@fusesource.com
> > > Web: http://fusesource.com
> > > Twitter: davsclaus, fusenews
> > > Blog: http://davsclaus.blogspot.com/
> > > Author of Camel in Action: http://www.manning.com/ibsen/
> > >
> >
>

Re: Camel :: Guice integration is inconsistent with Spring integration

Posted by surya aditya <su...@gmail.com>.
@Claus

It is disheartening to hear guiceyfruit is dead..I remember James/team
saying somewhere that he will pick up when possible and make it Guice 3.0
compatible, so is it not going to happen? I really like @JndiBind and
Jsr250 support offered by guiceyfruit with camel.

May I suggest not dropping guicefruit dependency from camel just yet?
GuiceCamelContext is working for us ok now.

@Chris

I am able to use guice+guiceyfruit with camel succesfully, will try to help
if you can elaborate a bit on issue you are facing.

peace,
surya


On Tue, Feb 28, 2012 at 11:44 AM, Tim <ch...@gmail.com> wrote:

> https://issues.apache.org/jira/browse/CAMEL-4466
> https://issues.apache.org/jira/browse/CAMEL-4209
>
>
> On Tue, Feb 28, 2012 at 10:36 AM, Claus Ibsen <cl...@gmail.com>
> wrote:
>
> > On Tue, Feb 28, 2012 at 5:35 PM, Chris Narburgh
> > <ch...@gmail.com> wrote:
> > > I would wholeheartedly agree. Guice 3.0 is the latest release with lots
> > of
> > > new useful features.
> > >
> > > Is there already a ticket for doing this?
> > >
> >
> > No feel free to create a ticket, and if possible work on contributions.
> >
> >
> > > Thanks,
> > > - Chris
> > >
> > > On Tue, Feb 28, 2012 at 10:33 AM, Claus Ibsen <cl...@gmail.com>
> > wrote:
> > >
> > >> On Tue, Feb 28, 2012 at 5:30 PM, Chris Narburgh
> > >> <ch...@gmail.com> wrote:
> > >> > Hi all,
> > >> >
> > >> > I came across an annoying problem today regarding Camel +
> Guiceyfruit.
> > >> > Camel 2.9.0, Guiceyfruit 2.0.
> > >> >
> > >> > The way that Guiceyfruit creates a GuiceCamelContext does not
> > >> automatically
> > >> > use the Injector in the registry, as the SpringCamelContext does
> with
> > its
> > >> > ApplicationContextRegistry.
> > >> >
> > >> > Could this inconsistency be fixed?
> > >> >
> > >>
> > >> Patches is welcome but I think guicyfruit is a dead project.
> > >> Would be better to remove the guicyfruit and use plain guice 3.0 or
> > >> whats the latest release.
> > >>
> > >>
> > >>
> > >> > Thanks,
> > >> > - Chris
> > >>
> > >>
> > >>
> > >> --
> > >> Claus Ibsen
> > >> -----------------
> > >> FuseSource
> > >> Email: cibsen@fusesource.com
> > >> Web: http://fusesource.com
> > >> Twitter: davsclaus, fusenews
> > >> Blog: http://davsclaus.blogspot.com/
> > >> Author of Camel in Action: http://www.manning.com/ibsen/
> > >>
> >
> >
> >
> > --
> > Claus Ibsen
> > -----------------
> > FuseSource
> > Email: cibsen@fusesource.com
> > Web: http://fusesource.com
> > Twitter: davsclaus, fusenews
> > Blog: http://davsclaus.blogspot.com/
> > Author of Camel in Action: http://www.manning.com/ibsen/
> >
>

Re: Camel :: Guice integration is inconsistent with Spring integration

Posted by Tim <ch...@gmail.com>.
https://issues.apache.org/jira/browse/CAMEL-4466
https://issues.apache.org/jira/browse/CAMEL-4209


On Tue, Feb 28, 2012 at 10:36 AM, Claus Ibsen <cl...@gmail.com> wrote:

> On Tue, Feb 28, 2012 at 5:35 PM, Chris Narburgh
> <ch...@gmail.com> wrote:
> > I would wholeheartedly agree. Guice 3.0 is the latest release with lots
> of
> > new useful features.
> >
> > Is there already a ticket for doing this?
> >
>
> No feel free to create a ticket, and if possible work on contributions.
>
>
> > Thanks,
> > - Chris
> >
> > On Tue, Feb 28, 2012 at 10:33 AM, Claus Ibsen <cl...@gmail.com>
> wrote:
> >
> >> On Tue, Feb 28, 2012 at 5:30 PM, Chris Narburgh
> >> <ch...@gmail.com> wrote:
> >> > Hi all,
> >> >
> >> > I came across an annoying problem today regarding Camel + Guiceyfruit.
> >> > Camel 2.9.0, Guiceyfruit 2.0.
> >> >
> >> > The way that Guiceyfruit creates a GuiceCamelContext does not
> >> automatically
> >> > use the Injector in the registry, as the SpringCamelContext does with
> its
> >> > ApplicationContextRegistry.
> >> >
> >> > Could this inconsistency be fixed?
> >> >
> >>
> >> Patches is welcome but I think guicyfruit is a dead project.
> >> Would be better to remove the guicyfruit and use plain guice 3.0 or
> >> whats the latest release.
> >>
> >>
> >>
> >> > Thanks,
> >> > - Chris
> >>
> >>
> >>
> >> --
> >> Claus Ibsen
> >> -----------------
> >> FuseSource
> >> Email: cibsen@fusesource.com
> >> Web: http://fusesource.com
> >> Twitter: davsclaus, fusenews
> >> Blog: http://davsclaus.blogspot.com/
> >> Author of Camel in Action: http://www.manning.com/ibsen/
> >>
>
>
>
> --
> Claus Ibsen
> -----------------
> FuseSource
> Email: cibsen@fusesource.com
> Web: http://fusesource.com
> Twitter: davsclaus, fusenews
> Blog: http://davsclaus.blogspot.com/
> Author of Camel in Action: http://www.manning.com/ibsen/
>

Re: Camel :: Guice integration is inconsistent with Spring integration

Posted by Claus Ibsen <cl...@gmail.com>.
On Tue, Feb 28, 2012 at 5:35 PM, Chris Narburgh
<ch...@gmail.com> wrote:
> I would wholeheartedly agree. Guice 3.0 is the latest release with lots of
> new useful features.
>
> Is there already a ticket for doing this?
>

No feel free to create a ticket, and if possible work on contributions.


> Thanks,
> - Chris
>
> On Tue, Feb 28, 2012 at 10:33 AM, Claus Ibsen <cl...@gmail.com> wrote:
>
>> On Tue, Feb 28, 2012 at 5:30 PM, Chris Narburgh
>> <ch...@gmail.com> wrote:
>> > Hi all,
>> >
>> > I came across an annoying problem today regarding Camel + Guiceyfruit.
>> > Camel 2.9.0, Guiceyfruit 2.0.
>> >
>> > The way that Guiceyfruit creates a GuiceCamelContext does not
>> automatically
>> > use the Injector in the registry, as the SpringCamelContext does with its
>> > ApplicationContextRegistry.
>> >
>> > Could this inconsistency be fixed?
>> >
>>
>> Patches is welcome but I think guicyfruit is a dead project.
>> Would be better to remove the guicyfruit and use plain guice 3.0 or
>> whats the latest release.
>>
>>
>>
>> > Thanks,
>> > - Chris
>>
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> FuseSource
>> Email: cibsen@fusesource.com
>> Web: http://fusesource.com
>> Twitter: davsclaus, fusenews
>> Blog: http://davsclaus.blogspot.com/
>> Author of Camel in Action: http://www.manning.com/ibsen/
>>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Re: Camel :: Guice integration is inconsistent with Spring integration

Posted by Chris Narburgh <ch...@gmail.com>.
I would wholeheartedly agree. Guice 3.0 is the latest release with lots of
new useful features.

Is there already a ticket for doing this?

Thanks,
- Chris

On Tue, Feb 28, 2012 at 10:33 AM, Claus Ibsen <cl...@gmail.com> wrote:

> On Tue, Feb 28, 2012 at 5:30 PM, Chris Narburgh
> <ch...@gmail.com> wrote:
> > Hi all,
> >
> > I came across an annoying problem today regarding Camel + Guiceyfruit.
> > Camel 2.9.0, Guiceyfruit 2.0.
> >
> > The way that Guiceyfruit creates a GuiceCamelContext does not
> automatically
> > use the Injector in the registry, as the SpringCamelContext does with its
> > ApplicationContextRegistry.
> >
> > Could this inconsistency be fixed?
> >
>
> Patches is welcome but I think guicyfruit is a dead project.
> Would be better to remove the guicyfruit and use plain guice 3.0 or
> whats the latest release.
>
>
>
> > Thanks,
> > - Chris
>
>
>
> --
> Claus Ibsen
> -----------------
> FuseSource
> Email: cibsen@fusesource.com
> Web: http://fusesource.com
> Twitter: davsclaus, fusenews
> Blog: http://davsclaus.blogspot.com/
> Author of Camel in Action: http://www.manning.com/ibsen/
>

Re: Camel :: Guice integration is inconsistent with Spring integration

Posted by Claus Ibsen <cl...@gmail.com>.
On Tue, Feb 28, 2012 at 5:30 PM, Chris Narburgh
<ch...@gmail.com> wrote:
> Hi all,
>
> I came across an annoying problem today regarding Camel + Guiceyfruit.
> Camel 2.9.0, Guiceyfruit 2.0.
>
> The way that Guiceyfruit creates a GuiceCamelContext does not automatically
> use the Injector in the registry, as the SpringCamelContext does with its
> ApplicationContextRegistry.
>
> Could this inconsistency be fixed?
>

Patches is welcome but I think guicyfruit is a dead project.
Would be better to remove the guicyfruit and use plain guice 3.0 or
whats the latest release.



> Thanks,
> - Chris



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/