Re: Having multiple versions of CXF deployed in the same OSGi container

2017-05-01 Thread Daniel Kulp

I can almost guarantee that having two versions of CXF deployed into the same 
OSGi container won’t work.  The loading of the Bus extensions from the various 
bundles does not currently take into account the CXF version they are tied to.

Dan


> On Apr 27, 2017, at 9:46 AM, M. D.  wrote:
> 
> Hello group,
> 
> This would be a rather general and abstract question so I won't mind getting 
> a rather general answer as well :)
> 
> We are trying to move from CXF 1.6.9 to the latest 3.1.11 release.
> We are running on an OSGi platform.
> Our plan is to have both CXF versions (and all of their dependencies) 
> deployed in parallel.
> 
> We know that quite some many of the CXF dependencies are utilizing heavily 
> the java ServiceLoader infrastructure.
> So in a way, even if OSGi would be able to strictly isolate the two parallel 
> versions, in theory it seems possible that we'd run into trouble because of 
> the service loader.
> 
> So my question is, has anyone tried to run 1.6.x and 3.x.x versions in 
> parallel in the same OSGi container?
> 
> What kinds of problems should we expect?
> Any guidelines that you could recommend?
> 
> Anything would be helpful actually :)
> 
> Thank you!
> 
> Best regards,
> M.D

-- 
Daniel Kulp
dk...@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com



Re: CXF v2.7.14 JAXB blocked threads and degraded performance

2017-05-01 Thread Daniel Kulp

This stack trace looks like it’s during creating a client proxy.  Is that 
something you do a lot?  If so, you really should either pool the proxies or 
use them in some other thread safe manner to avoid creating them all the time.  
Creating them is expensive and involves several locks.In this particular 
case, it’s creating a JAXB context.   In theory, the context cache can hold 
onto and share the JAXB contexts between multiple client proxies, but if the 
proxies are discarded and not held onto, the cache would clear as well and 
contexts would need to be re-created.   

Dan



> On May 1, 2017, at 11:35 AM, venkatesham nalla  wrote:
> 
> degraded performance with CXF v2.7.14 with bunch of threads in BLOCKED state  
> waiting to lock <0x000685890f28> (a 
> com.sun.xml.bind.v2.runtime.reflect.opt.Injector) with the following 
> stacktrace, teh thread that is holding the lock is in Runnable state. Is this 
> a bug or how do get around this performance issue?
> 
> 
> "pool-11-thread-163" #4455 prio=5 os_prio=0 tid=0x7f736c089000 nid=0x8335 
> waiting for monitor entry [0x7f72e01f1000]
>   java.lang.Thread.State: BLOCKED (on object monitor)
>at 
> com.sun.xml.bind.v2.runtime.reflect.opt.Injector.find(Injector.java:202)
>- waiting to lock <0x000685890f28> (a 
> com.sun.xml.bind.v2.runtime.reflect.opt.Injector)
>at 
> com.sun.xml.bind.v2.runtime.reflect.opt.Injector.find(Injector.java:96)
>at 
> com.sun.xml.bind.v2.runtime.reflect.opt.AccessorInjector.prepare(AccessorInjector.java:77)
>at 
> com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory.get(OptimizedAccessorFactory.java:165)
>at 
> com.sun.xml.bind.v2.runtime.reflect.Accessor$FieldReflection.optimize(Accessor.java:256)
>at 
> com.sun.xml.bind.v2.runtime.property.SingleElementLeafProperty.(SingleElementLeafProperty.java:81)
>at sun.reflect.GeneratedConstructorAccessor115.newInstance(Unknown 
> Source)
>at 
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
>at 
> com.sun.xml.bind.v2.runtime.property.PropertyFactory.create(PropertyFactory.java:124)
>at 
> com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.(ClassBeanInfoImpl.java:175)
>at 
> com.sun.xml.bind.v2.runtime.JAXBContextImpl.getOrCreate(JAXBContextImpl.java:490)
>at 
> com.sun.xml.bind.v2.runtime.JAXBContextImpl.getOrCreate(JAXBContextImpl.java:509)
>at 
> com.sun.xml.bind.v2.runtime.property.ArrayElementProperty.(ArrayElementProperty.java:108)
>at 
> com.sun.xml.bind.v2.runtime.property.ArrayElementNodeProperty.(ArrayElementNodeProperty.java:58)
>at sun.reflect.GeneratedConstructorAccessor117.newInstance(Unknown 
> Source)
>at 
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
>at 
> com.sun.xml.bind.v2.runtime.property.PropertyFactory.create(PropertyFactory.java:124)
>at 
> com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.(ClassBeanInfoImpl.java:175)
>at 
> com.sun.xml.bind.v2.runtime.JAXBContextImpl.getOrCreate(JAXBContextImpl.java:490)
>at 
> com.sun.xml.bind.v2.runtime.JAXBContextImpl.getOrCreate(JAXBContextImpl.java:509)
>at 
> com.sun.xml.bind.v2.runtime.property.ArrayElementProperty.(ArrayElementProperty.java:108)
>at 
> com.sun.xml.bind.v2.runtime.property.ArrayElementNodeProperty.(ArrayElementNodeProperty.java:58)
>at sun.reflect.GeneratedConstructorAccessor117.newInstance(Unknown 
> Source)
>at 
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
>at 
> com.sun.xml.bind.v2.runtime.property.PropertyFactory.create(PropertyFactory.java:124)
>at 
> com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.(ClassBeanInfoImpl.java:175)
>at 
> com.sun.xml.bind.v2.runtime.JAXBContextImpl.getOrCreate(JAXBContextImpl.java:490)
>at 
> com.sun.xml.bind.v2.runtime.JAXBContextImpl.getOrCreate(JAXBContextImpl.java:509)
>at 
> com.sun.xml.bind.v2.runtime.property.SingleElementNodeProperty.(SingleElementNodeProperty.java:101)
>at sun.reflect.GeneratedConstructorAccessor116.newInstance(Unknown 
> Source)
>at 
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
>at 
> com.sun.xml.bind.v2.runtime.property.PropertyFactory.create(PropertyFactory.java:124)
>at 
> com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.(ClassBeanInfoImpl.java:175)
>at 
> 

CXF v2.7.14 JAXB blocked threads and degraded performance

2017-05-01 Thread venkatesham nalla
degraded performance with CXF v2.7.14 with bunch of threads in BLOCKED state  
waiting to lock <0x000685890f28> (a 
com.sun.xml.bind.v2.runtime.reflect.opt.Injector) with the following 
stacktrace, teh thread that is holding the lock is in Runnable state. Is this a 
bug or how do get around this performance issue?


"pool-11-thread-163" #4455 prio=5 os_prio=0 tid=0x7f736c089000 nid=0x8335 
waiting for monitor entry [0x7f72e01f1000]
   java.lang.Thread.State: BLOCKED (on object monitor)
at 
com.sun.xml.bind.v2.runtime.reflect.opt.Injector.find(Injector.java:202)
- waiting to lock <0x000685890f28> (a 
com.sun.xml.bind.v2.runtime.reflect.opt.Injector)
at 
com.sun.xml.bind.v2.runtime.reflect.opt.Injector.find(Injector.java:96)
at 
com.sun.xml.bind.v2.runtime.reflect.opt.AccessorInjector.prepare(AccessorInjector.java:77)
at 
com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory.get(OptimizedAccessorFactory.java:165)
at 
com.sun.xml.bind.v2.runtime.reflect.Accessor$FieldReflection.optimize(Accessor.java:256)
at 
com.sun.xml.bind.v2.runtime.property.SingleElementLeafProperty.(SingleElementLeafProperty.java:81)
at sun.reflect.GeneratedConstructorAccessor115.newInstance(Unknown 
Source)
at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at 
com.sun.xml.bind.v2.runtime.property.PropertyFactory.create(PropertyFactory.java:124)
at 
com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.(ClassBeanInfoImpl.java:175)
at 
com.sun.xml.bind.v2.runtime.JAXBContextImpl.getOrCreate(JAXBContextImpl.java:490)
at 
com.sun.xml.bind.v2.runtime.JAXBContextImpl.getOrCreate(JAXBContextImpl.java:509)
at 
com.sun.xml.bind.v2.runtime.property.ArrayElementProperty.(ArrayElementProperty.java:108)
at 
com.sun.xml.bind.v2.runtime.property.ArrayElementNodeProperty.(ArrayElementNodeProperty.java:58)
at sun.reflect.GeneratedConstructorAccessor117.newInstance(Unknown 
Source)
at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at 
com.sun.xml.bind.v2.runtime.property.PropertyFactory.create(PropertyFactory.java:124)
at 
com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.(ClassBeanInfoImpl.java:175)
at 
com.sun.xml.bind.v2.runtime.JAXBContextImpl.getOrCreate(JAXBContextImpl.java:490)
at 
com.sun.xml.bind.v2.runtime.JAXBContextImpl.getOrCreate(JAXBContextImpl.java:509)
at 
com.sun.xml.bind.v2.runtime.property.ArrayElementProperty.(ArrayElementProperty.java:108)
at 
com.sun.xml.bind.v2.runtime.property.ArrayElementNodeProperty.(ArrayElementNodeProperty.java:58)
at sun.reflect.GeneratedConstructorAccessor117.newInstance(Unknown 
Source)
at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at 
com.sun.xml.bind.v2.runtime.property.PropertyFactory.create(PropertyFactory.java:124)
at 
com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.(ClassBeanInfoImpl.java:175)
at 
com.sun.xml.bind.v2.runtime.JAXBContextImpl.getOrCreate(JAXBContextImpl.java:490)
at 
com.sun.xml.bind.v2.runtime.JAXBContextImpl.getOrCreate(JAXBContextImpl.java:509)
at 
com.sun.xml.bind.v2.runtime.property.SingleElementNodeProperty.(SingleElementNodeProperty.java:101)
at sun.reflect.GeneratedConstructorAccessor116.newInstance(Unknown 
Source)
at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at 
com.sun.xml.bind.v2.runtime.property.PropertyFactory.create(PropertyFactory.java:124)
at 
com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.(ClassBeanInfoImpl.java:175)
at 
com.sun.xml.bind.v2.runtime.JAXBContextImpl.getOrCreate(JAXBContextImpl.java:490)
at 
com.sun.xml.bind.v2.runtime.JAXBContextImpl.getOrCreate(JAXBContextImpl.java:509)
at 
com.sun.xml.bind.v2.runtime.property.SingleElementNodeProperty.(SingleElementNodeProperty.java:101)
at sun.reflect.GeneratedConstructorAccessor116.newInstance(Unknown 
Source)
at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at 
com.sun.xml.bind.v2.runtime.property.PropertyFactory.create(PropertyFactory.java:124)
at 
com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.(ClassBeanInfoImpl.java:175)
at 
com.sun.xml.bind.v2.runtime.JAXBContextImpl.getOrCreate(JAXBContextImpl.java:490)
at