Академический Документы
Профессиональный Документы
Культура Документы
Roberto Chinnici
Sun Microsystems, Inc.
2940
2
Agenda
> Java EE Platform evolution
> Them e and features
> Com ponents (JSRs)
> Tim eline
> Get involved!
> The Great Web Profile Poll
3
Ease of Development Focus
Major Revamp of Programming Model
Java EE 5 EJB™ 3.0 support for POJOs means less to
learn, less to code and less to maintain
New Java™ Persistence API makes object /
relational mapping cleaner and easier
New and updated W eb Services (JAXW S 2.0
and JAXB 2.0) simplifies SOA implementation
JavaServer™ Faces 1.2 facilitates building
W eb 2.0 Applications with AJAX
Annotations often eliminate the need for
deployment descriptors
Supported by NetBeans™ 5.5 Enterprise
Pack
Get the SDK:
http://java.sun.com /javaee/downloads/
4
Java EE 5 Implementations
5
Rightsizing
=
Flex ibility, Focus, Sim plification
7
Rightsizing Explained
> Enable flex ibility at development and deployment
> Make it possible to focus on specific classes of
applications
> Simplify by removing rarely used or superseded APIs
8
Profiles
> Rules defined by the Java EE Platform spec
> Profiles can be
– proper subsets
– proper supersets
– overlapping (drop som ething, add som ething
else)
> Web Profile defined right away
> Other profiles follow regular JCP process
10
Pruning
> Make som e com ponents optional
> Strong signal for all new developm ent work
> Sam e rules proposed by Java SE
– “pruned now, optional in nex t release”
> Pruning candidates:
– JAX- RPC, EJB Entity Beans
– JAXR, JSR- 88
11
Extensibility
> Em brace open source libraries and fram eworks
> Create a level playing field
> Enable sim ple pluggability of technologies
> Scripting as a first- class citizen
12
JAX- RS Sample
import javax .ws.rs.*;
import org.apache.abdera.model.*;
@Pat h("act ivit ylog")
@ProduceMime("applicat ion/ atom+ x ml")
public class ActivityLog {
@GET
public Feed get Feed() {...}
@GET @Path("{id}")
public Ent ry get Ent ry(@Pat hParam("id") St ring id) {...}
}
14
EJB 3 .1
> Singletons
> Optional local interfaces
> Sim plified packaging in web apps
> Application startup/ shutdown events
> Calendar- based tim ers
> Global JNDI nam es
> EJB “Lite”
15
EJB 3 .1 Sample (1 )
@St artup
@Singlet on
public class SingleBean {
@Post Const ruct
public void onStartup() {
... application init ialization code goes here ...
}
EJB 3 .1 Sample (2 )
@St at eless
public class TimerBean {
@Schedule(dayOfWeek= ”Sun”)
public void onSunday() {
... periodically do some work ...
}
}
17
EJB 3 .1 Sample (3 )
@St at eless
public class HelloWorldBean / * no int erface */ {
public St ring hello(String name) {
ret urn “hello, “ + name;
}
}
hello.hello(“David”);
18
Other Components
> Java SE 6 underneath
> Point updates:
– JAX- WS 2.2
– JSR- 109 1.3
– JSP 2.2
> Com pleted JSRs:
– JSR- 196
– JAXB 2.2
21
Timeline
> June 2007 Ex pert group form ed
> Q3 2008 Public draft
> Q4 2008 Proposed final draft
> Q2 2009 Final release
22
Participate!
> Early/ public drafts available for m any of the specs
> Send feedback
> Contribute to the GlassFish im plem entation
> Use TP2, blog about it
23
GlassFish V3
> Open source im plem entation of Java EE 6
> Fully m odular, ex tensible
> OSGi R4 based
> Sm all footprint, fast startup
> Multiple containers, including JRuby, Groovy
24
Java.net Poll
> 1. A sm all set of JSRs
Q&A
Roberto Chinnici
http:/ / weblogs.java.net/ blog/ robc/
Sun Microsystems, Inc. roberto.chinnici@sun.com