Home >Technology >Java EE 6 and GlassFish v3: Paving the path for future

Java EE 6 and GlassFish v3: Paving the path for future

Date post:15-Jan-2015
Category:
View:3,904 times
Download:1 times
Share this document with a friend
Description:
This session presents the GlassFish™ Tools Bundle for Eclipse, which can be used for creating Java EE 6 applications and configuring, deploying, and monitoring the GlassFish application server.
Transcript:
  • 1. Java EE 6 and GlassFish v3:Paving the path for future Arun Gupta, GlassFish Guy Sun Microsystems, Inc. blog.arungupta.me

2. Java EE: Past & PresentRight SizingEase ofDevelopment Java EE 6EJB Lite WebJava EE 5 Restful WS Services Ease ofWeb BeansDevelopmentExtensibilityJ2EE 1.4AnnotationsRobustnessWeb Services, EJB 3.0EnterpriseManagement, Persistence API Java Platform J2EE 1.3 Deployment, New and CMP,Async.UpdatedConnector` Connector Web ServicesJava EE 6 J2EE 1.2Architecture Servlet, JSP, Web ProfileJPEEJB, JMS Project RMI/IIOPJava EE 6 and GlassFish v3: Paving path for the futureSlide 2 3. Compatible Java EE 5 ImplementationsJava EE 6 and GlassFish v3: Paving path for the future Slide 3 4. Goals for the Java EE 6 Platform Right Sizing the Platform > Flexible, lighter weight Extensible >Embrace Open Source Frameworks Easier to use, develop on > Continue on path set by Java EE 5Java EE 6 and GlassFish v3: Paving path for the future Slide 4 5. Right Sizing the Platform: Profiles Make platform flexible > Decouple specifications to allow more combinations > Expands potential licensee ecosystem > Profiles>Targeted technology bundles>Defined through the JCP>First profile: Web Profile Defined by the Java EE 6 Expert GroupJava EE 6 and GlassFish v3: Paving path for the future Slide 5 6. Web Profile Fully functional mid-sized profile > Actively discussed in Java EE Expert Group and outside it > Technologies > Servlet 3.0, EJB Lite 3.1, JPA 2.0, JSP 2.2, EL 1.2, JSTL 1.2, JSF 2.0, JTA 1.1, JSR-45, JSR-250 Java EE 6 and GlassFish v3: Paving path for the future Slide 6 7. Right Sizing the Platform: Pruning Make platform lighter > Makes some technologies optional > Pruned today, means > optional in the next release > Deleted in the subsequent release > Pruned Technologies will be marked in the javadocs > Current pruning list > JAX-RPC, EJB 2.X Entity Beans, JAXR, JSR-88 Java EE 6 and GlassFish v3: Paving path for the future Slide 7 8. Extensibility Embrace open source libraries and frameworks Zero-configuration, drag-and-drop for web frameworks > Servlets, servlet filters, context listeners for a framework get discovered and registered automatically Plugin library jars using web fragmentsJava EE 6 and GlassFish v3: Paving path for the future Slide 8 9. wicket.helloworldorg.apache.wicket.protocol.http.WicketFilterapplicationClassName...wicket.helloworld/*http://blog.arungupta.me/2009/08/totd-91-applying-java-ee-6-web-fragment-xml-to-apache-wicket-deploy-on-glassfish-v3/ Java EE 6 and GlassFish v3: Paving path for the future Slide 9 10. LiftFilterLift FilterThe Filter that intercepts lift callsnet.liftweb.http.LiftFilterLiftFilter/* http://blog.arungupta.me/2009/09/totd-101-applying-servlet-3-0java-ee-6-"web-fragment-xml"-to-lift--deploy-on-glassfish-v3/ Java EE 6 and GlassFish v3: Paving path for the futureSlide 10 11. Ease of Development Continue advancements of Java EE 5 Primary focus: Web Tier Multiple Areas easier to use: EJB 3.1 General principles > Annotation-based programming model > Reduce or eliminate need for deployment descriptors > Traditional API for advanced usersJava EE 6 and GlassFish v3: Paving path for the future Slide 11 12. Web/EJB Application in Java EE 5 Platformfoo.ear foo.earlib/foo_common.jar foo_web.war com/acme/Foo.classWEB-INF/web.xmlWEB-INF/classes/ com/acme/FooServlet.classfoo_web.warWEB-INF/classes com/acme/Foo.classOR WEB-INF/web.xmlWEB-INF/classes/ com/acme/FooServlet.class foo_ejb.jarcom/acme/FooBean.class foo_ejb.jar com/acme/Foo.class com/acme/FooBean.class Java EE 6 and GlassFish v3: Paving path for the future Slide 12 13. Web/EJB Application in Java EE 6 Platformfoo.warWEB-INF/classes/com/acme/FooServlet.classWEB-INF/classes/com/acme/FooBean.classweb.xml Java EE 6 and GlassFish v3: Paving path for the future Slide 13 14. EoD Example - Servlets Servlet in Java EE 5: Create two source files package com.foo; public class MyServlet MyServletextends HttpServlet { public void doGet(HttpServletRequestcom.foo.MyServletreq,HttpServletResponse res) { MyServlet.../myApp/*}... ... } Java EE 6 and GlassFish v3: Paving path for the future Slide 14 15. EoD Example - Servlets Servlet in Java EE 6: In many cases a single source filepackage com.foo; @WebServlet(name=MyServlet, urlPattern=/myApp/*) public class MyServlet extends HttpServlet {public void doGet(HttpServletRequest req,HttpServletResponse res){ ...}Java EE 6 and GlassFish v3: Paving path for the future Slide 15 16. Java EE 6 Status Public reviews completed JSF 2.0 is final, majority of the specs are in Proposed Final Draft Reference Implementation is GlassFish V3 Final release later this year Java EE 6 and GlassFish v3: Paving path for the future Slide 16 17. What is GlassFish ? A Community> Users, Partners, Testers, Developers, ...> Started in 2005 on java.net Application Server> Enterprise Quality and Open Source (CDDL & GPL v2)> Java EE 5 Reference Implementation> Full Commercial Support from Sun Leverages Sun's experience in other Java, Middleware, SDKhttp://glassfish.orgJava EE 6 and GlassFish v3: Paving path for the future Slide 17 18. Sun GlassFish Enterprise Server Enterprise ManagerCustomer Advocate eLearningCredit Customer Focused 24x7 SupportSupport Team GlassFishSun VIP Open SourceApplication Server Patches &Interoperability UpgradesSupport Java EE 6 and GlassFish v3: Paving path for the future Slide 18 19. GlassFish v3 Modular > Maven 2 Build & Module description > Felix OSGi runtime > Allow any type of Container to be plugged Start Container and Services on demand Embeddable: runs in-VM Extensible: pluggable containers> Rails, Grails, Django, ... Java EE 6 Reference Implementation Support for upcoming Java EE 6 profileshttp://glassfish.org/v3 Java EE 6 and GlassFish v3: Paving path for the future Slide 19 20. Dynamic Languages & Frameworks http://glassfish-scripting.dev.java.net Java EE 6 and GlassFish v3: Paving path for the future Slide 20 21. Rails Deployment ChoicesCredits: http://birdwatchersdigest.com Java EE 6 and GlassFish v3: Paving path for the futureSlide 21 22. Demo NetBeans and Java EE 6 http://blog.arungupta.me/2008/11/screencast-27-simple-web-application-using-netbeans-6-5-ide-and-glassfish-v3-prelude/ http://blog.arungupta.me/2008/11/screencast-26-developrundebug-rails-application-using-netbeans-ide-and-glassfish-v3-prelude/ http://blog.arungupta.me/2009/08/totd-93-getting-started-with-java-ee-6-using-netbeans-6-8-m1-glassfish-v3-a-simple-servlet-3-0-jpa-2-0-app/ http://blog.arungupta.me/2009/08/totd-94-a-simple-java-server-faces-2-0-jpa-2-0-application-getting-started-with-java-ee-6-using-netbeans-6-8-m1-glassfish-v3/ http://blog.arungupta.me/2009/08/totd-95-ejb-3-1-java-server-faces-2-0-jpa-2-0-web-application-getting-started-with-java-ee-6-using-netbeans-6-8-m1-glassfish-v3/ http://blog.arungupta.me/2008/11/screencast-28-simple-web-application-using-eclipse-and-glassfish-v3-prelude/Java EE 6 and GlassFish v3: Paving path for the future Slide 22 23. Embeddable GlassFish public void testServlet() throws Exception { int port = 9999; GlassFish glassfish = newGlassFish(port); URL url = new URL("http://localhost:" + port + "/" + NAME + "/SimpleServlet"); BufferedReader br = new BufferedReader( new InputStreamReader( url.openConnection().getInputStream())); assertEquals("Wow, I'm embedded!", br.readLine()); glassfish.stop(); } Java EE 6 and GlassFish v3: Paving path for the future Slide 23 24. ... Embeddable GlassFishprivate GlassFish newGlassFish(int port) throws Exception { GlassFish glassfish = new GlassFish(port); ScatteredWar war = new ScatteredWar(NAME,new File("src/main/resources"),new File("src/main/resources/WEB-INF/web.xml"),Collections.singleton(newFile("target/classes").toURI().toURL())); glassfish.deploy(war); System.out.println("Ready ..."); return glassfish;}http://blog.arungupta.me/2008/05/embeddable-glassfish-in-action-servlet-in-a-maven-project/ Java EE 6 and GlassFish v3: Paving path for the future Slide 24 25. Extending GlassFish ... 1, 2, 3. @Service(name="mycommand") @Scoped(PerLookup.class) public class CLIPluggabilityCommand implements AdminCommand { ... }... // this value can be either runtime or os for our demo @Param(primary=true) String inParam; ... public void execute(AdminCommandContext context) {...} http://java.net/blog/2008/11/07/extending-glassfish-v3-prelude-easy-1-2-3 Java EE 6 and GlassFish v3: Paving path for the future Slide 25 26. Light-weight & On-demand Monitoring Event-driven light-weight and non-intrusive monitoring Modules provide domain specific probes (monitoring events) > EJB, Web, Connector, JPA, Jersey, Orb, Ruby End-to-end monitoring on Solaris using DTrace 3rd party scripting clients > JavaScript to begin with Java EE 6 and GlassFish v3: Paving path for the future Slide 26 27. Demo GlassFish v3 Monitoring http://blog.arungupta.me/2009/09/totd-104-glassfish-v3-monitoring-how-to-monitor-a-rails-app-using-asadmin-javascript-jconsole-rest/ Java EE 6 and GlassFish v3: Paving path for the futureSlide 27 28. REST Interface REST interface to management and monitoring data > Configuration data, Commands invocation (start/stop instance, deploy, undeploy, ...), CRUD resources (JMS, JDBC, ...) > localhost:4848/management/domain > localhost:4848/monitoring/domain GET, POST, DELETE methods XML, JSON, HTML reps Java EE 6 and GlassFish v3: Paving path for the future Slide 28 29. Demo GlassFish v3 REST Interfacehttp://blog.arungupta.me/2009/08/totd-96-glassfish-v3-rest-interface-to-monitoring-and-management-json-xml-and-html-representations/Java EE 6 and GlassFish v3: Paving path for the future Slide 29 30. Java EE 6 and GlassFish v3:Paving the path for future Arun Gupta, GlassFish Guy Sun Microsystems,

Popular Tags:

Click here to load reader

Embed Size (px)
Recommended