29. J2SE 5.0 Concurrency

Lab Exercises


    Exercise 1: ThreadPoolExecutor

    더보기



    Exercise 2: Implement Runnable interface

    더보기




    Exercise 3: Callable and Future

    더보기

     

    Exercise 4: Semaphore

    더보기


    Exercise 5: Blocking queue

    더보기




    Homework exercise (for people who are taking Sang Shin's "Java Programming online course")


    1. The homework is to modify the ServerUsingThreadPoolExecutor project you created in Exercise 1 above.   (You might want to create a new project by copying the MyServerUsingThreadPoolExecutor project.)  You can name the new project in any way you want but here I am going to call to call it as MyServerUsingThreadPoolExecutor.
    • Increase the maximum thread size to 3 (instead of 2)
    • Build and run 3 client instances (instead of 2)
    2. Send the following files to javaprogramminghomework@sun.com with Subject as JavaIntro-javase5concurrency.
    • Zip file of the the MyServerUsingThreadPoolExecutor NetBeans project.  (Someone else should be able to open and run it as a NetBeans project.)  You can use your favorite zip utility or you can use "jar" utility that comes with JDK as following.
      • cd <parent directory that contains MyServerUsingThreadPoolExecutor directory> (assuming you named your project as MyServerUsingThreadPoolExecutor)
      • jar cvf MyServerUsingThreadPoolExecutor.zip MyServerUsingThreadPoolExecutor (MyServerUsingThreadPoolExecutor directory should contain nbproject directory)
    • Captured output screen  - name it as JavaIntro-javase5concurrency.gif orJavaIntro-javase5concurrency.jpg (or JavaIntro-javase5concurrency.<whatver graphics format>)
      • Any screen capture that shows that your program is working is good enough.  No cosmetic polishment is required.
    • If you decide to use different IDE other than NetBeans, the zip file should contain all the files that are needed for rebuilding the project - war file with necessary source files is OK.




    저작자 표시

    'BOOK Study > JAVA' 카테고리의 다른 글

    29. J2SE 5.0 Concurrency  (0) 2010/01/17
    28. J2SE 5.0 Annotations  (0) 2010/01/17
    27. J2SE 5.0 Generics  (0) 2010/01/17
    26. J2SE 5.0 Language Features Enhancements  (0) 2010/01/17
    Java SE 5 Language Feature Enhancements  (0) 2010/01/13
    25. Java Threads  (0) 2010/01/11
    Trackback 0 Comment 0