com.opentable.components:otj-jaxrs-clientfactory-jersey

This is the Base POM for open source OpenTable Maven projects.

Categories

Categories

CLI User Interface Jersey Program Interface REST Frameworks
GroupId

GroupId

com.opentable.components
ArtifactId

ArtifactId

otj-jaxrs-clientfactory-jersey
Last Version

Last Version

1.7.0
Release Date

Release Date

Type

Type

jar
Description

Description

This is the Base POM for open source OpenTable Maven projects.

Download otj-jaxrs-clientfactory-jersey

How to add to project

<!-- https://jarcasting.com/artifacts/com.opentable.components/otj-jaxrs-clientfactory-jersey/ -->
<dependency>
    <groupId>com.opentable.components</groupId>
    <artifactId>otj-jaxrs-clientfactory-jersey</artifactId>
    <version>1.7.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.opentable.components/otj-jaxrs-clientfactory-jersey/
implementation 'com.opentable.components:otj-jaxrs-clientfactory-jersey:1.7.0'
// https://jarcasting.com/artifacts/com.opentable.components/otj-jaxrs-clientfactory-jersey/
implementation ("com.opentable.components:otj-jaxrs-clientfactory-jersey:1.7.0")
'com.opentable.components:otj-jaxrs-clientfactory-jersey:jar:1.7.0'
<dependency org="com.opentable.components" name="otj-jaxrs-clientfactory-jersey" rev="1.7.0">
  <artifact name="otj-jaxrs-clientfactory-jersey" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.opentable.components', module='otj-jaxrs-clientfactory-jersey', version='1.7.0')
)
libraryDependencies += "com.opentable.components" % "otj-jaxrs-clientfactory-jersey" % "1.7.0"
[com.opentable.components/otj-jaxrs-clientfactory-jersey "1.7.0"]

Dependencies

compile (10)

Group / Artifact Type Version
com.opentable.components : otj-jaxrs-shared jar 1.7.0
com.opentable.components : otj-jaxrs-client jar 1.7.0
com.opentable.components : otj-config jar 1.3.2
org.skife.config : config-magic jar 0.17
javax.ws.rs : javax.ws.rs-api jar 2.0
org.glassfish.jersey.core : jersey-client jar 2.10.1
org.glassfish.jersey.core : jersey-common jar 2.10.1
org.glassfish.jersey.connectors : jersey-apache-connector jar 2.10.1
org.apache.commons : commons-lang3 jar 3.4
org.apache.httpcomponents : httpclient jar 4.4.1

test (3)

Group / Artifact Type Version
junit : junit jar 4.12
org.mockito : mockito-core jar 1.10.17
org.slf4j : slf4j-simple jar 1.7.12

Project Modules

There are no modules declared in this project.

OpenTable JAX-RS Component

Build Status

Notes

  • otj-jaxrs-exception is considered deprecated. Please do not use it in newer projects (although we will continue to support it indefinitely)

Component Charter

  • Provides bindings from a JAX-RS Client provider into the Spring, configuration, and otj-server ecosystem.
    • Can swap out Jersey for RESTEasy
    • Register Features with Spring DI environment
  • Brings in otj-jackson support for directly reading and writing JSON.

Component Level

Installation

  • Add the otj-jaxrs-client and otj-jaxrs-shared maven dependencies
  • Choose an engine (otj-jaxrs-clientfactory-resteasy, otj-jaxrs-clientfactory-jersey, otj-jaxrs-clientfactory-resteasy-apache).

Normally otj-jaxrs-clientfactory-resteasy (which is RestEasy + Jetty client) is used in otj-server. This is still the recommended choice.

otj-clientfactory-jersey is considered legacy and not regularly tested. We don't recommend it. Let us know if you need it.

otj-clientfactory-resteasy-apache - Is RestEasy + Apache Http Engine. We don't recommend this currently, but we are keeping this around, as Apache has a few options Jetty doesn't support.

Configuration

The JAX-RS client configuration is managed through your application properties.

See JaxRSClientConfig for the list of options. Note many options are only supported by specific engines. It's a bit of a mess, frankly, which eventually we'll clean up.

Options are configured using the provided client name and the corresponding jaxrs configuration:

jaxrs.client.${clientName}.option=value

For the client name "availability" the corresponding connection pool configuration option will be:

jaxrs.client.availability.connectionPool=50

For configuration options that take time, use the ISO 8601 Durations format (https://en.wikipedia.org/wiki/ISO_8601).

Example: Configure the connection timeout to 5s

jaxrs.client.availability.connectTimeout=PT5s

For values smaller than seconds you may use decimals per the ISO 8601 format:

"The smallest value used may also have a decimal fraction, as in "P0.5Y" to indicate half a year. This decimal fraction may be specified with either a comma or a full stop, as in "P0,5Y" or "P0.5Y"."

To configure a connection timeout of 150ms:

jaxrs.client.availability.connectTimeout=PT0.150s

For a list of configurable options see client/src/main/java/com/opentable/jaxrs/JaxRsClientConfig.java


Copyright (C) 2019 OpenTable, Inc.

com.opentable.components

OpenTable

Restaurant Reservations

Versions

Version
1.7.0
1.6.0
1.5.2
1.5.1
1.5.0