Tuesday Mar 24, 2015

What to do when JAX-RS cannot find it’s Providers aka My message body writer is not used

One of the reasons why I wrote this article is my, rather unusual, encounter with a missing message body writer in a Jersey 1 test application. This problem of mine occurred during collecting of data to get a Jersey 1 performance baseline in order to see where Jersey 2 stands when compared to its predecessor. The problem is described at the end of this article because I think it’s pretty rare, but still not impossible :-), and not many of you will (hopefully) face it. But first I’d like to take a look at more common issues regarding missing providers and what you can do to solve them.

More in my original post on blog.dejavu.sk 

Tuesday Mar 17, 2015

JAX-RS Providers on Client and on Server

In this article I'd like to explain two things. First, what to do when you want to restrict JAX-RS providers to be used on, for example, client-side only. And second, what are the issues (and how to solve them) with injecting providers when you create and register instances of them directly.

Constraining JAX-RS providers to particular runtime


Some of the JAX-RS providers can be used on the server-side as well as on the client-side. The reusability of providers was among the goals when JAX-RS 2.0 Client API was proposed and designed. Unquestionably this being a useful feature of JAX-RS 2.0 there are cases in which you want to constrain some of the available providers to either client or server. Constraining providers, or Features for that matter, is even more useful when writing a general purpose library that aims to support both sides but each in a slightly different manner.

More in my original post on blog.dejavu.sk 

Wednesday Jan 08, 2014

Binding JAX-RS Providers to Resource Methods

When you register providers (such as filters and interceptors) in your application they’re associated and applied to each resource method by default. In other words they’re bound globally. For most cases this approach is sufficient but sometimes, especially when you want to use your provider only with a few methods, it’s not enough. JAX-RS 2.0 brings a solution for this situation: Name and Dynamic Binding.

More in my original post on blog.dejavu.sk 

About

Mirror of blog.dejavu.sk

Search

Categories
Archives
« April 2015
SunMonTueWedThuFriSat
   
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
  
       
Today