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

Connection pooling feature with the connector? #113

Closed zabdsb closed 8 years ago

zabdsb commented 8 years ago

Hi,

I am using the OSGi JAX-RS connector within Apache Felix and using maven to build our project. We are using it to consume web services.

One of the web service operations will be used for a lot of searches. With that in mind, I looked at how it is possible to do connection pooling with JAX-RS and came up with some pointers on this site: http://www.theotherian.com/2013/08/jersey-client-2.0-httpclient-timeouts-max-connections.html

However, I do not seem to have access to the PoolingClientConnectionManager class (for example) via the connector. Is there a way this can be achieved in the current state of the connector (in the sense that it is dealt with behind the scenes already) or is this something that needs to be added as a new feature?

Thanks,

Abd

P.S I am a GitHub newbie, so I might not be going about using this in the right way ...

hstaudacher commented 8 years ago

The connector is splitted in two parts: publisher and consumer.

Publisher: You are responsible for configuring the client and making any requests. Consumer: You can pass the configuration the client needs to the create method, see https://github.com/hstaudacher/osgi-jax-rs-connector/blob/master/bundles/com.eclipsesource.jaxrs.consumer/src/com/eclipsesource/jaxrs/consumer/ConsumerFactory.java#L70