Tag Archives: concurrency

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

Using CDI with Java EE Concurrency Utilities

This blog post explores usage of CDI along with Java EE Concurrency Utilities – specifically using CDI beans as managed tasks. Here is the sample application on Github Lets begin with a quick overview Java EE Concurrency Utilities provides APIs … Continue reading

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

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 , , , , | 3 Comments

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

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

EJB 3.x : Lifecycle and Concurrency models (part 2)

This is the second post of the two part series. The first part covered the life cycle and the concurrency behavior of Stateful and Stateless EJBs. I’ll cover Singleton EJBs in this post The Singleton pattern is arguably the most used (some times misused … Continue reading

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

EJB 3.x : Lifecycle and Concurrency models (part 1)

Java EE component life cycle and concurrency related details might not be new for seasoned professionals, but it is something which can take time to sink in for beginners. As far as EJBs are concerned, understanding their life cycle (and related … Continue reading

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