Tag Archives: ejb

WebSocket endpoint as Singleton EJB

By default … … a WebSocket implementation creates a new (server) endpoint instance per client. In case you need a single instance, you can implement this using a custom ServerEndpointConfig.Configurator (by overriding the getEndpointInstance method) The catch: you might have to sacrifice some … Continue reading

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

JAX-RS, JWT & a pinch of JSR 375

This is another version of my previous blog on JAX-RS and JWT which includes a pinch of Java EE Security API (new JSR in Java EE 8). In case you are completely new to JSR 375, please jump to the last … Continue reading

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

Video Blog: Automated Retry In Java EE applications

The folks at Webucator have converted one of my previous blog posts (about automatically retrying operations in Java EE applications using Interceptors) into a video tutorial. Personally, I tend to stick to text only blogs due to lack of time … Continue reading

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

Implementing auto retry in Java EE applications

Initially, I wanted to call this blog – ‘Flexible timeouts with interceptor driven retry policies‘ – but then I thought it would be too ‘heavy’. This statement, along with the revised title should (hopefully) give you an idea of what … Continue reading

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

RESTful timers in Java EE

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. … Continue reading

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

Quick tip: Exception handling in Message Driven Beans

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 … Continue reading

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

Timeout policies for EJBs : how do they help…?

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 … Continue reading

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

Valid CDI scopes for Session (EJB) beans

CDI enriches the EJB specification (Session beans to be specific) by providing contextual life cycle management. Session beans are not ‘contextual’ instances in general. If you are comfortable with CDI in general, the idea of ‘being contextual’ should be pretty … Continue reading

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

Do you really understand @WebService ?

SOAP web services are not cutting edge technology by any means – although it still has it’s place, REST based web services are offering tough competition. Anyway – this is definitely not a REST vs SOAP post ! I have … Continue reading

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

MDB != JMS and vice-versa

Basics A Message Driven Bean (further referred to as MDB) is just another EJB like Stateless, Stateful or a Singleton. It’s specified using the @MessageDriven annotation. MDBs are used for asynchronous message processing They are similar to Stateless EJBs since … Continue reading

Posted in Java, Java EE | Tagged , , , , , , | 1 Comment