Where can I find a list of all the reference implementations for Java EE 6? [closed]

Here’s an overview of all RI’s (and alternatives). Java Platform, Enterprise Edition 6 (Java EE 6) – JSR 316 Oracle Glassfish 3.x (RI) JBoss AS 6.x and 7.x IBM WebSphere 8.0 Java Architecture for XML Binding (JAXB) 2.2 – JSR 222 Oracle JAXB (RI, used in Glassfish 3) Oracle Metro Java API for XML-Based Web … Read more

Use Enum type as a value parameter for @RolesAllowed-Annotation

How about this? public enum RoleType { STUDENT(Names.STUDENT), TEACHER(Names.TEACHER), DEANERY(Names.DEANERY); public class Names{ public static final String STUDENT = “Student”; public static final String TEACHER = “Teacher”; public static final String DEANERY = “Deanery”; } private final String label; private RoleType(String label) { this.label = label; } public String toString() { return this.label; } } … Read more

Java EE 6 @javax.annotation.ManagedBean vs. @javax.inject.Named vs. @javax.faces.ManagedBean

First of all let me do some clarifications: Managed bean definition : generally a managed bean is an object that its life cycle (construction, destruction, etc) is managed by a container. In Java ee we have many containers that manage life cycle of their objects, like JSF container, EJB container, CDI container, Servlet container, etc. … Read more

How do CDI and EJB compare? interact?

It is currently indeed a bit confusing as there are now multiple component models in Java EE. They are CDI, EJB3 and JSF Managed Beans. CDI is the new kid on the block. CDI beans feature dependency injection, scoping and an event bus. CDI beans are the most flexible with respect to injection and scoping. … Read more

What is javax.inject.Named annotation supposed to be used for?

Use @Named to differentiate between different objects of the same type bound in the same scope. @Named(“maxWaitTime”) public long maxWaitTimeMs; @Named(“minWaitTime”) public long minWaitTimeMs; Without the @Named qualifier, the injector would not know which long to bind to which variable. If you want to create annotations that act like @Named, use the @Qualifier annotation when … Read more