SlideShare a Scribd company logo
Tech Days 2010 from Oracle Luqman Shareef www.luqmanshareef.com [email_address] March 24-25 2010 Hyderabad
The event Ravichandra Kulur and band kick started the event, with flute, guitar, keyboard and drums  Krishna Dhawan, Managing Director, Oracle India talked about the re-enforced commitment to Java.
 
Technology showcase:  Be inspired Demos on Day 1 Teleporting - a new feature in Virtual Box A running Virtual Machine can be moved between different hosts across different architectures, different Operating Systems etc. A cool drawing tool in JavaFX Demos on Day 2 Java EE 6 JavaFx  For Desktop, for mobile and for  TV 04/05/10
James Gosling,  Father of Java  gave an overview of the Java ecosystem. To run through his slides James was using an application that he developed using JavaFX
From James presentation… 15 million JDK downloads / week 10 billion Java devices (more than number of humans on earth) 5.5 billion smart cards 2.6 billion mobile devices 100 million Java TV devices Gizmos 6.5+ million Java developers Most college grads have taken a Java course – Worldwide. “Learn once, work anywhere”
What’s new in JDK 7 Modularity  – JDK is getting bigger and bigger with the addition of new APIs. It is ought to be modularized. Project Jigsaw : The goal of this Project is to design and implement a simple, low-level module system focused narrowly upon the goal of modularizing the JDK, and to apply that system to the JDK itself. http://openjdk.java.net/projects/jigsaw/  Dynamic language support  – The magic is in the virtual machine. Supports lots of scripting languages.  Ex: Scala, Ruby, Groovy, Pyhon, Javascript etc. G1  (Garbage First) Garbage collector. NIO2  (New IO Improving performance of very large scale app services Compressed pointers. 32G == 4G 32 G Address space gives same performance as 4G Space
Java EE 6  (From Arun Gupta’s presentation)
Java EE 6 Contd…
Java EE 6 Contd…
Goals for the Java EE 6 Platform Flexible & Light-weight Extensible Embrace Open Source Frameworks Easier to use, develop on Continue on path set by Java EE 5
What’s new in JEE 6? (Spec released in Dec 2009) Includes  EJB 3.1,  JPA 2.0,  Servlets 3.0,  JAX-RS 1.1,  JSF 2.6,  JAX-WS 2.2,  Interceptors 1.1, etc. Pluggability / Extensibility – Create a playing field for third-party applications. Web profile – A fully functional, mid-size stack for modern web development. Dependency Injection – Uses the annotation facility to achieve this. GlassFish 3.0 is the reference implementation of JEE6.
Java EE 6 Web Profile 1.0 Fully functional mid-sized profile Actively discussed in the Java EE 6 Expert Group and outside it. Technologies in web profile Servlets 3.0 JSP 2.2 EL 2.2 JSTL 1.2 EJB 3.1 Lite JTA 1.1 JPA 2.0 Bean  Validation 1.0 Managed Beans 1.0 JSF 2.0 Common  Annotations 1.1 Interceptors 1.1 Context & Dependency Injection 1.0
Java EE 6 is Lightweight Pruning Make some technologies optional Pruned today, means Optional in the next release Deleted in the subsequent releases Technologies marked in Javadocs JAX-RPC, EJB 2.x Entity Beans, JAXR, JSR 88
Java EE 6 is Extensible Embrace open source frameworks Wicket, Lift, Spring, Struts, ... Zero-configuration, drag-and-drop for web frameworks Servlets, servlet filters, context listeners for a framework get discovered and registered automatically Plug-in libraries using web fragments
Glassfish V3
Glassfish is A community Users, Partners, Testers, Developers, ... Started in 2005 on java.net An application Server Open Source (CDDL & GPL v2) Java EE Reference Implementation
CLI-based Administration “ asadmin” CLI utility Administrative commands can be added with each container Available as : asadmin myCommand –s1 foo –s2 bar @Service(name=”myCommand”) public class ChangeRandomCtr implements AdminCommand { @Param String s1; @Param String s2; …  }
Glassfish 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
Oracle said .. “ GlassFish joins WebLogic Server in the best Java EE application server offering in the industry” “ GlassFish continues as the Java EE RI and as an open source project.” “ Oracle plans to add GlassFish Enterprise Server to all WebLogic offerings.” “ GlassFish also available as standalone offering.” http://blogs.sun.com/arungupta/entry/glassfish_strategy_by_oracle_sun
Java FX
What is JavaFX? It is Scripting Language to create rich media and content It is a declarative scripting language for GUI It Runs on JVM It utilizes Java class libraries The JavaFX Platform A rich client platform for crossscreen rich internet applications (RIA) and content Contains 2D graphics, Animation, Text and Media. Contains device specific elements for  desktop, mobile and TV 04/05/10 Compile javafxc script.fx Run javafx script
JavaFX Platform 04/05/10
Some JavaFX APIs javafx.scene.geometry Circle, Polygon, Arch, Eclipse, MoveTo, … javafx.scene.paint Color, Paint, … javafx.animation Interpolatable, Interpolator,  KeyFrame, Timeline … 04/05/10 Example import javafx.scene.geometry.*; import javafx.scene.paint.*; Ellipse { centerX: 50 centerY: 50 radiusX: 50 radiusY: 25 fill: Color.BLACK }
Performance Tuning Garbage Collection 04/05/10
Garbage Collection JVM Options Standard options :  Work in all platforms -X options : May not work in some platforms -XX options :  May not work in some platforms  & May need additional privileges to use (There are more than 400 –XX options in Java 6 JRE) Three different Garbage Collectors Serial Collector Parallel Collector Concurrent Collector 04/05/10
Serial vs. Parallel Vs. Concurrent GC Serial Collector Uses single thread to perform GC. Suited to most desktop applications Can be enabled with the option  -XX:+UseSerialGC Parallel Collector Also known as throughput collector Performs minor collections in parallel Suited for applications running on multiprocessor or multi-threaded hardware Can be enabled with the option   -XX:++UseParallelGC Concurrent Collector Performs most of its work concurrently (while the application is still running) Keeps the Garbage Collection pauses short Suited for applications for which  response time is more important than overall throughput Can be enabled with the option  -XX:++UseConcMarkSweepGC 04/05/10
Memory pools for HotSpot JVM A  memory pool  represents a memory area that the JVM manages.  Eden Space (heap) Pool from which memory is initially allocated for most objects. Survivor Space (heap) Pool containing objects that have survived GC of eden space. Tenured Generation (heap) Pool containing objects that have existed for some time in survivor space. Permanent Generation (non-heap) Holds all the reflective data of the virtual machine itself, such as class and method objects. With JVMs that use class data sharing, this generation is divided into read-only and read-write areas. 04/05/10
HotSpot VM Heap Layout 04/05/10
Garbage First (G1) GC It is new GC that is being introduced in the Java HotSpot VM in JDK 7.  Experimental version of G1 has been released in Java SE 6 Update 14. It is a replacement of CMS (Concurrent Mark Sweep) GC. Features of G1 Server style GC Parallel and Concurrent Generational Compacting  (Not available in CMS) Predictable  (Not available in CMS) Can be enabled with the following two parameters -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC  04/05/10
Hints for GC tuning GC Nirvana Low GC overhead Low GC pause times Good space efficiency Unfortunately, reality is you must choose any two out of the above three options. 04/05/10
JPA 2.0 04/05/10 http://blogs.sun.com/arungupta/entry/day_2_tech_days_2010
JPA 2.0 (JSR 317) Part of Java EE 6 and/or available standalone More sophisticated mapping and modeling options added. Expanded query language Adds Criteria API, together with Metamodel API Support for Validation EclipseLink is reference implementation Integrated in GlassFish 04/05/10
What is new in JPA 2.0? Element collections Embeddable classes Persistently ordered lists Improved Map support More relationship mapping options Criteria API Metamodel API Validation Support Pessimistic Locking Caching Configuration 04/05/10
Element Collection and Embeddable classes Element collections Collections of strings, integers, floats, decimals etc Collections of embeddable classes Embeddable classes Nested embeddables; embeddables with relationships 04/05/10 @Entity public class Person { @Id protected String ssn; protected String name; protected Date birthDate; . . . @ElementCollection protected Set<String> nickNames; } @Embeddable  public class Address { String street; String city; . . . } @Entity public class RichPerson extends Person { . . . @ElementCollection protected Set<Address> vacationHomes; . . . }
Java Persistence Query Language String-based SQL-like query language SELECT, FROM, WHERE, GROUP BY, ORDER BY,… Queries written over Java domain model Entities, state, relationships Supports navigation using dot-notation Mapped into SQL by the provider Supports static and dynamic use SELECT AVG (p.price) FROM Order o JOIN o.products p WHERE o.customer.address.zip = ‘94301’ 04/05/10
Criteria API Object-based API for building queries Designed to mirror JPQL semantics Strongly typed Based on type-safe metamodel of persistent classes and relationships Heavy use of Java generics Supports object-based or string-based navigation Query construction at development time or runtime 04/05/10 EntityManager em = …; CriteriaBuilder cb = em.getCriteriaBuilder(); CriteriaQuery<ResultType> cquery = cb.createQuery(ResultType.class); Root<MyEntity> e = cquery.from(MyEntity.class); Join<MyEntity, RelatedEntity> j = e.join(…); … cquery.select(…) .where(…) .orderBy(…) .groupBy(…); TypedQuery<ResultType> tq =  em.createQuery(cquery); List<ResultType> result = tq.getResultList();
Servlet 3.0 04/05/10
Servlet 3.0 Ease of Development Through annotation Dynamic registration of Servlets and Filters During runtime Pluggability (of 3rd-party frameworks/libs) No more tweaking of  web.xml is needed Asynchronous Servlet Support Comet applications Security enhancements 04/05/10
Annotations 04/05/10 Web.xml is not needed any more @WebServlet @WebFilter @WebListener @WebInitParam @WebServlet(urlPatterns=&quot;/simpletest&quot;, name=&quot;MyServlet&quot;, asyncSupported=true) public class SimpleServlet extends HttpServlet{ public void doGet(HttpServletRequest req,HttpServletResponse res){ // Code here } }
Dynamic Registration of Servlets/Filters 04/05/10 public class TestServletContextListener implements ServletContextListener { @Override public void contextInitialized(ServletContextEvent sce) { ServletContext servletConext = sce.getServletContext(); // Servlets/Filters can be added during runtime ServletRegistration.Dynamic dynamic = servletContext.addServlet( &quot;DynamicServlet&quot;, &quot;com.mycom.MyServlet&quot;); dynamic.addMapping(&quot;/dynamicServlet&quot;); dynamic.setAsyncSupported(true); ....
Asynchronous Servlet Async. Servlets are to avoid “thread starvation” in cases such as  Waiting for resources like JDBC connection) Waiting for events  Waiting for responses like web service responses Better scalability 04/05/10
Pluggability (of 3rd party Frameworks) Possible to use 3rd-party frameworks and libraries without configuring in web.xml Each framework defines its own web-fragment.xml Declares its specific controller servlet Declares listener and filters Container then collects them all Order of the frameworks/libs can be  specified in the web.xml A self-contained framework is  provided as a jar file and placed  under WEB-INF/lib web.xml (optional) WEB-INF/lib/ someframework1.jar  -> META-INF/web-fragment.xml WEB-INF/lib/ someframework2.jar  -> META-INF/web-fragment.xml 04/05/10 < web-fragment > <servlet> <servlet-name>MyFramework</servlet-name> <servlet-class>com.MyFrameworkServlet </servlet-class> </servlet> <servlet-mapping> <servlet-name>MyFramework</servlet-name> <url-pattern>/MyFramework</url-pattern> </servlet-mapping> ... </ web-fragment >
EJB 3.1 04/05/10
EJB 3.1 Packaging in a war file EJB components can be  packaged directly inside  a web application archive  (war file) Optional Local Interfaces One source file enough  for a bean 04/05/10 @Stateless public class HelloWorldBean {  // No interface public String sayHello() { return &quot;Hello World!&quot;; } }
EJB 3.1 contd… Singleton A single instance per application Asynchronous calls 04/05/10 @Singleton public class MyCacheBean {  private Map cache; public Map getCache() { … .. } public class MySampleBean {  @Asynchronous public Future<Long> sendEmail(String id){  ... }
EJB 3.1 contd… Cron-based Timer Service Cron-like syntax second [0..59], minute[0..59], hour[0..23]... dayOfMonth[1..31] dayOfWeek[0..7] or [Sun, Mon..] Etc. Embeddable Container API allows to Initialize a container Get container ctx 04/05/10 @Stateless public class WakeUpBean { @Schedule(dayOfWeek=&quot;Mon-Fri&quot;, hour=&quot;9&quot;) void wakeUp() { ... }
EJB Lite Meets the needs of applications that require only a subset of the features provided by EJB technology.  Features included Stateless, stateful, and singleton session beans Local EJB interfaces or no interfaces Interceptors Container-managed and bean-managed transactions Declarative and programmatic security Embeddable API 04/05/10
Thank You 04/05/10 Visit www.luqmanshareef.com
Ad

More Related Content

What's hot (20)

Is kubernetes a good choice for orchestration
Is kubernetes a good choice for orchestrationIs kubernetes a good choice for orchestration
Is kubernetes a good choice for orchestration
Samuel Dratwa
 
Build a Cloud Day - CloudStack
Build a Cloud Day - CloudStackBuild a Cloud Day - CloudStack
Build a Cloud Day - CloudStack
ke4qqq
 
Big Data on Cloud Native Platform
Big Data on Cloud Native PlatformBig Data on Cloud Native Platform
Big Data on Cloud Native Platform
Sunil Govindan
 
Cloud Computing Architecture with Open Nebula - HPC Cloud Use Cases - NASA A...
Cloud Computing Architecture with Open Nebula  - HPC Cloud Use Cases - NASA A...Cloud Computing Architecture with Open Nebula  - HPC Cloud Use Cases - NASA A...
Cloud Computing Architecture with Open Nebula - HPC Cloud Use Cases - NASA A...
Ignacio M. Llorente
 
Cloud Computing Platform-CloudStack
Cloud Computing Platform-CloudStackCloud Computing Platform-CloudStack
Cloud Computing Platform-CloudStack
Arcadian Learning
 
Running OpenStack on Amazon AWS, Alex Fishman
Running OpenStack on Amazon AWS, Alex FishmanRunning OpenStack on Amazon AWS, Alex Fishman
Running OpenStack on Amazon AWS, Alex Fishman
Cloud Native Day Tel Aviv
 
HPC Cloud Computing with OpenNebula
HPC Cloud Computing with OpenNebulaHPC Cloud Computing with OpenNebula
HPC Cloud Computing with OpenNebula
Ignacio M. Llorente
 
Azure bootcamp (1)
Azure bootcamp (1)Azure bootcamp (1)
Azure bootcamp (1)
AmnaHussain26
 
Cloud computing and OpenStack
Cloud computing and OpenStackCloud computing and OpenStack
Cloud computing and OpenStack
Edgar Magana
 
An Intrudction to OpenStack 2017
An Intrudction to OpenStack 2017An Intrudction to OpenStack 2017
An Intrudction to OpenStack 2017
Haim Ateya
 
Cloud sim
Cloud simCloud sim
Cloud sim
Khyati Rajput
 
Introduction to CloudStack: How to Deploy and Manage Infrastructure-as-a-Serv...
Introduction to CloudStack: How to Deploy and Manage Infrastructure-as-a-Serv...Introduction to CloudStack: How to Deploy and Manage Infrastructure-as-a-Serv...
Introduction to CloudStack: How to Deploy and Manage Infrastructure-as-a-Serv...
CloudStack - Open Source Cloud Computing Project
 
Simulating Heterogeneous Resources in CloudLightning
Simulating Heterogeneous Resources in CloudLightningSimulating Heterogeneous Resources in CloudLightning
Simulating Heterogeneous Resources in CloudLightning
CloudLightning
 
Build a Cloud Day - CloudStack
Build a Cloud Day - CloudStackBuild a Cloud Day - CloudStack
Build a Cloud Day - CloudStack
ke4qqq
 
Cloud computing using Eucalyptus
Cloud computing using EucalyptusCloud computing using Eucalyptus
Cloud computing using Eucalyptus
Abhishek Dey
 
OpenStack Introduction
OpenStack IntroductionOpenStack Introduction
OpenStack Introduction
Jimi Chen
 
Seminar on cloud computing by Prashant Gupta
Seminar on cloud computing by Prashant GuptaSeminar on cloud computing by Prashant Gupta
Seminar on cloud computing by Prashant Gupta
Prashant Gupta
 
Introduction to OpenStack Storage
Introduction to OpenStack StorageIntroduction to OpenStack Storage
Introduction to OpenStack Storage
NetApp
 
Docker Based Hadoop Provisioning
Docker Based Hadoop ProvisioningDocker Based Hadoop Provisioning
Docker Based Hadoop Provisioning
DataWorks Summit
 
Apache CloudStack from API to UI
Apache CloudStack from API to UIApache CloudStack from API to UI
Apache CloudStack from API to UI
CloudStack - Open Source Cloud Computing Project
 
Is kubernetes a good choice for orchestration
Is kubernetes a good choice for orchestrationIs kubernetes a good choice for orchestration
Is kubernetes a good choice for orchestration
Samuel Dratwa
 
Build a Cloud Day - CloudStack
Build a Cloud Day - CloudStackBuild a Cloud Day - CloudStack
Build a Cloud Day - CloudStack
ke4qqq
 
Big Data on Cloud Native Platform
Big Data on Cloud Native PlatformBig Data on Cloud Native Platform
Big Data on Cloud Native Platform
Sunil Govindan
 
Cloud Computing Architecture with Open Nebula - HPC Cloud Use Cases - NASA A...
Cloud Computing Architecture with Open Nebula  - HPC Cloud Use Cases - NASA A...Cloud Computing Architecture with Open Nebula  - HPC Cloud Use Cases - NASA A...
Cloud Computing Architecture with Open Nebula - HPC Cloud Use Cases - NASA A...
Ignacio M. Llorente
 
Cloud Computing Platform-CloudStack
Cloud Computing Platform-CloudStackCloud Computing Platform-CloudStack
Cloud Computing Platform-CloudStack
Arcadian Learning
 
Running OpenStack on Amazon AWS, Alex Fishman
Running OpenStack on Amazon AWS, Alex FishmanRunning OpenStack on Amazon AWS, Alex Fishman
Running OpenStack on Amazon AWS, Alex Fishman
Cloud Native Day Tel Aviv
 
HPC Cloud Computing with OpenNebula
HPC Cloud Computing with OpenNebulaHPC Cloud Computing with OpenNebula
HPC Cloud Computing with OpenNebula
Ignacio M. Llorente
 
Cloud computing and OpenStack
Cloud computing and OpenStackCloud computing and OpenStack
Cloud computing and OpenStack
Edgar Magana
 
An Intrudction to OpenStack 2017
An Intrudction to OpenStack 2017An Intrudction to OpenStack 2017
An Intrudction to OpenStack 2017
Haim Ateya
 
Simulating Heterogeneous Resources in CloudLightning
Simulating Heterogeneous Resources in CloudLightningSimulating Heterogeneous Resources in CloudLightning
Simulating Heterogeneous Resources in CloudLightning
CloudLightning
 
Build a Cloud Day - CloudStack
Build a Cloud Day - CloudStackBuild a Cloud Day - CloudStack
Build a Cloud Day - CloudStack
ke4qqq
 
Cloud computing using Eucalyptus
Cloud computing using EucalyptusCloud computing using Eucalyptus
Cloud computing using Eucalyptus
Abhishek Dey
 
OpenStack Introduction
OpenStack IntroductionOpenStack Introduction
OpenStack Introduction
Jimi Chen
 
Seminar on cloud computing by Prashant Gupta
Seminar on cloud computing by Prashant GuptaSeminar on cloud computing by Prashant Gupta
Seminar on cloud computing by Prashant Gupta
Prashant Gupta
 
Introduction to OpenStack Storage
Introduction to OpenStack StorageIntroduction to OpenStack Storage
Introduction to OpenStack Storage
NetApp
 
Docker Based Hadoop Provisioning
Docker Based Hadoop ProvisioningDocker Based Hadoop Provisioning
Docker Based Hadoop Provisioning
DataWorks Summit
 

Viewers also liked (20)

Hey Pais
Hey PaisHey Pais
Hey Pais
yellowcardigan
 
Winter in Bruch
Winter in BruchWinter in Bruch
Winter in Bruch
Alka Rao
 
Bhajan-Tu Gagar Mai Sagar
Bhajan-Tu Gagar Mai SagarBhajan-Tu Gagar Mai Sagar
Bhajan-Tu Gagar Mai Sagar
Mool Chand
 
Elvis Collectors Fdt Sony Bmg
Elvis Collectors Fdt   Sony BmgElvis Collectors Fdt   Sony Bmg
Elvis Collectors Fdt Sony Bmg
Elvis Presley Blues
 
If you have a problem, if no one else can help... and if you can find them, m...
If you have a problem, if no one else can help... and if you can find them, m...If you have a problem, if no one else can help... and if you can find them, m...
If you have a problem, if no one else can help... and if you can find them, m...
bitcoder
 
Week 16 Sight Words
Week 16 Sight WordsWeek 16 Sight Words
Week 16 Sight Words
kibentz
 
Friends are..
Friends are..Friends are..
Friends are..
Alka Rao
 
Introduction To Envido
Introduction To EnvidoIntroduction To Envido
Introduction To Envido
Richard_Morley
 
Pirates Campus Tour by Pik TrickoftheTrade
Pirates Campus Tour by Pik TrickoftheTradePirates Campus Tour by Pik TrickoftheTrade
Pirates Campus Tour by Pik TrickoftheTrade
Pik Lertsavetpong
 
цветы открытого грунта
цветы открытого грунтацветы открытого грунта
цветы открытого грунта
farcrys
 
Top Secret : I Will Not Tell it Even to Myself
Top Secret : I Will Not Tell it Even to MyselfTop Secret : I Will Not Tell it Even to Myself
Top Secret : I Will Not Tell it Even to Myself
Mool Chand
 
Elvis 1980
Elvis 1980Elvis 1980
Elvis 1980
Elvis Presley Blues
 
IA Search
IA SearchIA Search
IA Search
Sigaard
 
Give Greater - Social Media Presentation
Give Greater - Social Media PresentationGive Greater - Social Media Presentation
Give Greater - Social Media Presentation
Digital Surgeons
 
Shepherd's River Mennonite School
Shepherd's River Mennonite SchoolShepherd's River Mennonite School
Shepherd's River Mennonite School
kristenmhewitt
 
StaR Chart
StaR ChartStaR Chart
StaR Chart
soccerchase
 
Fierce and Fabulous Women's Expo
Fierce and Fabulous Women's ExpoFierce and Fabulous Women's Expo
Fierce and Fabulous Women's Expo
University of New Hampshire Health Services
 
Social Media Trending in China 2012 @ SMWHK
Social Media Trending in China 2012 @ SMWHKSocial Media Trending in China 2012 @ SMWHK
Social Media Trending in China 2012 @ SMWHK
Cohn & Wolfe
 
Winter in Bruch
Winter in BruchWinter in Bruch
Winter in Bruch
Alka Rao
 
Bhajan-Tu Gagar Mai Sagar
Bhajan-Tu Gagar Mai SagarBhajan-Tu Gagar Mai Sagar
Bhajan-Tu Gagar Mai Sagar
Mool Chand
 
If you have a problem, if no one else can help... and if you can find them, m...
If you have a problem, if no one else can help... and if you can find them, m...If you have a problem, if no one else can help... and if you can find them, m...
If you have a problem, if no one else can help... and if you can find them, m...
bitcoder
 
Week 16 Sight Words
Week 16 Sight WordsWeek 16 Sight Words
Week 16 Sight Words
kibentz
 
Friends are..
Friends are..Friends are..
Friends are..
Alka Rao
 
Introduction To Envido
Introduction To EnvidoIntroduction To Envido
Introduction To Envido
Richard_Morley
 
Pirates Campus Tour by Pik TrickoftheTrade
Pirates Campus Tour by Pik TrickoftheTradePirates Campus Tour by Pik TrickoftheTrade
Pirates Campus Tour by Pik TrickoftheTrade
Pik Lertsavetpong
 
цветы открытого грунта
цветы открытого грунтацветы открытого грунта
цветы открытого грунта
farcrys
 
Top Secret : I Will Not Tell it Even to Myself
Top Secret : I Will Not Tell it Even to MyselfTop Secret : I Will Not Tell it Even to Myself
Top Secret : I Will Not Tell it Even to Myself
Mool Chand
 
IA Search
IA SearchIA Search
IA Search
Sigaard
 
Give Greater - Social Media Presentation
Give Greater - Social Media PresentationGive Greater - Social Media Presentation
Give Greater - Social Media Presentation
Digital Surgeons
 
Shepherd's River Mennonite School
Shepherd's River Mennonite SchoolShepherd's River Mennonite School
Shepherd's River Mennonite School
kristenmhewitt
 
Social Media Trending in China 2012 @ SMWHK
Social Media Trending in China 2012 @ SMWHKSocial Media Trending in China 2012 @ SMWHK
Social Media Trending in China 2012 @ SMWHK
Cohn & Wolfe
 
Ad

Similar to Tech Days 2010 (20)

GlassFish and JavaEE, Today and Future
GlassFish and JavaEE, Today and FutureGlassFish and JavaEE, Today and Future
GlassFish and JavaEE, Today and Future
Alexis Moussine-Pouchkine
 
Powering the Next Generation Services with Java Platform - Spark IT 2010
Powering the Next Generation Services with Java Platform - Spark IT 2010Powering the Next Generation Services with Java Platform - Spark IT 2010
Powering the Next Generation Services with Java Platform - Spark IT 2010
Arun Gupta
 
Java Programming - 01 intro to java
Java Programming - 01 intro to javaJava Programming - 01 intro to java
Java Programming - 01 intro to java
Danairat Thanabodithammachari
 
Manuel - SPR - Intro to Java Language_2016
Manuel - SPR - Intro to Java Language_2016Manuel - SPR - Intro to Java Language_2016
Manuel - SPR - Intro to Java Language_2016
Manuel Fomitescu
 
Glass Fish Slides Fy2009 2
Glass Fish Slides Fy2009 2Glass Fish Slides Fy2009 2
Glass Fish Slides Fy2009 2
Abhishek Gupta
 
Glass Fish Slides Fy2009 2
Glass Fish Slides Fy2009 2Glass Fish Slides Fy2009 2
Glass Fish Slides Fy2009 2
Abhishek Gupta
 
Netbeans
NetbeansNetbeans
Netbeans
acosdt
 
Java se7 features
Java se7 featuresJava se7 features
Java se7 features
Kumaraswamy M
 
Java 7 Dolphin manjula kollipara
Java 7 Dolphin manjula kolliparaJava 7 Dolphin manjula kollipara
Java 7 Dolphin manjula kollipara
Manjula Kollipara
 
Object Oriented Programming-JAVA
Object Oriented Programming-JAVAObject Oriented Programming-JAVA
Object Oriented Programming-JAVA
Home
 
Introduction to java
Introduction to java Introduction to java
Introduction to java
Sandeep Rawat
 
Java for Recruiters
Java for RecruitersJava for Recruiters
Java for Recruiters
ph7 -
 
best java training center in chennai
best java training center in chennaibest java training center in chennai
best java training center in chennai
sathis est
 
How Java 19 Influences the Future of Your High-Scale Applications .pdf
How Java 19 Influences the Future of Your High-Scale Applications .pdfHow Java 19 Influences the Future of Your High-Scale Applications .pdf
How Java 19 Influences the Future of Your High-Scale Applications .pdf
Ana-Maria Mihalceanu
 
01. Introduction to programming with java
01. Introduction to programming with java01. Introduction to programming with java
01. Introduction to programming with java
Intro C# Book
 
Highlights from Java 10, 11 and 12 and Future of Java at Javaland 2019 By Vad...
Highlights from Java 10, 11 and 12 and Future of Java at Javaland 2019 By Vad...Highlights from Java 10, 11 and 12 and Future of Java at Javaland 2019 By Vad...
Highlights from Java 10, 11 and 12 and Future of Java at Javaland 2019 By Vad...
Vadym Kazulkin
 
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...
Codemotion
 
Java 7 and 8, what does it mean for you
Java 7 and 8, what does it mean for youJava 7 and 8, what does it mean for you
Java 7 and 8, what does it mean for you
Dmitry Buzdin
 
Java Cloud and Container Ready
Java Cloud and Container ReadyJava Cloud and Container Ready
Java Cloud and Container Ready
CodeOps Technologies LLP
 
Rajiv ranjan resume-us
Rajiv ranjan  resume-usRajiv ranjan  resume-us
Rajiv ranjan resume-us
Rajiv Ranjan
 
Powering the Next Generation Services with Java Platform - Spark IT 2010
Powering the Next Generation Services with Java Platform - Spark IT 2010Powering the Next Generation Services with Java Platform - Spark IT 2010
Powering the Next Generation Services with Java Platform - Spark IT 2010
Arun Gupta
 
Manuel - SPR - Intro to Java Language_2016
Manuel - SPR - Intro to Java Language_2016Manuel - SPR - Intro to Java Language_2016
Manuel - SPR - Intro to Java Language_2016
Manuel Fomitescu
 
Glass Fish Slides Fy2009 2
Glass Fish Slides Fy2009 2Glass Fish Slides Fy2009 2
Glass Fish Slides Fy2009 2
Abhishek Gupta
 
Glass Fish Slides Fy2009 2
Glass Fish Slides Fy2009 2Glass Fish Slides Fy2009 2
Glass Fish Slides Fy2009 2
Abhishek Gupta
 
Netbeans
NetbeansNetbeans
Netbeans
acosdt
 
Java 7 Dolphin manjula kollipara
Java 7 Dolphin manjula kolliparaJava 7 Dolphin manjula kollipara
Java 7 Dolphin manjula kollipara
Manjula Kollipara
 
Object Oriented Programming-JAVA
Object Oriented Programming-JAVAObject Oriented Programming-JAVA
Object Oriented Programming-JAVA
Home
 
Introduction to java
Introduction to java Introduction to java
Introduction to java
Sandeep Rawat
 
Java for Recruiters
Java for RecruitersJava for Recruiters
Java for Recruiters
ph7 -
 
best java training center in chennai
best java training center in chennaibest java training center in chennai
best java training center in chennai
sathis est
 
How Java 19 Influences the Future of Your High-Scale Applications .pdf
How Java 19 Influences the Future of Your High-Scale Applications .pdfHow Java 19 Influences the Future of Your High-Scale Applications .pdf
How Java 19 Influences the Future of Your High-Scale Applications .pdf
Ana-Maria Mihalceanu
 
01. Introduction to programming with java
01. Introduction to programming with java01. Introduction to programming with java
01. Introduction to programming with java
Intro C# Book
 
Highlights from Java 10, 11 and 12 and Future of Java at Javaland 2019 By Vad...
Highlights from Java 10, 11 and 12 and Future of Java at Javaland 2019 By Vad...Highlights from Java 10, 11 and 12 and Future of Java at Javaland 2019 By Vad...
Highlights from Java 10, 11 and 12 and Future of Java at Javaland 2019 By Vad...
Vadym Kazulkin
 
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...
Codemotion
 
Java 7 and 8, what does it mean for you
Java 7 and 8, what does it mean for youJava 7 and 8, what does it mean for you
Java 7 and 8, what does it mean for you
Dmitry Buzdin
 
Rajiv ranjan resume-us
Rajiv ranjan  resume-usRajiv ranjan  resume-us
Rajiv ranjan resume-us
Rajiv Ranjan
 
Ad

More from Luqman Shareef (10)

Containers virtaulization and docker
Containers virtaulization and dockerContainers virtaulization and docker
Containers virtaulization and docker
Luqman Shareef
 
Restful webservices
Restful webservicesRestful webservices
Restful webservices
Luqman Shareef
 
Scrum luqman
Scrum luqmanScrum luqman
Scrum luqman
Luqman Shareef
 
Cloud computing by Luqman
Cloud computing by LuqmanCloud computing by Luqman
Cloud computing by Luqman
Luqman Shareef
 
Ajax
AjaxAjax
Ajax
Luqman Shareef
 
Service Oriented Architecture Luqman
Service Oriented Architecture LuqmanService Oriented Architecture Luqman
Service Oriented Architecture Luqman
Luqman Shareef
 
Xml by Luqman
Xml by LuqmanXml by Luqman
Xml by Luqman
Luqman Shareef
 
Web Service Security
Web Service SecurityWeb Service Security
Web Service Security
Luqman Shareef
 
Service Oriented Architecture
Service Oriented ArchitectureService Oriented Architecture
Service Oriented Architecture
Luqman Shareef
 
J2SE 5
J2SE 5J2SE 5
J2SE 5
Luqman Shareef
 

Tech Days 2010

  • 1. Tech Days 2010 from Oracle Luqman Shareef www.luqmanshareef.com [email_address] March 24-25 2010 Hyderabad
  • 2. The event Ravichandra Kulur and band kick started the event, with flute, guitar, keyboard and drums Krishna Dhawan, Managing Director, Oracle India talked about the re-enforced commitment to Java.
  • 3.  
  • 4. Technology showcase: Be inspired Demos on Day 1 Teleporting - a new feature in Virtual Box A running Virtual Machine can be moved between different hosts across different architectures, different Operating Systems etc. A cool drawing tool in JavaFX Demos on Day 2 Java EE 6 JavaFx For Desktop, for mobile and for TV 04/05/10
  • 5. James Gosling, Father of Java gave an overview of the Java ecosystem. To run through his slides James was using an application that he developed using JavaFX
  • 6. From James presentation… 15 million JDK downloads / week 10 billion Java devices (more than number of humans on earth) 5.5 billion smart cards 2.6 billion mobile devices 100 million Java TV devices Gizmos 6.5+ million Java developers Most college grads have taken a Java course – Worldwide. “Learn once, work anywhere”
  • 7. What’s new in JDK 7 Modularity – JDK is getting bigger and bigger with the addition of new APIs. It is ought to be modularized. Project Jigsaw : The goal of this Project is to design and implement a simple, low-level module system focused narrowly upon the goal of modularizing the JDK, and to apply that system to the JDK itself. http://openjdk.java.net/projects/jigsaw/ Dynamic language support – The magic is in the virtual machine. Supports lots of scripting languages. Ex: Scala, Ruby, Groovy, Pyhon, Javascript etc. G1 (Garbage First) Garbage collector. NIO2 (New IO Improving performance of very large scale app services Compressed pointers. 32G == 4G 32 G Address space gives same performance as 4G Space
  • 8. Java EE 6 (From Arun Gupta’s presentation)
  • 9. Java EE 6 Contd…
  • 10. Java EE 6 Contd…
  • 11. Goals for the Java EE 6 Platform Flexible & Light-weight Extensible Embrace Open Source Frameworks Easier to use, develop on Continue on path set by Java EE 5
  • 12. What’s new in JEE 6? (Spec released in Dec 2009) Includes EJB 3.1, JPA 2.0, Servlets 3.0, JAX-RS 1.1, JSF 2.6, JAX-WS 2.2, Interceptors 1.1, etc. Pluggability / Extensibility – Create a playing field for third-party applications. Web profile – A fully functional, mid-size stack for modern web development. Dependency Injection – Uses the annotation facility to achieve this. GlassFish 3.0 is the reference implementation of JEE6.
  • 13. Java EE 6 Web Profile 1.0 Fully functional mid-sized profile Actively discussed in the Java EE 6 Expert Group and outside it. Technologies in web profile Servlets 3.0 JSP 2.2 EL 2.2 JSTL 1.2 EJB 3.1 Lite JTA 1.1 JPA 2.0 Bean Validation 1.0 Managed Beans 1.0 JSF 2.0 Common Annotations 1.1 Interceptors 1.1 Context & Dependency Injection 1.0
  • 14. Java EE 6 is Lightweight Pruning Make some technologies optional Pruned today, means Optional in the next release Deleted in the subsequent releases Technologies marked in Javadocs JAX-RPC, EJB 2.x Entity Beans, JAXR, JSR 88
  • 15. Java EE 6 is Extensible Embrace open source frameworks Wicket, Lift, Spring, Struts, ... Zero-configuration, drag-and-drop for web frameworks Servlets, servlet filters, context listeners for a framework get discovered and registered automatically Plug-in libraries using web fragments
  • 17. Glassfish is A community Users, Partners, Testers, Developers, ... Started in 2005 on java.net An application Server Open Source (CDDL & GPL v2) Java EE Reference Implementation
  • 18. CLI-based Administration “ asadmin” CLI utility Administrative commands can be added with each container Available as : asadmin myCommand –s1 foo –s2 bar @Service(name=”myCommand”) public class ChangeRandomCtr implements AdminCommand { @Param String s1; @Param String s2; … }
  • 19. Glassfish 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
  • 20. Oracle said .. “ GlassFish joins WebLogic Server in the best Java EE application server offering in the industry” “ GlassFish continues as the Java EE RI and as an open source project.” “ Oracle plans to add GlassFish Enterprise Server to all WebLogic offerings.” “ GlassFish also available as standalone offering.” http://blogs.sun.com/arungupta/entry/glassfish_strategy_by_oracle_sun
  • 22. What is JavaFX? It is Scripting Language to create rich media and content It is a declarative scripting language for GUI It Runs on JVM It utilizes Java class libraries The JavaFX Platform A rich client platform for crossscreen rich internet applications (RIA) and content Contains 2D graphics, Animation, Text and Media. Contains device specific elements for desktop, mobile and TV 04/05/10 Compile javafxc script.fx Run javafx script
  • 24. Some JavaFX APIs javafx.scene.geometry Circle, Polygon, Arch, Eclipse, MoveTo, … javafx.scene.paint Color, Paint, … javafx.animation Interpolatable, Interpolator, KeyFrame, Timeline … 04/05/10 Example import javafx.scene.geometry.*; import javafx.scene.paint.*; Ellipse { centerX: 50 centerY: 50 radiusX: 50 radiusY: 25 fill: Color.BLACK }
  • 25. Performance Tuning Garbage Collection 04/05/10
  • 26. Garbage Collection JVM Options Standard options : Work in all platforms -X options : May not work in some platforms -XX options : May not work in some platforms & May need additional privileges to use (There are more than 400 –XX options in Java 6 JRE) Three different Garbage Collectors Serial Collector Parallel Collector Concurrent Collector 04/05/10
  • 27. Serial vs. Parallel Vs. Concurrent GC Serial Collector Uses single thread to perform GC. Suited to most desktop applications Can be enabled with the option -XX:+UseSerialGC Parallel Collector Also known as throughput collector Performs minor collections in parallel Suited for applications running on multiprocessor or multi-threaded hardware Can be enabled with the option -XX:++UseParallelGC Concurrent Collector Performs most of its work concurrently (while the application is still running) Keeps the Garbage Collection pauses short Suited for applications for which response time is more important than overall throughput Can be enabled with the option -XX:++UseConcMarkSweepGC 04/05/10
  • 28. Memory pools for HotSpot JVM A  memory pool  represents a memory area that the JVM manages. Eden Space (heap) Pool from which memory is initially allocated for most objects. Survivor Space (heap) Pool containing objects that have survived GC of eden space. Tenured Generation (heap) Pool containing objects that have existed for some time in survivor space. Permanent Generation (non-heap) Holds all the reflective data of the virtual machine itself, such as class and method objects. With JVMs that use class data sharing, this generation is divided into read-only and read-write areas. 04/05/10
  • 29. HotSpot VM Heap Layout 04/05/10
  • 30. Garbage First (G1) GC It is new GC that is being introduced in the Java HotSpot VM in JDK 7. Experimental version of G1 has been released in Java SE 6 Update 14. It is a replacement of CMS (Concurrent Mark Sweep) GC. Features of G1 Server style GC Parallel and Concurrent Generational Compacting (Not available in CMS) Predictable (Not available in CMS) Can be enabled with the following two parameters -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC 04/05/10
  • 31. Hints for GC tuning GC Nirvana Low GC overhead Low GC pause times Good space efficiency Unfortunately, reality is you must choose any two out of the above three options. 04/05/10
  • 32. JPA 2.0 04/05/10 http://blogs.sun.com/arungupta/entry/day_2_tech_days_2010
  • 33. JPA 2.0 (JSR 317) Part of Java EE 6 and/or available standalone More sophisticated mapping and modeling options added. Expanded query language Adds Criteria API, together with Metamodel API Support for Validation EclipseLink is reference implementation Integrated in GlassFish 04/05/10
  • 34. What is new in JPA 2.0? Element collections Embeddable classes Persistently ordered lists Improved Map support More relationship mapping options Criteria API Metamodel API Validation Support Pessimistic Locking Caching Configuration 04/05/10
  • 35. Element Collection and Embeddable classes Element collections Collections of strings, integers, floats, decimals etc Collections of embeddable classes Embeddable classes Nested embeddables; embeddables with relationships 04/05/10 @Entity public class Person { @Id protected String ssn; protected String name; protected Date birthDate; . . . @ElementCollection protected Set<String> nickNames; } @Embeddable public class Address { String street; String city; . . . } @Entity public class RichPerson extends Person { . . . @ElementCollection protected Set<Address> vacationHomes; . . . }
  • 36. Java Persistence Query Language String-based SQL-like query language SELECT, FROM, WHERE, GROUP BY, ORDER BY,… Queries written over Java domain model Entities, state, relationships Supports navigation using dot-notation Mapped into SQL by the provider Supports static and dynamic use SELECT AVG (p.price) FROM Order o JOIN o.products p WHERE o.customer.address.zip = ‘94301’ 04/05/10
  • 37. Criteria API Object-based API for building queries Designed to mirror JPQL semantics Strongly typed Based on type-safe metamodel of persistent classes and relationships Heavy use of Java generics Supports object-based or string-based navigation Query construction at development time or runtime 04/05/10 EntityManager em = …; CriteriaBuilder cb = em.getCriteriaBuilder(); CriteriaQuery<ResultType> cquery = cb.createQuery(ResultType.class); Root<MyEntity> e = cquery.from(MyEntity.class); Join<MyEntity, RelatedEntity> j = e.join(…); … cquery.select(…) .where(…) .orderBy(…) .groupBy(…); TypedQuery<ResultType> tq = em.createQuery(cquery); List<ResultType> result = tq.getResultList();
  • 39. Servlet 3.0 Ease of Development Through annotation Dynamic registration of Servlets and Filters During runtime Pluggability (of 3rd-party frameworks/libs) No more tweaking of web.xml is needed Asynchronous Servlet Support Comet applications Security enhancements 04/05/10
  • 40. Annotations 04/05/10 Web.xml is not needed any more @WebServlet @WebFilter @WebListener @WebInitParam @WebServlet(urlPatterns=&quot;/simpletest&quot;, name=&quot;MyServlet&quot;, asyncSupported=true) public class SimpleServlet extends HttpServlet{ public void doGet(HttpServletRequest req,HttpServletResponse res){ // Code here } }
  • 41. Dynamic Registration of Servlets/Filters 04/05/10 public class TestServletContextListener implements ServletContextListener { @Override public void contextInitialized(ServletContextEvent sce) { ServletContext servletConext = sce.getServletContext(); // Servlets/Filters can be added during runtime ServletRegistration.Dynamic dynamic = servletContext.addServlet( &quot;DynamicServlet&quot;, &quot;com.mycom.MyServlet&quot;); dynamic.addMapping(&quot;/dynamicServlet&quot;); dynamic.setAsyncSupported(true); ....
  • 42. Asynchronous Servlet Async. Servlets are to avoid “thread starvation” in cases such as Waiting for resources like JDBC connection) Waiting for events Waiting for responses like web service responses Better scalability 04/05/10
  • 43. Pluggability (of 3rd party Frameworks) Possible to use 3rd-party frameworks and libraries without configuring in web.xml Each framework defines its own web-fragment.xml Declares its specific controller servlet Declares listener and filters Container then collects them all Order of the frameworks/libs can be specified in the web.xml A self-contained framework is provided as a jar file and placed under WEB-INF/lib web.xml (optional) WEB-INF/lib/ someframework1.jar -> META-INF/web-fragment.xml WEB-INF/lib/ someframework2.jar -> META-INF/web-fragment.xml 04/05/10 < web-fragment > <servlet> <servlet-name>MyFramework</servlet-name> <servlet-class>com.MyFrameworkServlet </servlet-class> </servlet> <servlet-mapping> <servlet-name>MyFramework</servlet-name> <url-pattern>/MyFramework</url-pattern> </servlet-mapping> ... </ web-fragment >
  • 45. EJB 3.1 Packaging in a war file EJB components can be packaged directly inside a web application archive (war file) Optional Local Interfaces One source file enough for a bean 04/05/10 @Stateless public class HelloWorldBean { // No interface public String sayHello() { return &quot;Hello World!&quot;; } }
  • 46. EJB 3.1 contd… Singleton A single instance per application Asynchronous calls 04/05/10 @Singleton public class MyCacheBean { private Map cache; public Map getCache() { … .. } public class MySampleBean { @Asynchronous public Future<Long> sendEmail(String id){ ... }
  • 47. EJB 3.1 contd… Cron-based Timer Service Cron-like syntax second [0..59], minute[0..59], hour[0..23]... dayOfMonth[1..31] dayOfWeek[0..7] or [Sun, Mon..] Etc. Embeddable Container API allows to Initialize a container Get container ctx 04/05/10 @Stateless public class WakeUpBean { @Schedule(dayOfWeek=&quot;Mon-Fri&quot;, hour=&quot;9&quot;) void wakeUp() { ... }
  • 48. EJB Lite Meets the needs of applications that require only a subset of the features provided by EJB technology. Features included Stateless, stateful, and singleton session beans Local EJB interfaces or no interfaces Interceptors Container-managed and bean-managed transactions Declarative and programmatic security Embeddable API 04/05/10
  • 49. Thank You 04/05/10 Visit www.luqmanshareef.com