Author Archives: Abhishek

About Abhishek

Loves Java EE, distributed KV stores and messaging systems. Frequently blogs at abhirockzz.wordpress.com as well as simplydistributed.wordpress.com. Oh, I have also authored a few (mini) books, articles, Refcards etc. :-)

New release: REST assured with JAX-RS

    REST assured with JAX-RS is now updated for JAX-RS 2.1 – a new chapter has been added to cover its new features. You can read it on Gitbook or grab it via Leanpub Cheers! Advertisements

Posted in Java, Java EE | Tagged , , , , , | Leave a comment

Handling custom objects with JAX-RS SSE API

Information sent using the JAX-RS 2.1 SSE support (in Java EE 8) does not only have to be of String type – it supports Java primitives (Integer , Long etc.), JSON-B & JAX-B annotated types as well as custom objects whose encoding process (Java object to … Continue reading

Posted in Java, Java EE | Tagged , , , , , | Leave a comment

CompletionStage support in server-side JAX-RS

JAX-RS 2.1 (part of Java EE 8) now supports returning a CompletionStage to mark the request as eligible for asynchronous processing. This is in addition to the AsyncResponse API which has been available since JAX-RS 2.0 (Java EE 7) Even the Client API has … Continue reading

Posted in Docker, Java, Java EE | Tagged , , , , | Leave a comment

JAX-RS 2.1 SSE Client API example using Glassfish 5 on Docker

Along with the Server API for SSE, JAX-RS 2.1 (part of Java EE 8) also has an equivalent client side API Here is a quick peek – you can grab the project from Github To summarize we use a @Singleton EJB … Continue reading

Posted in Java EE | Tagged , , , , , , , | Leave a comment

Try out JSON-B 1.0, JPA 2.2 using Java EE 8 on Glassfish 5 & Docker

Glassfish 5 Build 11 is now available – with support for many of the Java EE 8 specifications e.g. JAX-RS 2.1, JPA 2.2, JSON-B 1.0 etc. For more details check out the Aquarium space. This blog covers test driving couple of new additions in this build – … Continue reading

Posted in Java, Java EE | Tagged , , , , , , | Leave a comment

CDI (2.0) Async Events

Glassfish 5 builds for Java EE 8 are rolling along… here is another Docker based example on Github. This time it’s asynchronous events in CDI 2.0 (JSR 365) Steps Just follow the README… just a bunch of docker commands to get … Continue reading

Posted in Docker, Java, Java EE | Tagged , , , , , , , , , | Leave a comment

Java EE + Debezium

I just published a post – Debezium test drive. It uses Kafka and Java EE… check it out if this interests you Cheers!

Posted in Java, Java EE | Tagged , , , , , , | Leave a comment

Glassfish 5: JAX-RS SSE quickstart

Latest Glassfish 5 build 08 was announced today which includes JAX-RS 2.1 (JSR 370) integration. I am fond of Server Sent Events (SSE), so let’s take it for a test ride – here is a Docker based quick start on Github … Continue reading

Posted in Java, Java EE | Tagged , , , , , | 2 Comments

Validate JAX-RS query parameters

  It’s easy to validate parameters in JAX-RS using filters – ContainerRequestFilter to be specific. There are other options at your disposal e.g. using (CDI or EJB) interceptors, or injecting (HttpServletRequest using @Context) Scenario – Validate query parameter passed in by the … Continue reading

Posted in Java, Java EE | Tagged , | Leave a comment

Accessing HTTP Session in WebSocket endpoint

It’s possible to obtain a reference to the HttpSession within a WebSocket application using a custom implementation of ServerEndpointConfig.Configurator Here is an example application on Github Steps… Override the modifyHandshakeRequest method call the getHttpSession method on the HandshakeRequest object which is passed into the … Continue reading

Posted in Java EE | Tagged , , , , | Leave a comment