• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
What’s new in Java SE, EE, ME, Embedded world & new Strategy
 

What’s new in Java SE, EE, ME, Embedded world & new Strategy

on

  • 1,165 views

In this presentation, I have presented the history of Java EE from v1.0 to our latest Java EE 7.0, what is new and a brief introduction to each minor and major change to existing JSRs, and new JSRs ...

In this presentation, I have presented the history of Java EE from v1.0 to our latest Java EE 7.0, what is new and a brief introduction to each minor and major change to existing JSRs, and new JSRs with code to show simplifications and enhancements.

Also talked about our future Java EE 8 components alongside JDK 8 with major updates and JSRs, profiling concepts and more.

In addition, I have explained the IoT concepts with demo. Intro to the importance of Java Embedded systems world. With intro to Raspberry Pi and dukePad.

Agenda:
http://egjug.org/page/java_ee_7_8_and_beyond

Statistics

Views

Total Views
1,165
Views on SlideShare
579
Embed Views
586

Actions

Likes
1
Downloads
12
Comments
0

31 Embeds 586

http://tamanmohamed.blogspot.com 265
http://tamanmohamed.blogspot.co.uk 127
http://tamanmohamed.blogspot.in 34
http://tamanmohamed.blogspot.de 24
http://tamanmohamed.blogspot.com.br 17
http://tamanmohamed.blogspot.ru 16
http://tamanmohamed.blogspot.fr 15
http://tamanmohamed.blogspot.ch 12
http://tamanmohamed.blogspot.it 10
http://tamanmohamed.blogspot.com.es 9
http://tamanmohamed.blogspot.ca 5
http://tamanmohamed.blogspot.co.at 5
http://tamanmohamed.blogspot.be 5
http://tamanmohamed.blogspot.hk 5
http://tamanmohamed.blogspot.cz 4
http://tamanmohamed.blogspot.nl 4
http://tamanmohamed.blogspot.pt 4
http://tamanmohamed.blogspot.gr 3
http://tamanmohamed.blogspot.com.au 3
http://tamanmohamed.blogspot.ae 3
http://tamanmohamed.blogspot.mx 3
http://tamanmohamed.blogspot.com.ar 2
http://tamanmohamed.blogspot.jp 2
http://tamanmohamed.blogspot.se 2
http://www.tamanmohamed.blogspot.fr 1
http://tamanmohamed.blogspot.sk 1
http://tamanmohamed.blogspot.hu 1
http://prlog.ru 1
http://tamanmohamed.blogspot.ro 1
http://www.linkedin.com 1
http://tamanmohamed.blogspot.ie 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    What’s new in Java SE, EE, ME, Embedded world & new Strategy What’s new in Java SE, EE, ME, Embedded world & new Strategy Presentation Transcript

    • Mohamed Taman S y s t e m s A r c h i t e c t & D e s i g n S u p e r v i s o r, J C P, J C P E x e c u t i v e C o m m i t t e e , E x p e r t G r o u p h t t p : / / a b o u t . m e / m o h a m e d t am a n
    • About Me • A Systems Architect & Design supervisor @ “e-finance”. • JCP, Executive Committee, Expert Group Member, responsible for JSRs revision, evaluation, RI testing and evangelist the new technologies specifications & JCP process standardization. • Board member of “Oracle Egypt Architect Club”. • A frequent Speaker (JavaOne, Devoxx, Oracle Days, Tunis JUG Day, jMaghreb, JEEConf & JDC... etc.), • Consultant, Trainer, Blogger, & articles writer, books author and tech. reviewer. • Regularly posts on my blog , and also on DZone & JCG community.
    • Catch Me
    • Agenda • What is Java EE 7? • Main aim and objectives of Java EE 7. • What is new in Java EE 7? • HTML5 support. • IDEs support. • Glassfish v4.0 as RI. • Netbeans IDE. • Adopt-a-JSR organization on Github. • What's new • The new Strategy
    • Java EE Past, Present, & Future Java EE 7 Java EE 6 Java EE 5 J2EE 1.4 J2EE 1.2 J2EE 1.2 Servlet, JSP, EJB, JMS, RMI Dec 1999 CMP, Connector Architecture Sep 2001 Web Services Mgmt, Deployment, Async Connector Nov 2003 Ease of Development, EJB 3, JPA, JSF, JAXB, JAX-WS, StAX, SAAJ Pruning, Extensibility Ease of Dev, CDI, JAX-RS JMS 2, Batch, TX, Concurrency, Interceptor, WebSocket, JSON JAX-RPC, CMP/ BMP, JSR 88 Web Profile Web Profile JAX-RS 2 Servlet 3, EJB 3.1 Lite May 2006 Dec 2009 Jun 2013
    • Java EE 6 - Achievements • 50,000,000 + downloads • #1 choice for enterprise developers • #1 application development platform • Fastest adoptions of any Java EE release – 18 complaint servers
    • Java EE 6 – Main Features • Web Profile • EJB packaged in war • Optional web.xml • Type-safe dependency injection • CDI Events • JSF standardizing on facelets • @Schedule
    • What is new in Java EE 7? MA I N CO MP O NENT S
    • Main aim and objectives of Java EE 7
    • Java EE 7 – Candidate JSRs Common Annotations 1.1 EL 3.0 Concurrency Utilities (JSR 236) Major Release New Servlet 3.1 Interceptors 1.1 Managed Beans 1.0 Connector 1.6 JSF 2.2 JPA 2.1 CDI 1.1 EJB 3.2 JTA 1.2 JMS 2.0 Bean Validation 1.1 Portable Extension s JSP 2.2 Updated JAX-RS 2.0 Batch Applications (JSR 352) Java API for JSON (JSR 353) Java API for WebSocket (JSR 356)
    • Active JSRs • JSR 342: Java EE 7 Platform • JSR 345: Enterprise JavaBeans 3.2 • JSR 338: Java API for RESTful Web Services 2.0 • JSR 346: Contexts and Dependency Injection 1.1 • JSR 339: Java Persistence API 2.1 • JSR 349: Bean Validation 1.1 • JSR 340: Servlet 3.1 • JSR 236: Concurrency Utilities for Java EE 1.0 • JSR 341: Expression Language 3.0 • JSR 343: Java Message Service 2.0 • JSR 352: Batch Applications for the Java Platform 1.0 • JSR 344: JavaServer Faces 2.2 • JSR 353: Java API for JSON Processing 1.0 • JSR 356: Java API for WebSocket 1.0
    • Java EE 7 new Features
    • Java EE Web Profile Enhancements • The Java Enterprise Edition Web Profile was introduced in Java EE 6 • Most Web applications have significant requirements in the areas of transaction management, security, and persistence. • but are not supported by standalone servlet containers. • Web Profile is provided with pre-installed, pre-integrated, fully tested Web infrastructure features. • The Java EE 7 Web Profile adds support for HTML5 with WebSockets, JSON, JAX-RS 2.0, and more.
    • JSR 343: Java Message Service 2.0 • API modernization using dependency injection • Delivery delay, async send, MDB alignment, JMS resource definition • Fixes, clarifications
    • JMS 2 - Old API @Resource(lookup = "java:global/jms/demoConnectionFactory") ConnectionFactory connectionFactory; @Resource(lookup = "java:global/jms/demoQueue") Queue demoQueue; public void sendMessage(String payload) { try { Connection connection = connectionFactory.createConnection(); try { Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); MessageProducer messageProducer = session.createProducer(demoQueue); TextMessage textMessage = session.createTextMessage(payload); messageProducer.send(textMessage); } finally { connection.close(); } } catch (JMSException ex) { Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, ex); } }
    • JMS 2 Simplified API @Inject private JMSContext context; @Resource(mappedName = "jms/inboundQueue") private Queue inboundQueue; public void sendMessage (String payload) { context.createProducer().send(inboundQueue, payload); }
    • JMS 2/Java EE 7 JMS Resource Definition @JMSConnectionFactoryDefinition( name="java:global/jms/demoConnectionFactory", interfaceName= "javax.jms.ConnectionFactory", description="ConnectionFactory to use in demonstration") @JMSDestinationDefinition( name = "java:global/jms/demoQueue", description = "Queue to use in demonstration", interfaceName = "javax.jms.Queue", destinationName="demoQueue")
    • JMS 2/EJB 3.2 More Standard MDB Properties @MessageDriven(activationConfig = { @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"), @ActivationConfigProperty( propertyName = "destinationLookup", propertyValue = "jms/OrderQueue"), @ActivationConfigProperty( propertyName = "connectionFactoryLookup", propertyValue = "jms/MyConnectionFactory")}) public class OrderListener implements MessageListener { ... public void onMessage(Message message) { ... } ... }
    • Why WebSocket? • HTTP is half duplex • HTTP is verbose • Hacks for Server Push • Polling • Long Polling • Comet/Ajax • Complex, Wasteful, Inefficient
    • WebSocket to rescue • TCP based, bi-directional, full-duplex messaging • Capable of sending both UTF-8 string and binary frames in any direction at the same time • Operating from a single socket across the web • As part of HTML5, the application of the client interface will become native to all modern browsers • To establish a Web Socket connection, the browser or client simply makes a request to the server for an upgrade from HTTP to a Web Socket
    • “Reducing kilobytes of data to 2 bytes…and reducing latency from 150ms to 50ms is far more than marginal. In fact, these two factors alone are enough to make Web Sockets seriously interesting to Google.”
    • JSR 356: Java API for WebSocket 1.0 • Higher level API for WebSocket • Both client and server-side (Java SE and Java EE) • Both declarative and programmatic
    • Java API for WebSocket Connection Life Cycle @ServerEndpoint(”/chat”) public class ChatServer { Set<Session> peers = ... @OnOpen public void onOpen(Session peer) { peers.add(peer); } @OnClose public void onClose(Session peer) { peers.remove(peer); } ...
    • Java API for WebSocket WebSocket Communication ... @OnMessage public void message(String message, Session client) throws IOException { for (Session session : peers) { if (!session.equals(client)) { session.getRemote().sendObject(message); } } } }
    • JSON (JavaScript Object Notation) • JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. • It is easy for machines to parse and generate. • It is based on a subset of the JavaScript Programming Language, Standard ECMA-262 3rd Edition - December 1999. • JSON is a text format that is completely language independent but uses conventions that are familiar to programmers { “employee": [ { "firstName":“MOh" , "lastName":“Taman" }, { "firstName":"Anna" , "lastName":"Smith" }, { "firstName":"Peter" , "lastName":"Jones" } ] }
    • Why we need another API? • JSON has become a defacto data transfer standard specially for RESTful Web Services. • Java applications use different implementations to consume and process JSON data. • There should be standardized Java API for JSON so that applications do not need to bundle the implementation libraries.
    • JSR 353: Java API for JSON Processing 1.0 • API to parse, generate, transform, query JSON • Binding JSON to Java objects forthcoming. • API to parse and generate JSON • Streaming API • Low level efficient way to parse/generate JSON • Provide Pluggability for parser/generator • Object Model • similar to DOM and StAX • Simple, Easy-to-use high-level API • Implemented on top of Streaming API
    • Java API for JSON Processing Writing JSON (Object Model API) JsonArray value = Json.createArrayBuilder() .add(Json.createObjectBuilder() .add("type", "home") .add("number", "212 555-1234") ) .add(Json.createObjectBuilder() .add("type", "fax") .add("number", "646 555-4567") ) .build(); [ { "type": "home”, "number": "212 555-1234" }, { "type": "fax”, "number": "646 555-4567" } ]
    • Java API for JSON Processing Reading JSON (Streaming API) { "firstName": “Mohamed", "lastName": “Taman", "age": 25, "phoneNumber": [ { "type": "home", "number": "212 555-1234" }, { "type": "fax", "number": "646 555-4567" } ] } Event event = parser.next(); // START_OBJECT event = parser.next(); // KEY_NAME event = parser.next(); // VALUE_STRING String name = parser.getString(); // “Mohamed”
    • JSR 338: Java API for RESTful Web Services 2.0 • Client API • Message Filters & Entity Interceptors • Asynchronous Processing – Server & Client • Hypermedia Support • Content negotiation
    • JAX-RS 2 Client API // Get instance of Client Client client = ClientBuilder.newClient(); // Get customer name for the shipped products String name = client.target(“../orders/{orderId}/customer”) .pathParam(”orderId", ”10”) .queryParam(”shipped", ”true”) .request() .get(String.class);
    • JAX-RS 2 Logging Filter public class RequestLoggingFilter implements ContainerRequestFilter { @Override public void filter(ContainerRequestContext requestContext) { log(requestContext); // Non-wrapping => returns without invoking next filter } ... }
    • JSR 339: Java Persistence API 2.1 • The first spec to include new features is the JPA 2.1. The new features can be described with the following short list: • Schema Generation (Additional mapping metadata to provide better standardization) • Stored procedures • Unsynchronized persistence contexts • Entity converters • Multi-Tenancy (Table discriminator) • Custom types and transformation methods - Query by Example • Dynamic PU Definition • Fixes and enhancements
    • JPA 2.1 Schema Generation Properties • javax.persistence.schema-generation.[database|scripts].action “none”, “create”, “drop-and-create”, “drop” • javax.persistence.schema-generation.scripts.[create|drop]-target • javax.persistence.schema-generation.[create|drop]-script-source • javax.persistence.sql-load-script-source • javax.persistence.schema-generation.[create|drop]-source “metadata”, “script”, “metadata-then-script”, “script-then-metadata”
    • JPA 2.1 Stored Procedures @Entity @NamedStoredProcedureQuery(name="topGiftsStoredProcedure”, procedureName="Top10Gifts") public class Product { StoredProcedreQuery query = EntityManager.createNamedStoredProcedureQuery( "topGiftsStoredProcedure"); query.registerStoredProcedureParameter(1, String.class, ParameterMode.INOUT); query.setParameter(1, "top10"); query.registerStoredProcedureParameter(2, Integer.class, ParameterMode.IN); query.setParameter(2, 100); ... query.execute(); String response = query.getOutputParameterValue(1);
    • JTA 1.2 • Declarative transactions outside EJB • Transaction scope - @TransactionScoped
    • JTA 1.2 @Transactional Annotation @Inherited @InterceptorBinding @Target({TYPE, METHOD}) @Retention(RUNTIME) public @interface Transactional { TxType value() default TxType.REQUIRED; Class[] rollbackOn() default {}; Class[] dontRollbackOn() default {}; } @Transactional(rollbackOn={SQLException.class}, dontRollbackOn={SQLWarning.class}) public class UserService {...}
    • JSR 344: JavaServer Faces 2.2 • HTML5 Support (Form API) • @FlowScoped • @ViewScoped for CDI • Managed beans deprecated/CDI alignment • Stateless views • Resource library contracts • File upload component • View actions • Security • Fixes and enhancements
    • JSF 2.2 Pass-Through HTML 5 Components <html> ... <input type=“color” jsf:value=“#{colorBean.color2}” /> <input type=“date” jsf:value=“#{calendarBean.date1}” /> ... </html>
    • JSF 2.2 Faces Flow @Named @FlowScoped(id="flow-a") public class FlowABean implements Serializable { public String getName() { return "FlowABean"; } public String getReturnValue() { return "/return1"; } @Produces public Flow getFlow(FlowBuilder builder) { builder.startNode("router1"); builder.flowReturn("success").fromOutcome("/complete"); builder.flowReturn("errorOccurred").fromOutcome("error"); builder.switchNode("router1") .navigationCase().condition("#{facesFlowScope.customerId == null}") .fromOutcome("create-customer") .defaultOutcome("view-customer"); builder.viewNode("create-customer"); builder.viewNode("maintain-customer-record"); builder.methodCall("upgrade-customer") .method("#{maintainCustomerBean.upgradeCustomer}").defaultOutcome("view-customer"); builder.initializer("#{maintainCustomerBean.initializeFlow}"); builder.finalizer("#{maintainCustomerBean.cleanUpFlow}"); return builder.getFlow(); } }
    • JSR 352: Batch Applications for the Java Platform 1.0 • Batch processing is execution of series of "jobs" that is suitable for non-interactive, bulk-oriented and long-running tasks. • no standard Java programming model existed for batch applications. • API for robust batch processing targeted to Java EE, Java SE
    • Batch Applications for the Java Platform Step Example <step id=”sendStatements”> <chunk reader=”accountReader” processor=”accountProcessor” writer=”emailWriter” item-count=”10” /> </step> 3 1 @Named(“accountReader") ...implements ItemReader... { public Account readItem() { // read account using JPA 2 @Named(“accountProcessor") ...implements ItemProcessor... { Public Statement processItems(Account account) { // read Account, return Statement @Named(“emailWriter") ...implements ItemWriter... { public void writeItems(List<Statements> statements) { // use JavaMail to send email
    • JSR 349: Bean Validation 1.1 • Method constraints • Bean Validation artifacts injectable • Fixes, clarifications and enhancements
    • Bean Validation 1.1 Method Level Constraints public void placeOrder( @NotNull String productName, @NotNull @Max(“10”) Integer quantity, @Customer String customer) { ... } @Future public Date getAppointment() { ... }
    • JSR 236: Concurrency Utilities for Java EE 1.0 • Provides simple, safe API for concurrency in Java EE • Builds on Java SE concurrency • java.util.concurrent.ExecutorService • Relatively low-level API • Important enabler for Java EE ecosystem • Managing your own threads within a Java EE container is not recommended • Using java.util.concurrent API in a Java EE application component such as EJB or Servlet are problematic since the container and server have no knowledge of these resource
    • Concurrency Utilities for Java EE Managed Task Executor public class TestServlet extends HTTPServlet { @Resource(name=“concurrent/MyExecutorService”) ManagedExecutorService executor; Future future = executor.submit(new MyTask()); class MyTask implements Runnable { public void run() { ... // Task logic } } }
    • JSR 340: Servlet 3.1 • NIO.2 async I/O (Non-blocking I/O) • Leverage Java EE concurrency • Security improvements • Web Sockets support • Ease-of-Development
    • JSR 345: Enterprise JavaBeans 3.2 The scope of EJB 3.2 is intended to be relatively constrained in focusing on these goals: • Incremental factorization (Interceptors). • Further use of annotations to simplify the EJB programming model. • Proposed Optional: BMP/CMP. • Proposed Optional: Web Services invocation using RPC.
    • Others • CDI 1.1: • Global enablement. • @AroundConstruct. • @Vetoed… • EL 3.0: • Lambda expressions. • Collections, • Operators, • Standalone API…
    • Support IDEs and Servers
    • IDEs • Netbeans 7.4 - free • IntelliJ IDEA 12.x – commercial and community edition • Eclipse Juno 4.0 - free They supports the following main features: • • • • Java EE 7 support (Web and enterprise support). Mobile Development support (Android development, Cordova API). JDK 8 EA support. Full HTML5 support.
    • Servers 4.0 • GlassFish 4.0 (RI) • Weblogic 12.1.2c Partially (WS, JSON-P). • Apache Tomcat Version 8.0.0RC5. RI http://download.java.net/glassfish/4.0/release/glassfish-4.0.zip
    • What's new in Java World
    • Java.next() EE 8 and beyond. • JSON-B • Modularity? • JCache • Management/deployment APIs? • CDI.next() • More CDI/EJB alignment • Cloud, PaaS, multitenancy/SaaS • Security? • Testability? • NoSQL? • Action-oriented Web framework/HTML 5? • JMS.next()?
    • Java SE 8 and beyond. • Lambda Expressions. • Compact Profiles. • Stronger Algorithms for Password-Based Encryption. • Nashorn JavaScript Engine. • Bulk Data Operations for Collections. • Annotations on Java Types. • Date & Time API. • DocTree API. • JDBC 4.2. • Parallel Array Sorting. • More ++++ • Unicode 6.2.
    • You are Java Developer. • Before you were a Java SE, EE, ME, Embedded Developer. • In the future of Java you will become Java Developer. • Because of Java platform editions converges, then One platform will fit all needs.
    • Java & Embedded world. • Oracle enhance the embedded APIs. • Oracle becomes part of Raspberry PI equation. • http://www.raspberrypi.org • Oracle developed dukePad as BOC on Raspberry PI platform. • https://wiki.openjdk.java.net/display/OpenJFX/DukePad
    • Internet of Things - IoT • The Internet of Things (or IoT for short) refers to uniquely identifiable objects and their virtual representations in an Internet-like structure. • Equipping all objects in the world with minuscule identifying devices or machine-readable identifiers could be transformative of daily life. • According to ABI Research more than 30 billion devices will be wirelessly connected to the Internet of Things (Internet of Everything) by 2020. • This concept, where devices connect to the internet/web via low power radio is the most active research area in IoT. Wikipedia
    • Thanks for listening and attending. See you in upcoming events
    • Resources • Java EE Tutorials • http://docs.oracle.com/javaee/7/tutorial /doc/home.htm • http://www.programmingsimplified.com/index.html • Digging Deeper • http://docs.oracle.com/javaee/7/firstcu p/doc/home.htm • https://glassfish.java.net/hol/ • https://java.net/projects/cargotracker/ • Java EE 7 Transparent Expert Groups • http://javaee-spec.java.net • Java EE 7 Reference Implementación • http://glassfish.org • The Aquarium • http://blogs.oracle.com/theaquarium • Speakers • http://www.infoq.com/presentations/JavaEE-7-8