Re: Invoking Dynamic OSGi Blueprint services from a Java RouteBuilder

2016-02-19 Thread Brad Johnson
Good point. I guess I was just running through in my head what I did when I ran into the problem. There's definitely a classloader difference depending on how the routes and injection get set up. I have some speculations about it but that's all. I wish I had more time to chase it down. On Fri,

Re: Invoking Dynamic OSGi Blueprint services from a Java RouteBuilder

2016-02-19 Thread Quinn Stevenson
No - I haven’t tried logging the class type. I know it’s not a proxy because I don’t get a ServiceTimeoutException when the service is unavailable. I guess it could be a broken proxy, but I doubt it. I’ll try a couple of things and post my results. > On Feb 18, 2016, at 3:24 PM, Brad Johnson

Re: Invoking Dynamic OSGi Blueprint services from a Java RouteBuilder

2016-02-18 Thread Brad Johnson
When you run this below where you inject the blueprintServiceReference into the routebuilder, have you tried do a blueprintServiceReference.getClass().getName() log of print out? You should see the com.sun.Proxy class and not a concrete class. That's when I knew something was wrong for me. But I

Re: Invoking Dynamic OSGi Blueprint services from a Java RouteBuilder

2016-02-18 Thread Brad Johnson
Quinn, I don't recall if you answered this or not but when you run this: On Thu, Feb 18, 2016 at 9:18 AM, Quinn Stevenson < qu...@pronoia-solutions.com> wrote: > This one is really killing me. > > If anyone has any idea what may be going on and can point me in the right > direction, I’d love t

Re: Invoking Dynamic OSGi Blueprint services from a Java RouteBuilder

2016-02-18 Thread Quinn Stevenson
This one is really killing me. If anyone has any idea what may be going on and can point me in the right direction, I’d love to take a shot at fixing it - I just don’t know where to start looking. > On Feb 3, 2016, at 12:05 AM, Christian Schneider > wrote: > > I would use a new issue that

Re: Invoking Dynamic OSGi Blueprint services from a Java RouteBuilder

2016-02-05 Thread Quinn Stevenson
Brad - Please feel free to associate the issues - I don’t know exactly how that’s supposed to be done (I’m a little new to the Apache JIRA process). - Quinn > On Feb 5, 2016, at 2:10 PM, Brad Johnson wrote: > > Quinn, > > If you wouldn't mind putting a reference in there as a "may be relat

Re: Invoking Dynamic OSGi Blueprint services from a Java RouteBuilder

2016-02-05 Thread Brad Johnson
Quinn, If you wouldn't mind putting a reference in there as a "may be related to" the other issue that would be great. There shouldn't be a reason in an OSGi environment for any classloaders grabbing concrete implementations from other bundles and the current Camel classloader mechanics explicitl

Re: Invoking Dynamic OSGi Blueprint services from a Java RouteBuilder

2016-02-05 Thread Quinn Stevenson
OK - I’ve created an new JIRA issue describing what I’m seeing. https://issues.apache.org/jira/browse/CAMEL-9570 I’ll extract some samples from my projects and add them to the ticket shortly. > On Feb 3, 2016, at 12:05 AM, Christian Schneider

Re: Invoking Dynamic OSGi Blueprint services from a Java RouteBuilder

2016-02-02 Thread Christian Schneider
I would use a new issue that just explains what happens without trying to interpret. We do not yet know what really happens but I hope we can find out. Christian 2016-02-03 3:40 GMT+01:00 Quinn Stevenson : > I would expect the CamelContext to keep trying to run as well, but I > expected it to hi

Re: Invoking Dynamic OSGi Blueprint services from a Java RouteBuilder

2016-02-02 Thread Quinn Stevenson
I would expect the CamelContext to keep trying to run as well, but I expected it to hit the call to the OSGi service, block, and then timeout and throw a ServiceUnavailableException. But what I’m seeing is the call to the OSGi service is completing (it’s basically and echo service right now), a

Re: Invoking Dynamic OSGi Blueprint services from a Java RouteBuilder

2016-02-02 Thread Quinn Stevenson
> On Feb 2, 2016, at 3:15 PM, Christian Schneider > wrote: > > On 02.02.2016 23:08, Quinn Stevenson wrote: >> Christian - >> >> I don’t know about a class loader issue, but I do know when I run the route >> configured as you have it below, I’m not getting a proxy to the service. I >> know t

Re: Invoking Dynamic OSGi Blueprint services from a Java RouteBuilder

2016-02-02 Thread Christian Schneider
On 02.02.2016 23:08, Quinn Stevenson wrote: Christian - I don’t know about a class loader issue, but I do know when I run the route configured as you have it below, I’m not getting a proxy to the service. I know this because if I stop the bundle containing the OSGi service, the Camel context

Re: Invoking Dynamic OSGi Blueprint services from a Java RouteBuilder

2016-02-02 Thread Quinn Stevenson
Christian - I don’t know about a class loader issue, but I do know when I run the route configured as you have it below, I’m not getting a proxy to the service. I know this because if I stop the bundle containing the OSGi service, the Camel context keeps running - I don’t get a ServiceUnavaila

Re: Invoking Dynamic OSGi Blueprint services from a Java RouteBuilder

2016-02-02 Thread Christian Schneider
I am actually not sure if you have a classloader problem here. In your original route you use: .bean(blueprintServiceReference,false) public void setBlueprintServiceReference(Echo blueprintServiceReference) { this.blueprintServiceReference = blueprintServiceReference; } This will simpl

Re: Invoking Dynamic OSGi Blueprint services from a Java RouteBuilder

2016-02-02 Thread Quinn Stevenson
Do you have an idea of how to fix this? If you can point me in the right direction, I’d be happy to get a PR going for it. Quinn Stevenson qu...@pronoia-solutions.com (801) 244-7758 > On Feb 2, 2016, at 10:05 AM, Brad Johnson > wrote: > > And if we get enough up votes maybe it'll get put i

Re: Invoking Dynamic OSGi Blueprint services from a Java RouteBuilder

2016-02-02 Thread Brad Johnson
And if we get enough up votes maybe it'll get put in. It shouldn't be too difficult technically and can be put in without breaking anyone. Now, what happens when the flag gets turned on will be interesting. On Tue, Feb 2, 2016 at 11:02 AM, Brad Johnson wrote: > Tack the examples on to the issu

Re: Invoking Dynamic OSGi Blueprint services from a Java RouteBuilder

2016-02-02 Thread Quinn Stevenson
Will do - I’ll pull them from this thread. Thanks Again - this one is killing me right now > On Feb 2, 2016, at 10:02 AM, Brad Johnson > wrote: > > Tack the examples on to the issue to give it context.. That'll help folks > replicate it. > > On Tue, Feb 2, 2016 at 11:01 AM, Quinn Stevenson

Re: Invoking Dynamic OSGi Blueprint services from a Java RouteBuilder

2016-02-02 Thread Brad Johnson
Tack the examples on to the issue to give it context.. That'll help folks replicate it. On Tue, Feb 2, 2016 at 11:01 AM, Quinn Stevenson < qu...@pronoia-solutions.com> wrote: > Thank You for opening the issue Brad - > > You beat me to it, but you’re explanation of the issue was much better > tha

Re: Invoking Dynamic OSGi Blueprint services from a Java RouteBuilder

2016-02-02 Thread Quinn Stevenson
Thank You for opening the issue Brad - You beat me to it, but you’re explanation of the issue was much better than I could come up with - all I have are samples of what’s going on and no real explanation as to why :-) Thanks Again > On Feb 2, 2016, at 9:51 AM, Brad Johnson wrote: > > https

Re: Invoking Dynamic OSGi Blueprint services from a Java RouteBuilder

2016-02-02 Thread Brad Johnson
https://issues.apache.org/jira/browse/CAMEL-9562 I've opened an issue. I think it is a relatively easy thing to add a strict mode flag without breaking anyone. You're right that it is easy enough to make it work right. But if I haven't set something up to work correctly I don't want the classlo

Re: Invoking Dynamic OSGi Blueprint services from a Java RouteBuilder

2016-02-02 Thread Quinn Stevenson
Thank You Christian - Yes - I pointed out that if I used the Bean Component, everything seemed to work as I expected. The problem I have is I use beans in filter blocks as well, and there I can’t use the 'to( “bean://” ) with an aggregation strategy to get around this, but it worked the same

Re: Invoking Dynamic OSGi Blueprint services from a Java RouteBuilder

2016-02-02 Thread Christian Schneider
I agree about the classloader hacks ... though I am not sure if they are needed anywhere. The approach I showed will not suffer from this problem as you directly tell it to get a bean with an id. Christian On 02.02.2016 17:24, Brad Johnson wrote: Christian, Thanks for the constructive though

Re: Invoking Dynamic OSGi Blueprint services from a Java RouteBuilder

2016-02-02 Thread Brad Johnson
Christian, Thanks for the constructive thoughts. Theoretically if everything is set up correctly then it will find everything in the OSGi registry. Unfortunately, when it can't find things in the registry it will look for it with the global class loader. That was happening to me. It shouldn't ha

Re: Invoking Dynamic OSGi Blueprint services from a Java RouteBuilder

2016-02-02 Thread Christian Schneider
There is a much simpler way to use an OSGi service with blueprint. Simply use the bean component of camel. It resolves beans against the camel registry. When you define your camel context using blueprint then the camel registry automatically includes all blueprint beans. So you can do this in

Re: Invoking Dynamic OSGi Blueprint services from a Java RouteBuilder

2016-02-01 Thread Ranx
it to true and then have it do a hard failure if it can't find the class would be preferable for me. And for most developers I suspect. -- View this message in context: http://camel.465427.n5.nabble.com/Invoking-Dynamic-OSGi-Blueprint-services-from-a-Java-RouteBuilder-tp5776755p577710

Re: Invoking Dynamic OSGi Blueprint services from a Java RouteBuilder

2016-02-01 Thread Ranx
ge in context: http://camel.465427.n5.nabble.com/Invoking-Dynamic-OSGi-Blueprint-services-from-a-Java-RouteBuilder-tp5776755p5777108.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Invoking Dynamic OSGi Blueprint services from a Java RouteBuilder

2016-01-28 Thread Quinn Stevenson
e OSGi registry when working > in blueprint. > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Invoking-Dynamic-OSGi-Blueprint-services-from-a-Java-RouteBuilder-tp5776755p5776864.html > Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Invoking Dynamic OSGi Blueprint services from a Java RouteBuilder

2016-01-27 Thread Ranx
ersonally I'd prefer to have a strict mode flag that would require items to come out of the OSGi registry when working in blueprint. -- View this message in context: http://camel.465427.n5.nabble.com/Invoking-Dynamic-OSGi-Blueprint-services-from-a-Java-RouteBuilder-tp5776755p5776864

Re: Invoking Dynamic OSGi Blueprint services from a Java RouteBuilder

2016-01-27 Thread Quinn Stevenson
live in different bundles and > the internals are not exported. But when I do a .getClass().getName on the > service api received in bundle B it shows the implementation class. I don't > believe that's the proxy class. > > So it appears that using this mechanic is skirting the OSGi service proxying > mechanism. Is that a correct assessment? > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Invoking-Dynamic-OSGi-Blueprint-services-from-a-Java-RouteBuilder-tp5776755p5776848.html > Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Invoking Dynamic OSGi Blueprint services from a Java RouteBuilder

2016-01-27 Thread Ranx
ng mechanism. Is that a correct assessment? -- View this message in context: http://camel.465427.n5.nabble.com/Invoking-Dynamic-OSGi-Blueprint-services-from-a-Java-RouteBuilder-tp5776755p5776848.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Invoking Dynamic OSGi Blueprint services from a Java RouteBuilder

2016-01-27 Thread Quinn Stevenson
are using > option 3, which should actually work as you expected. > > Best regards > Stephan > > -Original Message- > From: Siano, Stephan [mailto:stephan.si...@sap.com] > Sent: Mittwoch, 27. Januar 2016 07:40 > To: users@camel.apache.org > Subject: RE: I

RE: Invoking Dynamic OSGi Blueprint services from a Java RouteBuilder

2016-01-26 Thread Siano, Stephan
@camel.apache.org Subject: RE: Invoking Dynamic OSGi Blueprint services from a Java RouteBuilder Hi, You have actually two issues. The first Is accessing an OSGi service from a route using Java DSL. Camel lookups are done in a Camel registry. The kind of registry depends on the way you start your camel context

RE: Invoking Dynamic OSGi Blueprint services from a Java RouteBuilder

2016-01-26 Thread Siano, Stephan
..@pronoia-solutions.com] Sent: Dienstag, 26. Januar 2016 23:11 To: users@camel.apache.org Subject: Invoking Dynamic OSGi Blueprint services from a Java RouteBuilder When I use an OSGi Service registered using Blueprint from a Java route (built using a Java RouteBuilder), the Camel route isn’t detectin

Invoking Dynamic OSGi Blueprint services from a Java RouteBuilder

2016-01-26 Thread Quinn Stevenson
When I use an OSGi Service registered using Blueprint from a Java route (built using a Java RouteBuilder), the Camel route isn’t detecting the when the service is not available, and it isn’t updating when the service implementation changes. The simple setup I’m using has a Java interface for th