You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Tim <ch...@gmail.com> on 2011/07/08 18:42:03 UTC

camel-guice

camel guice is using guice 2.0
Which wouldn't be so bad except that it uses things from the guice internal
packages.
This makes it impossible to use it alongside guice 3.0

I can't see any new version of guice 3.
I realize this isn't a 'camel' problem but the committers of guiceyfruit are
also camel committers.

Has anyone found a way to get camel-guice working with guice 3 otherwise?

Thanks

Re: camel-guice

Posted by lleclerc <ll...@aim-rg.com>.
I removed reference to com.google.inject.internal here :
http://speedy.sh/NqCJ3/Removed-reference-to-com-google-inject-internal.patch
, this patch include Josep code. I removed some functionality while doing
so, that might lead to strange behavior. But the current tests in
camel-guice are running without problems.

I commented most of the code in 
public static Class<? extends Annotation> getScopeAnnotation(Binding<?>
binding) 
from org.apache.camel.guice.inject.Injectors.

And removed the use of Errors from :
org.apache.camel.guice.support.internal.CloseErrorsImpl
and org.apache.camel.guice.support.CloseFailedException





--
View this message in context: http://camel.465427.n5.nabble.com/camel-guice-tp4565474p5724525.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: camel-guice

Posted by lleclerc <ll...@aim-rg.com>.
I tried the patch
https://issues.apache.org/jira/secure/attachment/12561884/camel_guice_3.0.diff

A pom.xml had problems, I simply removed the lines and build it and tried
the camel-guice in an OSGI container. I could not get it to be active,
needing com.google.common.collect and com.google.inject.internal. Guice-core
3.0 doesn't export those 2. I might be missing something, I will give it a
try and look at it tomorrow.

Thanks for working on this issue Josep!



--
View this message in context: http://camel.465427.n5.nabble.com/camel-guice-tp4565474p5724479.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: camel-guice

Posted by Tim <ch...@gmail.com>.
Thank you Williem! It should be worth mentioning that this fix could be as
simple as creating a non-internals depending release of guiceyfruit.
That would allow people to use it in current versions of camel with no other
changes as well as later versions of camel to use.


On Mon, Jul 11, 2011 at 3:41 AM, Willem Jiang <wi...@gmail.com>wrote:

> Hi,
>
> I just created a JIRA[1] to trace this issue.
>
> [1]https://issues.apache.org/**jira/browse/CAMEL-4209<https://issues.apache.org/jira/browse/CAMEL-4209>
>
>
> On 7/9/11 12:42 AM, Tim wrote:
>
>> camel guice is using guice 2.0
>> Which wouldn't be so bad except that it uses things from the guice
>> internal
>> packages.
>> This makes it impossible to use it alongside guice 3.0
>>
>> I can't see any new version of guice 3.
>> I realize this isn't a 'camel' problem but the committers of guiceyfruit
>> are
>> also camel committers.
>>
>> Has anyone found a way to get camel-guice working with guice 3 otherwise?
>>
>> Thanks
>>
>>
>
> --
> Willem
> ------------------------------**----
> FuseSource
> Web: http://www.fusesource.com
> Blog:    http://willemjiang.blogspot.**com<http://willemjiang.blogspot.com>(English)
>         http://jnn.javaeye.com (Chinese)
> Twitter: willemjiang
> Weibo: willemjiang
>

Re: camel-guice

Posted by Willem Jiang <wi...@gmail.com>.
Hi,

I just created a JIRA[1] to trace this issue.

[1]https://issues.apache.org/jira/browse/CAMEL-4209

On 7/9/11 12:42 AM, Tim wrote:
> camel guice is using guice 2.0
> Which wouldn't be so bad except that it uses things from the guice internal
> packages.
> This makes it impossible to use it alongside guice 3.0
>
> I can't see any new version of guice 3.
> I realize this isn't a 'camel' problem but the committers of guiceyfruit are
> also camel committers.
>
> Has anyone found a way to get camel-guice working with guice 3 otherwise?
>
> Thanks
>


-- 
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
          http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang

Re: camel-guice

Posted by Tim <ch...@gmail.com>.
Yep :)

http://repo1.maven.org/maven2/com/google/inject/guice/3.0/

On Fri, Jul 8, 2011 at 12:34 PM, Larry Meadors <la...@gmail.com>wrote:

> It's in the central repo, I believe.
>
> <dependency>
>    <groupId>com.google.inject</groupId>
>    <artifactId>guice</artifactId>
>    <version>3.0</version>
> </dependency>
>
> Larry
>
>
> On Fri, Jul 8, 2011 at 11:23 AM, Claus Ibsen <cl...@gmail.com>
> wrote:
> > Is guice 3.0 in any maven repository?
> >
> >
> > On Fri, Jul 8, 2011 at 6:42 PM, Tim <ch...@gmail.com> wrote:
> >> camel guice is using guice 2.0
> >> Which wouldn't be so bad except that it uses things from the guice
> internal
> >> packages.
> >> This makes it impossible to use it alongside guice 3.0
> >>
> >> I can't see any new version of guice 3.
> >> I realize this isn't a 'camel' problem but the committers of guiceyfruit
> are
> >> also camel committers.
> >>
> >> Has anyone found a way to get camel-guice working with guice 3
> otherwise?
> >>
> >> Thanks
> >>
> >
> >
> >
> > --
> > 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

Posted by Larry Meadors <la...@gmail.com>.
It's in the central repo, I believe.

<dependency>
    <groupId>com.google.inject</groupId>
    <artifactId>guice</artifactId>
    <version>3.0</version>
</dependency>

Larry


On Fri, Jul 8, 2011 at 11:23 AM, Claus Ibsen <cl...@gmail.com> wrote:
> Is guice 3.0 in any maven repository?
>
>
> On Fri, Jul 8, 2011 at 6:42 PM, Tim <ch...@gmail.com> wrote:
>> camel guice is using guice 2.0
>> Which wouldn't be so bad except that it uses things from the guice internal
>> packages.
>> This makes it impossible to use it alongside guice 3.0
>>
>> I can't see any new version of guice 3.
>> I realize this isn't a 'camel' problem but the committers of guiceyfruit are
>> also camel committers.
>>
>> Has anyone found a way to get camel-guice working with guice 3 otherwise?
>>
>> Thanks
>>
>
>
>
> --
> 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

Posted by Claus Ibsen <cl...@gmail.com>.
Is guice 3.0 in any maven repository?


On Fri, Jul 8, 2011 at 6:42 PM, Tim <ch...@gmail.com> wrote:
> camel guice is using guice 2.0
> Which wouldn't be so bad except that it uses things from the guice internal
> packages.
> This makes it impossible to use it alongside guice 3.0
>
> I can't see any new version of guice 3.
> I realize this isn't a 'camel' problem but the committers of guiceyfruit are
> also camel committers.
>
> Has anyone found a way to get camel-guice working with guice 3 otherwise?
>
> Thanks
>



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