ex6_73.txt
来自「j2ee core design patterns」· 文本 代码 · 共 24 行
TXT
24 行
Example 6.73 AccountDelegate
public class AccountDelegate {
public AccountProfileTO getAccountProfile(String accountId) {
AccountProfileTO accountProfile = null;
try {
AccountSessionHome home =
(AccountSessionHome) ServiceLocator.getInstance().
getEJBHome("Account", AccountSessionHome.class);
AccountSession session = home.create();
// Invoke Account Session Fa鏰de to get Account Profile
accountProfile = session.getAccountDetails(accountId);
}
catch(CreateException ex) {
// Translate the Session create exception into
// application exception
}
catch(RemoteException ex) {
// Translate the Remote exception into
// application exception
}
return accountProfile;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?