Benx Blog

五月 31, 2008

Diigo Diary 05/31/2008

分類於 Diigo Diary — benxshen @ 8:30 am
  • tags: apache, tutorial, htaccess, howto

  • tags: no_tag

    • Q What is the difference between Class.forName() and ClassLoader.loadClass()?

      A Both methods try to dynamically locate and load a java.lang.Class object corresponding to a given class name. However, their behavior differs regarding which java.lang.ClassLoader they use for class loading and whether or not the resulting Class object is initialized.

    • Additionally, Class.forName()’s common form initializes the loaded class. The visible effect of this is the execution of the class’s static initializers
      as well as byte code corresponding to initialization expressions of all static fields (this process occurs recursively for
      all the class’s superclasses). This differs from ClassLoader.loadClass() behavior, which delays initialization until the class is used for the first time.
    • if it is important to process all such errors at a known point in code,
      you should use a Class.forName() version that performs initialization.
  • tags: classloader, jvm, java

    • Current ClassLoader:當前類所屬的ClassLoader,在虛擬機中類之間引用,默認就是使用這個ClassLoader。另外,當你使用Class.forName(), Class.getResource()這幾個不帶ClassLoader參數的方法是,默認同樣適用當前類的ClassLoader。你可以通過方法XX.class.GetClassLoader()獲取。
    • Thread Context ClassLoader,沒一個Thread有一個相關聯繫的Context ClassLoader(由native方法建立的除外),可以通過Thread.setContextClassLoader()方法設置。如果你沒有主動設置,Thread默認集成Parent Thread的 Context ClassLoader(注意,是parent Thread 不是父類)。如果 你整個應用中都沒有對此作任何處理,那麼 所有的Thread都會以System ClassLoader作為Context ClassLoader。知道這一點很重要,因為從web服務器,java企業服務器使用一些複雜而且精巧的ClassLoader結構去實現諸如JNDI、線程池和熱部署等功能以來,這種簡單的情況越發的少見了。
    • 事實上,Context ClassLoader提供一個突破委託代理機制的後門。
  • tags: no_tag

    • Lock objects work very much like the implicit
      locks used by synchronized code.
    • As with implicit locks, only one
      thread can own a Lock object at a time.
  • tags: jdk1.5, new-features, thread

  • tags: software, freeware, download, pchome

五月 28, 2008

Diigo Diary 05/28/2008

分類於 Diigo Diary — benxshen @ 8:30 am

五月 22, 2008

Diigo Diary 05/22/2008

分類於 Diigo Diary — benxshen @ 8:32 am

五月 21, 2008

Diigo Diary 05/21/2008

分類於 Diigo Diary — benxshen @ 8:31 am

五月 20, 2008

Diigo Diary 05/20/2008

分類於 Diigo Diary — benxshen @ 8:30 am
  • tags: log4j, document, appender, howto, config

  • tags: 登山, 活動, 2008, 玉山

    • 四、活動日期

      974月至12月份第二星期四、五、六舉辦(4月份第四星期)。

       

      五、活動行程

             第一天       水里報到及室內課,水里-塔塔加

               第二天       塔塔加登山口-排雲山莊

               第三天       排雲山莊-玉山主峰-塔塔加-水里-台中(賦歸)

       

      六、活動費用:

               每人新台幣3900元整

             (含交通、食宿、200萬保險、登頂證或登頂紀念帽或神奇帽一份(三選一)、雜支等

       

       七、報名方式:

      1.    辦理梯隊上山35天前在各承辦協會網站公告開始受理報名該梯隊,額滿為止,以傳真方式報名。

      2.    活動承辦單位、辦理梯隊日期及開始受理報名時間明細表:

五月 17, 2008

Diigo Diary 05/17/2008

分類於 Diigo Diary — benxshen @ 8:31 am

五月 9, 2008

Diigo Diary 05/09/2008

分類於 Diigo Diary — benxshen @ 8:30 am

五月 8, 2008

Diigo Diary 05/08/2008

分類於 Diigo Diary — benxshen @ 8:31 am

五月 6, 2008

Diigo Diary 05/06/2008

分類於 Diigo Diary — benxshen @ 8:30 am

五月 2, 2008

Diigo Diary 05/02/2008

分類於 Diigo Diary — benxshen @ 8:31 am

在WordPress.com寫網誌.