Java 6 [Mustang] - Features and Enchantments

5,756 views

Published on

find the full lecture on
http://www.pavel-kaminsky.com/uncategorized/java-6-mustang/

Published in: Education, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
5,756
On SlideShare
0
From Embeds
0
Number of Embeds
1,397
Actions
Shares
0
Downloads
62
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Java 6 [Mustang] - Features and Enchantments

  1. 1. Visit me @ www.Pavel-Kaminsky.com Java 6 : Mustang Unleashed!
  2. 2. Visit me @ www.Pavel-Kaminsky.com Source Code SVN <ul><li>All Sources can be checked out (SVN) </li></ul><ul><li>from here: </li></ul><ul><ul><li>http://code.google.com/p/java6-features/ </li></ul></ul>
  3. 3. What’s New? <ul><li>Web Services </li></ul><ul><li>Scripting </li></ul><ul><li>Database </li></ul><ul><li>More Desktop APIs </li></ul><ul><li>Monitoring and Management </li></ul><ul><li>Compiler Access </li></ul><ul><li>Pluggable Annotations </li></ul><ul><li>Desktop Deployment </li></ul><ul><li>Security </li></ul><ul><li>Performance and Quality </li></ul>Visit me @ www.Pavel-Kaminsky.com
  4. 4. Language Enhancements in Java SE 6 <ul><li>No language changes were introduced in Java SE 6 !!!!!!!!! </li></ul><ul><li>where is my “syntactic sugar”?! </li></ul>Visit me @ www.Pavel-Kaminsky.com
  5. 5. What’s New? <ul><li>Web Services </li></ul><ul><li>Scripting </li></ul><ul><li>Database </li></ul><ul><li>More Desktop APIs </li></ul><ul><li>Monitoring and Management </li></ul><ul><li>Compiler Access </li></ul><ul><li>Pluggable Annotations </li></ul><ul><li>Desktop Deployment </li></ul><ul><li>Security </li></ul><ul><li>Performance and Quality </li></ul>Visit me @ www.Pavel-Kaminsky.com
  6. 6. Visit me @ www.Pavel-Kaminsky.com JAX-WS 2.0 (JSR 224) <ul><li>includes </li></ul><ul><ul><li>“ Java Architecture for XML Binding” (JAXB) 2.0. </li></ul></ul><ul><ul><li>“ SOAP with Attachments API for Java” (SAAJ) 1.3. </li></ul></ul>
  7. 7. Visit me @ www.Pavel-Kaminsky.com @WebService package webServices; import javax.jws.WebService; import javax.xml.ws.Endpoint; /** * @Author: webmaster@pavel-kaminsky.com * @Date: 11/09/11 */ @WebService public class CalculatorWS { public int add(int a , int b) { return a+b; } public static void main(String[] args) { Endpoint.publish(&quot;http://localhost:8080/calculator&quot;,new CalculatorWS()); } }
  8. 8. What’s New? <ul><li>Web Services </li></ul><ul><li>Scripting </li></ul><ul><li>Database </li></ul><ul><li>More Desktop APIs </li></ul><ul><li>Monitoring and Management </li></ul><ul><li>Compiler Access </li></ul><ul><li>Pluggable Annotations </li></ul><ul><li>Desktop Deployment </li></ul><ul><li>Security </li></ul><ul><li>Performance and Quality </li></ul>Visit me @ www.Pavel-Kaminsky.com
  9. 9. Scripting (JSR 223) <ul><li>Scripting language independent framework for using script engines from Java code </li></ul><ul><li>Write customizable/extendable applications in the Java language and leave the customization scripting language choice to the end user </li></ul><ul><li>The Java application developer need not choose the extension language during development </li></ul><ul><li>Sun's implementation of JDK 6 is co-bundled with the  Mozilla Rhino  based JavaScript script engine. </li></ul>Visit me @ www.Pavel-Kaminsky.com
  10. 10. Scripting – example <ul><li>package scripting.example2; </li></ul><ul><li>/** </li></ul><ul><li>* @Author: pavel.kaminsky@hp.com </li></ul><ul><li>* @Date: 31/08/11 </li></ul><ul><li>*/ </li></ul><ul><li>import javax.script.*; </li></ul><ul><li>import java.io.File; </li></ul><ul><li>public class InvokeScriptMethod { </li></ul><ul><li>public static void main(String[] args) throws Exception { </li></ul><ul><li>ScriptEngineManager manager = new ScriptEngineManager(); </li></ul><ul><li>ScriptEngine engine = manager.getEngineByName(&quot;JavaScript&quot;); </li></ul><ul><li> engine.eval(new java.io.FileReader(new File(&quot;src/scripting/example2/script.js&quot;).getAbsoluteFile())); </li></ul><ul><li> Invocable inv = (Invocable) engine; </li></ul><ul><li>// get script object on which we want to call the method </li></ul><ul><li>Object obj = engine.get(&quot;obj&quot;); </li></ul><ul><li>// invoke the method named &quot;hello&quot; on the script object &quot;obj&quot; </li></ul><ul><li>inv.invokeMethod(obj, &quot;rock&quot;, &quot;Pavel-Kaminsky.com&quot; ); </li></ul><ul><li>} </li></ul><ul><li>} </li></ul>Visit me @ www.Pavel-Kaminsky.com
  11. 11. Scripting – example <ul><li>Scripts.js var obj = new Object(); </li></ul><ul><li>obj.rock = function(name) </li></ul><ul><li>{ </li></ul><ul><li> result = name + ',Are you ready to rock?!!'; </li></ul><ul><li> print(result); </li></ul><ul><li> return result; </li></ul><ul><li>} </li></ul><ul><li>Output : Pavel Kaminsky , Are you ready to rock?!! </li></ul><ul><li>Answer: HAIL YEAH!!! </li></ul>Visit me @ www.Pavel-Kaminsky.com
  12. 12. Importing Java Packages <ul><li>package scripting.example3; </li></ul><ul><li>/** </li></ul><ul><li>* @Author: pavel.kaminsky@hp.com </li></ul><ul><li>* @Date: 31/08/11 </li></ul><ul><li>*/ </li></ul><ul><li>import javax.script.Invocable; </li></ul><ul><li>import javax.script.ScriptEngine; </li></ul><ul><li>import javax.script.ScriptEngineManager; </li></ul><ul><li>import java.io.File; </li></ul><ul><li>import java.util.ArrayList; </li></ul><ul><li>public class ScriptMethodImportPackages { </li></ul><ul><li>public static void main(String[] args) throws Exception { </li></ul><ul><li>ScriptEngineManager manager = new ScriptEngineManager(); </li></ul><ul><li>ScriptEngine engine = manager.getEngineByName(&quot;JavaScript&quot;); </li></ul><ul><li>engine.eval(new java.io.FileReader(new File(&quot;src/scripting/example3/script.js&quot;).getAbsoluteFile())); </li></ul><ul><li>Invocable inv = (Invocable) engine; </li></ul><ul><li>String myArray[] = (String[]) engine.get(&quot;myArray&quot;); </li></ul><ul><li>ArrayList yourArray = (ArrayList)engine.get(&quot;yourArray&quot;); </li></ul><ul><li>System.out.println(myArray[myArray.length-1]); </li></ul><ul><li>System.out.println(yourArray.get(yourArray.size()-1)); </li></ul><ul><li>} </li></ul><ul><li>} </li></ul>Visit me @ www.Pavel-Kaminsky.com
  13. 13. Scripting – example 1 <ul><li>Scripts.js var myArray = java.lang.reflect.Array.newInstance(java.lang.String, 1); </li></ul><ul><li>var yourArray = new java.util.ArrayList(); </li></ul><ul><li>myArray[0] = &quot;this is MY Array!&quot;; </li></ul><ul><li>yourArray.add(&quot;this is YOUR Array!&quot;); </li></ul><ul><li>Output : this is MY Array! </li></ul><ul><li>this is YOUR Array! </li></ul>Visit me @ www.Pavel-Kaminsky.com
  14. 14. What’s New? <ul><li>Web Services </li></ul><ul><li>Scripting </li></ul><ul><li>Database </li></ul><ul><li>More Desktop APIs </li></ul><ul><li>Monitoring and Management </li></ul><ul><li>Compiler Access </li></ul><ul><li>Pluggable Annotations </li></ul><ul><li>Desktop Deployment </li></ul><ul><li>Security </li></ul><ul><li>Performance and Quality </li></ul>Visit me @ www.Pavel-Kaminsky.com
  15. 15. Database <ul><li>Shipped with a Java DB ( = DB Apache Derby) </li></ul><ul><ul><li>A transactional, relational database. </li></ul></ul><ul><ul><li>storage of a database archived in a JAR file, which allows you to simply distribute the JAR file. </li></ul></ul><ul><li>Start/Stop locally : </li></ul><ul><ul><ul><li>java �jar derbyrun.jar server start 192.168.0.1 1555 </li></ul></ul></ul><ul><li>Accessed via JDBC </li></ul><ul><li>The $ JAVA_HOME/db subdirectory contains class libraries for Java DB, Sun Microsystems's distribution of the Apache Derby database technology. </li></ul>Visit me @ www.Pavel-Kaminsky.com
  16. 16. Database Example <ul><li>package database; </li></ul><ul><li>/** </li></ul><ul><li>* @Author: pavel.kaminsky@hp.com </li></ul><ul><li>* @Date: 31/08/11 </li></ul><ul><li>*/ </li></ul><ul><li>import java.sql.*; </li></ul><ul><li>public class JavaDBExample { </li></ul><ul><li>static Connection conn; </li></ul><ul><li>public static void main(String[] args) throws Exception { </li></ul><ul><li>if (args.length != 2) { </li></ul><ul><li>System.out.println(&quot;Usage: <Name> <Address>&quot;); </li></ul><ul><li>System.exit(1); </li></ul><ul><li>} </li></ul><ul><li>String dbName = &quot;UsersDB&quot;; </li></ul><ul><li>String connectionURL = &quot;jdbc:derby:&quot; + dbName + &quot;;create=true&quot;; </li></ul><ul><li>Class.forName(&quot;org.apache.derby.jdbc.EmbeddedDriver&quot;); </li></ul><ul><li>conn = DriverManager.getConnection(connectionURL); </li></ul><ul><li>// create table </li></ul><ul><li>Statement stmt = conn.createStatement(); </li></ul><ul><li>stmt.executeUpdate(&quot;CREATE TABLE USERS (ID NUMBER NOT NULL, UserName VARCHAR(250) NOT NULL)&quot;); </li></ul>Visit me @ www.Pavel-Kaminsky.com
  17. 17. <ul><li>// insert user </li></ul><ul><li>PreparedStatement psInsert = conn.prepareStatement(&quot;insert into USERS values (?,?)&quot;); </li></ul><ul><li>psInsert.setInt(1, 1); </li></ul><ul><li>psInsert.setString(2, &quot;Lenny Kravitz&quot;); </li></ul><ul><li>psInsert.executeUpdate(); </li></ul><ul><li>// load user </li></ul><ul><li>Statement usetStmt = conn.createStatement(); </li></ul><ul><li>ResultSet rs = usetStmt.executeQuery(&quot;select * from USERS&quot;); </li></ul><ul><li>while (rs.next()) { </li></ul><ul><li>System.out.println(&quot;Id: &quot; + rs.getInt(1) + &quot; Name&quot; + rs.getString(2)); </li></ul><ul><li>} </li></ul><ul><li>rs.close(); </li></ul><ul><li>} </li></ul><ul><li>} </li></ul><ul><li>Output : Id:1 Name:Lenny Kravitz </li></ul>Visit me @ www.Pavel-Kaminsky.com
  18. 18. What’s New? <ul><li>Web Services </li></ul><ul><li>Scripting </li></ul><ul><li>Database </li></ul><ul><li>More Desktop APIs </li></ul><ul><li>Monitoring and Management </li></ul><ul><li>Compiler Access </li></ul><ul><li>Pluggable Annotations </li></ul><ul><li>Desktop Deployment </li></ul><ul><li>Security </li></ul><ul><li>Performance and Quality </li></ul>Visit me @ www.Pavel-Kaminsky.com
  19. 19. java.awt.Desktop class <ul><li>Minimize the difference between the performance and integration of native applications and Java applications. </li></ul><ul><li>  Adopted JDesktop Integration Components (JDIC)  API  (http://jdic.dev.java.net/) </li></ul>Visit me @ www.Pavel-Kaminsky.com
  20. 20. Java.awt.Desktop <ul><li>public static enum Action { </li></ul><ul><li>/** </li></ul><ul><li>* Represents an &quot;open&quot; action. </li></ul><ul><li>* @see Desktop#open(java.io.File) </li></ul><ul><li>*/ </li></ul><ul><li>OPEN , </li></ul><ul><li>/** </li></ul><ul><li>* Represents an &quot;edit&quot; action. </li></ul><ul><li>* @see Desktop#edit(java.io.File) </li></ul><ul><li>*/ </li></ul><ul><li>EDIT , </li></ul><ul><li>/** </li></ul><ul><li>* Represents a &quot;print&quot; action. </li></ul><ul><li>* @see Desktop#print(java.io.File) </li></ul><ul><li>*/ </li></ul><ul><li>PRINT , </li></ul><ul><li>/** </li></ul><ul><li>* Represents a &quot;mail&quot; action. </li></ul><ul><li>* @see Desktop#mail() </li></ul><ul><li>* @see Desktop#mail(java.net.URI) </li></ul><ul><li>*/ </li></ul><ul><li>MAIL , </li></ul><ul><li>/** </li></ul><ul><li>* Represents a &quot;browse&quot; action. </li></ul><ul><li>* @see Desktop#browse(java.net.URI) </li></ul><ul><li>*/ </li></ul><ul><li>BROWSE </li></ul><ul><li>}; </li></ul>Visit me @ www.Pavel-Kaminsky.com
  21. 21. <ul><li>Desktop.isDesktopSupported() – checks whether Desktop functionality is available. </li></ul><ul><li>Desktop desktop = Desktop.getDesktop(); desktop.isSupported(Desktop.Action) – check whether the functionality is available. </li></ul><ul><li>5 New functionalities : </li></ul><ul><ul><ul><li>public void mail() throws IOException </li></ul></ul></ul><ul><ul><ul><li>public void open(File file) throws IOException </li></ul></ul></ul><ul><ul><ul><li>public void edit(File file) throws IOException </li></ul></ul></ul><ul><ul><ul><li>public void print(File file) throws IOException </li></ul></ul></ul><ul><ul><ul><li>public void browse(URI uri) throws IOException </li></ul></ul></ul><ul><ul><li>Let’s See a DEMO! </li></ul></ul>Visit me @ www.Pavel-Kaminsky.com
  22. 22. System Tray Functionality <ul><li>Now it’s possible to hook the “System Tray” </li></ul><ul><ul><li>SystemTray tray = SystemTray.getSystemTray(); </li></ul></ul><ul><ul><ul><li>public TrayIcon(Image image, String tooltip, PopupMenu popup) </li></ul></ul></ul><ul><ul><ul><li>public static boolean isSupported() </li></ul></ul></ul><ul><ul><ul><li>public void add(TrayIcon trayIcon) throws AWTException </li></ul></ul></ul><ul><ul><ul><li>public void remove(TrayIcon trayIcon) </li></ul></ul></ul><ul><ul><li>Let’s See a DEMO! </li></ul></ul><ul><li>Question : why there is no AWTException thrown on “remove” method? </li></ul>Visit me @ www.Pavel-Kaminsky.com
  23. 23. What’s New? <ul><li>Web Services </li></ul><ul><li>Scripting </li></ul><ul><li>Database </li></ul><ul><li>More Desktop APIs </li></ul><ul><li>Monitoring and Management </li></ul><ul><li>Compiler Access </li></ul><ul><li>Pluggable Annotations </li></ul><ul><li>Desktop Deployment </li></ul><ul><li>Security </li></ul><ul><li>Performance and Quality </li></ul>Visit me @ www.Pavel-Kaminsky.com
  24. 24. Monitoring and Management <ul><li>Improvements in jconsle </li></ul><ul><li>“ jps ” tool - Roll call of all the names and numbers of all the Java processes on your machine. Good for other command lines as they required id’s. </li></ul><ul><ul><ul><li>>C:Userskaminskp>jps.exe </li></ul></ul></ul><ul><ul><ul><li>>5484 </li></ul></ul></ul><ul><ul><ul><li>>5324 </li></ul></ul></ul><ul><ul><ul><li>>7816 Jps </li></ul></ul></ul><ul><li>“ jhat ” - Java Heap Analysis Tool </li></ul>Visit me @ www.Pavel-Kaminsky.com
  25. 25. Usage <ul><li>Find java application id with jps. </li></ul><ul><li>Create a dump with jmap into a file. </li></ul><ul><ul><ul><li>C:Userskaminskp>jmap -dump:file=output.txt <id> </li></ul></ul></ul><ul><li>Jhat the dump file. </li></ul><ul><ul><ul><ul><ul><li>C:Userskaminskp>jhat output.txt </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>Reading from output.txt ... </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>Dump file created Thu Sep 01 13:18:09 IDT 2011 </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>Snapshot read, resolving... </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>Resolving 45981 objects... </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>Chasing references, expect 9 dots......... </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>Eliminating duplicate references......... </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>Snapshot resolved. </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>Started HTTP server on port 7000 </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>Server is ready. </li></ul></ul></ul></ul></ul><ul><ul><ul><li>Browse to http://localhost:7000 </li></ul></ul></ul>Visit me @ www.Pavel-Kaminsky.com Let’s see an Example!
  26. 26. Personal Recommendation <ul><li>Don’t use JHat. </li></ul><ul><li>Use IBM’s MAT (Memory Analyzing Tool) instead , download here . </li></ul>Visit me @ www.Pavel-Kaminsky.com
  27. 27. What’s New? <ul><li>Web Services </li></ul><ul><li>Scripting </li></ul><ul><li>Database </li></ul><ul><li>More Desktop APIs </li></ul><ul><li>Monitoring and Management </li></ul><ul><li>Compiler Access </li></ul><ul><li>Pluggable Annotations </li></ul><ul><li>Desktop Deployment </li></ul><ul><li>Security </li></ul><ul><li>Performance and Quality </li></ul>Visit me @ www.Pavel-Kaminsky.com
  28. 28. Compiler Access ( JSR 199) <ul><li>Compile java source files from within java files </li></ul><ul><li>No need to fork into new javac.exe process </li></ul><ul><ul><li>JavaCompiler compiler = ToolProvider.getSystemJavaCompiler(); </li></ul></ul><ul><ul><li>int run(InputStream in, OutputStream out, OutputStream err, String... arguments); </li></ul></ul><ul><li>Good for IDE’s (compiling on the fly) </li></ul>Visit me @ www.Pavel-Kaminsky.com compiler.run(null, null, null, “One.java”, “Two.java”); Let’s see an Example!
  29. 29. What’s New? <ul><li>Web Services </li></ul><ul><li>Scripting </li></ul><ul><li>Database </li></ul><ul><li>More Desktop APIs </li></ul><ul><li>Monitoring and Management </li></ul><ul><li>Compiler Access </li></ul><ul><li>Pluggable Annotations </li></ul><ul><li>Desktop Deployment </li></ul><ul><li>Security </li></ul><ul><li>Performance and Quality </li></ul>Visit me @ www.Pavel-Kaminsky.com
  30. 30. Pluggable Annotations (JSR 269) <ul><li>@Annotation – remember that ?!? </li></ul><ul><li>Common annotations : </li></ul><ul><ul><ul><li>@SuppressWarnings </li></ul></ul></ul><ul><ul><ul><li>@Override </li></ul></ul></ul><ul><ul><ul><li>@Deprecated </li></ul></ul></ul><ul><li>Integrate custom annotation with compiler! </li></ul>Visit me @ www.Pavel-Kaminsky.com
  31. 31. Example (included in the example’s code) <ul><li>Let’s create a new annotation </li></ul><ul><ul><ul><li>package pluggableAnnotations; </li></ul></ul></ul><ul><ul><ul><li>import java.lang.annotation.ElementType; </li></ul></ul></ul><ul><ul><ul><li>import java.lang.annotation.Retention; </li></ul></ul></ul><ul><ul><ul><li>import java.lang.annotation.RetentionPolicy; </li></ul></ul></ul><ul><ul><ul><li>import java.lang.annotation.Target; </li></ul></ul></ul><ul><ul><ul><li>@Retention( RetentionPolicy.SOURCE ) </li></ul></ul></ul><ul><ul><ul><li>@Target( ElementType.METHOD ) </li></ul></ul></ul><ul><ul><ul><li>public @interface Borat { </li></ul></ul></ul><ul><ul><ul><li>} </li></ul></ul></ul>Visit me @ www.Pavel-Kaminsky.com
  32. 32. BoratBuilderProcessor <ul><li>package pluggableAnnotations; </li></ul><ul><li>import javax.annotation.processing.AbstractProcessor; </li></ul><ul><li>import javax.annotation.processing.RoundEnvironment; </li></ul><ul><li>import javax.annotation.processing.SupportedAnnotationTypes; </li></ul><ul><li>import javax.annotation.processing.SupportedSourceVersion; </li></ul><ul><li>import javax.lang.model.SourceVersion; </li></ul><ul><li>import javax.lang.model.element.Element; </li></ul><ul><li>import javax.lang.model.element.TypeElement; </li></ul><ul><li>import javax.tools.Diagnostic; </li></ul><ul><li>import java.util.Set; </li></ul><ul><li>@SupportedAnnotationTypes(&quot;pluggableAnnotations.Borat&quot;) </li></ul><ul><li>@SupportedSourceVersion(SourceVersion.RELEASE_6) </li></ul><ul><li>public class BoratBuilderProcessor extends AbstractProcessor { </li></ul><ul><li>@Override </li></ul><ul><li>public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) { </li></ul><ul><li>for (TypeElement typeElement : annotations) { </li></ul><ul><li>for (Element element : roundEnv.getElementsAnnotatedWith(typeElement)) { </li></ul><ul><li>this.processingEnv.getMessager().printMessage(Diagnostic.Kind.ERROR, &quot;I Like! but we don't use this method in Kazakhstan&quot;, element); </li></ul><ul><li>} </li></ul><ul><li>} </li></ul><ul><li>return true; </li></ul><ul><li>} </li></ul><ul><li>} </li></ul>Visit me @ www.Pavel-Kaminsky.com
  33. 33. Packaging <ul><li>Create an “META-INF/Services” Folder </li></ul><ul><li>Add a text file named javax.annotation.processing.Processor </li></ul><ul><li>Insert the path to BoratBuilderProcessor into the file </li></ul><ul><li>Package into Jar! </li></ul>Visit me @ www.Pavel-Kaminsky.com
  34. 34. Visual .. Visit me @ www.Pavel-Kaminsky.com
  35. 35. Create a TestApp <ul><li>Link the jar into your project (I use IntelliJ) </li></ul>Visit me @ www.Pavel-Kaminsky.com
  36. 36. Tester.java <ul><li>import pluggableAnnotations.Borat; </li></ul><ul><li>import javax.annotation.processing.Processor; </li></ul><ul><li>import java.util.ServiceLoader; </li></ul><ul><li>public class Tester { </li></ul><ul><li>@Borat </li></ul><ul><li>public static String annotateMe() { </li></ul><ul><li>return &quot;Welcome to America&quot;; </li></ul><ul><li>} </li></ul><ul><li>public static void main(String[] args) { </li></ul><ul><li>ServiceLoader<Processor> processors = ServiceLoader.load(Processor.class); </li></ul><ul><li>for (Processor processor : processors) { </li></ul><ul><li>System.out.println(processor.getClass().getSimpleName() + &quot; : &quot; + processor.getClass().getCanonicalName()); </li></ul><ul><li>} </li></ul><ul><li>System.out.println(Tester.annotateMe()); </li></ul><ul><li>} </li></ul><ul><li>} </li></ul>Visit me @ www.Pavel-Kaminsky.com
  37. 37. javac <ul><li>What do you think would happen? </li></ul>Visit me @ www.Pavel-Kaminsky.com
  38. 38. What’s New? <ul><li>Web Services </li></ul><ul><li>Scripting </li></ul><ul><li>Database </li></ul><ul><li>More Desktop APIs </li></ul><ul><li>Monitoring and Management </li></ul><ul><li>Compiler Access </li></ul><ul><li>Pluggable Annotations </li></ul><ul><li>Desktop Deployment </li></ul><ul><li>Security </li></ul><ul><li>Performance and Quality </li></ul>Visit me @ www.Pavel-Kaminsky.com
  39. 39. Visit me @ www.Pavel-Kaminsky.com Desktop Deployment <ul><li>Swing Improvements for Windows and GTK look and Feel </li></ul><ul><li>Can you tell the difference?! </li></ul>29
  40. 40. Visit me @ www.Pavel-Kaminsky.com More “Perks” <ul><li>JTable Sorting and Filtering no more customs implemantations. JTable table = new JTable(model); </li></ul><ul><li>final TableRowSorter<TableModel> sorter = new TableRowSorter<TableModel>(model); </li></ul><ul><li>table.setRowSorter(sorter); sorter.setRowFilter(RowFilter.regexFilter(text )); </li></ul><ul><li>New Modality </li></ul><ul><ul><li>Modeless – no modality </li></ul></ul><ul><ul><li>Document-modal - blocks all windows from the same document , except those from its child hierarchy </li></ul></ul><ul><ul><li>Application-modal - blocks all windows from the same application , except those from its child hierarchy </li></ul></ul><ul><ul><li>Toolkit-modal -  blocks all windows that run in the same toolkit , except those from its child hierarchy </li></ul></ul>
  41. 41. Visit me @ www.Pavel-Kaminsky.com More “Perks” <ul><li>Splash Screen – revamped </li></ul><ul><li>Security Dialogs </li></ul>
  42. 42. What’s New? <ul><li>Web Services </li></ul><ul><li>Scripting </li></ul><ul><li>Database </li></ul><ul><li>More Desktop APIs </li></ul><ul><li>Monitoring and Management </li></ul><ul><li>Compiler Access </li></ul><ul><li>Pluggable Annotations </li></ul><ul><li>Desktop Deployment </li></ul><ul><li>Security </li></ul><ul><li>Performance and Quality </li></ul>Visit me @ www.Pavel-Kaminsky.com
  43. 43. Security <ul><li>Kerberos Integration </li></ul><ul><li>Support for Smart Card I/O API </li></ul><ul><li>JAAS-based authentication using LDAP </li></ul>Visit me @ www.Pavel-Kaminsky.com
  44. 44. What’s New? <ul><li>Web Services </li></ul><ul><li>Scripting </li></ul><ul><li>Database </li></ul><ul><li>More Desktop APIs </li></ul><ul><li>Monitoring and Management </li></ul><ul><li>Compiler Access </li></ul><ul><li>Pluggable Annotations </li></ul><ul><li>Desktop Deployment </li></ul><ul><li>Security </li></ul><ul><li>Performance and Quality </li></ul>Visit me @ www.Pavel-Kaminsky.com
  45. 45. Performance Visit me @ www.Pavel-Kaminsky.com
  46. 46. Visit me @ www.Pavel-Kaminsky.com SPECjbb2005 Test <ul><li>SPECjbb2005 is an industry-standard benchmark designed to measure the server-side performance of Java runtime environments </li></ul><ul><li>SPECjbb2005 bops (business operations per second), obtained by averaging the total transaction rate in a SPECjbb2005 run from the expected peak number of warehouses, to twice the peak number of warehouses </li></ul><ul><li>Bops metric measures the overall throughput achieved by all the JVMs in a benchmark run. SPECjbb2005 bops/JVM reflects the contribution of a single JVM to the overall metric , and is thus a measure of the performance and scaling of a single JVM </li></ul><ul><li>http://www.spec.org/jbb2005/results/ </li></ul>
  47. 47. Visit me @ www.Pavel-Kaminsky.com Server Side Performance
  48. 48. Visit me @ www.Pavel-Kaminsky.com Server Side Performance
  49. 49. Visit me @ www.Pavel-Kaminsky.com Thank You! Visit and Subscribe

×