I am using whiteboard to register my servlets but i also use the jaxrs
connector https://github.com/hstaudacher/osgi-jax-rs-connector.  My custom
filter is called on rest calls but I do not seem to be getting the correct
context.  I am not sure if it is similar to
https://github.com/hstaudacher/osgi-jax-rs-connector/issues/99  or not.  I
can see how to set the context for the connector by implementing this class
https://github.com/hstaudacher/osgi-jax-rs-connector/blob/master/bundles/com.eclipsesource.jaxrs.publisher/src/com/eclipsesource/jaxrs/publisher/ServletConfiguration.java
but I do not know how to get an already created context from the
httpservice.  I do know how to set the context for a given path using
declarative services though.  My thinking was that I could just create a
class based off the default context and set it in declarative services and
return it in the ServletConfiguration.  It seems kinda hacky to me but I
couldn't think of a better way.  Am I on the wrong track.

On Tue, May 31, 2016 at 3:50 PM, Raymond Auge <[email protected]>
wrote:

> You may want to consider moving to Http Whiteboard. It's much more flexible
> particularly around context.
>
> - Ray
>
> On Tue, May 31, 2016 at 3:04 PM, David Daniel <[email protected]
> >
> wrote:
>
> > I'm ok.  I think I found it.
> >
> >
> >
> https://github.com/apache/felix/blob/trunk/http/whiteboard/src/main/java/org/apache/felix/http/whiteboard/internal/manager/DefaultHttpContext.java
> >
> > On Tue, May 31, 2016 at 2:44 PM, David Daniel <
> [email protected]
> > >
> > wrote:
> >
> > > When no implementation of httpcontext is passed in to felix what is the
> > > default implementation used.  Where can I find this code in source
> > > control.
> > >
> > > Thanks for any help,
> > >   David
> > >
> >
>
>
>
> --
> *Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile>
>  (@rotty3000)
> Senior Software Architect *Liferay, Inc.* <http://www.liferay.com>
>  (@Liferay)
> Board Member & EEG Co-Chair, OSGi Alliance <http://osgi.org>
> (@OSGiAlliance)
>

Reply via email to