Home » Author Archives: Gerard Davison

Author Archives: Gerard Davison

Per client cookie handling with Jersey

Jersey-logo

A lot of REST services will use cookies as part of the authentication / authorisation scheme. This is a problem because by default the old Jersey client will use the singleton CookieHandler.getDefault which is most cases will be null and if not null will not likely work in a multithreaded server environment. (This is because in the background the default ...

Read More »

Declarative Linking in Jersey 2.9 and up

java-interview-questions-answers

A couple of weeks ago A couple of months ago I was looking how I was going to engineers new REST API for an Oracle Cloud project. Once of the things I had planned to do was to use the declarative link injection created in Jersey 1.x by Marc Hadley. Sadly this hadn’t been forwarded ported yet, so a quick ...

Read More »

Transparent PATCH support in JAX-RS 2.0

java-interview-questions-answers

The PATCH method is one the the less well loved HTTP methods simple because until recently there really wasn’t a standard PATCH format. This has been standardized for JSON for a while now so there are quite a few libraries that will do the heavy lifting for you. For the purposes of this blog I am going to use json-patch ...

Read More »

Post-hoc tracing using a debugger

java-logo

Once nice little features of most debuggers that I have been exercising recently is the ability to log information on a breakpoint. This can be a really useful was to understand code without having to modify it is involve byte code modification. Let’s consider this very trivial and inefficient implementation of a function to return the n’th number in the ...

Read More »

Lambda, will it serialize?

java-interview-questions-answers

So I have been ponder an enhancement required on the Tyrus project that would allow a user to broadcast to a subset of client connected to a URL across a cluster of machines. There are various way of doing this; but since I was playing with JDK 8 this problem definitely looked like a nail.   To this end I ...

Read More »

Write an auto-debugger to catch Exceptions during test execution

java-logo

Previously I have stated that there are some exceptions you would always want to keep an debugger breakpoint on for. This help prevents code rotting away without you noticing – sometimes masking a different problem. If you take this seriously then it is a good idea to extend this idea to you automated testing; but coming up with a comprehensive ...

Read More »

Almost named method arguments in JDK 8

java-logo

Sometimes it would be really nice to have named method parameter in Java, this doesn’t look likely for a long while but there is always another little work around, for example using a builder pattern to get similar behaviour, that will bridge the gap for a little bit. It occurred to me that using the Lambda support in JDK 8 ...

Read More »
Do you want to know how to develop your skillset and become a ...

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!
Get ready to Rock!
To download the books, please verify your email address by following the instructions found on the email we just sent you.

THANK YOU!

Close