T2 reading 20101126

692 views

Published on

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

  • Be the first to like this

No Downloads
Views
Total views
692
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • T2 reading 20101126

    1. 1. T2Framework T2 @tan_go2382010/11/27 (s at) @k ro n os
    2. 2. About myself @tan_go238 T2 t2-samples T2
    3. 3. What is T2?id:shot6 Web
    4. 4. What is T2?http://domain/app/foo/bar@Page(“/foo”)public class FooPage { @GET @ActionPath(“/bar”) public Navigation bar(WebContext context){ return Forward.to(“/index.jsp”); }}
    5. 5. Why read the source code of T2? T2FWAMF
    6. 6. Internal ProcessingT2Filter
    7. 7. ContainerAdaptorT2 org.t2framework.t2.adapter.Seasar2Adapter org.t2framework.t2.adapter.SpringAdapter org.t2framework.t2.adapter.GuiceAdapter org.t2framework.t2.adapter.LucyContainerAdapterAbstractContainerAdapter
    8. 8. GlobalExceptionHandlerWebConfiguration ContainerAdapter GlobalExceptionHandler implements handlerException
    9. 9. ResolverCreatorParameterResolverActionAnnotationResolver AnnotationResolverCreatorimplementsViewDevelopmentAnnotationResolverCreatorImpl ...
    10. 10. WebApplicationContainerAdapter, rootPackage, eagerload,AnnotationResolverCreatorContext Page
    11. 11. PluginProcessorPage PluginPlugin AbstractPlugin
    12. 12. Summary
    13. 13. T2Framework Web @tan_go2382010/11/27 (s at) @k ro n os
    14. 14. Multi-threadingAgenda synchronized PluginProcessorImpl Lock object WebApplicationImpl pageDescMap classCache
    15. 15. Multi-threading
    16. 16. Multi-threading
    17. 17. Multi-threading public UnsafeValue { private int max; public void update(int value){ if(max < value) max = value; } public int get(){ return max; } }http://blogs.sun.com/javaev/entry/ java _2_ _
    18. 18. Multi-threading
    19. 19. Multi-threadingJava public class UnsafeValue { private int max; ... }
    20. 20. Multi-threading 1public UnsafeValue { private int max; public synchronized void update(int value){ if(max < value) max = value; } public synchronized int get(){ return max; }}
    21. 21. Multi-threading 2public UnsafeValue { private volatile int max; public synchronized void update(int value){ if(max < value) max = value; } public int get(){ return max; }}
    22. 22. Multi-threadingpublic UnsafeValue { private AtomicInteger max; public void update(int value){ do{ int old = max.get(); if(old >= value) break; } while(!max.compareAndSet(old, value)); } public int get(){ return max.get(); }} false
    23. 23. Multi-threading
    24. 24. Thread Safe?T2 Page
    25. 25. Thread Safe
    26. 26. Summery
    27. 27. Reading 1synchronized PluginProcessorImpl Lock object WebApplicationImpl pageDescMap classCache
    28. 28. Reading 2WebApplicationImpl pageDescMap classCache
    29. 29. ReferrenceWeb http://download.oracle.com/javase/tutorial/essential/concurrency/newlocks.html http://blogs.sun.com/javaev/entry/ java _2_ _ http://www.ibm.com/developerworks/jp/java/library/j-jtp08223/index.html http://www.stackasterisk.jp/tech/java/sjcp05_03.jsp Java

    ×