Re: How to contribue a CXF JAX-RS OSGi Sample?

2011-12-30 Thread Sergey Beryozkin

Hi, this demo is on the trunk now, I tested it and it worked fine
Thanks for this contribution,
Cheers, Sergey

On 16/12/11 22:34, K Fung wrote:

Hello,


  I'm sorry - I should've put it into 2.5.1 - but it will definitely make

it into 2.5.2 - and I hope it would be of interest to users.

No worries Sergey. Thanks for all your helpful suggestions and guidance
while I worked on this in 2 week spurts.

It took us countless hours and much frustration to figure out how to run
CXF JAX-RS in our OSGI environment. Hopefully this sample will alleviate
the time needed for others to get up to speed with CXF JAX-RS in their own
environments.


In 2.5.2 on later we can think of introducing an activator into the jaxrs

frontend so that it can discover custom Applications and providers
registered as OSGI services

Perhaps we should have a discussion on a separate thread to discuss how you
envision seeing this? In particular, I'm wondering what's the
baseline/environment you think this would be running. For example, right
now there is no activator in the CXF JAX-RS bundle but what are the
consequence of an activator in 2.5.2+ - can it be disabled? Do we rely on
the OSGI HttpService or do we use a built-in Jetty? Can we support both?

I guess you can see that I'm pretty interested in this topic :-)

On Fri, Dec 16, 2011 at 2:21 PM, Sergey Beryozkinwrote:


Hi KL


On 16/12/11 22:13, K Fung wrote:


Hi Sergey,

I've uploaded the final version (for now) to CXF-3859. I've bumped up the
version to 2.5.2-SNAPSHOT and commented out the Apache Snapshot
repository.
Hopefully, this meets the quality bar for commit :-)



I'm sorry - I should've put it into 2.5.1 - but it will definitely make it
into 2.5.2 - and I hope it would be of interest to users.




I did investigate creating the JAXRSServerFactoryBean directly (instead of
subclassing CXFNonSpringJaxrsServlet). If I went down this route, I would
have had to include a dependency on Jetty directly (as the traffic
wouldn't
be provided via the OSGI HttpService) or duplicate much of the servlet
code
in CXFNonSpringJaxrsServlet. In the end, I decided that it just wasn't
worth it.



Sounds right...
In 2.5.2 on later we can think of introducing an activator into the jaxrs
frontend so that it can discover custom Applications and providers
registered as OSGI services

thanks, Sergey




Cheers,
kl

On Mon, Dec 5, 2011 at 9:39 AM, Sergey Beryozkin
wrote:


  Hi KL



On 03/12/11 00:50, K Fung wrote:

  Hi Sergey,


Adding Dynamic-Import: * would likely resolve the issue. It also makes
any
package/class name resolution a lot slower because all the OSGI bundles
will basically now be a gigantic class path. I would not be inclined to
go
down this route.

I've uploaded a new version to CXF-3859. I've updated the code so that
it
compiles in Java 5 (turns out this wasn't too hard once I figured how
ServiceMix got it to work) and now when you compile the samples pom.xml,
it'll also compile the JAX-RS Minimal OSGI sample.

The final things on my TODO list are to investigate how to avoid using
my
own special servlet and the removal the snapshot repository. For the
latter, I'll likely just comment this out since it turns out that in the
samples pom.xml, snapshots are enabled.



Please try commenting it out. It seems like it's ready for a commit,

thanks, Sergey




  Regards,

kl









--
Sergey Beryozkin


Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com






--
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com


Re: Could not instantiate bean SpringBus: 2.4.1

2011-12-30 Thread Lalit Kumar
Add it

On 12/20/11, Lalit Kumar [via CXF]
 wrote:
>
>
> Hi,
>
> I have found the solution.
>
> 1. need to make the class loader policy at module level to be PARENT_LAST
> 2. delete following jars
> geronimo-activation_1.1_spec-1.1.jar
> geronimo-annotation_1.0_spec-1.1.1.jar
> geronimo-javamail_1.4_spec-1.7.1.jar
> geronimo-servlet_2.5_spec-1.1.2.jar
> geronimo-stax-api_1.0_spec-1.0.1.jar
>
> Then this worked fine
>
> Regards,
> Lalit Kumar
>
> -
> Lalit Kumar
> Technical Specialist
> Fidelity International
> ___
> If you reply to this email, your message will be added to the discussion
> below:
> http://cxf.547215.n5.nabble.com/Could-not-instantiate-bean-SpringBus-2-4-1-tp4539354p5088879.html
>
> To unsubscribe from Could not instantiate bean SpringBus: 2.4.1, visit
> http://cxf.547215.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4539354&code=bGFsaXRrdW1hcmJhbnNhbEBnbWFpbC5jb218NDUzOTM1NHw3OTI5MTkyNzQ=


-
Lalit Kumar
Technical Specialist
Fidelity International
--
View this message in context: 
http://cxf.547215.n5.nabble.com/Could-not-instantiate-bean-SpringBus-2-4-1-tp4539354p5110241.html
Sent from the cxf-dev mailing list archive at Nabble.com.