Re: cxi integration: multiple buses during deployment?

2016-10-21 Thread Romain Manni-Bucau
Thanks for the merge, FYI I enhanced openwebbeans to be more tolerant of that case ( https://issues.apache.org/jira/browse/OWB-1157) but happy we work with "current" and older releases. Thanks guys. Romain Manni-Bucau @rmannibucau | Blog

Re: cxi integration: multiple buses during deployment?

2016-10-19 Thread Romain Manni-Bucau
here it is https://github.com/apache/cxf/pull/181 Romain Manni-Bucau @rmannibucau | Blog | Old Wordpress Blog | Github | LinkedIn

Re: cxi integration: multiple buses during deployment?

2016-10-19 Thread John D. Ament
Could you raise a PR against 3.1.x? This way the PR builder runs and can test that there's no regression w/ Weld. John On Wed, Oct 19, 2016 at 2:03 PM Romain Manni-Bucau wrote: > in the meantime if someone can apply my patch or equivalent and push a > 3.1.9-SNAPSHOT it would unblock us. > > >

Re: cxi integration: multiple buses during deployment?

2016-10-19 Thread Romain Manni-Bucau
in the meantime if someone can apply my patch or equivalent and push a 3.1.9-SNAPSHOT it would unblock us. Romain Manni-Bucau @rmannibucau | Blog | Old Wordpress Blog | Github

Re: cxi integration: multiple buses during deployment?

2016-10-19 Thread John D. Ament
Yep I remember mark mentioned that to me before. Ok I need to prioritize getting those extra tests too. On Oct 19, 2016 13:29, "Romain Manni-Bucau" wrote: > @John: yes, didn't check weld but OWB wraps 3rd party Bean (cxf bus > here) where weld doesn't probably. > > > Romain Manni-Bucau > @rmann

Re: cxi integration: multiple buses during deployment?

2016-10-19 Thread Romain Manni-Bucau
@John: yes, didn't check weld but OWB wraps 3rd party Bean (cxf bus here) where weld doesn't probably. Romain Manni-Bucau @rmannibucau | Blog | Old Wordpress Blog | Github

Re: cxi integration: multiple buses during deployment?

2016-10-19 Thread John D. Ament
Ok this makes sense now. I suspect this is an internal diff between owb and weld (hence why i still want those tests). Thanks Roma! On Oct 19, 2016 13:16, "Romain Manni-Bucau" wrote: > http://svn.apache.org/repos/asf/openwebbeans/microwave/trunk/ just run > core > module > > Think the extensio

Re: cxi integration: multiple buses during deployment?

2016-10-19 Thread Romain Manni-Bucau
http://svn.apache.org/repos/asf/openwebbeans/microwave/trunk/ just run core module Think the extension was written with Weld which behaves a bit differently from openwebbeans on that point. Romain Manni-Bucau @rmannibucau | Blog

Re: cxi integration: multiple buses during deployment?

2016-10-19 Thread Andrey Redko
Hey Roman, Thanks a lot for verifying. Would you mind to share the sample project to reproduce the issue? There seems to be more things to take into account. Thanks. Best Regards, Andriy Redko On Wed, Oct 19, 2016 at 9:24 AM, Romain Manni-Bucau wrote: > doesn't work but for a weirder reaso

Re: cxi integration: multiple buses during deployment?

2016-10-19 Thread Romain Manni-Bucau
doesn't work but for a weirder reason. CdiBean is added programmatically - all fine Then it is directly used to get the bus (in "use the default bus" mode). This is not really fine since the CDI impl is free to wrap this so you should retrieve the actual instance of the bus and get it with this B

Re: cxi integration: multiple buses during deployment?

2016-10-19 Thread Andrey Redko
Hi Roman, Thanks a lot for clarifying on things. Could you please try latest 3.1.9-SNAPSHOT / 3.2.0-SNAPSHOT against this issue? The fix should be there. Thanks! Best Regards, Andriy Redko On Wed, Oct 19, 2016 at 2:28 AM, Romain Manni-Bucau wrote: > Le 19 oct. 2016 04:14, "Andriy Redko" a

Re: cxi integration: multiple buses during deployment?

2016-10-18 Thread Romain Manni-Bucau
Le 19 oct. 2016 04:14, "Andriy Redko" a écrit : > > I think this is what is happening: > - Roman defines own CXF bus bean, named "cxf" This is a workaround to be able to lookup the bus in my workaround extension. Not doing it without my extension leads to the issue. > - our JAX-RS CDI extensio

Re: cxi integration: multiple buses during deployment?

2016-10-18 Thread Andriy Redko
I think this is what is happening: - Roman defines own CXF bus bean, named "cxf" - our JAX-RS CDI extension finds it and makes it a "default" bus to be used for JAXRSServerFactoryBean instances - however, JAXRSServerFactoryBean::setApplication() would create a new bus nonetheless, becaus

Re: cxi integration: multiple buses during deployment?

2016-10-18 Thread John D. Ament
So still something isn't clicking as I don't have Romain's issue. Is it specific to when you have multiple deployments in your JVM? On Oct 18, 2016 09:02, "Romain Manni-Bucau" wrote: > 2016-10-18 14:43 GMT+02:00 Andrey Redko : > > > Hi Romain Manni-Bucau, > > > > Yes, technically we do have this

Re: cxi integration: multiple buses during deployment?

2016-10-18 Thread Romain Manni-Bucau
2016-10-18 14:43 GMT+02:00 Andrey Redko : > Hi Romain Manni-Bucau, > > Yes, technically we do have this option, but I would suggest to use > explicit wirings instead of thread local context. It > could have quite a number of side effects. I hope you would agree with > that. > > I agree it is bett

Re: cxi integration: multiple buses during deployment?

2016-10-18 Thread Andrey Redko
Hi Romain Manni-Bucau, Yes, technically we do have this option, but I would suggest to use explicit wirings instead of thread local context. It could have quite a number of side effects. I hope you would agree with that. Thanks! Best Regards, Andriy Redko On Tue, Oct 18, 2016 at 7:49 AM,

Re: cxi integration: multiple buses during deployment?

2016-10-18 Thread Romain Manni-Bucau
We also have option 3: set the thread bus as in the workaround I used. Romain Manni-Bucau @rmannibucau | Blog | Old Wordpress Blog | Github | LinkedIn

Re: cxi integration: multiple buses during deployment?

2016-10-18 Thread Sergey Beryozkin
Hi Andriy yes, option 1 is probably the simplest for the CDI integration path, Thanks, Sergey On 18/10/16 12:43, Andrey Redko wrote: Hey guys, Indeed, there is an issue with CDI and usage of custom bus. I think there are couple of the options we have here: - pass the bus instance to ResourceUt

Re: cxi integration: multiple buses during deployment?

2016-10-18 Thread Romain Manni-Bucau
here it is https://issues.apache.org/jira/browse/CXF-7095 (side note: affected it to 3.1.7 but 3.1.8 has the same bug) Romain Manni-Bucau @rmannibucau | Blog | Old Wordpress Blog | Github

Re: cxi integration: multiple buses during deployment?

2016-10-18 Thread Andrey Redko
Hey guys, Indeed, there is an issue with CDI and usage of custom bus. I think there are couple of the options we have here: - pass the bus instance to ResourceUtils::createApplication, in this case if bus is not set, the behaviour would be exactly the same - change the way JAXRSServerFactoryBean

Re: cxi integration: multiple buses during deployment?

2016-10-18 Thread Romain Manni-Bucau
Not yet something failling i can share but globally I ended up doing that: @Named("cxf") @ApplicationScoped public class BusInstance implements Bus { @Delegate private Bus delegate = new ExtensionManagerBus(); } public class OWBAutoSetup implements ServletContainerInitializer { @Override public vo

Re: cxi integration: multiple buses during deployment?

2016-10-18 Thread John D. Ament
Do you have a sample project that demonstrates the issue? Also, do you see setBus method being called on CXFCdiServlet? How many times do you see it invoked? Maybe step through loadBus to see which path it follows. On Tue, Oct 18, 2016 at 6:24 AM Romain Manni-Bucau wrote: > Not really, > > I

Re: cxi integration: multiple buses during deployment?

2016-10-18 Thread Romain Manni-Bucau
Not really, I don't have any bus bean, just using the default one of the extenson - behavior is the same however if I impl my own bus bean. Issue is in the load() method of the extension. It gets the bus and then calls ResourceUtils.createApplication(application, false, false) which will call org

Re: cxi integration: multiple buses during deployment?

2016-10-18 Thread John D. Ament
Romain, Depends on how you're trying to instantiate it. There is a CdiBusBean provided by CXF which does what you're trying to do - https://github.com/apache/cxf/blob/3.1.x-fixes/integration/cdi/src/main/java/org/apache/cxf/cdi/CdiBusBean.java#L40 , take a look at the create method. I was actual