2
The following/preceding is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any
material, code, or functionality, and should not be relied upon in making purchasing decisions.
The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of
Oracle.
3
Java EE for the Cloud
• Tighter requirements for resource and state management
• Better isolation between applications• Potential standard APIs for NRDBMS, caching, other• Common management and monitoring interfaces• Evolution, not revolution
4
Better Packaging for the Cloud
• Apps are versioned• Multiple versions can coexist• Must deal with data versioning, upgrades, etc.• Need ability to specify QoS properties• Apps both expose and connect to services
5
Cloud Platform
Application
Virtualization Layer
State Management
JavaService
PersistenceService
QueueingService …
6
Cloud Platform
ApplicationCodeModule
CodeModule Schema Migration QoS
InformationSecurityCodeModule …
Virtualization Layer
State Management
JavaService
PersistenceService
QueueingService …
7
Cloud Platform
Application Application Application
Virtualization Layer
State Management
JavaService
PersistenceService
QueueingService …
8
Cloud Platform
Application Application Application Application Application
Virtualization Layer
State Management
JavaService
PersistenceService
QueueingService …
9
Cloud Platform
Managed Environment
Application Application Application
Virtualization Layer
State Management
JavaService
PersistenceService
QueueingService …
Application Application
10
DemoGlassFish Virtual Edition
GroupMaster
Libvirt
PC - 1
LibVirt
PC - n
LibVirt
VM1 VM2 VM3
PC - 1
LibVirt
VM1 VM2 VM3
11
Modularity
• Build on Java SE 8 work• Applications made of modules• Dependencies are explicit• Versioning is built-in• Classloaders straightened out
13
Modular Applications
j1demo.app
requirestwitter-client-2.3.0
j1demo-web-1.0.3
j1demo-persist-1.4.0
14
Modular Applications
j1demo.app
javaee-web-7.0
requires
twitter-client-2.3.0
j1demo-persist-1.4.0
j1demo-web-1.0.3
15
Modular Applications
j1demo.app
requires
requires
javaee-web-7.0
twitter-client-2.3.0
jax-rs-2.0jpa-2.1
j1demo-web-1.0.3
j1demo-persist-1.4.0
16
Modular Applications
j1demo.app
javaee-web-7.0
implements
twitter-client-2.3.0
jax-rs-2.0jpa-2.1
…………
gf-appserver-4.0.1
j1demo-web-1.0.3
j1demo-persist-1.4.0
17
Modular Applications
j1demo.app
gf-appserver-4.0.1
implements
eclipselink-2.1.3
jersey-2.0.5
javaee-web-7.0
implements
twitter-client-2.3.0
jax-rs-2.0jpa-2.1
…………
j1demo-web-1.0.3
j1demo-persist-1.4.0
18
Modular Applications
j1demo.app
jersey-2.1.1
javaee-web-7.0
twitter-client-2.4.0 jax-rs-2.1
jpa-2.1
…………
gf-appserver-4.0.1eclipselink-2.1.3
j1demo-web-1.0.3
j1demo-persist-1.4.0
19
Modular Applications
jersey-2.1.5
javaee-web-7.0
twitter-client-2.4.0
jax-rs-2.1jpa-2.1
…………
gf-appserver-4.1.5eclipselink-2.1.3
jersey-2.1.1
jax-rs-2.1
j1demo.app
j1demo-web-1.0.3
j1demo-persist-1.4.0
21
Web Socket Sample (w/Grizzly WebSocket API)
public class ChatApplication extends WebSocketApplication<ChatWebSocket> { protected ChatWebSocket createWebSocket(Connection c, ServerWebSocketMeta m) { return new ChatWebSocket(c, m, this); }
public void onMessage(ChatWebSocket s, DataFrame frame) { String msg = frame.getAsText(); s.sendJson(s.getUser(), msg); }
public void onClose(ChatWebSocket s) { s.sendJson(“system”, s.getUser() + “ left the chat”); }}
22
Async Web Sample (w/Atmosphere)
@Path("/{topic}")@Produces("text/plain;charset=ISO-8859-1")public class PubSub { private @PathParam("topic") Broadcaster topic;
@GET @Suspend public Broadcastable subscribe() { return new Broadcastable("",topic); }
@POST @Broadcast @Consumes(MediaType.APPLICATION_FORM_URLENCODED) public Broadcastable publish( @FormParam("message") String message) { return new Broadcastable(message,topic); }}
23
JAX-RS 2.0 Client API (w/Jersey)
WebResource r = Client.create().resource("http://example.com");WebResource content = r.path("containers").path("quotes");content.path("1") .type(MediaType.TEXT_PLAIN) .put("Something is rotten in the state of Denmark");
ClientResponse response = content.path("1") .header("If-Modified-Since", lastModified) .header("If-None-Match", etag) .get(ClientResponse.class);
assertEquals(Response.Status.NOT_MODIFIED, response.getResponseStatus());
24
JSF 2.2
• HTML5 support– Semantic tags, browser feature detection– Use of HTML5 by components– Audio and video
• JSR-276 (tool support)• Mobile renderkits• Page resolver and application context manager API• Performance
25
JMS 2.0
• Much needed update!• Ease of development makeover• Better integration with application servers• Standardize some common vendor extensions
26
JPA 2.1 Candidate Features
• Converters / custom types• “Fetch” plans / profiles• Additional mapping metadata• User-defined naming strategies• More flexibility in use of generated values• Immutable attributes; readonly entities• More flexible XML descriptors• Additional event listeners and callbacks• Improved control of persistence context synchronization• Support for dynamic definition of persistence unit• Extension of Metamodel API to ORM• Methods for dirty detection• Additional unwrap methods
• Support for stored procedures• Additional built-in functions• Database and vendor function invocation support• Downcasting• Outer joins with ON conditions• Update and delete criteria queries• Mapping between JPQL and criteria queries• Improved result type mapping for native queries
27
Java EE 7 Platform Roadmap
• JAX-RS 2.0 and JPA 2.1 filed few months back• Java EE 7, EJB 3.2 filed last week.• Target completion in 2012