Jackson JSON Processor for Payara JAX-RS serialization/deserialization

Want to use Payara / Glassfish with JAX-RS and Jackson to serialize/deserialize objects to/from JSON? Pay extra attention as it might bite you as it had bit me. I was more than sure that Payara is using Jackson as JSON processor (I’ve checked pom.xml dependencies of Payara and found that Jackson 2.5.1 is defined there). Therefore, I started using all those nice @JsonProperty or @JsonAutoDetect annotations while scratching my head why is Payara ignoring them but still did “some” serialization using some defaults, i....

January 31, 2017 · 2 min

Asynchronous CDI Events

Few days ago, during our regular code review, one of my colleagues raised a question what would happen – and if it’s even possible – when a CDI Observer (so a method with parameter annotated @Observes) would be invoked multiple times at the same time for different event instances. In other words, after producing few events, is it possible that the following method will be processed by more than one thread at the same time:...

May 13, 2013 · 10 min

Java EE 7 -- JMS 2.0 With Glassfish v4

Java EE 7 has been recently accepted by the Executive Committee. This means that soon we should have Java EE 7 application servers available on the market. One of the specifications that constitutes Java EE 7 is JMS 2.0. Some interesting improvements were introduced since version 1.1. JMS has a lot of weird stuff like: Connection#createSession(boolean transacted, int acknowledgeMode) method. First method argument (transacted) defines if the session should be transacted....

May 9, 2013 · 5 min