<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)編輯 收藏
    主站蜘蛛池模板: 特级毛片aaaa级毛片免费| 亚洲乱码中文字幕久久孕妇黑人| 亚洲理论精品午夜电影| 免费人成在线观看网站| 亚洲国产精品无码久久久秋霞2| 国产又黄又爽又大的免费视频 | 67194在线午夜亚洲| 91短视频免费在线观看| 亚洲一区二区三区久久| AV无码免费永久在线观看| 亚洲免费福利在线视频| 成全影视免费观看大全二| 亚洲丰满熟女一区二区哦| 免费A级毛片无码A∨男男| 一级中文字幕免费乱码专区| 激情97综合亚洲色婷婷五| 三级网站免费观看| 久久亚洲AV无码精品色午夜麻豆| 1000部拍拍拍18免费网站| 亚洲综合精品第一页| 免费一级大黄特色大片| 中文字幕免费观看全部电影| 亚洲成人午夜在线| 久久久久久久久免费看无码| 色欲aⅴ亚洲情无码AV蜜桃| 久久久久一级精品亚洲国产成人综合AV区| 国产A∨免费精品视频| 久久91亚洲精品中文字幕| 综合在线免费视频| 香蕉97碰碰视频免费| 亚洲人成无码网站| 国产乱子精品免费视观看片| 337P日本欧洲亚洲大胆艺术图| 亚洲综合色区在线观看| 88av免费观看入口在线| 狠狠综合亚洲综合亚洲色| 亚洲AV无码一区东京热| 在线观看视频免费国语| a级毛片视频免费观看| 亚洲人成网站看在线播放| 亚洲国产一成久久精品国产成人综合|