This blog records some ideas, notes, and information of my works and studies in information technology.

Wednesday, July 1, 2009

Enterprise JavaBeans, 3.0 -- Chapter 17

  1. EJB 3.0 沒有定義Authentication的方式,只有定義Authorization的Annotation
    Jboss設定Authentication的方式在Section 36.1~!!
    設定在 %JBOSS_HOME%/server/default/conf/login-config.xml
  2. 範例只有普通文字檔設定的方式,JavaWorld.TW有稍微寫資料庫Mapping的方式
    http://www.javaworld.com.tw/jute/post/view?bid=7&id=244067
    有空試試看....

情境:
1. Database 存著 User <--> Role <--> Function的關係
2. Web Client 提供使用者Login UI,之後使用者的User-Password存在 Http Session中
3. 每當使用者要呼叫 EJB Remote時,應該要從 Http Session 取得 User-Password,放入 Properties,產生 Context,lookup EJB Remote!!

Java Serializable

"並非每個實作了Serializable介面的物件都可以被Serialization,如果這個物件繼承圖上的祖先,有其中一個是不可以被Serialization,那麼這個物件就不可以被Serialization。"


所以繼承一個非Serializable的物件,implements Serializable
仍然不能網路傳輸