The Java EE 6 - Using Scopes

Using Scopes

For a web application to use a bean that injects another bean class, the bean needs to be able to hold state over the duration of the user’s interaction with the application. The way to define this state is to give the bean a scope. You can give an object any of the scopes described in following table, depending on how you are using it.


Scope
Annotation
Duration
Request
@RequestScoped
A user’s interaction with a web application in a single HTTP request.
Session
@SessionScoped
A user’s interaction with a web application across multiple HTTP requests.
Application
@ApplicationScoped
Shared state across all users’ interactions with a web application.
Dependent
@Dependent
The default scope if none is specified; it means that an object exists to serve exactly one client (bean) and has the same lifecycle as that client (bean).
Conversation
@ConversationScoped
A user’s interaction with a JavaServer Faces application, within explicit developer-controlled boundaries that extend the scope across multiple invocations of the JavaServer Faces lifecycle. All long-running conversations are scoped to a particular HTTP servlet session and may not cross session boundaries.
The first three scopes are defined by both JSR 299 and the JavaServer Faces API. The last two are defined by JSR 299.

Java EE 7 Approved!

Java EE 7 is officially done as of this week. Linda DeMichiel just announced on the Oracle blog that the Java EE 7 Platform JSR, as well as the more compact Web Profile JSR for this EE version, have both been approved by the Java Community Process.

Here's the complete list of 14 JSRs and 9 MRs (maintenance releases):

JSRs:

  • Java Platform, Enterprise Edition 7 (JSR 342
  • Concurrency Utilities for Java EE 1.0 (JSR 236) (New to JEE!) 
  • Java Persistence 2.1 (JSR 338
  • JAX-RS: The Java API for RESTful Web Services 2.0 (JSR 339
  • Java Servlet 3.1 (JSR 340
  • Expression Language 3.0 (JSR 341
  • Java Message Service 2.0 (JSR 343
  • JavaServer Faces 2.2 (JSR 344
  • Enterprise JavaBeans 3.2 (JSR 345
  • Contexts and Dependency Injection for Java EE 1.1 (JSR 346
  • Bean Validation 1.1 (JSR 349
  • Batch Applications for the Java Platform 1.0 (JSR 352) (New to JEE!) 
  • Java API for JSON Processing 1.0 (JSR 353) (New to JEE!) 
  • Java API for WebSocket 1.0 (JSR 356) (New to JEE!) 

MRs:
  • Web Services for Java EE 1.4 (JSR 109
  • Java Authorization Service Provider Contract for Containers 1.5 (JACC 1.5) (JSR 115
  • Java Authentication Service Provider Interface for Containers 1.1 (JASPIC 1.1) (JSR 196
  • JavaServer Pages 2.3 (JSR 245
  • Common Annotations for the Java Platform 1.2 (JSR 250
  • Interceptors 1.2 (JSR 318
  • Java EE Connector Architecture 1.7 (JSR 322
  • Java Transaction API 1.2 (JSR 907
  • JavaMail 1.5 (JSR 919
Source: Dzone

Modern Enterprise Application Configuration with Spring

About video:
"The Spring family projects have long been important tools in the enterprise Java developer's toolkit. Often though, Spring is characterized as being too dependent on XML. This session will take a deep look at how Java applications can be configured entirely in code, eliminating Spring-, JPA- and even Servlet-related XML. We'll also look beyond the core Spring Framework and explore how higher-level Spring projects like Spring Data and Spring Integration take advantage of code based configuration."

Source: Vimeo

How to Create a Java EE 6 Application with JSF 2, EJB 3.1, JPA, and NetBeans IDE 6.8

"The architecture of the application is shown in the above diagram, where it is organized into various tiers: Presentation, Business, Data Access and Data, where each has an important role to play and is segregated from one another."

Writed by Christopher Lam in DZone

Java 1.8 (JDK8): What's new?

New features in Java 1.8
  • Lambda expressions
  • Remove the Permanent Generation
  • Small VM
  • Parallel Array Sorting
  • Bulk Data Operations for Collections
  • Define a standard API for Base64 encoding and decoding
  • New Date & Time API
  • Provide stronger Password-Based-Encryption (PBE) algorithm implementations in the SunJCE provider
Full article in Ttux.net

SQL? NoSQL? NewSQL? What's a Java Dev to Do?

ETE 2012 - Chris Richardson - SQL? NoSQL? NewSQL?!? What's a Java developer to do? from Vimeo

JSF - Redirect to other page

String url = "../folder/page.jsf";
FacesContext.getCurrentInstance().getExternalContext().redirect(url);

Powered by Blogger