You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by Jan Penninkhof <ja...@penninkhof.com> on 2014/03/05 17:43:48 UTC

Spring version of Olingo

Hello!

Most tutorials and examples on the Olingo site are based on
the CXFNonSpringJaxrsServlet. I would like to reuse components from an
exising CXF-Spring application though, which require the Spring framework
to be booted.

What would be the recommended way to get Spring booted up? Is there perhaps
another Servlet that could be invoked or should spring be booted by adding
code to boot the framework? And if I e.g. use CXFServlet instead of
CXFNonSpringJaxrsServlet, how should I pass the required init parameters
such as javax.ws.rs.Application
and org.apache.olingo.odata2.service.factory?

Thanks!

Best regards,
Jan Penninkhof

Re: Spring version of Olingo

Posted by Jan Penninkhof <ja...@penninkhof.com>.
Thanks for your kind reply, Michael :)
I have tried to go down that avenue, but as I'm not very experience with
Spring myself, I have chosen a Springless shortcut for now.
It would be nice if there's an implementation scenario for Olingo on Spring
though, so I'll follow your advice and will create a Jira item for this.

Best,
- Jan


On Thu, Mar 6, 2014 at 10:23 AM, Bolz, Michael <mi...@sap.com> wrote:

> Hi Jan,
>
> I myself have no experience with the combination of Spring/CXF/Olingo.
> But after a short look into CXF documentation here:
> https://cxf.apache.org/docs/jaxrs-services-configuration.html#JAXRSServices
> Configuration-ConfiguringJAX-RSservicesincontainerwithSpringconfigurationfi
> le.
> I think your mentioned way with the CXFServlet is the right one.
> Then the 'org.apache.cxf.jaxrs.JAXRSServerFactoryBean' is necessary which
> delegates to an implementation similar to current existing
> 'ODataSubLocator' to create the 'ODataRequest' object which then can be
> handled by the 'ODataRequestHandler' which calls the OData service.
> But to be honest these assumptions are not tested  ;o)
>
> Perhaps you could create an JIRA issue (Wish/Enhancement) that Spring/CXF
> should be supported with Olingo.
> So we have a common place to discuss and resolve this and perhaps find
> somebody who already have experience with the combination of
> Spring/CXF/Olingo.
>
> Kind regards,
> Michael
>
>
>
> On 05/03/14 17:43, "Jan Penninkhof" <ja...@penninkhof.com> wrote:
>
> >Hello!
> >
> >Most tutorials and examples on the Olingo site are based on
> >the CXFNonSpringJaxrsServlet. I would like to reuse components from an
> >exising CXF-Spring application though, which require the Spring framework
> >to be booted.
> >
> >What would be the recommended way to get Spring booted up? Is there
> >perhaps
> >another Servlet that could be invoked or should spring be booted by adding
> >code to boot the framework? And if I e.g. use CXFServlet instead of
> >CXFNonSpringJaxrsServlet, how should I pass the required init parameters
> >such as javax.ws.rs.Application
> >and org.apache.olingo.odata2.service.factory?
> >
> >Thanks!
> >
> >Best regards,
> >Jan Penninkhof
>

Re: Spring version of Olingo

Posted by "Bolz, Michael" <mi...@sap.com>.
Hi Jan,

I myself have no experience with the combination of Spring/CXF/Olingo.
But after a short look into CXF documentation here:
https://cxf.apache.org/docs/jaxrs-services-configuration.html#JAXRSServices
Configuration-ConfiguringJAX-RSservicesincontainerwithSpringconfigurationfi
le.
I think your mentioned way with the CXFServlet is the right one.
Then the 'org.apache.cxf.jaxrs.JAXRSServerFactoryBean' is necessary which
delegates to an implementation similar to current existing
'ODataSubLocator' to create the 'ODataRequest' object which then can be
handled by the 'ODataRequestHandler' which calls the OData service.
But to be honest these assumptions are not tested  ;o)

Perhaps you could create an JIRA issue (Wish/Enhancement) that Spring/CXF
should be supported with Olingo.
So we have a common place to discuss and resolve this and perhaps find
somebody who already have experience with the combination of
Spring/CXF/Olingo.

Kind regards,
Michael



On 05/03/14 17:43, "Jan Penninkhof" <ja...@penninkhof.com> wrote:

>Hello!
>
>Most tutorials and examples on the Olingo site are based on
>the CXFNonSpringJaxrsServlet. I would like to reuse components from an
>exising CXF-Spring application though, which require the Spring framework
>to be booted.
>
>What would be the recommended way to get Spring booted up? Is there
>perhaps
>another Servlet that could be invoked or should spring be booted by adding
>code to boot the framework? And if I e.g. use CXFServlet instead of
>CXFNonSpringJaxrsServlet, how should I pass the required init parameters
>such as javax.ws.rs.Application
>and org.apache.olingo.odata2.service.factory?
>
>Thanks!
>
>Best regards,
>Jan Penninkhof