hstaudacher / osgi-jax-rs-connector

An OSGi - JAX-RS 2.0 Connector, software repository available on the link below
http://hstaudacher.github.io/osgi-jax-rs-connector
Other
190 stars 98 forks source link

Issue #119 - Support for getSingleton() #121

Closed col-panic closed 8 years ago

col-panic commented 8 years ago

As mentioned in Issue #119 I implemented support for getSingleton() - without this it is not possible to use webdav-jaxrs. Supporting getSingleton() in ApplicationConfiguration, however, allows me to initialize the webdav support as required in

    @Override
    public Set<Object> getSingletons() {
        try {
            return new HashSet<Object>(Arrays.asList(new WebDavContextResolver()));
        } catch (JAXBException e) {
            return null;
        }
    }
hstaudacher commented 8 years ago

Can you please provide unit tests for this as well?

On 11.11.2015, at 08:28, Marco Descher notifications@github.com wrote:

As mentioned in Issue #119 I implemented support for getSingleton() - without this it is not possible to use webdav-jaxrs. Supporting getSingleton() in ApplicationConfiguration, however, allows me to initialize the webdav support as required in

@Override
public Set<Object> getSingletons() {
    try {
        return new HashSet<Object>(Arrays.asList(new WebDavContextResolver()));
    } catch (JAXBException e) {
        return null;
    }
}

You can view, comment on, or merge this pull request online at:

https://github.com/hstaudacher/osgi-jax-rs-connector/pull/121

Commit Summary

Issue #119 - Support for getSingleton() File Changes

M bundles/com.eclipsesource.jaxrs.publisher/src/com/eclipsesource/jaxrs/publisher/ApplicationConfiguration.java (12)
M bundles/com.eclipsesource.jaxrs.publisher/src/com/eclipsesource/jaxrs/publisher/internal/DefaultApplicationConfiguration.java (7) M bundles/com.eclipsesource.jaxrs.publisher/src/com/eclipsesource/jaxrs/publisher/internal/JerseyContext.java (10) Patch Links:

https://github.com/hstaudacher/osgi-jax-rs-connector/pull/121.patch https://github.com/hstaudacher/osgi-jax-rs-connector/pull/121.diff — Reply to this email directly or view it on GitHub.

col-panic commented 8 years ago

I'd really like to, can you give me a hint where I may fetch org.mockito.mockito-all from?? I don't seem to find a p2 repository providing it?!

col-panic commented 8 years ago

I added on whether the values are really added to the rootApplication. As by definition any kind of object can be added a simple string should suffice. This string would certainly not match the semantic requirements of a real added object, the fact that it is added, however, is tested.

hstaudacher commented 8 years ago

See comment on #119