Home » Tag Archives: JAX-RS

Tag Archives: JAX-RS

How To Stream/Serialize JPA Result As JAX-RS Response For Large Data

java-interview-questions-answers

There are times that retrieving a large data set through JPA is necessary (e.g. more than 1,000,000 records) and having them stuffed into a single instance of java.util.List is just risky (memory barrier). So, here’s a quick solution of how a JAX-RS REST resource end-point could still give us a timely Response without breaking the memory constrain through streaming or ...

Read More »

Java REST JAX-RS 2.0 – How To Handle Date, Time and Timestamp Data Types

java-interview-questions-answers

Be it X-Form-Urlencoded or JSON HTTP post to a REST resource end-point, there is no specific “data type” for date or time related data. Most developers will have these data posted as “String” or just simply convert them to Unix timestamp value (e.g. 1435061152). But, as developers implement more and more end-point methods, codes to parse of date, time and ...

Read More »

Using @Context in JAX-RS [part 1]

java-interview-questions-answers

JAX-RS provides the @Context annotation to inject a variety of resources in your RESTful services. Some of the most commonly injected components are HTTP headers, HTTP URI related information. Here is a complete list (in no specific order)           HTTP headers HTTP URI details Security Context Resource Context Request Configuration Application Providers Lets look at these ...

Read More »

Handling time outs in Async requests in JAX-RS

java-interview-questions-answers

JAX-RS 2.0 provides support for asynchronous programming paradigm, both on client as well as on the server end. This post which highlights the time out feature while executing asynchronous REST requests on server side using the JAX-RS (2.0) API Without diving into too many details here is a quick overview. In order to execute a method in asynchronous fashion, you ...

Read More »

Quick peek at JAX-RS request to method matching

java-interview-questions-answers

In this post, let’s look at the HTTP request to resource method matching in JAX-RS. It is one of the most fundamental features of JAX-RS. Generally, the developers using the JAX-RS API are not exposed to (or do not really need to know) the nitty gritty of the matching process, rest assured that the JAX-RS runtime churns out its algorithms ...

Read More »

RESTful Charts with JAX-RS and PrimeFaces

jsf-logo

Oftentimes, it is useful to utilize a chart for providing a visual representation of your data. PrimeFaces supplies charting solutions that make it easy to add visual representations of your data into web and mobile applications. If we couple the use of PrimeFaces charting components with RESTful web service data, we can create custom charts that scale well for both ...

Read More »

Simplifying JAX-RS caching with CDI

java-interview-questions-answers

This post explains (via a simple example) how you can use CDI Producers to make it a little easier to leverage cache control semantics in your RESTful services The Cache-Control header was added in HTTP 1.1 as a much needed improvement over the Expires header available in HTTP 1.0. RESTful web services can make use of this header in order ...

Read More »

JAX-RS 2.0 : Server side Processing Pipeline

java-interview-questions-answers

The inspiration for this post was the Processing Pipeline section in the JAX-RS 2.0 specification doc (Appendix C). I like it because of the fact that it provides a nice snapshot of all the modules in JAX-RS – in the form of a ready to gulp capsule !                 So I thought of ...

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