1 / 46

GlassFish BOF

GlassFish BOF. Reza Rahman, GlassFish Evangelist Anil Gaur, VP Software Development.

fawzia
Download Presentation

GlassFish BOF

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. GlassFish BOF Reza Rahman, GlassFish Evangelist Anil Gaur, VP Software Development

  2. The following 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. Agenda Journey since JavaOne 2012 Road Ahead Community Feedback Your agenda…Q&A

  4. GlassFish Community Shipped Java EE 7 RI More social: More Twitter followers Community contributions FishCat – Mohammed, Marcus, Adam & many more Adopt-a-JSR effort with 20+ JUGs Tic Tac Toe Sample - Johan Since JavaOne 2012…

  5. Java EE 7

  6. Java EE Past, Present, & Future Java EE 7 JMS 2, Batch, TX, Concurrency, Interceptor, WebSocket, JSON Java EE 6 Pruning,Extensibility,Ease of Use, CDI, JAX-RS Java EE 5 Ease of Development, EJB 3, JPA, JSF, JAXB, JAX-WS, StAX, SAAJ JAX-RPC, CMP/ BMP, JSR 88 J2EE 1.4 Web Services Mgmt, Deployment, Async Connector J2EE 1.3 CMP,Connector Architecture Web Profile JAX-RS 2 J2EE 1.2 Servlet, JSP, EJB, JMS, RMI Web Profile Servlet 3, EJB 3.1Lite

  7. Java EE 7 Portable Extensions JSP 2.2 JSF 2.2 JAX-RS 2.0 EL 3.0 Bean Validation 1.1 Concurrency Utilities (JSR 236) Servlet 3.1 Batch Applications(JSR 352) Common Annotations 1.1 Interceptors 1.1 CDI 1.1 Java API for JSON(JSR 353) Managed Beans 1.0 EJB 3.2 Java API for WebSocket (JSR 356) Connector 1.6 JPA 2.1 JTA 1.2 JMS 2.0 New MajorRelease Updated

  8. Java API for WebSocket Full-duplex, bidirectional communication over HTTP Part of HTML 5 API for WebSocket Client/Server Declarative, annotation-driven Programmatic, interface-driven

  9. Java API for WebSocket Connection Life Cycle @Singleton @ServerEndpoint(”/chat”) public class ChatServer { Set<Session> peers = ... @OnOpen public void onOpen(Session peer) { peers.add(session); } @OnClose public void onClose(Session session) { peers.remove(session); } ...

  10. 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.getBasicRemote().sendObject(message); } } } }

  11. JAX-RS 2 Client API Message filters & entity interceptors Asynchronous processing Server and client Hypermedia Support Mime type negotiation

  12. JAX-RS 2 Client API // Get instance of ClientClient client = ClientBuilder.newClient();// Get customer name for the shipped productsString name = client.target(“../orders/{orderId}/customer”) .pathParam(”orderId", ”10”) .queryParam(”shipped", ”true”) .request() .get(String.class);

  13. JMS 2 API modernization Streamlined APIs Dependency injection Runtime exceptions Builder pattern Intelligent defaults Delivery delay, async send, delivery count MDB alignment JMS resource definition

  14. 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); } } Boilerplate Functional core Checked exceptions

  15. JMS 2 Simplified API Higher-level managed, injected API @Inject private JMSContext context; @Resource(mappedName = "jms/inboundQueue") private Queue inboundQueue; public void sendMessage (String payload) { context.createProducer().send(inboundQueue, payload); } Reduced to functional core

  16. Batch Applications for the Java Platform Standard Java API for batch processing Lingua franca for well understood batch concepts Jobs, job specification language (JSL), steps, readers, writers, processors, chunking, flow, parallelization, repositories

  17. Batch Applications for the Java Platform Step Example ...implements ItemReader {public Object readItem() {// read account using JPA } <step id=”sendStatements”> <chunk reader ref=”accountReader” processor ref=”accountProcessor” writer ref=”emailWriter” chunk-size=”10” /> </step> ...implements ItemProcessor { Public Object processItems(Object account) {// read Account, return Statement } ...implements ItemWriter { public void writeItems(List accounts) {// use JavaMail to send email }

  18. Concurrency Utilities for Java EE Provides low-level asynchronous processing capabilities to Java EE application components in a safe, reliable, consistent manner Mostly extension of Java SE Concurrency Utilities APIs ManagedExecutorService ManagedScheduledExecutorService ManagedThreadFactory

  19. 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 } }}

  20. Many others . . . • JSON-P: Parsing, writing and querying JSON • JSF 2.2: @FlowScoped, HTML5 forms, CDI alignment… • Bean Validation 1.1: Method validation, CDI alignment… • Servlet 3.1: Non-blocking IO, Upgrade to WebSocket… • EL 3.0: Lambda expressions, Collection, Operators… • JPA 2.1: Schema generation, stored procedures, converters… • JTA 1.2: @Transactional, @TransactionScoped… • CDI 1.1: Ordering of interceptors, Servlet events, @Vetoed… • EJB 3.2: Optional CMP/BMP…

  21. GlassFish 4

  22. GlassFish 4 Feature Summary • Primary focus on making Java EE 7 usable by developers • Java EE 7 support in the Admin Console • Java EE Concurrency, JBatch • Background execution of admin commands • More REST/SSE support for administration • Log format changes • Configuration defaults • OSGi administration

  23. GlassFish 4 and Java EE 7 Concurrency

  24. GlassFish 4 and JBatch

  25. GlassFish 4 and JBatch list-batch-job-executions list-batch-job-steps list-batch-jobs

  26. Attach/Detach Admin Commands Commands can be executed in the background Use --detach with any command to send to the background Use --terse in scripts to receive just job id Show all running jobs using list-jobs Bring a job back to the foreground using the attach command Use the configure-managed-jobs command to further control the lifecycle of jobs

  27. More Support for REST/SSE A more REST centric approach with /command/{command_name} GET for command syntax, POST to execute JSON for data interchange curl -X POST -H "X-Requested-By: reza" http://localhost:4848/command/uptime Supports Server Sent Events (SSE) Try the [start|stop]-cluster command curl -X POST -H "X-Requested-By: reza" -H "Accept: text/event-stream" -d "clusterName=c01" http://localhost:4848/command/stop-cluster

  28. ODL vs. ULF Default log format changed to align with Oracle products Oracle Diagnostics Logging [yyyy-mm-ddThh:mm:ss.SSS-Z][ProductName-Version][Log Level] [Message ID][LoggerName][Key Value Pairs][[Message]] Uniform Log Formatter [#|yyyy-mm-ddThh:mm:ss.SSS-Z|Log Level|ProductName-Version|LoggerName|Key Value Pairs|Message|#] Well understood from GlassFish 3.1

  29. More Logging Commands Large set of existing logging related commands Define threshold, file rotation, file names, … New commands list-loggers helps in understanding logger hierarchy set-log-file-format to choose ODL, ULF or custom Still possible to use log viewer in the Admin Console

  30. Configuration Defaults GlassFish 3.1 – configuration values must be specified GlassFish 4 – introduce default values where possible Convergence to zero initial configuration get-active-module-config prints effective values create-module-config forces default values into the configuration Use as a template for configuration changes --dryrun just prints what’s being added delete-module-config removes actual configuration

  31. OSGi Administration GlassFish modularity is based on OSGi Default OSGi subsystem is Apache Felix Integrated GoGo interface The osgi command executes one GoGo command The osgi-shell command opens interactive GoGo console Optional OSGi admin console Add on to GlassFish

  32. More Details/Demos CON3319: GlassFish 4 Overview: What’s Under the Hood? Chanda Patel/Martin Mares Wednesday, September 25, 11:30 AM - 12:30 PM Parc 55 - Cyril Magnin I

  33. GlassFish Server The Ecosystem

  34. GlassFish.org – New Look and Feel!

  35. Project Avatar

  36. What is Avatar? R&D on HTML5/JavaScript • Industry trends • HTML5 and JavaScript is a significant trendsetter in market • HTML5 Connectivity – need a server • Strong interest in server-side JavaScript; horizontally scale • Native Applications gaining ground (but expensive) • Simplified user interface for browser-based applications for mobile, tablets and desktops • Avatar Scope • Java EE features to support HTML5 connectivity • WebSocket, JAX-RS, Server Sent Events • JavaScript services on the server • Enable Thin Server Architecture • Web Application Framework

  37. Publishing services using 3 programming models: WebSockets RESTful WebServices Server-Sent Events (SSE) Node.js services & programming model hosted on the JVM (avatar.js on Nashorn) Optional server-side template support for HTML5 data binding Optional client library to consume all the above Project Avatar Architecture Java EE HTTP (REST) 1 Databases Data Access Data Sources JAX-RS JMS EJB Application Server *.html HTML 5 Client Web Sockets 4 Servlets SSE *.js JAXBJSONB ChangeNotification WebSockets *.css SSE JPA Avatar Server 3 Scripting Container Node.jar 2 Nashorn

  38. Avatar Demo

  39. Project Avatar Call to Action • Participate and provide feedback • Join avatar.java.net • Download and Review sample applications • Use Project Avatar • Ask questions • What is the direction we should take? • GlassFish Open Source Project • Java EE .next

  40. Roadmap

  41. GlassFish Server Roadmap GlassFish Server 4.0 GlassFish Server 3.1.2.2 GlassFish Server 4.1 2014 2012 2013

  42. The Future of Java EE

  43. Summary Java EE 7 themes are HTML5, productivity and enterprise needs Well received by the community GlassFish 4 reference implementation and first application server implementing Java EE 7 Oracle continues to invest in Java EE/GlassFish Get involved in shaping the future!

  44. Try it Out! 4.0 http://glassfish.org

More Related