?? hellobean.java
字號:
//引入相關包
import javax.ejb.*;
//創建組件類
public class HelloBean implements SessionBean
{
private SessionContext sct;
//實現SessionBean接口中的setSessionContext方法
public void setSessionContext(SessionContext sct)
{
this.sct=sct;
}
//實現SessionBean接口中的ejbActivate方法
public void ejbActivate()
{
}
//實現SessionBean接口中的ejbPassivate方法
public void ejbPassivate()
{
}//實現SessionBean接口中的ejbRemove方法
public void ejbRemove()
{
}
//與生命周期接口create方法想對應的方法
public void ejbCreate()
{
}
//業務方法
public String sayHello()
{
return "hello";
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -