<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    隨筆 - 41  文章 - 29  trackbacks - 0
    <2008年11月>
    2627282930311
    2345678
    9101112131415
    16171819202122
    23242526272829
    30123456

    常用鏈接

    留言簿(5)

    隨筆分類(28)

    隨筆檔案(23)

    收藏夾(6)

    Inside JVM

    Java

    java performance

    Solr

    搜索

    •  

    最新評論

    閱讀排行榜

    評論排行榜

         摘要: 本文討論了實際工作中單元測試實踐和測試驅動開發的感受和困惑,并試圖通過研究業界實踐來回答如下問題:為什么要進行單元測試,對誰進行單元測試,怎么進行單元測試。  閱讀全文
    posted @ 2010-07-13 17:34 Justin Chen 閱讀(2904) | 評論 (2)編輯 收藏
         摘要: This message is a summary based on a very good article (http://www.ibm.com/developerworks/java/library/j-ts1.html?S_TACT=105AGX02&S_CMP=EDU) and focusing on common mistakes when implementing transactions in the Java platform. The original article is aimed to discuss Transaction Strategy. Here, we just want to discuss the common mistakes on transaction management.   閱讀全文
    posted @ 2009-04-15 15:12 Justin Chen 閱讀(2884) | 評論 (0)編輯 收藏
         摘要: 從今天開始,本人將逐章翻譯《剖析SQL Server執行計劃(Dissecting SQL Server Execution Plans)》一書。該書是系列叢書《高性能SQL代碼的藝術》的第一本,來源于http://www.infoq.com/news/2009/03/SQL- Performance。該書由SQL Server專家Grant Frltchey編寫,并頗獲好評。  閱讀全文
    posted @ 2009-04-14 22:43 Justin Chen 閱讀(2304) | 評論 (0)編輯 收藏
         摘要: An Introduction to memcached - Improve Your Web Site Performance By Cache  閱讀全文
    posted @ 2009-04-12 21:29 Justin Chen 閱讀(2108) | 評論 (0)編輯 收藏
         摘要: This article is a short summary on the interview with Werner Vogels, who is the CTO of Amazon.com.   閱讀全文
    posted @ 2009-04-11 21:27 Justin Chen 閱讀(860) | 評論 (0)編輯 收藏
         摘要: This document is a summary or outline of Sun's document: Tuning Garbage collection with the 1.4.2 Hotspot JVM located here: http://java.sun.com/docs/hotspot/gc1.4.2/  閱讀全文
    posted @ 2009-04-01 17:19 Justin Chen 閱讀(1071) | 評論 (0)編輯 收藏
         摘要: Mock test is a very good way to test unit of codes. However, Mock test need lots effort on creating mock object, creating input and output parameter, and creating AugumentMatcher, and also comparing the expected result and actual results (assertions). Using Unitils can Simplify most of the manual work required by Mock Test.   閱讀全文
    posted @ 2009-03-30 22:30 Justin Chen 閱讀(2022) | 評論 (1)編輯 收藏
         摘要: Java Memory Management is one of the most important Java Core Techniques. It is worth for every developer to spend some time to learn how it works. It is also a very interesting topic. I try to provide an overview on Java Memory Management, so, some detailed are omitted in the slides, please see detailed by the Reference Links in the last page.   閱讀全文
    posted @ 2009-03-26 09:47 Justin Chen 閱讀(4718) | 評論 (11)編輯 收藏
         摘要: JDBC has been used as the major Java Database Access technique for long time. However, JDBC access always need try-catch block and repeated JDBC codes, such as connection, statement and resultset. And recently, JDK 6.0 already released a simplified JDBC access approach. This article will introduce a similar and very simple design to reduce most of JDBC codes. You don't have to repeat the traditional JDBC codes template agan and again.
      閱讀全文
    posted @ 2009-03-20 10:07 Justin Chen 閱讀(2022) | 評論 (2)編輯 收藏
         摘要: This article is trying to summarize what' the JVM GC log and how can we use it to analyse memory issues.   閱讀全文
    posted @ 2009-03-19 22:27 Justin Chen 閱讀(8516) | 評論 (2)編輯 收藏
         摘要: This article introduces three tools: P6Spy, IronTrackSQL and SQL Profiler (NOT SQL Server Profiler). Using these tools are very easy to log all SQL statements and show the detailed statistics results.  閱讀全文
    posted @ 2009-03-14 21:06 Justin Chen 閱讀(3559) | 評論 (0)編輯 收藏
         摘要: An introduction on JTracert - Runtime Sequence Diagram Generator Tool   閱讀全文
    posted @ 2009-03-11 22:42 Justin Chen 閱讀(1768) | 評論 (0)編輯 收藏
         摘要: In summary, we always met the performance result stability issue during performance testing. This article tries to explain why an java application will perform differently at different time, there are too many factors impacting this, and how can we get a more trustable results. This article is a first try to explain this topic, i hope more and more discussion will make us clearer.   閱讀全文
    posted @ 2009-03-09 23:25 Justin Chen 閱讀(1544) | 評論 (1)編輯 收藏
         摘要: Open Source Reporting Tools in Java  閱讀全文
    posted @ 2009-03-01 22:28 Justin Chen 閱讀(688) | 評論 (0)編輯 收藏
         摘要: Profiling Java Performance With Perf4j  閱讀全文
    posted @ 2009-02-22 22:00 Justin Chen 閱讀(2071) | 評論 (0)編輯 收藏
         摘要: This article will have a simple introduction on new tool – Eclipse Memory Analyzer (previously called SAP memory analyzer) and how to use this tool to find some interesting memory issues.  閱讀全文
    posted @ 2009-02-22 21:29 Justin Chen 閱讀(5779) | 評論 (0)編輯 收藏
         摘要: This message introduced the major JVM-Level problems on Java Development, such as Out of Memeory, Thread Lock etc.  閱讀全文
    posted @ 2009-01-08 22:15 Justin Chen 閱讀(3298) | 評論 (3)編輯 收藏
         摘要: Recently, there are lots of discussion regarding to QA bottleneck in our release plan, or lack of communication between Dev and QA, i’d like to share my little experiences from my previous experiences. This article describes three major mindset changes and some practical skills to help the team achieve these principles   閱讀全文
    posted @ 2008-12-10 13:39 Justin Chen 閱讀(1431) | 評論 (1)編輯 收藏
         摘要: An introduction to Java Bean Validation Framework and How to use Spring Bean Validation Framework without Spring MVC.   閱讀全文
    posted @ 2008-12-01 11:48 Justin Chen 閱讀(4806) | 評論 (1)編輯 收藏
         摘要: This article is to explain how solr cache works  閱讀全文
    posted @ 2008-11-11 15:05 Justin Chen 閱讀(1725) | 評論 (0)編輯 收藏

    The previous message only explains how to create service, this message will describe how to create client and invoke server side. Actually, JSR-311 only defined the server API, so, each vendor will have different ideas on client. But one common way is to use Apache Http Common Client lib. Please see following examples.

    1. GET a customer

    // Sent HTTP GET request to query customer info

    System.out.println(
    "Sent HTTP GET request to query customer info");

    URL url 
    = new URL("http://localhost:8080/vendor_search/services/customerservice/customers/123");

    InputStream in 
    = url.openStream();

    System.out.println(getStringFromInputStream(in)); 
    //NOTE, return an input stream, you need convert xml to Java Object by yourself
    2. Use PUT to update a customer


    System.out.println("Sent HTTP PUT request to update customer info");

    Client client 
    = new Client();

    String inputFile 
    = client.getClass().getResource("update_customer.txt").getFile();

    File input 
    = new File(inputFile);

    PutMethod put 
    = new PutMethod("http://localhost:8080/vendor_search/services/customerservice/customers");

    RequestEntity entity 
    = new FileRequestEntity(input, "text/xml; charset=ISO-8859-1");

    put.setRequestEntity(entity);

    HttpClient httpclient 
    = new HttpClient();



    try {

    int result = httpclient.executeMethod(put);

    System.out.println(
    "Response status code: " + result);

    System.out.println(
    "Response body: ");

    System.out.println(put.getResponseBodyAsString());

    finally {

    // Release current connection to the connection pool once you are

    // done

    put.releaseConnection();

    }
    3. Use POST to add a customer

    System.out.println(
    "Sent HTTP POST request to add customer");

    inputFile 
    = client.getClass().getResource("add_customer.txt").getFile();

    input 
    = new File(inputFile);

    PostMethod post 
    = new PostMethod("http://localhost:8080/vendor_search/services/customerservice/customers");

    post.addRequestHeader(
    "Accept" , "text/xml");

    entity 
    = new FileRequestEntity(input, "text/xml; charset=ISO-8859-1");

    post.setRequestEntity(entity);

    httpclient 
    = new HttpClient();



    try {

    int result = httpclient.executeMethod(post);

    System.out.println(
    "Response status code: " + result);

    System.out.println(
    "Response body: ");

    System.out.println(post.getResponseBodyAsString());

    finally {

    // Release current connection to the connection pool once you are

    // done

    post.releaseConnection();

    }

    So, for this way provided by Apach Common Http Client, the user still need think about the convention from XML to POJO. It is not so convenience. We will provide a utility class to simply this process.

    posted @ 2008-11-05 22:48 Justin Chen 閱讀(1851) | 評論 (0)編輯 收藏
         摘要: The first article of a series of implementing Restful web service with CXF. This one focus on a very simple service and how to config it in Tomcat container.   閱讀全文
    posted @ 2008-11-05 18:24 Justin Chen 閱讀(3516) | 評論 (1)編輯 收藏
         摘要: This message gives us a brief introduction on Restful web service (All of these information comes from internet and i just re-organized them) and some thoughts on how can we apply this new architecture pattern into our common service services.  閱讀全文
    posted @ 2008-11-05 10:43 Justin Chen 閱讀(2110) | 評論 (3)編輯 收藏
    主站蜘蛛池模板: 久久久久亚洲AV无码专区网站 | 亚洲精品美女久久7777777| 狠狠久久永久免费观看| 亚洲大片免费观看| 一级毛片在线观看免费| 久久综合图区亚洲综合图区| 亚洲AV无码AV男人的天堂| 在线看片免费人成视频久网下载| 精品国产人成亚洲区| sss日本免费完整版在线观看| 日韩精品免费在线视频| 一二三四视频在线观看中文版免费| 亚洲男人第一av网站| 久久A级毛片免费观看| 亚洲色欲www综合网| 可以免费看的卡一卡二| 亚洲国产乱码最新视频| a级毛片免费全部播放无码| 久久亚洲国产欧洲精品一| 亚洲а∨天堂久久精品9966| 成年女人免费v片| 国产l精品国产亚洲区在线观看| 免费网站观看WWW在线观看| 午夜亚洲国产理论秋霞| 国产精品视频免费| 亚洲精品成人片在线播放| 伊人久久免费视频| 亚洲欧洲日韩极速播放| 国产精品黄页在线播放免费| 水蜜桃视频在线观看免费| 亚洲伊人久久精品影院| 在线人成精品免费视频| 亚洲另类无码专区首页| 成人在线免费看片| 成人精品国产亚洲欧洲| 97性无码区免费| 国产精品久久亚洲一区二区| 成人免费午夜视频| 一级毛片在线免费视频| 亚洲国产专区一区| 91高清免费国产自产拍2021|