guilhebl

Philosophical writings about programming and technology

JPA - Find all - Generic method

You might want to implement some generic template type methods for your domain model superclass in order to avoid duplicating boilerplate code for several classes, one example is the findAll method, in certain scenarios you...
Read more...
09 April 2014

Domain Model Generic Superclass

There is a common JavaEE pattern for enterprise domain modeling called Domain Generic Superclass which is one specific case of the Design Patter Template: "With the Template method pattern this happens at compile-time by subclassing...
Read more...
09 April 2014

Portable global JNDI name

Default syntax Per the EJB 3.1 Specification, each session bean is assigned a unique JNDI name within the java:global namespace. java:global[/<app-name>]/<module-name>/<bean-name> The portion is only present if the application is deployed as an .ear file....
Read more...
06 April 2014

Managing your UI dependencies with Bower

Bower - a UI dependency management tool Building UI related code has evolved during last years due to the introduction of new modern Javascript frameworks and to the new possibilities of usage that the javascript...
Read more...
06 April 2014

Evolution of the Java EE platform

Java SE The evolution of the Java Enterprise Edition (JavaEE) platform is closely related to the evolution of the Java language and the Java Standard Edition(JavaSE) API itself. Starting from the first Java version the...
Read more...
05 April 2014

@Inject vs @EJB and Direct JNDI Lookup

Three different ways to get an EJB reference in Java 1: @Inject Preferrable way as for JavaEE6 and beyond, CDI api gives greater flexibility for your java classes and it's nowadays considered the standard way...
Read more...
01 April 2014

Creating a JAAS JDBC Authentication Realm in Glassfish

Why JAAS The objective of using JAAS is to separate the concerns of user authentication so that they may be managed independently. You can let your Application Server handle the authentication logic using JAAS JDBC...
Read more...
01 April 2014

Building RESTful webservices with JAX-RS

Prerequisites To start deploying your JAX-RS application you need to install: Java JDK (1.6 or later) Glassfish (4.0 or later) or any other JavaEE server which implements Java EE 6 or 7. Download java latest...
Read more...
27 March 2014