Home » Author Archives: Abhishek Gupta

Author Archives: Abhishek Gupta

WebSocket Client API in Java EE 7

java-interview-questions-answers

In this post, let’s explore the less talked about Web Socket Client API and how to leverage it within a Java EE 7 container itself. Web Socket Server API rules The server side API of JSR 356 (Web Socket API for Java) is most commonly used for building Web Socket endpoint implementations. More often than not, from a client perspective, ...

Read More »

RESTful timers in Java EE

java-interview-questions-answers

In this post…. Whirlwind tour of EJB timers Working with EJB timers on the fly via simple REST interface with a sample implementation Update (14 July 2015) The front end for the application is now available on OpenShift. Since I am a front end novice, I assembled this HTML5 + AngularJS app with help from other sources :) So it ...

Read More »

Quick tip: Exception handling in Message Driven Beans

java-interview-questions-answers

Let’s do a quick review of exceptional handling with regards to Message Driven Beans. The entry point into a MDB is the overridden onMessage method. It does not provide any scope for throwing checked exceptions and as a result, you will need to propagate unchecked exceptions (subclass of java.lang.RuntimeException) from your code if you want to handle error scenarios. Types ...

Read More »

Types of JMSContext in JMS 2.0

java-interview-questions-answers

If you follow Java EE, the simplified API components in JMS 2.0 (Java EE 7) will not be unknown to you. One of the important interfaces which forms a part of the simplified API is the javax.jms.JMSContext interface. JMSContext can be categorized in to two types depending on how it’s instance is obtained and managed (life cycle) – Container managed ...

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 »

Timeout policies for EJBs : how do they help?

java-interview-questions-answers

EJB 3.1 introduced timeout related annotations as a part of its API. @AccessTimeout @StatefulTimeout Let’s quickly look at what they are and why are they important @AccessTimeout Specifies the time period after which a queued request (waiting for another thread to complete) times out. When your session bean instances are bombarded with concurrent requests, the EJB container ensures sanity by ...

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 »

Approval specific web services in Oracle IDM

java-interview-questions-answers

This is quick post with regards to the web service endpoints which are leveraged by OIM and SOA in the context of an approval related scenario – basic stuff, but can be useful for beginners. Oracle IDM integrates with and leverages the SOA suite for approval related features (SOA is quite rich to be honest and is utilized as the ...

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 »

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 »
Want to take your Java Skills to the next level?
Grab our programming books for FREE!
  • Save time by leveraging our field-tested solutions to common problems.
  • The books cover a wide range of topics, from JPA and JUnit, to JMeter and Android.
  • Each book comes as a standalone guide (with source code provided), so that you use it as reference.
Last Step ...

Where should we send the free eBooks?

Good Work!
To download the books, please verify your email address by following the instructions found on the email we just sent you.