This post is about using JSON Web Token (JWT) with JAX-RS It features; A real quick intro to JWT Instructions for how to use it with JAX-RS (for authentication) with an example In addition, the post… Demonstrates contextual state/information sharing feature provided by JAX-RS Request Filters and usage of custom Security Context in JAX-RS Uses the jose4j library for JWT creation […]

Read more

This is a quick post which points out how to share contextual user-defined (custom) data between JAX-RS filters. Filter execution It is chain based: one filter gets executed after another Request filters are executed before Response filters If a filter throws an exception, the chain breaks and other filters are skipped i.e. an exception from a Request filter […]

Read more

JAX-RS 2.0 defines multiple ways using which server side filters and interceptors can be bound to their target components. Global Binding Named Binding Dynamic Binding Global Binding By default, JAX-RS filters and interceptors are bound to all the methods of resource classes in an application. That is, both request (pre and post) and response filters will […]

Read more

EJBs are not about XMLs and interfaces any more. From a Java EE developer standpoint, the real magic of EJBs lies in their annotation driven programming model. This is personified by the API layout which consists of 32 annotations. These are used by the the container to weave its magic at runtime. In other words, the container does […]

Read more

I have not dug into the Bean Validation specification into detail before, but one of the entries posted in the Payara issue tracker made me explore how the JAX-RS specification integrates/leverages the Bean Validation features Note: Bean Validation has been around since Java EE 6, but its integration with JAX-RS was materialized only in the latest […]

Read more

The contents of this post are derived from conversations on the Java EE 8 mailing lists with regards to JCache integration. There are a couple of threads One initiated by Arjan Tijms and is being continued here and the other one by Adam Bien Here are a bunch of points which seemed to have to […]

Read more

JMS 2.0 (part of the Java EE 7 Platform) introduced a lot of nice features. One of these was the ability to declare JMS resources for automatic deployment. Pre-Java EE 7 you would… Inject Connection Factory using @Resource. Lookup Destination (Queue/Topic) using @Resource. Pull out the Session object and use it to create the Message, Message […]

Read more

In this article, I’ll be experimenting with Ozark, the Reference Implementation for MVC 1.0 which is a candidate for inclusion in the upcoming Java EE 8 platform release. The code is available on my GitHub account (just in case!) Enjoy!

Read more

History I think it’s important to take a look at the evolution of Interceptors in Java EE because of the simple fact that it started as an EJB-specific item and later evolved into a separate spec which is now open for extension by other Java EE specifications. Version 1.0 Interceptors were first introduced in EJB […]

Read more

Click here for Part One of this series. Work on Java EE 8 is still in the initial phases and expected to pick up the pace in the upcoming year. We can expect to see the completion of Expert Group formation, more discussions about use cases and features, lots of JIRAs, and draft versions of various […]

Read more